|
|
%!s(int64=3) %!d(string=hai) anos | |
|---|---|---|
| .run | %!s(int64=3) %!d(string=hai) anos | |
| cmd | %!s(int64=3) %!d(string=hai) anos | |
| domain | %!s(int64=3) %!d(string=hai) anos | |
| internal | %!s(int64=3) %!d(string=hai) anos | |
| web | %!s(int64=3) %!d(string=hai) anos | |
| .env | %!s(int64=3) %!d(string=hai) anos | |
| .gitignore | %!s(int64=3) %!d(string=hai) anos | |
| LICENSE | %!s(int64=3) %!d(string=hai) anos | |
| Makefile | %!s(int64=3) %!d(string=hai) anos | |
| README.md | %!s(int64=3) %!d(string=hai) anos | |
| go.mod | %!s(int64=3) %!d(string=hai) anos | |
| go.sum | %!s(int64=3) %!d(string=hai) anos |
"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.:8080FIZZBUZZ_ADDR overrides default-addr overrides environment variableNote: environment can be loaded from .env file: see make serve.
go.mod-addr flag, FIZZBUZZ_ADDR env varSIGTERMstdout (not stderr)