0

尝试使用 运行 bundle 命令go:generate bundle -o=h2_bundle.go -prefix=http2 -tags=!nethttpomithttp2 github.com/zMrKrabz/fhttp/http2,但我得到了running "bundle": exec: "bundle": executable file not found in $PATH.

其他所有 go 命令都可以正常工作,我已经完成了go get golang.org/x/tools/cmd/bundle,但这并不能解决任何问题。

试图跑go install golang.org/x/tools/cmd/bundle,但我得到了cannot find package "." in: .../vendor/golang.org/x/tools/cmd/bundle

4

1 回答 1

0

我刚试过go get golang.org/x/tools/cmd/bundle,但我的 Go 项目文件夹之外:

C:\Users\vonc>go get golang.org/x/tools/cmd/bundle
go: downloading golang.org/x/tools v0.1.2
go: downloading golang.org/x/sys v0.0.0-20210510120138-977fb7262007

C:\Users\vonc>where bundle
C:\Users\vonc\go\bin\bundle.exe

这样,我确信我不会弄乱 go.mod 项目,尽管从Go 1.16 开始,go install应该以这种方式工作

于 2021-05-29T06:09:37.923 回答