diff --git a/cmd/now.go b/cmd/now.go index a84bfb3..7c2aaa3 100644 --- a/cmd/now.go +++ b/cmd/now.go @@ -2,7 +2,6 @@ package cmd import ( "encoding/json" - "errors" "fmt" "git.sr.ht/~timharek/yr-go/yr" @@ -10,16 +9,11 @@ import ( ) var nowCmd = &cobra.Command{ - Use: "now", + Use: "now ", Aliases: []string{"current", "n"}, Short: "Get current forecasted weather", - Args: func(cmd *cobra.Command, args []string) error { - if len(args) < 1 || len(args) > 1 { - return errors.New("Need a maximum of one argument") - } - return nil - }, - Run: now, + Args: cobra.ExactArgs(1), + Run: now, } func init() {