Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

golang remote imports fail

Tags:

import

go

I just install golang with homebrew and I am having trouble importing remote packages.

when I try to instal demo.go which contains

import "github.com/bradfitz/gomemcache/memcache"

I get the following error

$ go install
demo.go:3:8: cannot find package "github.com/bradfitz/gomemcache/memcache" in any of:
/usr/local/Cellar/go/1.4/libexec/src/github.com/bradfitz/gomemcache/memcache (from $GOROOT)
/Users/white/go/src/github.com/bradfitz/gomemcache/memcache (from $GOPATH)

To my untrained eyes it looks like it is just looking locally on my GOPATH.

like image 629
honkskillet Avatar asked Jan 15 '15 06:01

honkskillet


1 Answers

That means you need to get it first:

go get github.com/bradfitz/gomemcache/memcache

That is what the bradfitz/gomemcache recommends.

like image 139
VonC Avatar answered Oct 14 '22 08:10

VonC