MustLoad 必须成功加载配置,否则 panic
(path string)
| 374 | |
| 375 | // MustLoad 必须成功加载配置,否则 panic |
| 376 | func 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 | } |
nothing calls this directly
no test coverage detected