0

我正在使用dep来构建依赖项。

在下面的toml文件中,我在 apimachinery 中遇到了问题

# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
required = ["k8s.io/apimachinery/pkg/api/resource", "k8s.io/apimachinery/pkg/apis/meta/v1", "k8s.io/apimachinery/pkg/apis/meta/v1"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
#   name = "github.com/user/project"
#   version = "1.0.0"
#
# [[constraint]]
#   name = "github.com/user/project2"
#   branch = "dev"
#   source = "github.com/myfork/project2"
#
# [[override]]
#  name = "github.com/x/y"
#  version = "2.4.0"


[[constraint]]
  name = "k8s.io/kubernetes"
  version = "v1.13.4"

[[override]]
  name = "k8s.io/kubernetes"
  version = "v1.13.4"

[[override]]
  version = "kubernetes-1.13.4"
  name = "k8s.io/api"

[[override]]
  name = "k8s.io/client-go"
  version = "v10.0.0"

#[[constraint]]
#  name = "k8s.io/client-go"
#  version = "v10.0.0"

[[constraint]]
  name = "k8s.io/apimachinery"
  version = "kubernetes-1.13.4"

#[[override]]
#  name = "k8s.io/apimachinery"
#  version = "kubernetes-1.13.4"

[[override]]
  source = "https://github.com/fsnotify/fsnotify/archive/v1.4.7.tar.gz"
  name = "gopkg.in/fsnotify.v1"

[prune]
  non-go = true
  go-tests = true
  unused-packages = true

错误

    kubernetes-1.13.4: Could not introduce k8s.io/apimachinery@kubernetes-1.13.4, as its subpackage k8s.io/apimachinery/pkg/api does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)

我尝试了什么?

我添加了该required部分以指定正在使用的确切软件包,但没有运气。

4

0 回答 0