golang/go

cmd/go: document that go mod vendor ignores directories that do not contain Go files

Open

#57,529 创建于 2022年12月30日

在 GitHub 查看
 (7 评论) (0 反应) (0 负责人)Go (19,008 fork)batch import
DocumentationGoCommandNeedsFixhelp wanted

仓库指标

Star
 (133,883 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

What version of Go are you using (go version)?

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

What did you do?

[user@localhost:~]$ git clone https://github.com/ava-labs/avalanchego
[user@localhost:~]$ cd avalanchego
[user@localhost:avalanchego]$ go build -o /dev/null ./main
[user@localhost:avalanchego]$ go mod vendor

What did you expect to see?

[user@localhost:avalanchego]$ go build -o /dev/null ./main

What did you see instead?

[user@localhost:avalanchego]$ go build -o /dev/null ./main
# github.com/supranational/blst/bindings/go
vendor/github.com/supranational/blst/bindings/go/blst.go:16:11: fatal error: blst.h: No such file or directory
   16 | // #include "blst.h"
      |           ^~~~~~~~
compilation terminated.
# github.com/zondax/hid
vendor/github.com/zondax/hid/hid_enabled.go:23:18: fatal error: os/threads_posix.c: No such file or directory
   23 |         #include "os/threads_posix.c"
      |                  ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

贡献者指南