Reputation: 539
My project tree is $GOPATH/src/gillab.myfirm.ru/golang/rkn
I try to use glide for get dependency glide install
and I am stuck with a problem:
[ERROR] Error scanning gitlab.myfirm.ru/golang/rkn/events: cannot find package "." in:
/Users/droot/.glide/cache/src/https-gitlab.myfirm.ru-golang-rkn/events
I don't understand what exactly glide want from me. What such package is this "."
?
$GOPATH/src/gitlab.myfirm.ru/golang/rkn/event/events.go
have only 4 imports
package events
import (
"github.com/streadway/amqp"
log "github.com/Sirupsen/logrus"
"fmt"
"gitlab.myfirm.ru/golang/rkn/config"
)
........
same problem I got with another 4 packages.
Upvotes: 11
Views: 12366
Reputation: 59
I have found that this error can occur when your Go code attempts to import a package which does not exist in Github or no longer exists.
For example, it used to be that the package github.com/hashicorp/terraformbuiltin/providers/aws
existed:
https://github.com/hashicorp/terraform/tree/v0.9.6/builtin/providers
But as of Terraform 0.11, it has been moved: https://github.com/hashicorp/terraform/tree/v0.11.2/builtin/providers https://github.com/terraform-providers/terraform-provider-aws
Upvotes: 1
Reputation: 539
I found the answer.
When glide makes cache files, git is in there.
If master
have foo package
and someBranch
have also bar package
when you make glide install
glide also cache git branches and give from cache master
branch as default.
The solution is cd /Users/droot/.glide/cache/src/https-gitlab.myfirm.ru-golang-rkn/
and checkout cache branch git checkout someBranch
Upvotes: 5