getConfigSource returns a user-friendly description of where config is loaded from
(configPath string)
| 181 | |
| 182 | // getConfigSource returns a user-friendly description of where config is loaded from |
| 183 | func getConfigSource(configPath string) string { |
| 184 | if configPath != "" { |
| 185 | // Explicit config file specified |
| 186 | return configPath |
| 187 | } |
| 188 | |
| 189 | // Check if config file exists in standard locations |
| 190 | if foundPath, err := config.FindConfigFile(); err == nil { |
| 191 | return foundPath |
| 192 | } |
| 193 | |
| 194 | // No config file found, using defaults |
| 195 | return "defaults (no config file found)" |
| 196 | } |
no test coverage detected