csv-json-converter-CLI-golang

module
v0.0.0-...-6e8f11a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2023 License: MIT

README

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:

  1. Conversion direction (either "csvtojson" or "jsontocsv").
  2. Input file path.
  3. 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:

  1. To remove a specific file:
$ make clean file=filename.csv/json
  1. To remove all CSV and JSON files:
$ make clean-all
  1. To delete all files with a specified extension:
$ make delete type=csv/json

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL