- Install Go - Set up environment for productivity.
- 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.
- Dependency Injection - Learn about dependency injection, how it relates to using interfaces and a primer on io.
- 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
andMutex
- 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.
Now that you have hopefully digested the Go Fundamentals section you have a solid grounding of a majority of Go's language features and how to do TDD.
This next section will involve building an application.
Each chapter will iterate on the previous one, expanding the application's functionality as our product owner dictates.
New concepts will be introduced to help facilitate writing great code but most of the new material will be learning what can be accomplished from Go's standard library.
By the end of this, you should have a strong grasp as to how to iteratively write an application in Go, backed by tests.
- HTTP server - We will create an application which listens to HTTP requests and responds to them.
- JSON, routing and embedding - We will make our endpoints return JSON and explore how to do routing.
- IO and sorting - We will persist and read our data from disk and we'll cover sorting data.
- Command line & project structure - Support multiple applications from one code base and read input from command line.
- Time - using the
time
package to schedule activities. - WebSockets - learn how to write and test a server that uses WebSockets.