Solved GO Help

Ok, I wanted to try my hand at go. I've played with other languages but I'm no expert. I'm not sure how this is supposed to work on FreeBSD but godoc raises 'command not found'.

I thought since it was a tool that it might come in a separate package, but:
Code:
[:15-03-07 19:16]larry@/home/larry%go list
can't load package: package .: no buildable Go source files in /home/larry
Is there a guide to go on FreeBSD? Or am I just doing things wrong? FYI I was able to run/compile 'hello world' so something is working.

Can anyone give me some pointers or point me to some?
 
Well on go list, nevermind... I thought it was a package installtool :p . K back to go doc
 
Ok, I don't know if this is the best way (probably not ;)) but I installed vim-go through Vundle; that gave me " GoInstallBinaries" which gave me " go get"

Then

Code:
go get golang.org/x/tools/cmd/godoc

and ... Voilà!
 
I spent a few days setting up lang/go on Linux about a month ago and didn't go beyond the tinkering stage so I don't remember much except needing to "get" a few packages so I could do anything so you might have missed a step in getting those.

(I switched the company to FreeBSD immediately after that. Yay!)
 
I don't doubt that there may be more to do but...

godoc works!
Code:
[freebsd:15-03-08 19:04]larry@/home/larry/ycm_build%godoc
usage: godoc package [name ...]
        godoc -http=:6060
  -analysis="": comma-separated list of analyses to perform (supported: type, pointer). See http://golang.org/lib/godoc/analysis/help.ht
  -ex=false: show examples in command line mode
  -goroot="/usr/local/go": Go root directory
  -html=false: print HTML in command-line mode
  -http="": HTTP service address (e.g., ':6060')
  -httptest.serve="": if non-empty, httptest.NewServer serves on this address and blocks
  -index=false: enable search index
  -index_files="": glob pattern specifying index files; if not empty, the index is read from these files in sorted order
  -index_interval=0: interval of indexing; 0 for default (5m), negative to only index once at startup
  -index_throttle=0.75: index throttle value; 0.0 = no time allocated, 1.0 = full throttle
  -links=true: link identifiers to their declarations
  -maxresults=10000: maximum number of full text search results shown
  -notes="BUG": regular expression matching note markers to show
  -play=false: enable playground in web interface
  -q=false: arguments are considered search queries
  -server="": webserver address for command line searches
  -src=false: print (exported) source in command-line mode
  -tabwidth=4: tab width
  -templates="": directory containing alternate template files
  -timestamps=false: show timestamps with directory listings
  -url="": print HTML for named URL
  -v=false: verbose mode
  -write_index=false: write index to a file; the file name must be specified with -index_files
  -zip="": zip file providing the file system to serve; disabled if empty
(Congrats on the switch!)
 
Back
Top