安装 govendor

安装 govendor

install

1
go get -u github.com/kardianos/govendor

如果按照官方的install的方法安装后提示

1
govendor command not found

则按如下方式解决

go get命令会直接编译包并存放于 $GOPATH/bin 目录下

而该目录并不在environment path中, 所以如果是windows的话就要将该目录加入到PATH环境变量中

Mac / Linux 环境下要修改 ~/.bashrc.zshrc (如果你是用zsh的话)

1
export PATH=$HOME/bin:/usr/local/bin:~/go/bin:$PATH

然后重新载入配置文件

1
2
3
4
5
source ~/.zshrc

// or

source ~/.bashrc

govendor init 报错

检查一下一下是否把默认的gopath设置在环境变量中了

.zshrc or .bashrc

1
export GOPATH=$HOME/go:$HOME/other/go

编辑完别忘了重新载入配置文件

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×