mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
make lint happy
This commit is contained in:
parent
d60acd3a47
commit
891bbb96aa
7
main.go
7
main.go
@ -7,7 +7,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/kanban" // 在最前打印 banner
|
"github.com/FloatTech/ZeroBot-Plugin/kanban" // 在最前打印 banner
|
||||||
@ -291,7 +293,10 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
rand.Seed(time.Now().UnixNano()) // 全局 seed,其他插件无需再 seed
|
if !strings.Contains(runtime.Version(), "go1.2") { // go1.20之前版本需要全局 seed,其他插件无需再 seed
|
||||||
|
rand.Seed(time.Now().UnixNano()) //nolint: staticcheck
|
||||||
|
rand.Int()
|
||||||
|
}
|
||||||
// 帮助
|
// 帮助
|
||||||
zero.OnFullMatchGroup([]string{"/help", ".help", "菜单"}, zero.OnlyToMe).SetBlock(true).
|
zero.OnFullMatchGroup([]string{"/help", ".help", "菜单"}, zero.OnlyToMe).SetBlock(true).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user