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:
+3
-3
@@ -69,10 +69,10 @@ func __unmarshalContentFields(b []byte, v *ContentFields) error {
|
||||
return json.Unmarshal(b, *v)
|
||||
case "":
|
||||
return fmt.Errorf(
|
||||
"Response was missing Content.__typename")
|
||||
"response was missing Content.__typename")
|
||||
default:
|
||||
return fmt.Errorf(
|
||||
`Unexpected concrete type for ContentFields: "%v"`, tn.TypeName)
|
||||
`unexpected concrete type for ContentFields: "%v"`, tn.TypeName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ func __marshalContentFields(v *ContentFields) ([]byte, error) {
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
return nil, fmt.Errorf(
|
||||
`Unexpected concrete type for ContentFields: "%T"`, v)
|
||||
`unexpected concrete type for ContentFields: "%T"`, v)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user