2020-03-02 17:18:07 +11:00
2020-03-02 17:02:56 +11:00
2020-03-02 16:46:01 +11:00
2020-03-02 00:34:43 +11:00
2020-03-02 16:46:01 +11:00
2020-03-02 17:02:56 +11:00
2020-03-02 00:34:43 +11:00
2020-03-02 00:34:43 +11:00
2020-03-02 16:46:01 +11:00
2020-03-02 17:18:07 +11:00

Zendesk Code Challenge

Github Build

How does it application work

Highlights

  • Had basic CI(Github workflow) pipeline setup
  • Containerised Application
  • Usd map to index all entities and fields, after all the entities been scanned, how many how many items we have, the time complexity is always O(1).
  • Used table driven test

How to

How to run


./auto/run

Or without Docker


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


./auto/test

Or without Docker


go test ./... -cover

How to build Docker image


GITHUB_RUN_NUMBER=1 ./auto/build

If I had more time / What can I improve

  • Better object printing instead of using spew.Dump()
  • Reuse more shard logic especially in search/index.go, but due to Go missing generics concept it's different when compare to Ruby, Java and some other popular languages.
  • Add more tests, due to this code test costs me a lot of time to complete, so I didn't cover all the code currently, but I am keen to add more tests if possible.
  • Better user experience in CLI application, current the cli app is very basic and go can't go back to previous menu.
S
Description
No description provided
Readme
176 KiB
Languages
Go 98.3%
Dockerfile 1%
Shell 0.7%