Go Code Style Specification

https://gocn.github.io/styleguide/docs/01-overview/

Excerpt

img.png

function and method names should not be prefixed with Get or get, use Compute or Fetch to make it clear to the reader that function calls may take time and may block or fail.

1
2
3
4
5
6
7
// Good:
err := fmt.Errorf("something bad happened")

// Good:
log.Infof("Operation aborted: %v", err)
log.Errorf("Operation aborted: %v", err)
t.Errorf("Op(%q) failed unexpectedly; err=%v", args, err)