Software developer challenge
To software's mission is to assert the cheapest travel for desired destination.
The programming language choiced was Golang. As good practice using Docker.
To start the software needs a file with possibles routes. Example:
GRU,BRC,10
BRC,SCL,5
GRU,CDG,75
...
Similar to .env.example
make clean-containers
make clean-network
make create-network
make build
./main --help
Starting Service
Usage of /tmp/go-build314365757/b001/exe/main:
-routes string
travel routes file (default "./input-file.txt")
make run ROUTES=./input-file.txt
Enter ORG-DES
format.
Example:
GRU-ORL
Answer:
best route: BRC - SCL - GRU - ORL > $35.00
Based on k8s best practices
/healthz
/started
To find the cheapest transfer travel option.
/routes?origin=GRU&destination=ORL
To insert new route. It will be perssistent on data inputed file.
/routes
Method: Post
Body: {"origin": "GRU", "destination": "BRC", "price": 10}
make test-coverage