set-up Visual Studio Code

set-up go Dockerfile

Use the go playground

Youtube - Learn Go in 7 minutes Goroutines by example Channels by example

Learning Go

Official Go Docs

  • Tutorial: Getting started
  • Tutorial: Create a module: Code in ./1_go.dev_doc_tutorial_create-a-module
  • Tutorial: Getting started with multi-module workspaces: Code in ./2_go.dev_doc_tutorial_multi-module-workspaces
  • Tutorial: Developing a RESTful API with Go and Gin: Code in ./3_go.dev_doc_tutorial_restful-api-with-go-and-gin
  • Tutorial: Getting started with generics: Code in ./4_go.dev_doc_tutorial_generics
  • Tutorial: Getting started with fuzzing: Code in ./5_go.dev_doc_tutorial_fuzzing

Resources I went through in order, some concurrently

Effective Go

Code Review Comments

The Language Specification

Go Tour

Learning Go: An Idiomatic Approach to Real-World Go Programming
Another edition is expected out in 2024

Review of the best Go books for 2023:

"The Go Programming Language"

  • What go is and has according to the Preface:
    • Apparently Go is a high-level language, but it has basically no functional programming features
    • Garbage collection
    • A package system
    • First-class functions
    • lexical scope
    • A system call interface
    • Immutable strings in which text is generally encoded in UTF-8
    • No implicit numeric conversions
    • No constructors or destructors
    • No operator overloading
    • No default parameter values
    • No inheritance
    • No generics (Although these are added in 1.18)
    • No exceptions
    • No macros
    • No function annotations
    • No thread-local storage

Some chapters refer to exercises in previous chapters, and expect you to build on them. So you can't just read each chapter expecting it to be self contained. Some of the exercises such as creating an FTP server in Chapter 8 requires a lot of background knowledge. If you don't work on an FTP server on a daily basis, this exercise is likely to take you weeks. You'll learn all about FTP and little about Go. This is a side-track from learning Go, and a wast of time unless you want to learn all about FTP rather than Go.

I started going through chapter "8. Goroutines and Channels" after reading chapter "10. Concurrency in Go" of "Learning Go: An Idiomatic Approach to Real-World Go Programming" and got up to "8.6. Example: Concurrent Web Crawler", then realised that I couldn't go any further without going back to Chapter 5, which I hadn't been through.

100 Go Mistakes and How to Avoid Them

Useful Resources

Generics

Functional Go

Constants

There are boolean constants, rune constants, integer constants, floating-point constants, complex constants, and string constants. Rune, integer, floating-point, and complex constants are collectively called numeric constants. as per spec. That means Arrays, Slices, Maps, Structs, etc can't be made constant, but there is a work-around using initialisation functions.

Books

  • Learning Functional Programming in Go
  • Functional Programming in Golang (to be released on 2023-04-11), but it's Pakt, so based on experience with Pakt, probably not much good
  • Humans are very good at measuring when we have something to measure against. Go for JavaScript Developers has comparisons that are quite helpful for those of us that have spent a long time in JavaScript
  • wiki books