Live data from Hacker News

Ask HN: What Go framework for web API are you using in production?

news.ycombinator.com

41–50 of 65 posts

Re: Ask HN: What Go framework for web API are you using in production?

#42
post #18

Using no frameworks at all, only https://github.com/julienschmidt/httprouter for routing.

How do you handle database schema migrations?

I toyed with this: https://github.com/mattes/migrate

Quite simple, does the job.

Re: Ask HN: What Go framework for web API are you using in production?

#43
post #18

Using no frameworks at all, only https://github.com/julienschmidt/httprouter for routing.

How do you handle database schema migrations?

I use Rails migrations, via the standalone_migrations gem, and code-generate the basic CRUD Go stuff from the schema.

I've tried a bunch of other migration tools but I don't think anyone has done a better job of it than Rails has.

Re: Ask HN: What Go framework for web API are you using in production?

#45

https://github.com/gorilla/mux

https://github.com/bitexploder/gowebexample

I put together a little example web app based based on a few popular packages, including gorilla / mux. It's not a framework, just a nice starting point for little apps.

Re: Ask HN: What Go framework for web API are you using in production?

#47
post #43
post #18

Earlier quoted context omitted.

How do you handle database schema migrations?

I use Rails migrations, via the standalone_migrations gem, and code-generate the basic CRUD Go stuff from the schema. I've tried a bunch of other migration tools but I don't think anyone has done a better job of it than Rails has.

Cool, because this is actually what I ended up with myself in a dummy Go setup of mine (after having reinvented AR's migrations poorly with a Bash script). I'm not really accustomed to Go's ecosystem yet, so:

>and code-generate the basic CRUD Go stuff from the schema

I guess you read schema.rb and output some structs and methods? Because a quick Google search only yielded some Yeoman plugins …

Re: Ask HN: What Go framework for web API are you using in production?

#48
post #47
post #43

Earlier quoted context omitted.

I use Rails migrations, via the standalone_migrations gem, and code-generate the basic CRUD Go stuff from the schema. I've tried a bunch of other migration tools but I don't think anyone has done a better job of it than Rails has.

Cool, because this is actually what I ended up with myself in a dummy Go setup of mine (after having reinvented AR's migrations poorly with a Bash script). I'm not really accustomed to Go's ecosystem yet, so: >and code-generate the basic CRUD Go stuff from the schema I guess you read schema.rb and output some structs and methods? Because a quick Google search only yielded some Yeoman plugins …

No, I use Postgres and just query information_schema, and use the row/column information to populate text/template Go templates.

There's a bunch of tools that do this already (one I know works is "xo"), but I wanted join-table support.

Post reply on HN