Avoid capitalized error strings in generated code (#162)
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
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user