A professional-grade, lightweight text completion, editing, and auto-correction utility tool written in Go. This project is structured using the standard Go industry enterprise layout.
go-reloaded/ # Parent Directory
├── cmd/ # Command subdirectory
│ └── go-reloaded/ # Application namespace
│ └── main.go # Application entry point (CLI & I/O)
├── internal/ # Hidden core logic subsystem package
│ ├── reloaded.go # Core text-processing utility logic
│ └── reloaded_test.go# Automated unit test suite
├── assets/ # Subdirectory for files/documentation assets
│ ├── sample.txt # Raw input sample text
│ └── result.txt # Corrected text output target
├── go.mod # Module definition dependency manager
└── README.md # Documentation guide (Root level)
- Number Conversions: Automatically converts hexadecimal
(hex)and binary(bin)strings into standard base-10 decimals. - Text Case Formatting:
- Modifies a single preceding word using
(up),(low), and(cap). - Modifies multiple preceding words using numeric arguments:
(up, <number>),(low, <number>), and(cap, <number>).
- Modifies a single preceding word using
- Punctuation Correction: Adjusts spacing so standard punctuation marks (
.,,,!,?,:,;) attach cleanly to the left word and leave a single space to the right. Handles grouped marks like...and!?. - Quote Formatting: Properly encloses strings wrapped inside single quotes
'by stripping internal padding spaces. - Grammar Correction: Automatically swaps the article
atoanif the next word begins with a vowel (a, e, i, o, u) or a silenth.
Ensure you have Go 1.21+ installed on your system.
To run the text auto-correction tool from the root directory, provide the explicit command subdirectory path followed by your target asset paths:
go run ./cmd/go-reloaded assets/sample.txt assets/result.txtYou can also compile the project into an explicit binary file and execute it cleanly:
# Compile
go build -o reloaded ./cmd/go-reloaded
# Run binary
./reloaded assets/sample.txt assets/result.txtInput File (assets/sample.txt):
If I make you BREAKFAST IN BED (low, 3) just say thank you instead of: how (cap) did you get in my house (up, 2) ?
Output File (assets/result.txt):
If I make you breakfast in bed just say thank you instead of: How did you get in MY HOUSE?
This project utilizes isolated table-driven testing within the internal logic module space. To run the validation suite, execute:
go test -v ./internal/...