anylapus first test
Base Path /api
Implements four ariphmetical methods:
- addition(сложение)
/add
- subtraction(вычитание)
/sub
- multiplication(умножение)
/mul
- division(деление)
/div
Waiting parameters from query, like ?a=1&b=2
docker-compose up -d --build
http://localhost:8080/api/add?a=4&b=5
Good request
15:29 $ curl -X GET "http://localhost:8080/api/add?a=4&b=5"
{"Success":true,"ErrCode":"","Value":9}
Bad request
15:30 $ curl -X GET "http://localhost:8080/api/div?a=4&b=0"
{"Success":false,"ErrCode":"400"}
simple test
make test
simple covarage
make covtest
- избавиться от дублирования кода в хендлерах, в работе со структурой
Numbers