2 Star 0 Fork 0

917502/go-wechat

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
doc.go 679 Bytes
一键复制 编辑 原始数据 按行查看 历史
917502 提交于 2021-04-12 16:24 +08:00 . 'init'
/*
Package wechat provide wechat-sdk for go
5行代码,开启微信API示例:
package main
import (
"net/http"
"gitee.com/fbbi/go-wechat" // 微信SDK包
)
func main() {
wechat.Debug = true
cfg := &wechat.WxConfig{
Token: "yourToken",
AppId: "yourAppID",
Secret: "yourSecret",
EncodingAESKey: "yourEncodingAesKey",
}
app := wechat.New(cfg)
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
app.VerifyURL(w, r).NewText("客服消息1").Send().NewText("客服消息2").Send().NewText("查询OK").Reply()
})
http.ListenAndServe(":9090", nil)
}
More info: https://gitee.com/fbbi/go-wechat
*/
package wechat
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fbbi/go-wechat.git
git@gitee.com:fbbi/go-wechat.git
fbbi
go-wechat
go-wechat
master

搜索帮助