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: wrong redirect if my package name the same as standard library's #15060

Open
darasion opened this issue Apr 1, 2016 · 6 comments
Labels
NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@darasion
Copy link

darasion commented Apr 1, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version go1.6 windows/amd64
  2. What operating system and processor architecture are you using (go env)?
    set GOARCH=amd64
    set GOBIN=
    set GOEXE=.exe
    set GOHOSTARCH=amd64
    set GOHOSTOS=windows
    set GOOS=windows
    set GOPATH=D:\workspace\Golang
    set GORACE=
    set GOROOT=D:\Go
    set GOTOOLDIR=D:\Go\pkg\tool\windows_amd64
    set GO15VENDOREXPERIMENT=1
    set CC=gcc
    set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
    set CXX=g++
    set CGO_ENABLED=1
  3. What did you do?
    • set GOPATH to D:\workspace\Golang
    • write some code with package name "rpc" in dir D:\workspace\Golang\src\rpc
    • run: godoc -http=:6060 .
    • visit http://localhost:6060/pkg/rpc/ on browser
  4. What did you expect to see?
    the html document of my code with package name rpc .
    http://localhost:6060/pkg/rpc/
  5. What did you see instead?
    the document of standard library code with package name net/rpc .
    http://localhost:6060/pkg/net/rpc/
@minux
Copy link
Member

minux commented Apr 1, 2016 via email

@bradfitz
Copy link
Contributor

bradfitz commented Apr 1, 2016

Please don't. I don't want to break links. Also, I sometimes navigate to https://golang.org/pkg/http on purpose because I know it'll work.

@bradfitz
Copy link
Contributor

bradfitz commented Apr 1, 2016

@darasion, usually people put their code under $GOPATH/src/github.com/USERNAME/rpc instead of $GOPATH/src/something

@adg
Copy link
Contributor

adg commented Apr 4, 2016

One could argue that we should only serve the redirects from golang.org, rather than baking them into every version of godoc. But ultimately, @darasion should be putting packages in a namespace that they control.

@darasion
Copy link
Author

darasion commented Apr 7, 2016

Thanks everybody, now I understand why.

@bradfitz bradfitz added this to the Unreleased milestone Apr 7, 2016
@agnivade
Copy link
Contributor

agnivade commented Apr 25, 2018

ping @bradfitz - NeedsFix or close ?

@agnivade agnivade added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Apr 29, 2018
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. 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