Skip to content

Latest commit

 

History

History
35 lines (18 loc) · 1.49 KB

README.md

File metadata and controls

35 lines (18 loc) · 1.49 KB

Learn Go with Tests

This book is for absolute beginners. Familarity with any other programming language is expected.

Following is a map of Chapter name and what topics they cover.

  • Hello, World: Basic syntax, introduction to writing tests in Go.

  • Integers: Documentation, example test/documentation.

  • Iteration: For loops, benchmarks.

  • Arrays and slices: Arrays, slices, len, test coverage.

  • Structs, methods & interfaces: Structs, methods & interfaces and how are they used together.

  • Pointers & errors: Pointers (copy by reference vs copy by value). Errors. nil.

  • Maps: Maps (dictionaries), basic CRUD.

  • Dependency Injection: Prerequisite to next chapter (mocking).

  • Mocking: Test the behavior, not implementation. Don't rely on blocking resources, mimic them.

  • Concurrency: go routines, channels, race contidions, . Make it work, make it right, make it fast.

  • Select: Syntax sugar related to concurrency. Listen to multiple channels at once in a syntax similar to switch.

  • Reflection: Go's internal datatypes.

  • Sync: Supplement to concurrency. WaitGroups, Mutexes. A WaitGroup waits for a collection of goroutines to finish. A Mutex is a mutual exclusion lock. The zero value for a Mutex is an unlocked mutex.

  • Context:

The book can be found at https://quii.gitbook.io/learn-go-with-tests/. If that link is dead, head over to wayback machine https://web.archive.org/web/20200110162028/https://quii.gitbook.io/learn-go-with-tests/