Skip to content

Commit

Permalink
add local AddConfigPath
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Jul 7, 2024
1 parent 2a5f133 commit b967904
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ func initConfig() {
home, err := os.UserHomeDir()
cobra.CheckErr(err)

// Search config in home directory with name ".cobra" (without extension).
// Search config in home directory with name ".postal_server" (without extension).
viper.AddConfigPath(home)
viper.AddConfigPath(".")
viper.SetConfigType("yaml")
viper.SetConfigName(".postal_server")
}
Expand Down

0 comments on commit b967904

Please sign in to comment.