Cobra-cli使用技巧(个人用)

82 阅读1分钟

1.写好项目逻辑

2.go build main.go ptm //把程序编译成为二进制文件

3.sudo cp ptm /usr/local/bin //这样用户打开命令行就可以直接使用ptm命令