Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

Commit

Permalink
🎨 Little code format
Browse files Browse the repository at this point in the history
  • Loading branch information
toby3d committed Jan 25, 2018
1 parent 4dfb50b commit 97759d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 1 addition & 3 deletions get_updates_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -35,7 +39,4 @@ func main() {
log.D(update)
}
}

err = db.Close()
errCheck(err)
}

0 comments on commit 97759d7

Please sign in to comment.