Skip to content

Commit 8ca200a

Browse files
committed
docs: update readme
1 parent c5b0f90 commit 8ca200a

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

README.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,30 @@ export DINGTALK_TOKEN="change me"
77
export DINGTALK_SECRET="change me"
88
```
99

10-
Test sending message:
10+
Test sending messages:
1111

1212
```shell
1313
go test ./... -v
1414
```
1515

16-
Send with this SDK in Go:
16+
Send messages with this SDK in Go:
17+
18+
```shell
19+
go get -u github.com/Lonor/dingtalkbot-sdk
20+
```
1721

1822
```go
19-
bot := sdk.NewDingBot(os.Getenv("DINGTALK_TOKEN"), os.Getenv("DINGTALK_SECRET"))
20-
bot.SendSimpleText("hello world")
23+
package main
24+
25+
import (
26+
sdk "github.com/Lonor/dingtalkbot-sdk"
27+
"os"
28+
)
29+
30+
func main() {
31+
bot := sdk.NewDingBot(os.Getenv("DINGTALK_TOKEN"), os.Getenv("DINGTALK_SECRET"))
32+
_ = bot.SendSimpleText("hello world")
33+
}
2134
```
2235

2336
## LICENSE

0 commit comments

Comments
 (0)