Go API service that performs math operations (add, subtract, multiply, divide) on two arguments (x and y) passed via URL and returns the result in JSON format. The app caches results and shows if it was used. Cache items expire if not hit for 1 minute.
PORT=8080 go run main.go
go test -v ./tests/...
go build
go build -ldflags '-s -w'
./teltech-go-challenge
Pushing to the main branch will result in deploying the app to `https://teltech-go.fly.dev/
- On push to master .github/workflows/deploy is triggered (
Trunk Deploy
) - Github action builds the app, runs tests and deploys to Fly.io