PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, August 22, 2022

[FIXED] How to make "godoc" command work on my system?

 August 22, 2022     environment-variables, go, ubuntu     No comments   

Issue

"godoc" doesnt' work on my system.(I'm using ubuntu 13.04)

godoc fmt

gives the following error

2013/06/08 19:12:43 readTemplate: open /usr/lib/go/lib/godoc/codewalk.html: no such file or directory

"which go" gives:

/usr/bin/go

"go env" gives the following:

GOROOT="/usr/lib/go"
GOBIN=""
GOARCH="386"
GOCHAR="8"
GOOS="linux"
GOEXE=""
GOHOSTARCH="386"
GOHOSTOS="linux"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_386"
GOGCCFLAGS="-g -O2 -fPIC -m32 -pthread"
CGO_ENABLED="1"

What should I do to make it work?


Solution

The following worked for me on Ubuntu 13.10:

sudo apt-get install golang-doc
godoc -http=:6060

Navigate to http://localhost:6060


EDIT: The version shipped with the distribution is likely to be out of date. I'm not an active Go user at the moment but this answer looks the most complete: https://stackoverflow.com/a/61300854/15985



Answered By - Thomas Bratt
Answer Checked By - Marie Seifert (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing