The GoLang, Go, or Go Language, is a very nice language used by many projects. Started by Google, they asked some smart people from Berkely (and other places) to create a language that could be simple to write and build like C for compatability to other architectures.
- Effective Go
- Made by the people who maintain GoLang, this page has tons of patterns and notes about how to write.. well… effective go code.
- Rob Pike interview for Evrone: “Go has become the language of cloud infrastructure”
- An interview about GoLang becoming the language of the cloud infrastructure.
- These things are worth learning to become faster at resolving issues.
Go is really amazing at the documents its providing. You can go through the source code at the url below and not only is it the full syntax of the DSL but you also have working examples that you can execute and add your own experiments right inside the webpage!
Using https://play.golang.org/ to quickly share code and ask questions. Allows people to execute the code in quick mannor and within a shared environment.
I like to stay away from global installs of my tools and this is another one of those projects that lets you install multiple versions and select the one for your project.
I really like to use shell scripts to take care of all my setups. So, I am going to tell you (as well as myself) to use the LibSh Project file called go.sh which should have a utility to do installation. Currently the function is called
go_install_goenv which gives you the ability to select Go versions.
After you have this installed
LibSh should pick it up and load it and give you the necessary settings for your environment to continue working.
Here are a couple of things to check your environment is good to Go (see what I did there? yah that was a pun on purpose…)
- Checking what Go can see
This is the command that will dump a ton of things, but of the output we are looking for GOPATH and GOROOT. These variables will need to point to the same version you want to use. If they do not line up, then set with
goenv local #.#.# to set your version for the project, or use
goenv global #.#.# to set globally.
# set version in .go-version
goenv local 1.15.7
# check version
# output should be:
# go version go1.15.7 darwin/amd64
# check go env
go env | grep -E "PATH|ROOT"
# output should be: