feat: db migrations, encrypted passwords
All checks were successful
ci/woodpecker/tag/release Pipeline was successful
All checks were successful
ci/woodpecker/tag/release Pipeline was successful
This commit is contained in:
parent
84e5feeb81
commit
ece8280358
8 changed files with 490 additions and 65 deletions
|
@ -1,8 +1,10 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"os"
|
||||
"runtime/debug"
|
||||
|
||||
"git.nakama.town/fmartingr/butterrobot/internal/app"
|
||||
"git.nakama.town/fmartingr/butterrobot/internal/config"
|
||||
|
@ -19,15 +21,26 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Handle version command
|
||||
if len(os.Args) > 1 && os.Args[1] == "version" {
|
||||
info, ok := debug.ReadBuildInfo()
|
||||
if ok {
|
||||
fmt.Printf("ButterRobot version %s\n", info.Main.Version)
|
||||
} else {
|
||||
fmt.Println("ButterRobot. Can't determine build information.")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Initialize and run application
|
||||
application, err := app.New(cfg, logger)
|
||||
if err != nil {
|
||||
logger.Error("Failed to initialize application", "error", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
||||
if err := application.Run(); err != nil {
|
||||
logger.Error("Application error", "error", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue