csv

package
v2.2.9 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package csv contains the CSV loader which allows to load data in a CSV format into a slice of structs.

Index

Constants

View Source
const Name = "csv"

Name of the loader.

Variables

This section is empty.

Functions

func Load

func Load[Out any](in io.Reader) (Out, error)

Load a CSV file and converts it to target struct (Out).

Types

type CSV

type CSV[Out any] struct {
	loader.ILoader[io.Reader, Out] `json:"loader" validate:"required"`
}

CSV definition.

func New

func New[Out any](
	opts ...loader.Func[io.Reader, []Out],
) (*CSV[[]Out], error)

New creates a new loader.

Jump to

Keyboard shortcuts

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