Conversation
| ModelID string `json:"model_id"` | ||
| } | ||
|
|
||
| func (r deleteModelResult) String() string { |
There was a problem hiding this comment.
What if the mode cannot be deleted since is in use?
There was a problem hiding this comment.
If the --force flag is not used, it should fail with feedback.Fatal(err.Error(), feedback.ErrGeneric).
| cmd := &cobra.Command{ | ||
| Use: "delete", | ||
| Short: "Delete the provided model", | ||
| Args: cobra.ExactArgs(1), |
There was a problem hiding this comment.
Maybe we could accept more than one model name in order to delete them all in action
There was a problem hiding this comment.
Usually we only accept one parameter when performing this kind of operations in the various CLIs we have, but I don't have a strong opinion on this matter.
There was a problem hiding this comment.
If we support multiple models, we need to define the behavior when one model can be deleted but another cannot. Should the deletion be 'all or nothing' (atomic) or 'best effort'? Unless required otherwise, I will keep it simple.
Co-authored-by: Luca Rinaldi <l.rinaldi@arduino.cc>
| func (r modelListResult) String() string { | ||
| t := table.NewWriter() | ||
| t.SetStyle(tablestyle.CustomCleanStyle) | ||
| t.AppendHeader(table.Row{"ID", "NAME", "RUNNER", "BUILTIN"}) |
There was a problem hiding this comment.
Maybe I would avoid the runner that is always "brick"
Motivation
Add
modelcli commands, following-up to themodelapi interface.Change description
Added the following cli commands:
model list [--exclude-builtin]model delete <id> [--force]Additional Notes
Reviewer checklist
main.