add config
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"rockhu-bot/local/api"
|
||||
cronhu "rockhu-bot/local/utl/cron"
|
||||
"rockhu-bot/local/utl/db"
|
||||
discordrhu "rockhu-bot/local/utl/discord"
|
||||
"rockhu-bot/local/utl/server"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/robfig/cron/v3"
|
||||
|
||||
"go.uber.org/dig"
|
||||
)
|
||||
|
||||
func main() {
|
||||
godotenv.Load()
|
||||
err := godotenv.Load()
|
||||
if err != nil {
|
||||
log.Fatal("error loading .env file")
|
||||
}
|
||||
di := dig.New()
|
||||
|
||||
c := cron.New()
|
||||
di.Provide(func() *cron.Cron {
|
||||
return c
|
||||
})
|
||||
|
||||
cronhu.Init(di)
|
||||
discordrhu.Init(di)
|
||||
db.Start(di)
|
||||
server := server.Start(di)
|
||||
|
||||
Reference in New Issue
Block a user