Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/alyyousuf7/fizzbuzz

FizzBuzz implementation in Go
https://github.com/alyyousuf7/fizzbuzz

fizzbuzz golang

Last synced: about 4 hours ago
JSON representation

FizzBuzz implementation in Go

Awesome Lists containing this project

README

        

# fizzbuzz
FizzBuzz implementation in Go.

Usage:
```go
package main

import (
"fmt"

"github.com/alyyousuf7/fizzbuzz"
)

func main() {
fb, err := fizzbuzz.New(
[]int{3, 5, 7},
[]string{"fizz", "buzz", "bazz"},
)
if err != nil {
panic(err)
}

for i := 1; i <= 15; i++ {
fmt.Println(fb.Process(i))
}
}
```

Outputs:
```bash
1
2
fizz
4
buzz
fizz
bazz
8
fizz
buzz
11
fizz
13
bazz
fizzbuzz
```