Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/friskenstein/learn-go-with-tests

Working through the exercises of Learn Go with tests by Chris James
https://github.com/friskenstein/learn-go-with-tests

go golang tdd test-driven-development testing

Last synced: 4 days ago
JSON representation

Working through the exercises of Learn Go with tests by Chris James

Awesome Lists containing this project

README

        

# Learn Go with Tests

Going through the exercises of [Learn Go with Tests](https://quii.gitbook.io/learn-go-with-tests)

Run with `go run main.go -ex={EXERCISE_NAME}`

## Exercises

- [x] Hello, world - Declaring variables, constants, if/else statements, switch, write your first go program and write your first test. Sub-test syntax and closures.
- [ ] Integers - Further Explore function declaration syntax and learn new ways to improve the documentation of your code.
- [ ] Iteration - Learn about for and benchmarking.
- [ ] Arrays and slices - Learn about arrays, slices, len, varargs, range and test coverage.
- [ ] Structs, methods & interfaces - Learn about struct, methods, interface and table driven tests.
- [ ] Pointers & errors - Learn about pointers and errors.
- [ ] Maps - Learn about storing values in the map data structure.
- [x] Dependency Injection - Learn about dependency injection, how it relates to using interfaces and a primer on io.
- [x] Mocking - Take some existing untested code and use DI with mocking to test it.
- [ ] Concurrency - Learn how to write concurrent code to make your software faster.
- [ ] Select - Learn how to synchronise asynchronous processes elegantly.
- [ ] Reflection - Learn about reflection
- [ ] Sync - Learn some functionality from the sync package including WaitGroup and Mutex
- [ ] Context - Use the context package to manage and cancel long-running processes
- [ ] Intro to property based tests - Practice some TDD with the Roman Numerals kata and get a brief intro to property based tests
- [ ] Maths - Use the math package to draw an SVG clock
- [ ] Reading files - Read files and process them
- [ ] Templating - Use Go's html/template package to render html from data, and also learn about approval testing
- [ ] Generics - Learn how to write functions that take generic arguments and make your own generic data-structure
- [ ] Revisiting arrays and slices with generics - Generics are very useful when working with collections. Learn how to write your own Reduce function and tidy up some common patterns.