Search⌘ K
AI Features

FizzBuzz: "Buzz" Requirement

Explore how to implement the Buzz feature for numbers divisible by 5 in the FizzBuzz kata. Learn to write the failing test, fix the code, and refactor following the TDD Red-Green-Refactor process using Go.

So far, we’ve implemented two scenarios of the FizzBuzz kata:

  • The not divisible scenario.
  • The Fizz feature prints fizz when a number divisible by 3 is provided.

Now, let’s move to the Buzz feature.

Buzz scenario

As a reminder, the feature states that the function has to print Buzz when a number ...