-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
28 lines (23 loc) · 814 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main
import (
"github.com/theoriz0/flome-go/internal/config"
"github.com/theoriz0/flome-go/internal/database"
"github.com/theoriz0/flome-go/internal/flag"
"github.com/theoriz0/flome-go/internal/log"
"github.com/theoriz0/flome-go/internal/server"
"github.com/theoriz0/flome-go/internal/verflag"
)
func main() {
flag.ParseAndHandleHelpFlag()
verflag.PrintAndExitIfRequested()
config.ParseConfig()
log.Init(&config.GlobalConfig.Log)
defer log.Sync()
log.Info("config:", log.String("file", *config.ConfigFile))
log.Info("version:", log.String("build_date", verflag.BuildDate),
log.String("git_version", verflag.GitVersion), log.String("git_commit", verflag.GitCommit),
log.String("git_tree_state", verflag.GitTreeState),
)
database.Init(&config.GlobalConfig.Database)
server.Start()
}