xref #56592
What version of Go are you using (go version)?
$ gotip version
go version devel go1.21-f00c54146c Mon Apr 10 22:52:22 2023 +0000 linux/amd64
Does this issue reproduce with the latest release?
This tests a change made on tip.
What operating system and processor architecture are you using (go env)?
NA
What did you do?
Given this file:
// Package p is a package.
//
//magic:true
package p
// T is a type
//
//magic:true
type T struct {
// Field is a field
//magic:true
Field int
}
go 1.20 go doc shows:
$ go doc --all .
package p // import "hockin.org/p"
Package p is a package.
TYPES
type T struct {
// Field is a field
//magic:true
Field int
}
T is a type
Note the directive line is present. gotip doc says:
$ gotip doc --all .
package p // import "hockin.org/p"
Package p is a package.
TYPES
type T struct {
// Field is a field
Field int
}
T is a type
The directive is gone (yay) but there's now a blank line. @ianlancetaylor explains it in #56592 (comment) and acknowledges that it is imperfect (but better than before).
xref #56592
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
This tests a change made on tip.
What operating system and processor architecture are you using (
go env)?NA
What did you do?
Given this file:
go 1.20
go docshows:Note the directive line is present.
gotip docsays:The directive is gone (yay) but there's now a blank line. @ianlancetaylor explains it in #56592 (comment) and acknowledges that it is imperfect (but better than before).