英文:
Cannot find the gensupport "google.golang.org/api/gensupport" in golang project with version of "google.golang.org/api"=>v0.103.0
问题
之前我在我的go.mod文件中使用了"google.golang.org/api"=>v0.10.0
,并成功导入了"google.golang.org/api/gensupport"
。但是在新的"google.golang.org/api"=>v0.103.0
版本中,我无法导入gensupport
。我和我的同事调查后发现,gensupport
已经被移到了"google.golang.org/api/internal/gensupport"
。但是在使用这个导入语句时,会出现一个错误,提示"不允许使用内部包"。那么现在我该如何在新的"google.golang.org/api"=>v0.103.0
版本中使用gensupport
呢?
英文:
previously I was using
> "google.golang.org/api"=>v0.10.0
in my go.mod file and I was able to import
> gensupport "google.golang.org/api/gensupport"
But with new
> "google.golang.org/api"=>v0.103.0
I was unable to import gensupport and as I and my colleague have investigated, gensupport was shifted to
>"google.golang.org/api/internal/gensupport"
but while using this import there is one error saying
>Use of the internal package is not allowed
So now how I will be able to use gensupport with new "google.golang.org/api"=>v0.103.0 version.
答案1
得分: 1
你唯一的选择是供应一个旧版本的库。
这个软件包已经被标记为内部使用已经很长时间了,并且也被标记为允许出现问题。请参考https://github.com/googleapis/google-api-go-client/issues/416了解选项。
英文:
Your only option is to vendor an older version of the library.
This package has been marked for internal use for a long time and was also marked to allow for breakages. See https://github.com/googleapis/google-api-go-client/issues/416 for options.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论