Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

github.com/surajat17/gocsv

Package Overview
Dependencies
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/surajat17/gocsv

Source
Go Modules
Version
v0.0.0-20230218183928-4bc5324e4867
Version published
Created
Source

#gocsv

This is a Go program that reads data from a CSV file and outputs it in a formatted way.

Usage

  • Clone the repository:
git clone https://github.com/example/gocsv.git
  • Build the program:
go build
  • Run the program
go run main.go

This will read the data from the data.csv file in the same directory and output it in a formatted way to the console.

CSV File Format

The program assumes that the CSV file has a header row and three columns of data. The header row is skipped, and the data in each row is read into a struct with three fields: Column1, Column2, and Column3.

Example

Suppose we have the following data in data.csv:

Column 1,Column 2,Column 3 Value 1,Value 2,Value 3 Value 4,Value 5,Value 6

When we run the program, we should see the following output:

Column 1 Column 2 Column 3 Value 1 Value 2 Value 3 Value 4 Value 5 Value 6

FAQs

Package last updated on 18 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts