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

x/tools/cmd/godoc: add https support? #19315

Closed
Happy-Ferret opened this issue Feb 28, 2017 · 7 comments
Closed

x/tools/cmd/godoc: add https support? #19315

Happy-Ferret opened this issue Feb 28, 2017 · 7 comments
Labels
FeatureRequest help wanted NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@Happy-Ferret
Copy link

Happy-Ferret commented Feb 28, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go1.8 linux/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOOS="linux"

What did you do?

I'm trying to serve godoc on a server that enforces https redirection

godoc -http=:60000

What did you expect to see?

When I browsed to https://<url>:60000, I expected to see a working godoc landing page.

What did you see instead?

A page informing me of ERR_SSL_PROTOCOL_ERROR
"Unable to make a secure connection to the server"

Is there a way to serve godocs over https, using the godoc utility?

@bradfitz bradfitz changed the title godoc -http over https x/tools/godoc: add https support? Feb 28, 2017
@bradfitz
Copy link
Contributor

We do already have such support, but it's behind a build tag.

You can do:

$ go install --tags=autocert golang.org/x/tools/cmd/godoc

And then it'll listen on port 443 and use LetsEncrypt to get a cert.

We can use this bug to track making that more official.

@bradfitz bradfitz modified the milestones: Go1.8.1, Go1.9Maybe Feb 28, 2017
@Happy-Ferret
Copy link
Author

Thanks.

Any way to ``go get`´ this from Github? Golang.org is, for some reason, blocked at my company. Knowing the IT guys here, they'll have it unblocked just in time for Go 20.1...

@ianlancetaylor
Copy link
Contributor

I don't know whether go get works, but you can clone it from the https://github.com/golang/tools repo.

@bradfitz bradfitz modified the milestones: Go1.10, Go1.9Maybe May 24, 2017
@bradfitz bradfitz added FeatureRequest help wanted NeedsFix The path to resolution is known, but the work has not been done. labels May 24, 2017
@bradfitz
Copy link
Contributor

Pushing this to Go 1.10, by which time I hope we'll have our package management story more sorted out.

@bradfitz
Copy link
Contributor

(as my change above depends on golang.org/x/crypto/autocert)

@bradfitz bradfitz modified the milestones: Go1.10, Unplanned Nov 15, 2017
@dmitshur dmitshur changed the title x/tools/godoc: add https support? x/tools/cmd/godoc: add https support? May 17, 2019
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 12, 2019
@nehbit
Copy link

nehbit commented Jun 18, 2020

Pinging this issue because there's an incompatibility between gopls and godoc that rests on godoc being http-only.

For context, gopls has a feature that allows you to set the documentation server. (gopls documentation). For private packages, we want this to point to localhost, hosted by godoc.

However, gopls is built in such a way that the link cannot be http, it can only be https. This means you cannot provide a localhost docs site provided by godoc here.

It might be worth pushing this https feature out to public so as to make sure godoc is compatible with gopls by default.

Let me know if you need more context. Thanks for all the hard work! Both godoc and gopls are invaluable tools.

@adonovan
Copy link
Member

gopls/v0.16.0, released today, contains an integrated documentation viewer, similar in style to pkg.go.dev, but that works on local unpublished packages and even unsaved editor buffers.

I'm going to close this issue, since godoc is deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest help wanted NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

6 participants