Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Glide cannot find package "." in

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.

like image 224
user199588 Avatar asked Dec 18 '17 20:12

user199588


1 Answers

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

like image 187
user199588 Avatar answered Oct 20 '22 14:10

user199588