Skip to content

Commit

Permalink
Avoid capitalized error strings in generated code (#162)
Browse files Browse the repository at this point in the history
Error strings should follow established guidelines
to ensure good composability and uniformity.
A mention of this particular guideline can be found
in Go Code Review Comments:
https://github.com/golang/go/wiki/CodeReviewComments#error-strings
  • Loading branch information
adambabik authored Jan 13, 2022
1 parent f0c2ac1 commit 9fbb6b8
Show file tree
Hide file tree
Showing 15 changed files with 117 additions and 117 deletions.
2 changes: 1 addition & 1 deletion generate/marshal_helper.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ func __marshal{{.GoName}}(v *{{.GoName}}) ([]byte, error) {
return []byte("null"), nil
default:
return nil, {{ref "fmt.Errorf"}}(
`Unexpected concrete type for {{.GoName}}: "%T"`, v)
`unexpected concrete type for {{.GoName}}: "%T"`, v)
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9fbb6b8

Please sign in to comment.