We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9753350 commit cb0fe92Copy full SHA for cb0fe92
1 file changed
internal/config/config.go
@@ -40,12 +40,8 @@ func Load() (*Config, error) {
40
viper.SetDefault("api_url", DefaultAPIURL)
41
viper.SetDefault("output_format", DefaultOutputFormat)
42
43
- // Read config file if it exists
44
- if err := viper.ReadInConfig(); err != nil {
45
- if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
46
- return nil, fmt.Errorf("failed to read config file: %w", err)
47
- }
48
+ // Read config file if it exists (ignore if not found, use defaults)
+ _ = viper.ReadInConfig()
49
50
var cfg Config
51
if err := viper.Unmarshal(&cfg); err != nil {
0 commit comments