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

Support Go 1.19 godoc formatting #29

Closed
ainar-g opened this issue May 30, 2022 · 7 comments
Closed

Support Go 1.19 godoc formatting #29

ainar-g opened this issue May 30, 2022 · 7 comments

Comments

@ainar-g
Copy link

ainar-g commented May 30, 2022

See golang/go#51028 golang/go#51082. It seems like this should mostly be a matter of updating some dependencies, but I don't know for sure.

@zigo101
Copy link
Collaborator

zigo101 commented Jun 7, 2022

@ainar-g
Sorry, I just noticed this issue.
It looks the linked issue is unrelated. Is it golang/go#16666 or golang/go#51082?

@ainar-g
Copy link
Author

ainar-g commented Jun 7, 2022

@go101, the latter, yes. Apologies, hand copying strikes again, heh.

@zigo101
Copy link
Collaborator

zigo101 commented Jun 7, 2022

If it is applicable, Golds will use the official code as dependency.
If this is not possible or there are difficulties in this way, then Golds might render the comments with slightly different rules.

@ainar-g
Copy link
Author

ainar-g commented Jun 9, 2022

I'm not sure I follow, sorry. I've built a local copy of golds using the latest golang.org/x/tools as well as a development version of Go 1.19 from master, but the resulting binary doesn't show headers or lists from the proposal in the web interface.

gotip version -m $( which golds )
/home/ainar/go/bin/golds: devel go1.19-1a2ca95ad2 Thu Jun 9 01:07:11 2022 +0000
        path    go101.org/golds
        mod     go101.org/golds (devel)
        dep     golang.org/x/mod        v0.6.0-dev.0.20220419223038-86c51ed26bb4        h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
        dep     golang.org/x/net        v0.0.0-20220225172249-27dd8689420f      h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
        dep     golang.org/x/sys        v0.0.0-20211216021012-1d35b9e2eb4e      h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
        dep     golang.org/x/text       v0.3.7  h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
        dep     golang.org/x/tools      v0.1.11-0.20220608221525-4a8620f6ba29   h1:GY4oxXkEP5h9DKhSS69+lDMbM9BvK5egPBs51R5PGrI=
        build   -compiler=gc
        build   CGO_ENABLED=1
        build   CGO_CFLAGS=
        build   CGO_CPPFLAGS=
        build   CGO_CXXFLAGS=
        build   CGO_LDFLAGS=
        build   GOARCH=amd64
        build   GOOS=linux
        build   GOAMD64=v1
        build   vcs=git
        build   vcs.revision=c9f23ad288322a6d36ec08d755efdf6a15a2a287
        build   vcs.time=2022-06-09T13:36:39Z
        build   vcs.modified=true

@zigo101
Copy link
Collaborator

zigo101 commented Jun 9, 2022

This feature has not been implemented in Golds yet.
Go 1.19 will introduce a go/doc/comment package, Golds will use it if applicable.
But it is not guaranteed to be implemented as such.
That means Golds will only write some links but not support headers and lists.

@ainar-g
Copy link
Author

ainar-g commented Jun 9, 2022

Ah, I see, thanks.

@zigo101
Copy link
Collaborator

zigo101 commented Oct 13, 2022

@ainar-g

A new -render-doclinks option is added to render links in doc comments.
Some implementation details might differ from the official ones.

And I decide not to render bullets and headings.

A new release will be made several days later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants