Cannot find the gensupport "google.golang.org/api/gensupport" in golang project with version of "google.golang.org/api"=>v0.103.0

huangapple go评论85阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年2月2日 23:17:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/75325239.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定