Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/alyyousuf7/fizzbuzz
- Owner: alyyousuf7
- Created: 2019-05-11T12:30:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-11T13:01:23.000Z (over 5 years ago)
- Last Synced: 2023-02-28T18:37:05.612Z (over 1 year ago)
- Topics: fizzbuzz, golang
- Language: Go
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fizzbuzz
FizzBuzz implementation in Go.Usage:
```go
package mainimport (
"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
```