1. Do not create "assertion libraries" like `assertEqual(x, y)` [1]
2. Leave testing to the Test function [2]
3. Intialisms (HTTPURL, IOS, gRPC) [3]
4. Function formatting [4]
For the record I'm not saying I disagree with these. I just think that folks coming from other languages have a lot of built in muscle memory to do it other ways. [1] https://google.github.io/styleguide/go/decisions#assertion-libraries
[2] https://google.github.io/styleguide/go/best-practices#leave-testing-to-the-test-function
[3] https://google.github.io/styleguide/go/decisions#initialisms
[4] https://google.github.io/styleguide/go/decisions#function-formatting
Like:
- Standard Tooling: formatting coverage, dependencies, BIN install, versioning, vendoring all done in Go CLI
- Opinionated, minimal design: often I feel like there are fewer ways to do things in Go than in other languages.
- Readability: fewer operators and minimal language design make it feel easier to ramp up and read most go programs
Dislike:
- Hard to master: some elements are very unintuitive coming from other languages (interfaces). I feel like a lot of content on go.dev is out of date (Effective Go). The Google Style guide is helping to light a path and when they publish Go Tips I think it will get better.
- Too Minimal: in some cases it feels like Go went too far in not building language features (no set, use map[$TYPE]bool instead or map[$TYPE]struct{} for more efficiency but less readable imo)