Learn Go with tests
Contribute on github
Search…
main
Learn Go with Tests
Go fundamentals
Install Go
Hello, World
Integers
Iteration
Arrays and slices
Structs, methods & interfaces
Pointers & errors
Maps
Dependency Injection
Mocking
Concurrency
Select
Reflection
Sync
Context
Intro to property based tests
Maths
Reading files
Templating
Generics
Revisiting arrays and slices with generics
Build an application
Intro
HTTP server
JSON, routing and embedding
IO and sorting
Command line & package structure
Time
WebSockets
Questions and answers
OS Exec
Error types
Context-aware Reader
Revisiting HTTP Handlers
Meta
Why unit tests and how to make them work for you
Anti-patterns
Contributing
Chapter Template
Powered By GitBook
Chapter Template
Some intro

Write the test first

Try to run the test

Write the minimal amount of code for the test to run and check the failing test output

Write enough code to make it pass

Refactor

Repeat for new requirements

Wrapping up

Meta - Previous
Contributing
Last modified 3mo ago
Copy link
Contents
Write the test first
Try to run the test
Write the minimal amount of code for the test to run and check the failing test output
Write enough code to make it pass
Refactor
Repeat for new requirements
Wrapping up