requires go 1.13 or later
- clone this repository
- download dependencies:
go mod download
- build using
make build
orgo build -o frequently main.go
Main commands
command | description |
---|---|
serve | start http server |
req | make request as client to server |
help | help about any command |
use serve
command to start http server.
Usage:
./frequently serve [flags]
Flags:
-a, --address string http listening port (default ":8000")
-h, --help help for serve
use req
command to make request as client to server
Usage:
./frequently req [flags]
Flags:
-f, --file string file to check
-h, --help help for req
-i, --insensitive insensitive mode
-m, --max string max result (default "10")
-u, --url string url for request (default "http://localhost:8000")
example to get top 5 words appearance from server: ./frequently -f ./data/GoLang_Test.txt --max=5