git.domain.com/a/b/main.go:
import (
"github.com/spf13/cobra"
"git.domain.com/x/y/tlsgenerate"
)
func main() {
rootCmd.AddCommand(tlsgenerate.CobraCommand)
}
git.domain.com/x/y/tlsgenerate/cmd.go:
package tlsgenerate
import (
"github.com/spf13/cobra"
)
var CobraCommand = &cobra.Command{
}
and gometalinter said that:
warning: cannot use tlsgenerate.CobraCommand (variable of type *git.domain.com/x/y/vendor/github.com/spf13/cobra.Command) as *git.domain.com/a/b/vendor/github.com/spf13/cobra.Command value in argument to rootCmd.AddCommand (megacheck)
We use dep to manage dependency. And github.com/spf13/cobra
exist in both a/b/vendor
and x/y/vendor
.
How can I fix this?