grep plist go.mod github.com/DHowett/go-plist v0.0.0-2018060905-6ren">
gpt4 book ai didi

go - 解析go.mod : unexpected module path "howett.net/plist"

转载 作者:行者123 更新时间:2023-12-02 03:59:53 25 4
gpt4 key购买 nike

我想导入一个 Go 模块,其 go.mod 中包含以下内容:

> grep plist go.mod
github.com/DHowett/go-plist v0.0.0-20180609054337-500bd5b9081b
howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect

但是,如果我尝试go get该包,我会收到以下错误消息:

go: github.com/DHowett/go-plist@v0.0.0-20181124034731-591f970eefbb: parsing go.mod: unexpected module path "howett.net/plist"
go get: error loading module requirements

如果我只是尝试 go get github.com/DHowett/go-plist,我也会收到此错误:

> go get github.com/DHowett/go-plist
go: finding github.com/DHowett/go-plist latest
go: github.com/DHowett/go-plist@v0.0.0-20181124034731-591f970eefbb: parsing go.mod: unexpected module path "howett.net/plist"
go: error loading module requirements

如何修复此错误以便导入该模块?

最佳答案

该模块的标识为 go.mod定义为 howett.net/plist 而不是 github.com/DHowett/go-plist

如果你运行这个,它应该可以正常工作:

go get howett.net/plist

另请参阅this entry在官方 Golang Wiki 中

关于go - 解析go.mod : unexpected module path "howett.net/plist",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58598354/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com