The logic for looking up a type name in typeNameToInfo appears in both prepareInput and prepareOutput including repeated error messages. The logic for the two cases of the error message has been moved to the function: typeNotPassedError. The internal function in prepareOutput that used to contain this code has also been removed and replaced with inline map lookups.
The error message in query.go that is triggered when two types have the same name is clarified. It is included in this PR because the old error message is of the same form as those that have been factored into the new function.
The logic for looking up a type name in
typeNameToInfo
appears in bothprepareInput
andprepareOutput
including repeated error messages. The logic for the two cases of the error message has been moved to the function:typeNotPassedError
. The internal function inprepareOutput
that used to contain this code has also been removed and replaced with inline map lookups.The error message in
query.go
that is triggered when two types have the same name is clarified. It is included in this PR because the old error message is of the same form as those that have been factored into the new function.