update readme about how to use

This commit is contained in:
2020-03-02 17:02:56 +11:00
parent 1582b482b3
commit d004808ea1
3 changed files with 57 additions and 0 deletions
+1
View File
@@ -21,5 +21,6 @@ WORKDIR /home/zendesk
USER zendesk
COPY --from=build /app/zendesk/bin/app .
COPY --from=build /app/zendesk/data ./data
CMD [ "/home/zendesk/app" ]
+51
View File
@@ -1,2 +1,53 @@
# Zendesk Code Challenge
## How to
### How to run
```bash
./auto/run
```
Or without Docker
```bash
go run main.go
```
Please use your arrow keys to select search data type and field name from all fields, then type the value for that field.
If there are something matched, the application will printed out all the information, including linked `User` and `Organisation` information.
Otherwise you should expect a error message says `Cannot find any matched result`
Notice: Due to the limited time, currently you can't go back in the CLI, if you want to skip the current search then just type `Enter`.
### How to test
```bash
./auto/test
```
Or without Docker
```bash
go test ./... -cover
```
### How to build Docker image
```bash
GITHUB_RUN_NUMBER=1 ./auto/build
```
Executable
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash -eu
cd $(dirname $0)/..
docker-compose run app