Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nebraska/main: fix error formatting #825

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions backend/cmd/nebraska/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ func main() {
// config parse
conf, err := config.Parse()
if err != nil {
log.Fatalf("Error parsing config, err: %w", err)
log.Fatal("Error parsing config, err: ", err)
}

// validate config
err = conf.Validate()
if err != nil {
log.Fatalf("Config is invaliad, err: %w\n", err)
log.Fatal("Config is invalid, err: ", err)
}

if conf.RollbackDBTo != "" {
db, err := db.New()
if err != nil {
log.Fatal("DB connection err:", err)
log.Fatal("DB connection err: ", err)
}

count, err := db.MigrateDown(conf.RollbackDBTo)
if err != nil {
log.Fatal("DB migration down err:", err)
log.Fatal("DB migration down err: ", err)
}
log.Infof("DB migration down successful, migrated %d levels down", count)
return
Expand All @@ -43,7 +43,7 @@ func main() {
// create new DB
db, err := db.NewWithMigrations()
if err != nil {
log.Fatal("DB connection err:", err)
log.Fatal("DB connection err: ", err)
}

// setup logger
Expand All @@ -57,7 +57,7 @@ func main() {
if conf.EnableSyncer {
syncer, err := syncer.Setup(conf, db)
if err != nil {
log.Fatalf("Syncer setup error: %w\n", err)
log.Fatal("Syncer setup error:", err)
}
go syncer.Start()
defer syncer.Stop()
Expand All @@ -66,12 +66,12 @@ func main() {
// setup and instrument metrics
err = metrics.RegisterAndInstrument(db)
if err != nil {
log.Fatalf("Metrics register error: %w\n", err)
log.Fatal("Metrics register error:", err)
}

server, err := server.New(conf, db)
if err != nil {
log.Fatalf("Server setup error: %w\n", err)
log.Fatal("Server setup error:", err)
}

// run server
Expand Down
Loading