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

Godoc v. go doc in Go 1.14 #54

Description

@TomasHubelbauer

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions