Go中包含库的类型不匹配

I'm running into an issue with a library I made that I want to include in multiple projects

# github.com/pcs-services/message-queue-operator/pkg/controller/messagequeue
pkg/controller/messagequeue/messagequeue_controller.go:167:129: cannot use instance.ObjectMeta.GetUID() (type "github.com/pcs-services/message-queue-operator/vendor/k8s.io/apimachinery/pkg/types".UID) as type "github.com/pcs-services/grafana/vendor/k8s.io/apimachinery/pkg/types".UID in argument to grafana.DeployGrafana

The files are the same in the main project to the

$ md5 k8s.io/apimachinery/pkg/types/uid.go
MD5 (k8s.io/apimachinery/pkg/types/uid.go) = cc286eae550982db7f93c079e0df1f52
$ md5 k8s.io/apimachinery/pkg/types/uid.go
MD5 (k8s.io/apimachinery/pkg/types/uid.go) = cc286eae550982db7f93c079e0df1f52

k8s.io/apimachinery is vendored in the main app but not the library.

The error says:

pkg/controller/messagequeue/messagequeue_controller.go:167:129: 
cannot use instance.ObjectMeta.GetUID() (type 
"github.com/pcs-services/message-queue-operator/vendor/k8s.io/apimachinery/pkg/types".UID) 
as type 
"github.com/pcs-services/grafana/vendor/k8s.io/apimachinery/pkg/types".UID 
in argument to grafana.DeployGrafana

So, you're using github.com/pcs-services/grafana/vendor/k8s.io/apimachinery/pkg/types.UID but imported github.com/pcs-services/message-queue-operator/vendor/k8s.io/apimachinery/pkg/types.UID. Check your imports and possibly run dep ensure (if you're using dep) to copy the correct dependencies to your vendor folder.