-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/node: make loadConfig directly log any errors
The function already logged at the info level, so do the same for any messages like "creating config file". For any errors that means we can't continue, log at the fatal level directly rather than returning an error. This is a function used only by the main function, so that's fine. It also keeps our code easier to follow. We also make errors such as "failed to read config", "failed to unmarshal config", and "failed to write config" fatal, so as to not log them as warnings and silently continue. If there are any such errors, the user likely wants to correct them.
- Loading branch information
Showing
2 changed files
with
14 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters