CatchZeng/feishu

readme文档中的示例不正确

feeops opened this issue · 2 comments

`package main

import (
"log"

"github.com/CatchZeng/feishu"

)

func main() {
token := "6cxxxx80-xxxx-49e2-ac86-7f378xxxx960"
secret := "k6usknqxxxxazNxxxx443d"

client := feishu.NewClient(token, secret)

text := feishu.NewText("文本")
a := feishu.NewA("链接", "https://www.baidu.com/")
at := feishu.NewAT("all")
line := []feishu.PostItem{text, a, at}
msg := feishu.NewPostMessage()
msg.SetZHTitle("测试富文本 @all").
	AppendZHContent(line)

resp, err := client.Send(msg)
if err != nil {
	log.Print(err)
	return
}
log.Print(resp)

}`

其中
resp, err := client.Send(msg)

Send方法返回的三个返回值,只有两个返回值进行接收,建议改为
req, resp, err := client.Send(msg)

👍

已修正,感谢指出