package cmd import ( "github.com/spf13/cobra" ) // WelcomeMessage to introduce ofc-bootstrap const WelcomeMessage = "Welcome to faasd" func init() { rootCommand.AddCommand(versionCmd) rootCommand.AddCommand(upCmd) rootCommand.AddCommand(installCmd) } var ( // GitCommit Git Commit SHA GitCommit string // Version version of the CLI Version string ) func Execute(gitCommit, version string) error { GitCommit = gitCommit Version = version if err := rootCommand.Execute(); err != nil { return err } return nil } var rootCommand = &cobra.Command{ Use: "faasd", Short: "Start faasd", Long: ` faasd - serverless without Kubernetes `, RunE: runRootCommand, SilenceUsage: true, } func runRootCommand(cmd *cobra.Command, args []string) error { printLogo() cmd.Help() return nil }