You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.
There are a lot of type assertions that require checks and every time developer needs to build an error by hand.
An integrated solution would ease the process of development.
First construction that comes to mind:
r, ok:=resource.Item.(types.Type)
if!ok {
returnfmt.Errorf("wrong type assertion: got %s instead of %s",
reflect.TypeOf(r).Name(),
reflect.TypeOf(types.Type{}).Name())
}
The text was updated successfully, but these errors were encountered:
Since we tell which type of object we use when generating a code we can try to implement it in cq-gen to automatically generate such a check in fetchers and resolvers.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
There are a lot of type assertions that require checks and every time developer needs to build an error by hand.
An integrated solution would ease the process of development.
First construction that comes to mind:
The text was updated successfully, but these errors were encountered: