csv

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Marshaller

type Marshaller interface {
	Headers() []string
	Encode(w *csv.Writer, val any, nilValue string) error
}

A Marshaller marshals objects into CSV format.

func NewMarshaller

func NewMarshaller(typ reflect.Type) (Marshaller, error)

NewMarshaller creates a marshaller for the given type.

type RowMapper

type RowMapper interface {
	Headers() []string
	Values(val reflect.Value, nilValue string) ([]string, bool)
}

A RowMapper maps a single row into the CSV representation.

Jump to

Keyboard shortcuts

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