4 ms·
I recommend starting with http://tour.golang.org/#1 http://tour.golang.org/#1. Yes, the Go tool comes with package-management capabilities. "go get labix.org/
by zemo 14y ago
I recommend starting with http://tour.golang.org/#1 http://tour.golang.org/#1.
Yes, the Go tool comes with package-management capabilities. "go get labix.org/v2/mgo" will download the very excellent MongoDB driver mgo, for example.
- swasheck 14y agoBut then actually implementing something useful is cryptic and obscure. I tried figuring out how to connect to a postgresql server following the spaghetti documentation of https://github.com/bmizerany/pq https://github.com/bmizerany/pq and http://golang.org/pkg/database/sql/ http://golang.org/pkg/database/sql/ and have yet to find anything useful. Hacking around only leaves me with frustration. Searching around only leads me to unhelpful descriptions of what the GO command does in MSSQL Server.
- luriel 14y agoIf you have Go questions and can't find the answer anywhere, feel free to post to StackOverflow or http://reddit.com/r/golang http://reddit.com/r/golang You will get an answer quite fast.
- kkowalczyk 14y agoSeriously? What is "cryptic" about db = sql.Open(...); db.Exec(); db.Query(); db.Close() etc.? From https://github.com/bmizerany/pq/blob/master/conn_test.go https://github.com/bmizerany/pq/blob/master/conn_test.go: func TestExec(t *testing.T) { db := openTestConn(t) defer db.Close() _, err := db.Exec("CREATE TEMP TABLE temp (a int)") if err != nil { t.Fatal(err) } r, err := db.Exec("INSERT INTO temp VALUES (1)") if err != nil { t.Fatal(err) } What is it exactly that you tried and failed? Because looking at conn_test.go the API is dead simple and pretty much like any other db API of this kind.
- antihero 14y agoNeat, is there something like virtualenv or rvm so I can install it locally not systemwide?
- drivebyacct2 14y agoJust change GOPATH and you're done.