csv

package
v0.0.0-...-514cf28 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCSVNotSlice          = errors.New("data is not a slice")
	ErrCSVNotSliceOfStructs = errors.New("slice elements are not structs")
	ErrCSVWriteFailed       = errors.New("failed to write")
)

Functions

func SliceOfStructsToCSV

func SliceOfStructsToCSV(w io.Writer, data interface{}) error

SliceOfStructsToCSV writes a slice of structs to a CSV writer using struct field names as headers. This function assumes that the data provided is a slice of structs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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