parseUnassignFromUserConfig handles unassign-from-user configuration
(outputMap map[string]any)
| 16 | |
| 17 | // parseUnassignFromUserConfig handles unassign-from-user configuration |
| 18 | func (c *Compiler) parseUnassignFromUserConfig(outputMap map[string]any) *UnassignFromUserConfig { |
| 19 | config := parseConfigScaffold(outputMap, "unassign-from-user", unassignFromUserLog, func(err error) *UnassignFromUserConfig { |
| 20 | unassignFromUserLog.Printf("Failed to unmarshal config: %v", err) |
| 21 | // For backward compatibility, use defaults |
| 22 | unassignFromUserLog.Print("Using default configuration") |
| 23 | return &UnassignFromUserConfig{ |
| 24 | BaseSafeOutputConfig: BaseSafeOutputConfig{Max: defaultIntStr(1)}, |
| 25 | } |
| 26 | }) |
| 27 | if config == nil { |
| 28 | return nil |
| 29 | } |
| 30 | |
| 31 | // Set default max if not specified |
| 32 | if config.Max == nil { |
| 33 | config.Max = defaultIntStr(1) |
| 34 | } |
| 35 | |
| 36 | unassignFromUserLog.Printf("Parsed configuration: allowed_count=%d, target=%s", len(config.Allowed), config.Target) |
| 37 | |
| 38 | return config |
| 39 | } |
no test coverage detected