fix
- check CHANGELOG.md ver 0.2.1-alpha
This commit is contained in:
1 parent
a8f164c241
commit
9434b02422
8 files changed
+59
-7
No files matched your search
@@ -1,6 +1,10 @@
|
||||
package cli
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/abelith/spellbook/internal/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func NewRmCommand(app Application) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
@@ -10,6 +14,10 @@ func NewRmCommand(app Application) *cobra.Command {
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
ctx := cmd.Context()
|
||||
|
||||
if len(args) < 1 {
|
||||
return fmt.Errorf("%w: %s", errors.ErrInsufficientArgs, "spell_name")
|
||||
}
|
||||
|
||||
return app.DeleteSpell(ctx, args[0])
|
||||
},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user