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: unexpected arguments #28232

Closed
vbatts opened this issue Oct 16, 2018 · 5 comments
Closed

x/tools/cmd/godoc: unexpected arguments #28232

vbatts opened this issue Oct 16, 2018 · 5 comments

Comments

@vbatts
Copy link
Contributor

vbatts commented Oct 16, 2018

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

go version go1.11.1 linux/amd64

Does this issue reproduce with the latest release?

yes. Master of golang.org/x/tools/cmd/godoc at the time of this report is golang/tools@5d4988d

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/vbatts/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/vbatts"
GOPROXY=""
GORACE=""
GOROOT="/home/vbatts/go1.11"
GOTMPDIR=""
GOTOOLDIR="/home/vbatts/go1.11/pkg/tool/linux_amd64"
GCCGO="/usr/bin/gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build859811761=/tmp/go-build -gno-record-gcc-switches"

What did you do?

go get -v -u golang.org/x/tools/cmd/godoc
godoc strings

What did you expect to see?

The docs for strings pkg (or any stdlib package ...)

What did you see instead?

Unexpected arguments.
usage: godoc -http=localhost:6060
  -analysis string
    	comma-separated list of analyses to perform (supported: type, pointer). See http://golang.org/lib/godoc/analysis/help.html
  -goroot string
    	Go root directory (default "/home/vbatts/go1.11")
  -http string
    	HTTP service address (default "localhost:6060")
  -index
    	enable search index
  -index_files string
    	glob pattern specifying index files; if not empty, the index is read from these files in sorted order
  -index_interval duration
    	interval of indexing; 0 for default (5m), negative to only index once at startup
  -index_throttle float
    	index throttle value; 0.0 = no time allocated, 1.0 = full throttle (default 0.75)
  -links
    	link identifiers to their declarations (default true)
  -maxresults int
    	maximum number of full text search results shown (default 10000)
  -notes string
    	regular expression matching note markers to show (default "BUG")
  -play
    	enable playground in web interface
  -templates string
    	load templates/JS/CSS from disk in this directory
  -timestamps
    	show timestamps with directory listings
  -url string
    	print HTML for named URL
  -v	verbose mode
  -write_index
    	write index to a file; the file name must be specified with -index_files
  -zip string
    	zip file providing the file system to serve; disabled if empty
@gopherbot gopherbot added this to the Unreleased milestone Oct 16, 2018
@vbatts
Copy link
Contributor Author

vbatts commented Oct 16, 2018

(also, it's a shame that the -ex flag for seeing examples was removed too :-( )

@agnivade
Copy link
Contributor

This is correct. CLI support for godoc was removed in master. Please use godoc from the 1.11 release.

https://golang.org/doc/go1.11#godoc

@vbatts
Copy link
Contributor Author

vbatts commented Oct 16, 2018

sorry, but ./make.bash did no such thing.

[vbatts@chacha] {master *} ~$ cd $GOROOT
[vbatts@chacha] ((go1.11.1)) ~/go1.11$ find . -name godoc
[vbatts@chacha] ((go1.11.1)) ~/go1.11$ 

@vbatts
Copy link
Contributor Author

vbatts commented Oct 16, 2018

this seems like a mistake to break user's access to the local doc tool. This already happened when go doc was migrated away from stdlib to x/tools around go1.5. Now it's going back and going to disrupt folks again?

@agnivade
Copy link
Contributor

You cannot get godoc using make.bash. It is packaged as part of the 1.11 distribution which is available for download on the website.

this seems like a mistake to break user's access to the local doc tool.

Please refer to the release notes. We are trying to reduce duplication across multiple doc tools. You may use go doc as the local doc tool.

@golang golang locked and limited conversation to collaborators Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants