Create a gist now

Instantly share code, notes, and snippets.

@kr /go.md Secret
Created Mar 15, 2012

What would you like to do?
Go Buildpack Quickstart (RC)
@laslowh

This comment has been minimized.

Show comment Hide comment
@laslowh

laslowh Mar 18, 2012

Cool! Is it possible to access a DB from your app?

laslowh commented Mar 18, 2012

Cool! Is it possible to access a DB from your app?

@kr

This comment has been minimized.

Show comment Hide comment
@kr

kr Mar 20, 2012

Yes, you can use any Go package just as you normally would,
so you can access any database that has a Go driver.

For example, Heroku provides several postgres database
service options, and you can find a Go driver for postgres at
https://github.com/bmizerany/pq.go (soon to be renamed
https://github.com/bmizerany/pq). We also have various other
databases available at https://addons.heroku.com/. Some of
them are sure to have Go drivers, though I don't know the
complete list of which do.

Owner

kr commented Mar 20, 2012

Yes, you can use any Go package just as you normally would,
so you can access any database that has a Go driver.

For example, Heroku provides several postgres database
service options, and you can find a Go driver for postgres at
https://github.com/bmizerany/pq.go (soon to be renamed
https://github.com/bmizerany/pq). We also have various other
databases available at https://addons.heroku.com/. Some of
them are sure to have Go drivers, though I don't know the
complete list of which do.

@radisson

This comment has been minimized.

Show comment Hide comment
@radisson

radisson Mar 26, 2012

Seems to fail on Go packages hosted on bazaar repositories (such as launchpad.net/mgo, the best go mongo driver out there). Is there a workaround? I tried adding the code to my git repository under src/launchpad.net but that didn't do it.

Seems to fail on Go packages hosted on bazaar repositories (such as launchpad.net/mgo, the best go mongo driver out there). Is there a workaround? I tried adding the code to my git repository under src/launchpad.net but that didn't do it.

@kr

This comment has been minimized.

Show comment Hide comment
@kr

kr Mar 26, 2012

The buildpack doesn't currently make Bazaar available when
running the go tools. I need to fix that. (Mercurial too, maybe.)

As a workaround, you can copy the code of another package
into your project, but you'll have to mangle the include paths.

Owner

kr commented Mar 26, 2012

The buildpack doesn't currently make Bazaar available when
running the go tools. I need to fix that. (Mercurial too, maybe.)

As a workaround, you can copy the code of another package
into your project, but you'll have to mangle the include paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment