diff --git a/cmd/commands.go b/cmd/commands.go index 6b63537..af6764c 100644 --- a/cmd/commands.go +++ b/cmd/commands.go @@ -21,6 +21,6 @@ var Search = &cobra.Command{ }, } -func AddCommands() { +func init() { RootCmd.AddCommand(Search) } diff --git a/main.go b/main.go index c5d40c7..e2ea5b2 100644 --- a/main.go +++ b/main.go @@ -8,8 +8,6 @@ import ( ) func main() { - cmd.AddCommands() - if err := cmd.RootCmd.Execute(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1)