Golang
Jump to navigation
Jump to search
https://github.com/go-modules-by-example/index/blob/master/008_vendor_example/README.md
go mod init go mod vendor go run .
./vendor/ $GOROOT $GOPATH
src,pkg,bin
cat /etc/profile.d/go.sh export GOPATH=$HOME/go export PATH=$PATH:$GOPATH/bin export OS_OUTPUT_GOPATH=0
GOROOT="/usr/lib/go" GOPATH="/root/go"
go get github.com/RangelReale/osin go get github.com/pborman/uuid
hack/lib/build/binaries.sh OS_EXTRA_GOPATH=$GOPATH
make build hack/build-go.sh hack/lib/build/binaries.sh 228: `GOOS=${platform%/*} GOARCH=${platform##*/} go install -pkgdir "${OS_OUTPUT_PKGDIR}/${platform}" -tags "${OS_GOFLAGS_TAGS-} ${!platform_gotags_envvar:-}" -ldflags="${local_ldflags}" "${goflags[@]:+${goflags[@]}}" "${nonstatics[@]}"`
https://github.com/golang/go/wiki/GOPATH https://github.com/golang/go/issues/17262
go env export $GOPATH=$HOME/go hack/env OS_OUTPUT_GOPATH
./_output/local/pkgdir/linux/amd64/github.com/openshift/origin/vendor/github.com/RangelReale/osin.a cp /root/go/pkg/linux_amd64/github.com/RangelReale/osin.a ./_output/local/pkgdir/linux/amd64/github.com/openshift/origin/vendor/github.com/RangelReale/osin.a
Godeps/Godeps.json
"github.com/RangelReale/osin"
cd /usr/src/origin; /root/go/bin/godep restore
perl -pi -w -e 's/\"github.com\/RangelReale\/osin\"/\"github.com\/janmg\/osin\"/g;' $( grep -rl '\"github.com\/RangelReale\/osin\"' )