lang/go: reformat README (WIP)
This commit is contained in:
parent
cc36f9608e
commit
fbf2a29ebe
1 changed files with 34 additions and 15 deletions
|
@ -1,5 +1,20 @@
|
||||||
#+TITLE: :lang go
|
#+TITLE: lang/go
|
||||||
|
#+DATE: January 16, 2017
|
||||||
|
#+SINCE: v2.0
|
||||||
|
#+STARTUP: inlineimages
|
||||||
|
|
||||||
|
* Table of Contents :TOC:
|
||||||
|
- [[Description][Description]]
|
||||||
|
- [[Module Flags][Module Flags]]
|
||||||
|
- [[Plugins][Plugins]]
|
||||||
|
- [[Prerequisites][Prerequisites]]
|
||||||
|
- [[Go][Go]]
|
||||||
|
- [[Dependencies][Dependencies]]
|
||||||
|
- [[Features][Features]]
|
||||||
|
- [[Configuration][Configuration]]
|
||||||
|
- [[Troubleshooting][Troubleshooting]]
|
||||||
|
|
||||||
|
* Description
|
||||||
This module adds [[https://golang.org][Go]] support.
|
This module adds [[https://golang.org][Go]] support.
|
||||||
|
|
||||||
+ Code completion (~gocode~)
|
+ Code completion (~gocode~)
|
||||||
|
@ -12,29 +27,28 @@ This module adds [[https://golang.org][Go]] support.
|
||||||
+ [[../../feature/file-templates/templates/go-mode][File templates]]
|
+ [[../../feature/file-templates/templates/go-mode][File templates]]
|
||||||
+ [[https://github.com/hlissner/emacs-snippets/tree/master/go-mode][Snippets]]
|
+ [[https://github.com/hlissner/emacs-snippets/tree/master/go-mode][Snippets]]
|
||||||
|
|
||||||
#+begin_quote
|
** Module Flags
|
||||||
I have mixed feelings about Go. It's a decent compromise between C and higher-level languages, is pleasantly straight-forward and elegant, but lacks /native/ support for luxuries I miss from other languages, like generics, optional arguments, and function overloading. You've got to learn to love ~interface{}~.
|
This module provides no flags.
|
||||||
|
|
||||||
Still, Go is a remarkably useful (and fast!) companion for a variety of small-to-medium backend web and CLI projects.
|
** Plugins
|
||||||
#+end_quote
|
+ [[https://github.com/dominikh/go-mode.el][go-mode]]
|
||||||
|
+ [[https://github.com/syohex/emacs-go-eldoc][go-eldoc]]
|
||||||
|
+ [[https://github.com/dominikh/go-mode.el][go-guru]]
|
||||||
|
+ [[https://github.com/manute/gorepl-mode][gorepl-mode]]
|
||||||
|
+ [[https://github.com/mdempsky/gocode][company-go]]*
|
||||||
|
|
||||||
* Table of Contents :TOC:
|
* Prerequisites
|
||||||
- [[#install][Install]]
|
|
||||||
- [[#go][Go]]
|
|
||||||
- [[#dependencies][Dependencies]]
|
|
||||||
|
|
||||||
* Install
|
|
||||||
** Go
|
** Go
|
||||||
To get started with Go, you need the ~go~ tool:
|
To get started with Go, you need the ~go~ tool:
|
||||||
|
|
||||||
*** MacOS
|
*** MacOS
|
||||||
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
|
#+BEGIN_SRC bash
|
||||||
brew install go
|
brew install go
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Arch Linux
|
*** Arch Linux
|
||||||
#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes")
|
#+BEGIN_SRC bash
|
||||||
sudo pacman --needed --noconfirm -S go
|
sudo pacman -S go
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Dependencies
|
** Dependencies
|
||||||
|
@ -42,10 +56,10 @@ This module requires a valid ~GOPATH~, and the following Go packages:
|
||||||
|
|
||||||
+ ~gocode~ (for code completion & eldoc support)
|
+ ~gocode~ (for code completion & eldoc support)
|
||||||
+ ~godoc~ (for documentation lookup)
|
+ ~godoc~ (for documentation lookup)
|
||||||
+ ~goimports~ (for auto-formatting code on save and fixing imports)
|
|
||||||
+ ~gorename~ (for extra refactoring commands)
|
+ ~gorename~ (for extra refactoring commands)
|
||||||
+ ~gore~ (for the REPL)
|
+ ~gore~ (for the REPL)
|
||||||
+ ~guru~ (for code navigation & refactoring commands)
|
+ ~guru~ (for code navigation & refactoring commands)
|
||||||
|
+ ~goimports~ (optional: for auto-formatting code on save & fixing imports)
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
#+BEGIN_SRC sh
|
||||||
export GOPATH=~/work/go
|
export GOPATH=~/work/go
|
||||||
|
@ -58,3 +72,8 @@ go get -u golang.org/x/tools/cmd/gorename
|
||||||
go get -u golang.org/x/tools/cmd/guru
|
go get -u golang.org/x/tools/cmd/guru
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* TODO Features
|
||||||
|
|
||||||
|
* TODO Configuration
|
||||||
|
|
||||||
|
* TODO Troubleshooting
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue