MCPcopy Create free account
hub / github.com/LunaSource/Luna / askForAPIKey

Function askForAPIKey

config/config.go:262–272  ·  view source on GitHub ↗
(configType string)

Source from the content-addressed store, hash-verified

260 }
261 fmt.Println(style.Success("Created .lunacfg in current directory"))
262 } else {
263 fmt.Println(style.Info(".lunacfg already exists in current directory"))
264 }
265}
266
267func createGlobalConfig() {
268 path, _ := getGlobalConfigPath()
269 if _, err := os.Stat(path); os.IsNotExist(err) {
270 cfg := GetDefaultConfig()
271 if err := SaveGlobalConfig(cfg); err != nil {
272 fmt.Println(style.Err(fmt.Sprintf("Error creating .lunarc: %v", err)))
273 return
274 }
275 fmt.Println(style.Success("Created .lunarc in home directory"))

Callers 1

initConfigInteractiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected