Skip to content

Commit

Permalink
Merge pull request #1 from eryajf/main
Browse files Browse the repository at this point in the history
docs: 修复readme中的问题
  • Loading branch information
electricbubble authored Apr 21, 2023
2 parents 5e29d87 + 586c3f3 commit b3b49a3
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,12 @@ package main

import (
"bytes"
fsBotAPI "github.com/electricbubble/feishu-bot-api"
"github.com/electricbubble/feishu-bot-api/md"
"log"
"os"
"strings"
)

func loadTestBot(wh *string, secretKey *string) {
*wh = os.Getenv("FS_BOT_WEBHOOK")
*secretKey = os.Getenv("FS_BOT_SECRET_KEY")
}
fsBotAPI "github.com/electricbubble/feishu-bot-api"
"github.com/electricbubble/feishu-bot-api/md"
)

func main() {
webhook := "https://open.feishu.cn/open-apis/bot/v2/hook/045b07bd-xxxx-xxxx-xxxx-2b49c4af1a2b"
Expand All @@ -36,8 +31,6 @@ func main() {
// 开启签名校验时使用
secretKey := "你的密钥"

loadTestBot(&webhook, &secretKey)

// 开启签名校验
bot := fsBotAPI.NewBot(webhook, fsBotAPI.WithSecretKey(secretKey))
// 如果未开启可忽略密钥 👇
Expand Down

0 comments on commit b3b49a3

Please sign in to comment.