From cf1a6fcc681ec00d27bb5ca5b603a7a9a0b50813 Mon Sep 17 00:00:00 2001 From: iyear Date: Sun, 12 Apr 2020 09:08:06 +0800 Subject: [PATCH] Add ErrLimit --- .goreleaser.yml | 5 +++++ config.yml.example | 1 + handle.go | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 1a93ec6..6216c8b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -10,6 +10,11 @@ builds: goarch: - 386 - amd64 + - arm + - arm64 + goarm: + - 6 + - 7 checksum: name_template: '{{ .ProjectName }}_checksums.txt' archives: diff --git a/config.yml.example b/config.yml.example index 3f2d7cf..c9fdae3 100644 --- a/config.yml.example +++ b/config.yml.example @@ -2,6 +2,7 @@ bot_token: xxx #socks5: 127.0.0.1:1080 bindmax: 3 admin: 555,666,777 +errlimit: 5 notice: "aaa\nbbb" cron: "1 */3 * * *" #docker部署默认无需修改mysql配置 diff --git a/handle.go b/handle.go index c26b73d..44e1279 100644 --- a/handle.go +++ b/handle.go @@ -53,6 +53,9 @@ func init() { err := viper.ReadInConfig() CheckErr(err) + viper.SetDefault("errlimit", 5) + viper.SetDefault("bindmax", 5) + BindMaxNum = viper.GetInt("bindmax") ErrMaxTimes = viper.GetInt("errlimit") notice = viper.GetString("notice")