A simple microservice to solve linear equations, built in Golang.
Explore go-eqn-solver docs »
Demo it now »
- Install
docker
- Clone the repository and
cd
into the directory - Build the image through
docker build -t go-eqn-solver .
- Run using
docker run -d -p 8080:8080 go-eqn-solver
cd
into the project directory- Run tests using
go test ./...
- Browse to http://localhost:8080 to access the front-end equation solver
RESTFul API
POST https://go-eqn-solver.azurewebsites.net/api/solve
Key | Description | Example |
---|---|---|
eqn | A linear equation with one unknown x | 2x=4 |
Given a valid request, here are the possible responses. The response is returned as JSON with a single result
field.
Result | Description |
---|---|
x={number} | The equation has a single solution, number , rounded to 8 decimal places. |
Infinite solutions | The equation has infinite solutions |
No solution | The equation is unsolvable |