MCPcopy Index your code
hub / github.com/cheat/cheat / firstRunConfigExists

Function firstRunConfigExists

test/integration/first_run_integration_test.go:293–305  ·  view source on GitHub ↗

firstRunConfigExists checks whether a cheat config file exists under the given home directory at any of the standard locations.

(home string)

Source from the content-addressed store, hash-verified

291// firstRunConfigExists checks whether a cheat config file exists under the
292// given home directory at any of the standard locations.
293func firstRunConfigExists(home string) bool {
294 candidates := []string{
295 filepath.Join(home, ".config", "cheat", "conf.yml"),
296 filepath.Join(home, ".cheat", "conf.yml"),
297 filepath.Join(home, "AppData", "Roaming", "cheat", "conf.yml"),
298 }
299 for _, p := range candidates {
300 if _, err := os.Stat(p); err == nil {
301 return true
302 }
303 }
304 return false
305}

Callers 1

TestFirstRunIntegrationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected