Canonical guidance

Use when

Avoid

Preferred pattern

// Fetch loads the user by ID and returns ErrNotFound when no row exists.
func Fetch(ctx context.Context, id string) (User, error)

Anti-pattern

// Fetch fetches the user.
func Fetch(ctx context.Context, id string) (User, error)

Explanation: This anti-pattern is tempting when documenting quickly, but comments that restate code add noise and go stale without helping callers.

Why

Sources