Skip to content

Commit

Permalink
improvement: update code
Browse files Browse the repository at this point in the history
Signed-off-by: ysicing <i@ysicing.me>
  • Loading branch information
ysicing committed Nov 18, 2020
1 parent 3fc0bd4 commit a5229b5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/ysicing/workwxbot

go 1.12
go 1.15
4 changes: 2 additions & 2 deletions message.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type AccessToken struct {
//Client 微信企业号应用配置信息
type Client struct {
CropID string
AgentID int
AgentID int64
AgentSecret string
Token AccessToken
}
Expand All @@ -59,6 +59,6 @@ type Message struct {
ToParty string `json:"toparty"`
ToTag string `json:"totag"`
MsgType string `json:"msgtype"`
AgentID int `json:"agentid"`
AgentID int64 `json:"agentid"`
Markdown Content `json:"markdown"`
}
2 changes: 1 addition & 1 deletion workwechat.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

//New 实例化微信企业号应用
func New(cropID string, agentID int, AgentSecret string) *Client {
func New(cropID string, agentID int64, AgentSecret string) *Client {

c := new(Client)
c.CropID = cropID
Expand Down
2 changes: 1 addition & 1 deletion workwechat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

func TestClient_Send(t *testing.T) {
corpid := "wwxxxx"
agentid := 1000004
agentid := int64(1000004)
secretkey := "xxxxxxx"
client := workwxbot.Client{CropID: corpid, AgentID: agentid, AgentSecret: secretkey}
msg := workwxbot.Message{
Expand Down

0 comments on commit a5229b5

Please sign in to comment.