()
| 246 | } |
| 247 | |
| 248 | func createGlobalConfig() { |
| 249 | path, _ := getGlobalConfigPath() |
| 250 | if _, err := os.Stat(path); os.IsNotExist(err) { |
| 251 | cfg := GetDefaultConfig() |
| 252 | if err := SaveGlobalConfig(cfg); err != nil { |
| 253 | fmt.Printf("Error creating .lunarc: %v\n", err) |
| 254 | return |
| 255 | } |
| 256 | fmt.Println("🗸 Created .lunarc in home directory") |
| 257 | } else { |
| 258 | fmt.Println("🛈 .lunarc already exists in home directory") |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | func askForAPIKey(configType string) string { |
| 263 | fmt.Printf("→ Set API key for %s? (Enter to skip or paste)\n", configType) |
no test coverage detected