Skip to content

Commit

Permalink
chore: refactor main.go for better code organization
Browse files Browse the repository at this point in the history
  • Loading branch information
damonto committed May 4, 2024
1 parent dda9249 commit 5efbdca
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ func init() {
flag.Parse()
}

func main() {
slog.Info("eSTK.me cloud enhance server", "version", Version)
func initApp() {
config.C.LoadEnv()

if config.C.Verbose {
slog.SetLogLoggerLevel(slog.LevelDebug)
slog.Warn("verbose mode is enabled, this will print out sensitive information")
Expand All @@ -44,6 +42,11 @@ func main() {
os.Exit(1)
}
}
}

func main() {
slog.Info("eSTK.me cloud enhance server", "version", Version)
initApp()

manager := cloud.NewManager()
server := cloud.NewServer(manager)
Expand Down

0 comments on commit 5efbdca

Please sign in to comment.