Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/doc: Blank lines inserted into doc output in place of "directive" lines #59529

Open
thockin opened this issue Apr 11, 2023 · 0 comments
Open
Assignees
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@thockin
Copy link

thockin commented Apr 11, 2023

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).

@dr2chase dr2chase assigned dr2chase and ianlancetaylor and unassigned dr2chase Apr 11, 2023
@dr2chase dr2chase added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 11, 2023
@seankhliao seankhliao added this to the Unplanned milestone Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants