initial commit
This commit is contained in:
28
cmd/poke/poke.go
Normal file
28
cmd/poke/poke.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func commandRoot() *cobra.Command {
|
||||
rootCmd := &cobra.Command{
|
||||
Use: "poke",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
cmd.Help()
|
||||
os.Exit(2)
|
||||
},
|
||||
}
|
||||
rootCmd.AddCommand(commandServe())
|
||||
rootCmd.AddCommand(commandVersion())
|
||||
return rootCmd
|
||||
}
|
||||
|
||||
func main() {
|
||||
if err := commandRoot().Execute(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err.Error())
|
||||
os.Exit(2)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user