We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f73e7db commit 72c1c0dCopy full SHA for 72c1c0d
pkg/generators/enum.go
@@ -55,6 +55,10 @@ func newEnumContext(c *generator.Context) *enumContext {
55
// If the given type is a known enum type, returns the enumType, true
56
// Otherwise, returns nil, false
57
func (ec *enumContext) EnumType(t *types.Type) (enum *enumType, isEnum bool) {
58
+ // if t is a pointer, use its underlying type instead
59
+ if t.Kind == types.Pointer {
60
+ t = t.Elem
61
+ }
62
enum, ok := ec.enumTypes[t.Name]
63
return enum, ok
64
}
0 commit comments