// formatDocComment reformats the doc comment list, // returning the canonical formatting. func formatDocComment(list []*ast.Comment) []*ast.Comment { … } // isDirective reports whether c is a comment directive. // See go.dev/issue/37974. // This code is also in go/ast. func isDirective(c string) bool { … } // allStars reports whether text is the interior of an // old-style /* */ comment with a star at the start of each line. func allStars(text string) bool { … }