MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / getConfigPath

Function getConfigPath

token/path.go:46–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44}
45
46func getConfigPath() (string, error) {
47 configPath, err := homedir.Expand(config.DefaultConfigSearchDirectories()[0])
48 if err != nil {
49 return "", err
50 }
51 ok, err := config.FileExists(configPath)
52 if !ok && err == nil {
53 // create config directory if doesn't already exist
54 err = os.Mkdir(configPath, 0700)
55 }
56 return configPath, err
57}

Calls 2

FileExistsFunction · 0.92

Tested by

no test coverage detected