csv

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 3 Imported by: 2

Documentation

Overview

Package csv provides helpers to write CSV files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteToCSV

func WriteToCSV(filename string, data interface{}, encoder ...any) error

WriteToCSV writes the given data to a CSV file, optionally using the given encoders to marshal custom types. Will write a header row if the given file is empty. Wraps github.com/jszwec/csvutil

Types

type CSVEncoder

type CSVEncoder[T any] func(t T) ([]byte, error)

CSVEncoder is a custom encoder for marshalling types to CSV files.

Jump to

Keyboard shortcuts

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