3 ms·
I think I'm rather able and intelligent, but there are just so many footguns in golang that my team doesn't have the knowledge to avoid.
by ttymck 3y ago
I think I'm rather able and intelligent, but there are just so many footguns in golang that my team doesn't have the knowledge to avoid.
- drzaiusx11 3y agoJust curious, what are some of those footguns your team is encountering? Only thing that comes to mind is the somewhat tedious error handling imposed by the language. Which language would you say had _less_ footguns than go? Or was this sarcasm and it went straight over my head?
- ttymck 3y agoI guess I am just bad at golang. Loop variable pointer and nil struct is not nil interface are the two that continue to hound us.
- ttymck 3y agoAlso: type MyError {} var _ error = (&MyError)(nil) errors.As(err, &MyError{}) --- Panicking because it needs to be &&MyError{} instead is a similar gotcha.