Add ErrLimit

This commit is contained in:
iyear 2020-04-12 09:08:06 +08:00
parent 5a1158ec6f
commit cf1a6fcc68
3 changed files with 9 additions and 0 deletions

View File

@ -10,6 +10,11 @@ builds:
goarch:
- 386
- amd64
- arm
- arm64
goarm:
- 6
- 7
checksum:
name_template: '{{ .ProjectName }}_checksums.txt'
archives:

View File

@ -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配置

View File

@ -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")