Skip to content

Commit 07ab80d

Browse files
committed
修复examples/receive-and-send配置加载逻辑 (merge request !101)
Squash merge branch 'fix_20241122_demo_recevie_and_send' into 'master' 修复examples/receive-and-send配置加载逻辑
1 parent 660d5f6 commit 07ab80d

File tree

15 files changed

+45
-44
lines changed

15 files changed

+45
-44
lines changed

dto/webhook.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ type WHValidationReq struct {
88

99
// WHValidationRsp 机器人回调验证响应结果
1010
type WHValidationRsp struct {
11-
PlainToken string `json:"plain_token"`
12-
Signature string `json:"signature"`
11+
PlainToken string `json:"plain_token"`
12+
Signature string `json:"signature"`
13+
DataVersion string `json:"data_version"` //数据格式版本号
1314
}

examples/apitest/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"testing"
88
"time"
99

10-
"gopkg.in/yaml.v2"
10+
"gopkg.in/yaml.v3"
1111

1212
"github.com/tencent-connect/botgo"
1313
"github.com/tencent-connect/botgo/openapi"
File renamed without changes.

examples/custom-filter/config.yaml.demo

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/custom-logger/config.yaml.demo

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/custom-logger/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ func main() {
3535
}
3636
// 把新的 logger 设置到 sdk 上,替换掉老的控制台 logger
3737
botgo.SetLogger(logger)
38-
3938
content, err := os.ReadFile("config.yaml")
4039
if err != nil {
4140
log.Fatalln("load config file failed, err:", err)

examples/go.mod

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ go 1.21
44

55
require (
66
github.com/google/uuid v1.3.0
7-
github.com/tencent-connect/botgo v0.0.0-00010101000000-000000000000
7+
github.com/tencent-connect/botgo v0.1.7
88
go.uber.org/zap v1.19.1
9-
gopkg.in/yaml.v2 v2.4.0
109
gopkg.in/yaml.v3 v3.0.1
1110
)
1211

@@ -22,5 +21,3 @@ require (
2221
golang.org/x/oauth2 v0.23.0 // indirect
2322
golang.org/x/sync v0.1.0 // indirect
2423
)
25-
26-
replace github.com/tencent-connect/botgo => ../

examples/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
6969
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
7070
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
7171
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
72+
github.com/tencent-connect/botgo v0.1.7 h1:+RkHW9T4WOBRGQtOcFAO52VvZEKoTXFq162k2xo0Jac=
73+
github.com/tencent-connect/botgo v0.1.7/go.mod h1:oO1sG9ybhXNickvt+CVym5khwQ+uKhTR+IhTqEfOVsI=
7274
github.com/tidwall/gjson v1.9.3 h1:hqzS9wAHMO+KVBBkLxYdkEeeFHuqr95GfClRLKlgK0E=
7375
github.com/tidwall/gjson v1.9.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
7476
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=

examples/img.png

-3.8 KB
Binary file not shown.

examples/receive-and-send/config.yaml.demo

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)