Live data from Hacker News

Ask HN: Is there a project based book or course on Go for writing web APIs?

news.ycombinator.com

11–20 of 34 posts

Re: Ask HN: Is there a project based book or course on Go for writing web APIs?

#11
If you're coming from Ruby, you might like Gin[0].

I'd also recommend learning to write web APIs with the standard library so you know the primitives. Writing Web Applications[1] on golang.org covers the basics.

[0] https://github.com/gin-gonic/gin

[1] https://golang.org/doc/articles/wiki

Re: Ask HN: Is there a project based book or course on Go for writing web APIs?

#12
post #11

If you're coming from Ruby, you might like Gin[0]. I'd also recommend learning to write web APIs with the standard library so you know the primitives. Writing Web Applications[1] on golang.org covers the basics. [0] https://github.com/gin-gonic/gin [1] https://golang.org/doc/articles/wiki

I've had a bad experience with Gin and when asking about alternatives in a local Go meetup I was given the advice to use https://github.com/go-chi/chi or gorilla/mux.

Re: Ask HN: Is there a project based book or course on Go for writing web APIs?

#13

Earlier quoted context omitted.

At first I thought book was in Slovenian or something, until I realized there was some DOM level decryption happening. I simultaneously wanted to open it up to figure out how it worked and close the page because it was so broken and counter to the supposedly simple idea of displaying words on a page that it infuriated me. I hope the book is good, but I guess I'll never know.

What do you mean you'll never know? Your parent comment said it was pretty good. A single data point is not authoritative, but it shows a pretty solid trend toward "pretty good." You already know the book is pretty good, you just wanted to complain about DRM, I suspect. I hope that's not the case.

Eating rotten carrots is pretty good.

A single data point is not authoritative, but my comment shows a pretty solid trend toward "pretty good." I expect you'll run out to go find some rotten carrots to eat now?

Re: Ask HN: Is there a project based book or course on Go for writing web APIs?

#16

I'm working through Let's Go! by Alex Edwards right now, it's not specifically focussed on APIs but the book guides you through building a web application in Go. My experience so far has been very positive. https://lets-go.alexedwards.net/

well the structure is so so and everything is in package main in every file in every project.

Re: Ask HN: Is there a project based book or course on Go for writing web APIs?

#17
post #11

If you're coming from Ruby, you might like Gin[0]. I'd also recommend learning to write web APIs with the standard library so you know the primitives. Writing Web Applications[1] on golang.org covers the basics. [0] https://github.com/gin-gonic/gin [1] https://golang.org/doc/articles/wiki

I've had a bad experience with Gin and when asking about alternatives in a local Go meetup I was given the advice to use https://github.com/go-chi/chi or gorilla/mux.

Could you go into more detail about this? I'm using Gin currently and would like to avoid any potential landmines if possible.

Re: Ask HN: Is there a project based book or course on Go for writing web APIs?

#18

Haven't read through it myself, but I think it's noteworthy and it wasn't mentioned here yet: https://astaxie.gitbooks.io/build-web-application-with-golan...

Second this, I've used this as a resource for ramping up medium-experience web developers in Go. It's great because it sticks to the `net/http` basics, and is fairly concise and blunt.

Re: Ask HN: Is there a project based book or course on Go for writing web APIs?

#20

Earlier quoted context omitted.

I've had a bad experience with Gin and when asking about alternatives in a local Go meetup I was given the advice to use https://github.com/go-chi/chi or gorilla/mux.

Could you go into more detail about this? I'm using Gin currently and would like to avoid any potential landmines if possible.

I've used Gin for several small to medium projects without too much difficulty. I think Gin is a good way to learn quickly since its ecosystem introduces you to a lot of the pieces you will need. Personally, I don't do enough web development to grow out of it, since my web related projects are not a primary focus.

One thing to note is that Gin's Context is not the standard context.Context, which some find problematic. Most (vocal?) Gophers prefer sticking with the standard library and Gorilla.

Post reply on HN