1 Star 0 Fork 0

waiot / kit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
makefile.go 633 Bytes
一键复制 编辑 原始数据 按行查看 历史
package root
import (
"gitee.com/waiot/kit/internal/pkg/config"
"github.com/spf13/cobra"
)
var makefileCmd = &cobra.Command{
Use: "makefile",
Aliases: []string{"mk", "mf", "m"},
Short: "Generate Makefile templates",
Long: "Generate Makefile templates",
Run: func(cmd *cobra.Command, args []string) {
cf := config.File{
Path: path,
Name: "Makefile",
Type: "makefile",
}
err = cf.Generate(name)
cobra.CheckErr(err)
},
}
func init() {
makefileCmd.Flags().StringVarP(&path, "path", "p", "./templates/makefile", "generate makefile's file templates path.")
makefileCmd.ParseFlags([]string{"path"})
}
Go
1
https://gitee.com/waiot/kit.git
git@gitee.com:waiot/kit.git
waiot
kit
kit
e5f6f6ee3716

搜索帮助