Using go 1.20 version
This application fetches the list of essays a relative link and count the top 10 word for all the essays combined.
A valid word is:
- Contain at least 3 characters
- Contain only alphabetic characters
- Be part of our bank of words (where not all the words in the bank are valid according to the previous rules)
Output is in pretty json and written to the stdout.
Please see Makefile for build command
make docker-build
Install dependencies
go mod download
Run locally with default flags
go run cmd/word-count/main.go
run with optional flags:
- timeout
- global_timeout
- word_bank_url
- essays_path
- concurrency_limit
- num_consumers
If you wanna run with these flags easiest is to update the .env file and include it when you run command can be found in Makefile.
make wordcounter
make docker-run
Switch out tag for the tag you built with
make tests