4 ms·
I have built a lot of random stuff in Go. I picked up go about two years because it seemed to be a really cool middle-of-the-road language. It wasn't great at
by ejcx 10y ago
I have built a lot of random stuff in Go.
I picked up go about two years because it seemed to be a really cool middle-of-the-road language. It wasn't great at anything but was pretty good at most things. Before, I had written a lot of PHP on the web.
No stumbling blocks after getting set up (GOPATH, getting newest version installed). It's always slow to learn something new.
My advice. Do not return dynamic content with Go. If you build a backend webservice in Go that is meant to serve complicated dynamic content (like the way it is possible to do with PHP), you will have a bad time. htmltemplates in Go are not good and you'll waste a lot of time try to live with them. It's better just to return a little bit of info that a front end js app can bootstrap the front-end with.
- zacmps 10y agoYou know you can use almost any template language with go right? Just look for a package that'll compile into templates then execute them. There are packages for pug (Used to be jade,) amber, handlebars, mustache etc.