DEV Community

loading...

Discussion on: How can I learn to like Golang? (and use it a lot)

Collapse
rhymes profile image
rhymes • Edited

There is still an issue with GoDoc, as I mentioned above. And it mostly correlate with Swagger Codegen, as well as comment highlighting. But it is not that some languages like Python doesn't have this problem as well.

If there's one suggestion I can leave you with is not to try to bend Go to be similar to other languages :D Just "go with the flow" (no pun intended)

You won't find Go code with /* syntax anyway. You can find more info on Godoc here: blog.golang.org/godoc

Nowadays, I rely a lot on Fastify's Request + Response validation --> and it seems that someone have ported in to Golang for me -- github.com/danielgtaylor/huma/

I'm not familiar with Fastify or Huma but Go is pretty awesome at JSON validation having those inline tags:

type Data struct {
  Something string `json:something`
}

which tell the JSON serializer to map the field automatically :D

I think Go is worth a try, at least! Start with gobyexample.com/ :-)