From 899deac3d4ee637d117c3961aabc711a7f851abe Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Mon, 16 Mar 2020 00:11:33 +1100 Subject: [PATCH] Update readme --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 093dd09..d08e314 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,35 @@ # Zombie +## How to run application + +```bash +docker-compose run app +``` + +Or if you have `Go` v1.13 installed locally, then run + +```bash +go run cmd/main.go +``` + +## How to run tests + +```bash +docker-compose run app go test ./... -cover +``` + +## Where to start to read the code + +Please read the code from the entry point `cmd/main.go` + +## Assumptions + +* All the input data is valid + + +## Highlights + +* Used `TableDrivenTests` +* Used `interface` and `map` to model the `command` part to avoid `if else` checks +* Built a `First-In-First-Out` structure `nextZombie` in `application` to represent the next zombie to run. +* Had `docker compose` built in, you don't need to have Go installed locally. One command to bring up the whole application. \ No newline at end of file