cobra-cli init报 command not found

问题分析:

环境变量配置不合理报命令不存在,有两种解决方案:

解决方案:

1)使用绝对路径

go mod init <MODNAME>
~/go/bin/cobra-cli init

2)设置环境变量

export PATH="~/go/bin:$PATH"

猜你喜欢

转载自blog.csdn.net/ygq13572549874/article/details/131190958