我是 Go 語言的新手。我想使用此命令測試Go語言中的一些代碼。這些代碼在Go語言中測試一些代碼。go run main.go我有這個錯誤:cannot find module providing package github.com/perlin-network/noise/crypto/ed25519我試圖使用以下命令安裝它:go get github.com/perlin-network/noise/crypto/ed25519我收到此錯誤:go: finding github.com/perlin-network/noise/crypto/ed25519 latestgo: finding github.com/perlin-network/noise/crypto latestgo get github.com/perlin-network/noise/crypto/ed25519: no matching versions for query "latest"我也試過這個:go get -u github.com/perlin-network/noise錯誤:go: finding github.com/oasislabs/ed25519 latestgo: finding golang.org/x/lint latestgo: finding golang.org/x/xerrors latestgo: finding golang.org/x/crypto latestgo: github.com/oasislabs/[email protected]: parsing go.mod: unexpected module path "github.com/oasisprotocol/ed25519"go: finding golang.org/x/net latestgo get: error loading module requirements我錯過了什么嗎?
1 回答

犯罪嫌疑人X
TA貢獻2080條經驗 獲得超4個贊
自2020年8月以來,目前在perlin-network/noise
issue 287中提到了這一點,目前(2021年第二季度)沒有任何答案。
另一種方法是:
分叉存儲庫
perlin-network/noise
更新分叉中的依賴項
me/noise
在項目中使用
go mod 替換
來切換存儲庫。
但所有這些都表明你自己的項目使用go mod,所以一定要先這樣做,以便從這些依賴關系管理功能中受益。
這樣,就不需要 .go init myproject
$GOPATH/src
- 1 回答
- 0 關注
- 89 瀏覽
添加回答
舉報
0/150
提交
取消