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:
Vendored
+6
-6
@@ -195,10 +195,10 @@ func __unmarshalInterfaceListFieldRootTopicChildrenContent(b []byte, v *Interfac
|
||||
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 InterfaceListFieldRootTopicChildrenContent: "%v"`, tn.TypeName)
|
||||
`unexpected concrete type for InterfaceListFieldRootTopicChildrenContent: "%v"`, tn.TypeName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ func __marshalInterfaceListFieldRootTopicChildrenContent(v *InterfaceListFieldRo
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
return nil, fmt.Errorf(
|
||||
`Unexpected concrete type for InterfaceListFieldRootTopicChildrenContent: "%T"`, v)
|
||||
`unexpected concrete type for InterfaceListFieldRootTopicChildrenContent: "%T"`, v)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,10 +443,10 @@ func __unmarshalInterfaceListFieldWithPointerTopicChildrenContent(b []byte, v *I
|
||||
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 InterfaceListFieldWithPointerTopicChildrenContent: "%v"`, tn.TypeName)
|
||||
`unexpected concrete type for InterfaceListFieldWithPointerTopicChildrenContent: "%v"`, tn.TypeName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,7 +482,7 @@ func __marshalInterfaceListFieldWithPointerTopicChildrenContent(v *InterfaceList
|
||||
return []byte("null"), nil
|
||||
default:
|
||||
return nil, fmt.Errorf(
|
||||
`Unexpected concrete type for InterfaceListFieldWithPointerTopicChildrenContent: "%T"`, v)
|
||||
`unexpected concrete type for InterfaceListFieldWithPointerTopicChildrenContent: "%T"`, v)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user