csvhelper

package module
v0.0.0-...-8a3f8d1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 2 Imported by: 1

README

csvhelper

Build Status GoDoc

Package csvhelper provides helper functions for CSV files.

Example of Reading CSV File
f := "files/example.csv"

records, err := csvhelper.ReadFile(f)
if err != nil {
        log.Printf("ReadFile() error: %v", err)
        return
}

log.Printf("records: %v", records)
Documentation
License

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(f string) ([][]string, error)

ReadFile reads CSV file and return CSV records.

Example
package main

import (
	"log"

	"github.com/northbright/csvhelper"
)

func main() {
	f := "files/example.csv"

	records, err := csvhelper.ReadFile(f)
	if err != nil {
		log.Printf("ReadFile() error: %v", err)
		return
	}

	log.Printf("records: %v", records)
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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