mirror of
https://github.com/aljazceru/khatru.git
synced 2026-01-10 00:44:24 +01:00
start: propagate init errors
package users can now act accordingly on startup errors, for example by exiting with a non-zero code. this is useful when running a service, notifying a supervising process about such failures. although this is technically a breaking change, most pkg users should be unaffected since Start and StartConf returned nothing before this commit.
This commit is contained in:
@@ -75,5 +75,7 @@ func main() {
|
||||
return
|
||||
}
|
||||
r.storage = &postgresql.PostgresBackend{DatabaseURL: r.PostgresDatabase}
|
||||
relayer.Start(&r)
|
||||
if err := relayer.Start(&r); err != nil {
|
||||
relayer.Log.Fatal().Err(err).Msg("server terminated")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user