gotest/cmd/root.go
2019-08-25 13:29:01 -05:00

28 lines
494 B
Go

package cmd
import (
"fmt"
"os"
"git.bloy.org/mike/gotest/version"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "gotest",
Short: "Gotest is a thing for testing out go packaging and boilerplate",
Long: "An Experiment",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Hello world!")
},
Version: version.Version.String(),
}
// Execute the root command
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}