go install remote repository

11,010 views
Skip to first unread message

Monnand

unread,
Feb 2, 2012, 11:42:06 PM2/2/12
to golang-nuts
Hi all,

I have just updated to the tip of the repository, which means any
Makefile under the go projects cannot be used.

However, this is the least problem. Right now, I am trying to figure
out how to use go install to install a remote repository on github. I
read the documents and find no obvious different between go install
and goinstall. But when I try this:

$ go install github.com/monnand/redis.go
can't load package: github.com/monnand/redis.go: package could not be
found locally

It seems that go install cannot figure out it is a remote git
repository. I checked go help remote, but didn't find useful
information.

Is there anything I missed? How can I install a package from remote
repository.

BTW, I do love the idea of the command go now. But it seems that we
need some documentation work to do.

Regards,
-Monnand

Monnand

unread,
Feb 2, 2012, 11:47:33 PM2/2/12
to golang-nuts
I appologize that I did read most of the document except the help
message from go command, which says:

get download and install packages and dependencies

Then I can use go get github.com/user/package to install remote
packages.

Sorry for bothering you.

Regards,
-Monnand

Sanjay Menakuru

unread,
Feb 2, 2012, 11:48:20 PM2/2/12
to golan...@googlegroups.com
Try "go get  github.com/monnand/redis.go" to download + install, go get -d  github.com/monnand/redis.go" to download, or "go install  github.com/monnand/redis.go" to install.

downloading entails touching the network (checking out the source), installing does not. Installing simply entails compiling and moving products of compilation to a well-defined location (ie GOPATH[i]/pkg/GOOS_GOARCH/* for packages or GOPATH[i]/bin/* for commands where GOPATH[i] is some member of your GOPATH variable.

Cheers,
Sanjay
Reply all
Reply to author
Forward
0 new messages