solo-io / sqoop

The GraphQL Engine powered by Gloo
https://sqoop.solo.io
528 stars 42 forks source link

Fix default cli with no params #20

Closed christian-posta closed 5 years ago

christian-posta commented 5 years ago

We should either implement an interactive mode, default to showing the version, or show the help menu. This is not idea:

$ sqoopctl 

panic: not implemented

goroutine 1 [running]:
github.com/solo-io/sqoop/cli/pkg/cmd.App.func1(0xc000307900, 0x41dd168, 0x0, 0x0)
        /workspace/gopath/src/github.com/solo-io/sqoop/cli/pkg/cmd/root.go:29 +0x39
github.com/solo-io/sqoop/vendor/github.com/spf13/cobra.(*Command).execute(0xc000307900, 0xc00009c170, 0x0, 0x0, 0x0, 0x0)
        /workspace/gopath/src/github.com/solo-io/sqoop/vendor/github.com/spf13/cobra/command.go:766 +0xe3a
github.com/solo-io/sqoop/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000307900, 0xc000307900, 0x0, 0x0)
        /workspace/gopath/src/github.com/solo-io/sqoop/vendor/github.com/spf13/cobra/command.go:852 +0x6bb
github.com/solo-io/sqoop/vendor/github.com/spf13/cobra.(*Command).Execute(0xc000307900, 0x0, 0x0)
        /workspace/gopath/src/github.com/solo-io/sqoop/vendor/github.com/spf13/cobra/command.go:800 +0x3b
main.main()
        /workspace/gopath/src/github.com/solo-io/sqoop/cli/cmd/main.go:18 +0x10a
rickducott commented 5 years ago

Saw this as well, have a fix in #19 just got bogged down on updating Gloo versions.

rickducott commented 5 years ago

No longer panics, just displays usage.