Learnings from Golang
So I’ve recently started learning golang. It’s been a language that I’ve been keen to explore since its widely used under the hood for alot of infrastructure code.
I wanted to consolidate my patterns and learning process here.
Good learning resources for golang
Here are some good resources for learning golang
- “Exercism - go” - Main source of go practices, provides a useful learning path for the language feature
- “Go by Example” - Provides a bunch of templates to reference
- “Learn go with tests” - tests in go
- “100 Go mistakes” - Useful hints and guides for unknown lints and their fixes
- “goimports and go fmt” - tools for go format and import
neovim plugins
The plugin that I am using is vim-go, which is slightly older but consolidates all the necessary plugins into neovim.
What I like most about it is that the formatting gofmt and goimports is configured in the init.vim file, this avoids autocommands required in the go.neovim plugin.
" Vim-Go
let g:go_fmt_command = "goimports" " format imports with goimports
let g:go_fmt_autosave = 1 " autoformat on save
Leave a comment