quii / learn-go-with-tests

Learn Go with test-driven development
MIT License
22.21k stars 2.81k forks source link

Proposal: clear chapter sections #809

Open LBF38 opened 2 months ago

LBF38 commented 2 months ago

Hi, thanks for this awesome resource to learn the fundamentals of Go. It helps a lot to have a first view of the whole language !

However, I think that each chapter sections could be improved to better display the structure of them. As I have read, the chapters are structured based on the TDD approach. And this makes it hard to quickly navigate to a specific chapter section when we want to revisit the Git Book or when we are resuming our reading.

Therefore, I'd like to suggest a slight modification of the chapter sections by organizing them around each requirement. Hence, we can keep the titles for each TDD step and encapsulate each TDD cycle into its requirement section. So, it would look something like the following :

Intro to the chapter concepts

# Requirement 1

## 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

# Requirement 2

Repeat TDD sections ...

# Wrapping Up

What do you think ?