🔥 Removed useless files and directories

This commit is contained in:
Maxim Lebedev 2018-06-25 01:00:55 +05:00
parent c2ea3cea36
commit 2c730eb012
No known key found for this signature in database
GPG Key ID: F8978F46FF0FFA4F
2 changed files with 0 additions and 40 deletions

View File

@ -1,8 +0,0 @@
language: go
go:
- tip
install:
- go get -tags=debug
- go get -u github.com/nicksnyder/go-i18n/goi18n

View File

@ -1,32 +0,0 @@
package init
import (
log "github.com/kirillDanshin/dlog"
"github.com/toby3d/MyPackBot/internal/bot"
"github.com/toby3d/MyPackBot/internal/config"
"github.com/toby3d/MyPackBot/internal/db"
"github.com/toby3d/MyPackBot/internal/errors"
"github.com/toby3d/MyPackBot/internal/i18n"
)
// init prepare configuration and other things for successful start
func init() {
log.Ln("Initializing...")
var err error
// Preload configuration file
config.Config, err = config.Open("./configs")
errors.Check(err)
// Preload localization strings
err = i18n.Open("i18n/")
errors.Check(err)
// Open database or create new one
db.DB, err = db.Open("stickers.db")
errors.Check(err)
// Create bot with credentials from config
bot.Bot, err = bot.New(config.Config.GetString("telegram.token"))
errors.Check(err)
}