(config editItemConfig)
| 340 | } |
| 341 | |
| 342 | func fieldIdAndProjectIdPresence(config editItemConfig) error { |
| 343 | if config.opts.fieldID == "" && config.opts.projectID == "" { |
| 344 | return cmdutil.FlagErrorf("field-id and project-id must be provided") |
| 345 | } |
| 346 | if config.opts.fieldID == "" { |
| 347 | return cmdutil.FlagErrorf("field-id must be provided") |
| 348 | } |
| 349 | if config.opts.projectID == "" { |
| 350 | // TODO: offer to fetch interactively |
| 351 | return cmdutil.FlagErrorf("project-id must be provided") |
| 352 | } |
| 353 | return nil |
| 354 | } |
no test coverage detected