Hacker Newsnew | past | comments | ask | show | jobs | submit | ThierryBuilds's commentslogin

Nice Article. However I fail to understand how using the enum prevents the usage of the wrong index in a data structure. Can you explain further?

Nice article. And the `Into` trick also accept &String

I’ve been using Go Expr for a while because it’s zero-dependency and fast, but I kept hitting walls that weren't obvious in the docs—like the fact that map keys in the script are treated as literals, or the "strict vs forgiving" difference between structs and maps.

I put together this deep dive into 10 specific gotchas to help others avoid the same debugging loops I got stuck in.


On a different note, the syntax for capacity hints of slices vs map can be confusing. m := make(map[string]string, 16) VS a := make([]string, 16)

They look similar but the second argument do not have the same meaning.

I got bitten by it in my early days of Go


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: