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
@@ -184,10 +184,10 @@ func __unmarshalInterfaceNestingRootTopicChildrenContent(b []byte, v *InterfaceN
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 InterfaceNestingRootTopicChildrenContent: "%v"`, tn.TypeName)
`unexpected concrete type for InterfaceNestingRootTopicChildrenContent: "%v"`, tn.TypeName)
}
}
@@ -223,7 +223,7 @@ func __marshalInterfaceNestingRootTopicChildrenContent(v *InterfaceNestingRootTo
return []byte("null"), nil
default:
return nil, fmt.Errorf(
`Unexpected concrete type for InterfaceNestingRootTopicChildrenContent: "%T"`, v)
`unexpected concrete type for InterfaceNestingRootTopicChildrenContent: "%T"`, v)
}
}
@@ -389,10 +389,10 @@ func __unmarshalInterfaceNestingRootTopicChildrenContentParentTopicChildrenConte
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 InterfaceNestingRootTopicChildrenContentParentTopicChildrenContent: "%v"`, tn.TypeName)
`unexpected concrete type for InterfaceNestingRootTopicChildrenContentParentTopicChildrenContent: "%v"`, tn.TypeName)
}
}
@@ -428,7 +428,7 @@ func __marshalInterfaceNestingRootTopicChildrenContentParentTopicChildrenContent
return []byte("null"), nil
default:
return nil, fmt.Errorf(
`Unexpected concrete type for InterfaceNestingRootTopicChildrenContentParentTopicChildrenContent: "%T"`, v)
`unexpected concrete type for InterfaceNestingRootTopicChildrenContentParentTopicChildrenContent: "%T"`, v)
}
}