Improve configuration with config file
This adds explanations to the example config file, renames the file in order to enable yaml syntax highlighting and fixes the parsing of the flag specifying where to find the configuration file.
This commit is contained in:

committed by
Jan-Eric Hellenberg

parent
da38f56f64
commit
c497e2f19c
4
main.go
4
main.go
@@ -63,7 +63,9 @@ func shutdownOnOSSignal(server *http.Server) {
|
||||
}
|
||||
|
||||
func main() {
|
||||
config.InitConfig()
|
||||
if err := config.InitConfig(); err != nil {
|
||||
log.WithError(err).Warn("Could not initialize configuration")
|
||||
}
|
||||
logging.InitializeLogging(config.Config.Logger.Level)
|
||||
server := initServer()
|
||||
log.WithField("address", server.Addr).Info("Starting server")
|
||||
|
Reference in New Issue
Block a user