iedc-go/vendor/github.com/silenceper/wechat/doc.go
2023-03-03 03:12:15 +08:00

34 lines
751 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
Package wechat provide wechat sdk for go
使用Golang开发的微信SDK简单、易用。
以下是一个处理消息接收以及回复的例子:
//配置微信参数
config := &wechat.Config{
AppID: "xxxx",
AppSecret: "xxxx",
Token: "xxxx",
EncodingAESKey: "xxxx",
}
wc := wechat.NewWechat(config)
// 传入request和responseWriter
server := wc.GetServer(request, responseWriter)
server.SetMessageHandler(func(msg message.MixMessage) *message.Reply {
//回复消息:演示回复用户发送的消息
text := message.NewText(msg.Content)
return &message.Reply{message.MsgText, text}
})
server.Serve()
server.Send()
更多信息https://github.com/silenceper/wechat
*/
package wechat