in main.go [61:84]
func parseConfig(configPath string) (*config, error) {
f, err := os.Open(configPath)
if err != nil {
return nil, err
}
defer f.Close()
c := new(config)
if err := yaml.NewDecoder(f).Decode(c); err != nil {
return nil, fmt.Errorf("failed to decode config: %w", err)
}
for k, ac := range c.Agents {
if ac.Image == "" {
return nil, fmt.Errorf("custom agent %q is missing 'image' value", k)
}
if ac.ArtifactPath == "" {
return nil, fmt.Errorf("custom agent %q is missing 'artifact' value", k)
}
}
return c, nil
}