Live data from Hacker News

Ask HN: What GO web framework do you use?

news.ycombinator.com

1–10 of 26 posts

Re: Ask HN: What GO web framework do you use?

#2
net/http. Go has great web support in the standard library.^1

Kidding aside, I didn't think that full-fledged web frameworks (akin to Ruby-on-Rails, Flask, Spring, etc) were really a thing with Go - or at least not a super popular thing. And you should be able to pretty easily recreate the functionality of a Tomcat-like web server using the http/net library.^2

[1]: https://pkg.go.dev/net/http [2]: https://go.dev/doc/articles/wiki/

Re: Ask HN: What GO web framework do you use?

#6
For simple, battle-tested web server, you can't go wrong with net/http.

A couple of us are working on Bud (http://github.com/livebud/bud), which aims to be a full-stack web framework for Go, similar to Laravel or Rails.

The project is getting better very quickly! If you're working on a greenfield project and want more out of the box, I'd encourage you to give Bud a try!

Re: Ask HN: What GO web framework do you use?

#7

For simple, battle-tested web server, you can't go wrong with net/http. A couple of us are working on Bud ( http://github.com/livebud/bud ), which aims to be a full-stack web framework for Go, similar to Laravel or Rails. The project is getting better very quickly! If you're working on a greenfield project and want more out of the box, I'd encourage you to give Bud a try!

looks cool!

Re: Ask HN: What GO web framework do you use?

#8
I use the standard library. My entire business runs on it, html/css all through the standard library (templates package).

I use embed to embed all assets in the binary itself. "go build" and then "scp" the binary to the production server and "systemctl restart appserver"

Re: Ask HN: What GO web framework do you use?

#9
post #8

I use the standard library. My entire business runs on it, html/css all through the standard library (templates package). I use embed to embed all assets in the binary itself. "go build" and then "scp" the binary to the production server and "systemctl restart appserver"

> templates package

How do you like the template package ? Can you compare it to Jinja/Twig ?

Re: Ask HN: What GO web framework do you use?

#10
post #8

I use the standard library. My entire business runs on it, html/css all through the standard library (templates package). I use embed to embed all assets in the binary itself. "go build" and then "scp" the binary to the production server and "systemctl restart appserver"

> templates package How do you like the template package ? Can you compare it to Jinja/Twig ?

I have never used Jinja/Twig, but I have used handlebars, ERB, JSX and other similar templating systems.

Overall, I find Go's template system to be a bit clunky but it certainly gets the job done. The template system is fairly minimal so it feels mostly like working with HTML, but it gives you a few tools to use.. mainly passing data down the template/sub-templates and the ability to define template functions/helpers. Minimal... but it's all you really need.

I converted my business from Rails 5 to Go about a year ago and the ERB was fairly straight forward to convert to Go's template system.. it felt like I was mostly converting to {{ .. }} and changing to {{ template ... }}

Post reply on HN