Ask HN: Is there a project based book/course on Go for writing web API’s?

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

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.

I didn’t like Gin because they don’t let you use whatever routes you want. Something like /:category/:product and /user/:name (notice no “:”) is not admissible because “:category” in the first route clashes with “user” in the second route (wtf?)

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.

They have something like a 5-minute per-24h free preview of the entire book. It confused me too, the first time I came back to a tab I’d left open for a book I wanted to check out. Ultimately I wasn’t able to get a good idea of the book quality, so I never purchased a book from them, but maybe it works for some people.

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?

Excellent thread! Thanks all. Also in the process of getting GOing on Go. >:) (Yes, I am a geeky pun guy)

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.