faasd/cmd/root.go
Alex Ellis (OpenFaaS Ltd) 17a5e2c625 Extract file for version command
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2019-12-31 12:18:27 +00:00

41 lines
644 B
Go

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)
}
func Execute() error {
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
}