MCPcopy Create free account
hub / github.com/basecamp/hey-cli / localConfigPath

Function localConfigPath

internal/config/config.go:95–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93}
94
95func localConfigPath() string {
96 // Walk up from cwd looking for .hey/config.json
97 dir, err := os.Getwd()
98 if err != nil {
99 return ""
100 }
101 for {
102 candidate := filepath.Join(dir, ".hey", configFile)
103 if _, err := os.Stat(candidate); err == nil {
104 return candidate
105 }
106 parent := filepath.Dir(dir)
107 if parent == dir {
108 break
109 }
110 dir = parent
111 }
112 return ""
113}
114
115func Load() (*Config, error) {
116 cfg := &Config{

Callers 1

LoadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected