Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

Godoc v. go doc in Go 1.14 #54

Open
TomasHubelbauer opened this issue Mar 12, 2020 · 0 comments
Open

Godoc v. go doc in Go 1.14 #54

TomasHubelbauer opened this issue Mar 12, 2020 · 0 comments

Comments

@TomasHubelbauer
Copy link

I am a novice at Go, so this might have an obvious reason/solution, however I have run into a problem on the first page of the book. It says to use godoc hash to read about the hash package. I tried that and it says this:

Unexpected arguments. Use "go doc" for command-line help output instead. For example, "go doc fmt.Printf".
usage: godoc -http=localhost:6060

When using go doc hash, everything works as expected. Should go doc hash be the recommended command to run instead?

I am not sure why the difference in Godoc and go doc. I installed godoc using go get golang.org/x/tools/cmd/godoc which is a command I just got somewhere, I didn't find any "official" way to do it and the highest ranked Google result (some reddit post) contained a command which didn't work for me (it hung). So I settled at this command.

I am using Go 1.14 so it's possible things have changed between when this (and others books and resources I've been using) were written and today.

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

No branches or pull requests

1 participant