csv-json-converter-CLI-golang

This repository houses a simple CLI (Command Line Interface) application written in Go. The tool allows for the conversion of CSV files to JSON format and vice versa.
Prerequisites
Getting Started
Clone the repository to your local machine using the following command:
$ git clone https://github.com/GiorgiMakharadze/csv-json-converter-CLI-golang.git
$ cd csv-json-converter-CLI-golang
Building the App
$ make build
Usage
The CLI tool takes three arguments:
- Conversion direction (either "csvtojson" or "jsontocsv").
- Input file path.
- Output file path.
Use the tool as follows
$ ./bin/csvjsonconverter csvtojson input.csv output.json
or
$ ./bin/csvjsonconverter jsontocsv input.json output.csv
If the conversion is successful, it will output: Conversion successful!
Test the App
$ make test
This will execute the test cases and output the results.
Cleaning Up
You can clean up generated files using commands from the Makefile:
- To remove a specific file:
$ make clean file=filename.csv/json
- To remove all CSV and JSON files:
$ make clean-all
- To delete all files with a specified extension:
$ make delete type=csv/json