diff --git a/cmd/shortenertest/iteration17_test.go b/cmd/shortenertest/iteration17_test.go index 891df83..1bacfd1 100644 --- a/cmd/shortenertest/iteration17_test.go +++ b/cmd/shortenertest/iteration17_test.go @@ -138,12 +138,12 @@ func undocumentedGenDecl(decl *ast.GenDecl) bool { for _, spec := range decl.Specs { switch st := spec.(type) { case *ast.TypeSpec: - if st.Name.IsExported() && decl.Doc == nil { + if st.Name.IsExported() && st.Doc == nil && decl.Doc == nil { return true } case *ast.ValueSpec: for _, name := range st.Names { - if name.IsExported() && decl.Doc == nil { + if name.IsExported() && st.Doc == nil && decl.Doc == nil { return true } }