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:
Adam Babik
2022-01-13 11:01:33 -08:00
committed by GitHub
parent f0c2ac17a9
commit 9fbb6b87aa
15 changed files with 117 additions and 117 deletions
+2 -2
View File
@@ -28,9 +28,9 @@ func __unmarshal{{.GoName}}(b []byte, v *{{.GoName}}) error {
of the mock didn't know to add __typename, so give a special
error. */ -}}
return {{ref "fmt.Errorf"}}(
"Response was missing {{.GraphQLName}}.__typename")
"response was missing {{.GraphQLName}}.__typename")
default:
return {{ref "fmt.Errorf"}}(
`Unexpected concrete type for {{.GoName}}: "%v"`, tn.TypeName)
`unexpected concrete type for {{.GoName}}: "%v"`, tn.TypeName)
}
}