Golist

List of articles, projects, books with small annotations, my comments and (may be) pros and cons.

Testing

  • Fakeit - random data generator with over 160 functions. You can create your own functions, can fire up built in local server to test functions.
  • Testfixtures - helps with functional testing, keeping fixture data in yml files.

Slices

Project Structure

Gotchas

  • Cmd dev null - if either one of Cmd.Stdout, Cmd.Stderr, Cmd.Stdin are not explicitly set, Go sets them to /dev/null. This can cause failures when using Cmd.Run in Go programs that execute in environments where /dev/null isn’t accessible. To fix this, either assign dummy values to Cmd.Stdout, Cmd.Stderr and Cmd.Stdin, or ensure that /dev/null is accessible.
  • 50 Shades of Go - Traps, Gotchas, and Common Mistakes, especially useful for New Golang Devs.

Compiler

  • Why Go compiles so fast - Go is one of the fastest compiling programming languages out there. It compiles faster than most of the programming languages, like C/C++, Java, Rust, etc. Since the existing large codebase at Google used to take long hours to build, the quick compilation was one of the most important requirements during the creation of Golang at Google.

Errors

  • Working with errors - Video about new (since Go 1.13) Is, As, Unwrap methods to dealing with errors.

Other

  • CheatSheet - Good and brief examples of Go basics most of which taken from Go Tour.