Skip to content

Commit

Permalink
fix exported #1002 for ast.Ident 2
Browse files Browse the repository at this point in the history
  • Loading branch information
comdiv committed Jun 28, 2024
1 parent 98eabe8 commit d7fc862
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rule/exported.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ func (w *lintExported) Visit(n ast.Node) ast.Visitor {

func (w *lintExported) doCheckPublicInterface(typeName string, iface *ast.InterfaceType) {
for _, m := range iface.Methods.List {
if _, ok := m.Type.(*ast.Ident); ok {
// case of ast.Ident and other implicit fields
if len(m.Names) == 0 {
continue
}
if ast.IsExported(m.Names[0].Name) {
Expand Down

0 comments on commit d7fc862

Please sign in to comment.