csvx

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

encoding/csv的扩展包。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EachRecord

func EachRecord(r io.Reader, h Handler, opts Options) error

func FileEachRecord

func FileEachRecord(filename string, h Handler, opts Options) error

func ToFreejson

func ToFreejson(data []byte) (interface{}, error)

func ToVal

func ToVal(v interface{}) func(data []byte) (interface{}, error)

Types

type Handler

type Handler func(line int, record interface{}) (bool, error)

func JsonH

func JsonH(decoder func(data []byte) (interface{}, error), h Handler) Handler

func Top

func Top(n int, h Handler) Handler

type Options

type Options struct {
	Comma            rune
	Comment          rune
	FieldsPerRecord  int
	LazyQuotes       bool
	TrailingComma    bool
	TrimLeadingSpace bool
	IgnoreErr        bool
}

Jump to

Keyboard shortcuts

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