Compare commits

..

No commits in common. "99c57bd538e491d4c8f68d10ff46f89c9bc5205c" and "5dacfd0dfed14865b2a1f27c8832d598e3befd07" have entirely different histories.

2 changed files with 3 additions and 7 deletions

View file

@ -33,10 +33,6 @@ See [Running](#Running) for details.
See the `go.mod` file for minimum required Go version.
There are currently no dependencies apart from the Go standard library.
``` shell
go build -ldflags '-X main.version=v420.69-rc23' .
```
## Running
Set the environment variable to a comma-separated list of config files or pass the `-c` flag.

View file

@ -14,7 +14,7 @@ import (
)
const (
envConfigPath = "SPACEAPID_CONFIG_PATH"
envConfigPath = "CONFIG_PATH"
)
type pathsT []string
@ -59,7 +59,7 @@ func getConfigPaths() (paths pathsT) {
// If paths is still empty we are missing something
if len(paths) == 0 {
log.Fatalln("Error: Neither env: ", envConfigPath, "nor cli flag was specified, unable to start without config.")
log.Fatalln("Neither the env variable nor cli flag was specified, we are missing a config file.")
}
return
}
@ -91,7 +91,7 @@ func ParseConfiguration() (conf SpaceapidConfig) {
log.Fatalln("Provided file doesn't specify compatibility with API version 14")
}
// Initialize fields for environment sensors
// Initialise 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))