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: go doc struct.field prints non-Go syntax #20928

Closed
rsc opened this issue Jul 6, 2017 · 1 comment
Closed

cmd/doc: go doc struct.field prints non-Go syntax #20928

rsc opened this issue Jul 6, 2017 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Jul 6, 2017

$ go doc http.Client.Jar
struct Client {
    // Jar specifies the cookie jar.
    //
    // The Jar is used to insert relevant cookies into every
    // outbound Request and is updated with the cookie values
    // of every inbound Response. The Jar is consulted for every
    // redirect that the Client follows.
    //
    // If Jar is nil, cookies are only sent if they are explicitly
    // set on the Request.
    Jar CookieJar
}
$ 

In general go doc prints Go or pseudo-Go output. struct Client is not Go, it's C.

It would also be nice to print ... other fields elided ... on a line before the closing brace, to make clear that there are other fields in the type.

/cc @robpike

@rsc rsc added this to the Go1.9 milestone Jul 6, 2017
@bradfitz bradfitz added the NeedsFix The path to resolution is known, but the work has not been done. label Jul 6, 2017
@gopherbot
Copy link

CL https://golang.org/cl/47730 mentions this issue.

@golang golang locked and limited conversation to collaborators Jul 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants