Skip to content

Commit

Permalink
fix: schema extraction npe (#2740)
Browse files Browse the repository at this point in the history
  • Loading branch information
worstell authored Sep 20, 2024
1 parent 26ca5bd commit 9d5f3ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion go-runtime/schema/typeenum/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ func Extract(pass *analysis.Pass) (interface{}, error) {
in.Preorder(nodeFilter, func(n ast.Node) {
node := n.(*ast.TypeSpec) //nolint:forcetypeassert

iType, ok := pass.TypesInfo.TypeOf(node.Type).Underlying().(*types.Interface)
typ := pass.TypesInfo.TypeOf(node.Type)
if typ == nil {
return
}

iType, ok := typ.Underlying().(*types.Interface)
if !ok {
return
}
Expand Down

0 comments on commit 9d5f3ae

Please sign in to comment.