將我的 Go 服務(wù)部署到 Google AppEngine(標(biāo)準(zhǔn))時(shí),我收到一條錯(cuò)誤,描述未找到模塊版本,但一切編譯正常。這些模塊位于私有 Github 實(shí)例上并簽出到vendor/.Ago build -mod vendor -o /dev/null ./...在 cloud-build-local、本地和 Google Cloud Build 中工作。github.com/company/gosystem 上存在一個(gè)名為“v1.1.0”的標(biāo)簽:gosystem$ git tagv0.0.1v0.0.2v0.0.3v1.0.0v1.1.0Failed to build app: [go build -o /tmp/staging172777881/usr/local/bin/start .] with env [PATH=/go/bin:/usr/local/go/bin:/builder/google-cloud-sdk/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=f3f56ce621f0 HOME=/builder/home BUILDER_OUTPUT=/builder/outputs DEBIAN_FRONTEND=noninteractive GOROOT=/usr/local/go/ GOPATH=/go GO111MODULE=on GOCACHE=/tmp/cache019702820 GOPATH=/go] failed: err=exit status 1, out="go: finding github.com/pquerna/otp v1.1.0go: finding github.com/gin-gonic/gin v1.4.0go: finding github.com/pkg/errors v0.8.1go: finding github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59bego: finding github.com/gosimple/slug v1.5.0go: finding github.com/boombuler/barcode v1.0.0go: finding github.com/company/gosystem v1.1.0go: finding github.com/oblq/i18n v0.0.0-20181031085821-98eec2978e00go: finding github.com/go-pg/pg v8.0.4+incompatiblego: finding golang.org/x/text v0.3.2go: finding github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1ddgo: finding github.com/modern-go/reflect2 v1.0.1go: finding github.com/golang/protobuf v1.3.1go: finding github.com/stretchr/testify v1.3.0go: finding github.com/ugorji/go/codec v0.0.0-20190204201341-e444a5086c43go: finding github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3go: finding github.com/mattn/go-isatty v0.0.7go: github.com/company/gosystem@v1.1.0: unknown revision v1.1.0Agrep -RI 'gosystem@' *什么也沒(méi)報(bào)告。
`go build -mod vendor` 無(wú)法使用 vendored 包
BIG陽(yáng)
2023-06-19 15:43:06