MCPcopy Create free account
hub / github.com/SamNet-dev/snix / Load

Function Load

config/config.go:108–114  ·  view source on GitHub ↗

Load reads and validates a YAML config file.

(path string)

Source from the content-addressed store, hash-verified

106
107// Load reads and validates a YAML config file.
108func Load(path string) (*Config, error) {
109 b, err := os.ReadFile(path)
110 if err != nil {
111 return nil, fmt.Errorf("config: read %s: %w", path, err)
112 }
113 return Parse(b)
114}
115
116// Parse validates a YAML document in memory. Exported so the TUI can
117// validate as the user types.

Callers 3

newAppFunction · 0.92
UpdateMethod · 0.92
loadConfigFunction · 0.92

Calls 1

ParseFunction · 0.85

Tested by

no test coverage detected