Godoc Command Not Found

godoc command doesn't work on my system (I'using Linux Mint 20 Ulyana).

I've just tried this procedure:

  1. install godoc with following command:

go get

  1. Start godoc server:

godoc -http=:6060

The result is: bash: godoc: command not found

I'm using this go version go version go1.15 linux/amd64

And this is my PATH variable /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/go/bin

All other go commands (go build, go run and so on) work correctly.

What can I do to make godoc command work?

3

5 Answers

Step - 1: Check if godoc package is installed

Make sure you can run godoc using this command:

$GOPATH/bin/godoc -http=:6060
Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.