A text processing CLI tool written in Go that reads a file containing raw text, applies a set of formatting and correction rules, and writes the corrected output into a new file.
This project focuses on string manipulation, file handling, and text formatting, helping build strong backend programming fundamentals using Go.
Go Reloaded works like a small auto-correction engine.
The program:
- Reads a text file containing raw text.
- Detects special formatting commands inside the text.
- Applies transformations.
- Writes the corrected result to a new output file.
The goal of this project is to practice text parsing and file processing in Go.
The program detects formatting commands and modifies words accordingly.
| Command | Description |
|---|---|
(up) |
Converts the previous word to uppercase |
(low) |
Converts the previous word to lowercase |
(cap) |
Capitalizes the previous word |
Example:
Input
this is amazing (up)Output
this is AMAZINGCommands can affect more than one word.
Example:
hello world (cap, 2)Output
Hello WorldConverts hexadecimal numbers to decimal.
Input
1E (hex)Output
30Converts binary numbers to decimal.
Input
10 (bin)Output
2Fixes incorrect use of a / an.
Example
a amazing storyOutput
an amazing storyAutomatically fixes punctuation spacing.
Example
Input
Hello ,world !Output
Hello, world!The program takes two arguments:
go run . <input-file> <output-file>
Example:
go run . sample.txt result.txt
Workflow:
Input File → Go Program → Apply Transformations → Output File
it (cap) was the best of times , it was the worst of times (up)
go run . sample.txt result.txt
It was the best of times, it was the worst of TIMES
go-reloaded-project
│
├── main.go
├── go.mod
├── sample.txt
├── result.txt
└── README.md
This project helped strengthen important Go backend development skills:
- File reading and writing
- String manipulation
- Command line argument parsing
- Pattern detection
- Data transformation
- Debugging and testing
- Writing modular functions
Building this project helped me understand that small details matter in backend development.
Even tiny mistakes like:
- incorrect spacing
- misplaced punctuation
- wrong capitalization
can break the expected output.
Working through these challenges improved my:
- debugging skills
- patience when testing code
- attention to detail
Possible improvements include:
- adding unit tests
- improving pattern detection
- supporting more transformation commands
- adding a web interface version
- creating a REST API version
Ayodeji Olanrewaju
Backend developer in training focused on building practical tools with Go.