delete aliases
This commit is contained in:
parent
221fa29459
commit
f5755d5d48
|
@ -2,6 +2,7 @@ package command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"slices"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -14,7 +15,7 @@ func NewDeleteArgs() DeleteArgs {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (da DeleteArgs) Parse(main []string, flags map[string]string) (Command, error) {
|
func (da DeleteArgs) Parse(main []string, flags map[string]string) (Command, error) {
|
||||||
if len(main) < 2 || (main[0] != "delete" && main[0] != "done") {
|
if len(main) != 2 || !slices.Contains([]string{"d", "delete", "done"}, main[0]) {
|
||||||
return nil, ErrWrongCommand
|
return nil, ErrWrongCommand
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue