From ccf3981d8d079538975f0ad81114fc91e6f47230 Mon Sep 17 00:00:00 2001 From: Bennett Wetters Date: Sat, 3 Aug 2024 21:58:51 +0200 Subject: [PATCH] docs: Improve log output for missing config --- config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index f9d7bcd..444fd45 100644 --- a/config/config.go +++ b/config/config.go @@ -59,7 +59,7 @@ func getConfigPaths() (paths pathsT) { // If paths is still empty we are missing something if len(paths) == 0 { - log.Fatalln("Neither the env variable nor cli flag was specified, we are missing a config file.") + log.Fatalln("Error: Neither env: ", envConfigPath, "nor cli flag was specified, unable to start without config.") } return } @@ -91,7 +91,7 @@ func ParseConfiguration() (conf SpaceapidConfig) { log.Fatalln("Provided file doesn't specify compatibility with API version 14") } - // Initialise fields for environment sensors + // Initialize fields for environment sensors conf.Response.Sensors = make(map[string][]types.EnvironmentSensor) for key, sensorConfigs := range conf.Dynamic.Sensors { conf.Response.Sensors[key] = make([]types.EnvironmentSensor, len(sensorConfigs))