Set default config on configuration error to allow listing midi connections before configuration.
This commit is contained in:
parent
8fe0a0fb2f
commit
0442655a93
3 changed files with 3 additions and 2 deletions
BIN
.config.yaml.kate-swp
Normal file
BIN
.config.yaml.kate-swp
Normal file
Binary file not shown.
|
|
@ -48,7 +48,7 @@ func (a *App) ReadConfig() {
|
|||
} else if _, err := os.Stat(etcConfig); err == nil {
|
||||
configFile = etcConfig
|
||||
} else {
|
||||
log.Fatal("Unable to find a configuration file.")
|
||||
log.Println("Unable to find a configuration file.")
|
||||
}
|
||||
|
||||
// Load the configuration file.
|
||||
|
|
@ -68,6 +68,7 @@ func (a *App) ReadConfig() {
|
|||
fig.Dirs(filePath),
|
||||
)
|
||||
if err != nil {
|
||||
app.config = config
|
||||
log.Printf("Error parsing configuration: %s\n", err)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
2
main.go
2
main.go
|
|
@ -15,7 +15,7 @@ import (
|
|||
const (
|
||||
serviceName = "midi-request-trigger"
|
||||
serviceDescription = "Takes trigger MIDI messages by HTTP or MQTT requests and trigger HTTP or MQTT requests by MIDI messages"
|
||||
serviceVersion = "0.2"
|
||||
serviceVersion = "0.2.1"
|
||||
)
|
||||
|
||||
// App is the global application structure for communicating between servers and storing information.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue