Implemented console commands functionality in the project in a way that requires minimal changes when adding a new command.
Clone this repository
git clone https://github.com/kemalkochekov/Console-Commands.git
bar@foo$: go run cmd/cli/main.go
- help command
- spell command
- gofmt command
Displays a list of available commands
Accepts a word as input and outputs all the letters of that word separated by spaces in the console based on the results of the operation.
Accepts a *.txt file as input and generates a modified text file with alterations such as inserting a tab before each paragraph and adding a period (.) at the end of sentences.
Available commands:
help: Displays a list of available commands
spell: spell --word [string] | Accepts a word as input and outputs all the letters of that word separated by spaces in the console based on the results of the operation.
gofmt: gofmt --file [string] | Accepts a *.txt file as input and generates a modified text file with alterations such as inserting a tab before each paragraph and adding a period (.) at the end of sentences.
go test ./...
go test ./... -cover
We can add several new commands with minimum changes in the whole project.