diff --git a/dist/plan b/dist/plan index b5cb59c..7470218 100755 Binary files a/dist/plan and b/dist/plan differ diff --git a/plan/command/delete.go b/plan/command/delete.go index 9d23bb3..0122609 100644 --- a/plan/command/delete.go +++ b/plan/command/delete.go @@ -14,7 +14,7 @@ func NewDeleteArgs() DeleteArgs { } func (da DeleteArgs) Parse(main []string, flags map[string]string) (Command, error) { - if len(main) < 2 || main[0] != "delete" { + if len(main) < 2 || (main[0] != "delete" && main[0] != "done") { return nil, ErrWrongCommand } @@ -71,7 +71,7 @@ func (del *Delete) Do(deps Dependencies) (CommandResult, error) { return nil, fmt.Errorf("could not delete task: %v", err) } - return nil, nil + return DeleteResult{}, nil } type DeleteResult struct{} diff --git a/plan/command/delete_test.go b/plan/command/delete_test.go index 1a1145a..3f2899a 100644 --- a/plan/command/delete_test.go +++ b/plan/command/delete_test.go @@ -42,6 +42,10 @@ func TestDelete(t *testing.T) { name: "valid", main: []string{"delete", "1"}, }, + { + name: "done", + main: []string{"done", "1"}, + }, } { t.Run(tc.name, func(t *testing.T) { // setup