MCPcopy Create free account
hub / github.com/1buran/rHttp / loadOverrideSettings

Function loadOverrideSettings

config.go:94–104  ·  view source on GitHub ↗
(path string, c *Config)

Source from the content-addressed store, hash-verified

92 return loadJSON(userConfig, c)
93}
94func loadOverrideSettings(path string, c *Config) error {
95 if path == "" {
96 return nil // no config path passed
97 }
98
99 if strings.HasPrefix(path, "~/") {
100 userHome, _ := os.UserHomeDir() // ignore rare cases when user home is undefined
101 path = filepath.Join(userHome, path)
102 }
103 return loadJSON(path, c)
104}
105
106func loadJSON(path string, c *Config) error {
107 b, err := os.ReadFile(path)

Callers 1

ReadConfigFunction · 0.85

Calls 1

loadJSONFunction · 0.85

Tested by

no test coverage detected