Programming in Go feels sufficiently flexible but at the same time the compiler is quite insistent on strong variable types and removing unused variables. For example, you cannot compare an integer with a floating point number without converting one of them. This is by design and is to prevent you from getting into trouble. Discipline. Here are some useful resources for Go.
- The main Go website with downloadable packages, documentation, and lots of very useful stuff indeed.
- The GNU Compiler Collection, which includes a Go compiler.
Is there any difference? My preference is to use the official one when I'm programming on my Mac. I have both installed on a Raspberry Pi but I've yet to do any tests to determine differences. By default, the official compiler outputs a static binary and GCC outputs a dynamically linked binary (requiring the Go library).
- O'Reilly's Introducing Go. You can easily read this book in a weekend and get a beginner's grasp of Go. (Also available on O'Reilly directly of course.)
- The Go Programming Language, Donovan & Kernighan, Addison-Wesley. Kernighan's involvement in such a book excites me. His book with Ritchie on C is a classic and is incredibly easy to read.
- Once you've had an introduction to Go and seen concurrency on paper, this video by Rob Pike explains how to use it in Go with examples.
- Learn how to code Google's Go Programming Language (Udemy) - a comprehensive course of 46 hours. I dipped in and out of this to reinforce what I'd learnt from the books. Keep an eye out on Udemy for discounts for this course.
Here are suggested directions to go further:
- gg, a 2d graphics library. This makes it very easy to draw graphics and output png files. I used it early on in my Go learning to output The Mandelbrot Set.
- Web Development with Go (Udemy). Once you have the basics, this course will tell you how to use Go for web applications.