🎨 Little code format

This commit is contained in:
Maxim Lebedev 2018-01-25 17:26:10 +05:00
parent 4dfb50b346
commit 97759d7cbf
No known key found for this signature in database
GPG Key ID: F8978F46FF0FFA4F
2 changed files with 5 additions and 6 deletions

View File

@ -42,9 +42,7 @@ func getUpdatesChannel() tg.UpdatesChannel {
)
log.Ln("Creating new webhook...")
webhook := tg.NewWebhook(
fmt.Sprint(set, listen, bot.AccessToken), nil,
)
webhook := tg.NewWebhook(fmt.Sprint(set, listen, bot.AccessToken), nil)
webhook.MaxConnections = 40
webhook.AllowedUpdates = allowedUpdates

View File

@ -14,6 +14,10 @@ func main() {
var err error
go dbInit()
defer func() {
err = db.Close()
errCheck(err)
}()
log.Ln("Initializing new bot via checking access_token...")
bot, err = tg.NewBot(cfg.UString("telegram.token"))
@ -35,7 +39,4 @@ func main() {
log.D(update)
}
}
err = db.Close()
errCheck(err)
}