(args []string)
| 265 | } |
| 266 | |
| 267 | func splitKeyValue(args []string) (string, string, bool) { |
| 268 | switch len(args) { |
| 269 | case 1: |
| 270 | raw := args[0] |
| 271 | idx := strings.IndexByte(raw, '=') |
| 272 | if idx <= 0 { |
| 273 | return "", "", false |
| 274 | } |
| 275 | return strings.TrimSpace(raw[:idx]), strings.TrimSpace(raw[idx+1:]), true |
| 276 | case 2: |
| 277 | return args[0], args[1], true |
| 278 | default: |
| 279 | return "", "", false |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | // --- legacy CAM-config helpers (operate on the file at --config) --------- |
| 284 |