Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Reloaded 🔄

Go CLI Tool Status

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.


Project Overview

Go Reloaded works like a small auto-correction engine.

The program:

  1. Reads a text file containing raw text.
  2. Detects special formatting commands inside the text.
  3. Applies transformations.
  4. Writes the corrected result to a new output file.

The goal of this project is to practice text parsing and file processing in Go.


Features

Case Transformations

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 AMAZING

Apply Transformation to Multiple Words

Commands can affect more than one word.

Example:

hello world (cap, 2)

Output

Hello World

Hexadecimal Conversion

Converts hexadecimal numbers to decimal.

Input

1E (hex)

Output

30

Binary Conversion

Converts binary numbers to decimal.

Input

10 (bin)

Output

2

Grammar Correction

Fixes incorrect use of a / an.

Example

a amazing story

Output

an amazing story

Punctuation Fixing

Automatically fixes punctuation spacing.

Example

Input

Hello ,world !

Output

Hello, world!

How It Works

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

Example

Input (sample.txt)

it (cap) was the best of times , it was the worst of times (up)

Command

go run . sample.txt result.txt

Output (result.txt)

It was the best of times, it was the worst of TIMES

Project Structure

go-reloaded-project
│
├── main.go
├── go.mod
├── sample.txt
├── result.txt
└── README.md

Concepts Practiced

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

What I Learned

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

Future Improvements

Possible improvements include:

  • adding unit tests
  • improving pattern detection
  • supporting more transformation commands
  • adding a web interface version
  • creating a REST API version

Author

Ayodeji Olanrewaju

Backend developer in training focused on building practical tools with Go.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages