MCPcopy Create free account
hub / github.com/astercloud/aster / MustLoad

Function MustLoad

pkg/config/loader.go:376–383  ·  view source on GitHub ↗

MustLoad 必须成功加载配置,否则 panic

(path string)

Source from the content-addressed store, hash-verified

374
375// MustLoad 必须成功加载配置,否则 panic
376func MustLoad(path string) *types.AgentConfig {
377 loader := NewLoader()
378 config, err := loader.LoadAgentConfig(path)
379 if err != nil {
380 panic(fmt.Sprintf("failed to load config from %s: %v", path, err))
381 }
382 return config
383}

Callers

nothing calls this directly

Calls 2

LoadAgentConfigMethod · 0.95
NewLoaderFunction · 0.70

Tested by

no test coverage detected