Fixes #30492
Change-Id: Iec658bdf8bfac21e1bcc3eed900722cc535ec00a
Reviewed-on: https://go-review.googlesource.com/c/go/+/166178
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
`func ReturnExported\(\) ExportedType`,
`func \(ExportedType\) ExportedMethod\(a int\) bool`,
`Comment about exported method.`,
+ `func \(ExportedType\) Uncommented\(a int\) bool\n\n`, // Ensure line gap after method with no comment
},
[]string{
`unexportedType`,
for _, fun := range funcs {
if isExported(fun.Name) {
pkg.emit(fun.Doc, fun.Decl)
+ if fun.Doc == "" {
+ pkg.newlines(2)
+ }
}
}
} else {
return true != true
}
+func (ExportedType) Uncommented(a int) bool {
+ return true != true
+}
+
// Comment about unexported method.
func (ExportedType) unexportedMethod(a int) bool {
return true