I am in the process of experimenting with the various package manager offerings on, well, offer for Golang. I like what I read in gopm - simple. However, thus far I cannot get past the very first hurdle. Here is what I am doing
go get github.com/gpmgo/gopm
whereis gopm
returns /opt/gopkg/bin/gopm
echo $GOPATH
returns /opt/gopkg
.Create main.go under /var/www/html/rest
. The code reads
package main import("github.com/astaxie/beego")
func main(){ println("Beego version:beego.VERSION) }
Create the .gopmfile. It reads [target] path=rest
Switch to the /var/www/html/rest
folder. At this point it contains
root root 20 Jun 25 09:13 .gopmfile root root 107 Jun 25 09:13 main.go
Now issue a gopm build
. which comes back with [GOPM] 15-06-25 09:28:13 [FATAL]: package not installed github.com/astaxie/beego
Examine the /var/www/html/rest
folder. It now contains an additional folder .vendor
which in turn contains the folder src
which in turn has a symlink to the /var/www/html/rest
folder.
What am I doing wrong here?
You did not include the dependencies section in your .gopmfile file, which should look something like this:
[target]
path = rest
[deps]
github.com/astaxie/beego = tag:v0.9.0