A calculator API written in Golang
git clone [email protected]:alohr51/Go-Calculator-API.git
cd Go-Calculator-API
docker build -t gocalc .
docker run --rm -p 8080:8080 gocalc
- Open
http://localhost:8080/api/calc/sum/1/2
in your browser to sum 1 + 2, for example.- Subtract example
http://localhost:8080/api/calc/subtract/10/5
- Multiply example
http://localhost:8080/api/calc/multiply/10/5
- Divide example
http://localhost:8080/api/calc/divide/10/5
- Subtract example
git clone [email protected]:alohr51/Go-Calculator-API.git
cd Go-Calculator-API
go run main.go
- From root of project Go-Calculator-API:
go test ./...