Frederic G. MARAND 66e1a7d954 Added some DI polish | há 2 anos atrás | |
---|---|---|
.run | há 2 anos atrás | |
cmd | há 2 anos atrás | |
domain | há 2 anos atrás | |
internal | há 2 anos atrás | |
web | há 2 anos atrás | |
.env | há 2 anos atrás | |
.gitignore | há 2 anos atrás | |
LICENSE | há 2 anos atrás | |
Makefile | há 2 anos atrás | |
README.md | há 2 anos atrás | |
go.mod | há 2 anos atrás | |
go.sum | há 2 anos atrás |
"The original fizz-buzz consists in writing all numbers from 1 to 100, and just replacing all multiples of 3 by ""fizz"", all multiples of 5 by ""buzz"", and all multiples of 15 by ""fizzbuzz"". The output would look like this: ""1,2,fizz,4,buzz,fizz,7,8,fizz,buzz,11,fizz,13,14,fizzbuzz,16,...""."
Your goal is to implement a web server that will expose a REST API endpoint that:
The server needs to be:
Bonus: add a statistics endpoint allowing users to know what the most frequent request has been. This endpoint should:
int1
and int2
must be different and within the open interval ]1, limit[
.str1
and str2
must be valid path components as per RFC 3986 §2.2.:8080
FIZZBUZZ_ADDR
overrides default-addr
overrides environment variableNote: environment can be loaded from .env
file: see make serve
.
go.mod
-addr
flag, FIZZBUZZ_ADDR
env varSIGTERM
stdout
(not stderr
)