工具
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
497 B

package servicegen
import (
"github.com/spf13/cobra"
"log"
)
func Command() *cobra.Command {
newCmd := &cobra.Command{
Use: "new [string to new]",
Short: "create service for hasaki",
Args: cobra.MinimumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
err := Gen(args[0])
if err != nil {
log.Printf("Error: %+v\n", err)
}
},
}
serviceCmd := &cobra.Command{
Use: "service",
Short: "service command"}
serviceCmd.AddCommand(newCmd)
return serviceCmd
}