Unable to install godoc on my local machine

I have windows (Windows 11 Home core i7).
I tried installing godoc but it gives me an error i dont fully understand. Any help is much appreciated.

1. $ go install golang.org/x/tools/godoc@latest
*package golang.org/x/tools/godoc is not a main package*

golang.org/x/tools/cmd/godoc install cmd/godoc

go intall golang.org/x/tools/cmd/godoc@latest

1 Like

yes it works… installs in my $GOPATH/bin directory.
and that path is not in my windows user $PATH, hence “command not found”… makes sense now… Thanks for the help.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.