Ask HN: What Go framework for web API are you using in production?
21–30 of 65 posts
Just standard library (net/http), no framework. Specific packages for specific tasks if needed (sqlx for database etc).
Re: Ask HN: What Go framework for web API are you using in production?
#22Using no frameworks at all, only https://github.com/julienschmidt/httprouter for routing.
Yes, this. One of the things I love about go is the stdlib capabilities. I try to avoid a lot of frameworks as there seems to be too much "magic" going on that you end up having to figure out when it comes time to troubleshoot. The HttpRouter is bare bones enough to understand and build on top of while still adding some value and helping avoid creating boilerplate code on your own.
Re: Ask HN: What Go framework for web API are you using in production?
#23https://github.com/gin-gonic/gin
Also using Gin, works really well.
Re: Ask HN: What Go framework for web API are you using in production?
#24Just a router is enough for me https://github.com/buaazp/fasthttprouter
Re: Ask HN: What Go framework for web API are you using in production?
#25I am using Gin for my food side project https://bestfoodnearme.com
at my day job in fintech I use the standard library and gorilla/mux
Re: Ask HN: What Go framework for web API are you using in production?
#26Re: Ask HN: What Go framework for web API are you using in production?
#27Using no frameworks at all, only https://github.com/julienschmidt/httprouter for routing.
How do you handle database schema migrations?
The best generic tool/library for migrations that I've found is https://github.com/remind101/migrate
We're using it in production on a few CoreOS projects.
Re: Ask HN: What Go framework for web API are you using in production?
#28We've been pretty happy with https://gobuffalo.io so far. We're serving up a Vue.js app with it. We needed a single binary to deploy on a client's server with no external dependencies and buffalo fits the bill. It comes with a cli that runs webpack and does hot reloads on save. It also has a build command that will bundle all the assets up to shove in the binary.
Re: Ask HN: What Go framework for web API are you using in production?
#29Chi gives us just enough while still adhering to all the Golang standards:
https://github.com/go-chi/chi
Do augment it a bit here and there with other libraries.
Re: Ask HN: What Go framework for web API are you using in production?
#30Using no frameworks at all, only https://github.com/julienschmidt/httprouter for routing.
How do you handle database schema migrations?
Migrations are a minor pain point for me. The libraries I've used don't support running (all) pending migrations; only those with a timestamp more recent than the previous one. This means we have to finesse the timestamps manually as migrations get merged into the main branch and deployed to various environments. As such, the value offered by the migration library is pretty minimal compared to just remembering to pipe a .sql file directly into the database. Hopefully there's a more robust option out there that I just haven't found yet.