()
| 448 | } |
| 449 | |
| 450 | func configFilePath() string { |
| 451 | // First check if there's a config file path from viper (which includes env vars and flags) |
| 452 | if configPath := viper.GetString(varConfig); len(configPath) > 0 { |
| 453 | return configPath |
| 454 | } |
| 455 | |
| 456 | // Fall back to default location if no custom path specified |
| 457 | return fmt.Sprintf("%s/cronitor.json", defaultConfigFileDirectory()) |
| 458 | } |
| 459 | |
| 460 | // parseUsers parses the CRONITOR_USERS config value into a slice of usernames |
| 461 | func parseUsers() []string { |
no test coverage detected