in processor/processor.go [259:277]
func (p *processor) extractPkgDocumentation(pkg *loader.Package) string {
var pkgComments []string
pkg.NeedSyntax()
for _, n := range pkg.Syntax {
if n.Doc == nil {
continue
}
comment := n.Doc.Text()
commentLines := strings.Split(comment, "\n")
for _, line := range commentLines {
if !ignoredCommentRegex.MatchString(line) {
pkgComments = append(pkgComments, line)
}
}
}
return strings.Join(pkgComments, "\n")
}