Skip to content

Commit

Permalink
refactor(main): extract LoadConfig from if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Wabri committed Aug 30, 2024
1 parent 94b806b commit 808ec65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const (
func main() {
viper.SetConfigType("yaml")
viper.SetConfigName(constants.ConfigFileName)
if err := config.LoadConfig(); err != nil {
err := config.LoadConfig()
if err != nil {
errorMessage := "main->" + err.Error()
log.Fatal(errorMessage)
}
Expand Down

0 comments on commit 808ec65

Please sign in to comment.