Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.
/ arithmatic Public archive

A simple arithmatic API with cache support written in Golang

License

Notifications You must be signed in to change notification settings

Brettm12345/arithmatic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arithmatic API Golang Build Status Go Report Card Coverage Status

A simple arithmatic API with cache support written in Golang

Building

$ go get -u github.com/Brettm12345/arithmatic

Usage

I use httpie for the following examples

Starting the server

$ arithmatic

Addition

$ http localhost:8080/add?x=4&y=5
{
    "Action": "add",
    "Answer": 9,
    "Cached": false,
    "X": 4,
    "Y": 5
}

Subtraction

$ http localhost:8080/subtract?x=4&y=5
{
    "action": "subtract",
    "answer": -1,
    "cached": false,
    "x": 4,
    "y": 5
}

Multiplication

$ http localhost:8080/subtract?x=4&y=5
{
    "action": "multiply",
    "answer": 20,
    "cached": false,
    "x": 4,
    "y": 5
}

Division

$ http localhost:8080/subtract?x=4&y=5
{
    "action": "divide",
    "answer": 0,
    "cached": false,
    "x": 4,
    "y": 5
}

About

A simple arithmatic API with cache support written in Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages