How to do better Error Handling with Golang

Takeaways Errors as uint64 for better performance By convention, 0 is “OK” or “no error” Use the exhaustive linter with switch Use enums to define error cases Implement Stringer on enums for human readable error messages Use generic T ~uint64 to type custom structs to errors I have been trying to figure out a better Golang error handling pattern. In my previous […]