Offline Go Documentation Tools

809 views
Skip to first unread message

me

unread,
Jul 24, 2017, 11:33:37 AM7/24/17
to golang-nuts
Sometimes I want to disconnect my laptop or computer from the internet and work with go..

What do you use to read documentation when you are offline?

Here is some brief research I did:
http://www.andybritcliffe.com/post/44610795381/offline-go-lang-documentation

That appears to be one solution.

I do miss an IDE where I can just hit "F1" for help, and it is sensitive to what my cursor is over (finds the docs automatically with what your cursor is currently at).

The above sentence, is likely a challenge/threat to myself to create a Go IDE myself with F1 context senstive help... but that's a large software problem I can't handle right now ;-)

andrey mirtchovski

unread,
Jul 24, 2017, 11:45:25 AM7/24/17
to me, golang-nuts
> What do you use to read documentation when you are offline?

godoc -http=:6060

Tyler Compton

unread,
Jul 24, 2017, 12:46:31 PM7/24/17
to andrey mirtchovski, me, golang-nuts
For cursor-sensitive help dialogs, you may find Language Server Protocol[1] interesting. It provides what you're looking for in Visual Studio Code with Go today, and will help provide that functionality to editors like [Neo]vim in the future.


On Mon, Jul 24, 2017 at 8:45 AM andrey mirtchovski <mirtc...@gmail.com> wrote:
> What do you use to read documentation when you are offline?

godoc -http=:6060

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rob Pike

unread,
Jul 24, 2017, 4:52:48 PM7/24/17
to Tyler Compton, andrey mirtchovski, me, golang-nuts
The "go doc" (distinct from "godoc") command works fine offline. It fact it never goes on line.

-rob


On Tue, Jul 25, 2017 at 2:45 AM, Tyler Compton <xav...@gmail.com> wrote:
For cursor-sensitive help dialogs, you may find Language Server Protocol[1] interesting. It provides what you're looking for in Visual Studio Code with Go today, and will help provide that functionality to editors like [Neo]vim in the future.

On Mon, Jul 24, 2017 at 8:45 AM andrey mirtchovski <mirtc...@gmail.com> wrote:
> What do you use to read documentation when you are offline?

godoc -http=:6060

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.

me

unread,
Aug 7, 2017, 10:29:43 PM8/7/17
to golang-nuts, mirtc...@gmail.com


On Monday, July 24, 2017 at 10:46:31 AM UTC-6, Tyler Compton wrote:
For cursor-sensitive help dialogs, you may find Language Server Protocol[1] interesting. It provides what you're looking for in Visual Studio Code with Go today, and will help provide that functionality to editors like [Neo]vim in the future.


That's interesting!
Is Visual Studio Code a .Net app that takes up lots of memory and CPU?
I find Visual Studio a memory hog/cpu hog at times and do not like editing in it if I do not have to.
However, the "Code" edition could be trimmed down to be quicker, and smaller foot print, but only an experienced user would know.

If that does not work, maybe I'll one day take LSP (above) and implement it into one of my own editors.

 

me

unread,
Aug 7, 2017, 10:33:30 PM8/7/17
to golang-nuts, xav...@gmail.com, mirtc...@gmail.com, you...@z505.com


On Monday, July 24, 2017 at 2:52:48 PM UTC-6, Rob 'Commander' Pike wrote:
The "go doc" (distinct from "godoc") command works fine offline. It fact it never goes on line.

-rob


That's a good tip, I might be even able to use that and pipe it into an editor Memo/Edit widget for instant help with an F1 shortcut. Some editors have "tools" that you can pipe the output of a process into a status memo based on the context (current selected item in editor or cursor). Just running it at a command line and reading it like a man page is an option, but, I'll likely want something a bit more than that, such as a pop up window when I hit F1 or a shortcut.

Tyler Compton

unread,
Aug 9, 2017, 2:25:25 AM8/9/17
to me, golang-nuts, mirtc...@gmail.com, you...@z505.com
Is Visual Studio Code a .Net app that takes up lots of memory and CPU?

Worse, it's an Electron app :)
I don't personally use VSC, so I can't speak to its performance or efficiency. However, LSP is currently supported at some level in Neovim using a plugin, and first-class support is planned. It's possible that there's a project to implement LSP in your editor of choice already.

Christoph Berger

unread,
Aug 10, 2017, 5:02:39 AM8/10/17
to golang-nuts, fo...@z505.com, mirtc...@gmail.com, you...@z505.com
> > Is Visual Studio Code a .Net app that takes up lots of memory and CPU?
Worse, it's an Electron app :)

I use VSC on an old 2012 Mac Mini, and I cannot confirm that it consumes lots of CPU or memory, even with about two dozen extension installed. It is fast and responsive (some say it is notably faster than Atom, the other Electron-based code editor) and has become my favorite editor for code and Markdown (and I have been a diehard Vim user for years, if not decades!). Too many open windows may become a problem, but so may too many open tabs in Chrome or Firefox. VSC saves the state of a workspace though, so I can always happily close a window completely and re-open it later, and VSC restores the workspace. 
And VSC has a great Go plugin.

Just give it a try, it is easy to install and easy to remove :)
Reply all
Reply to author
Forward
0 new messages