csvarser

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CsvParser

type CsvParser struct {
	TypeParsers map[string]ParserFunc
}

func (*CsvParser) AddTypeParser

func (p *CsvParser) AddTypeParser(dataType string, parser ParserFunc)

func (*CsvParser) FillStructFromSlice

func (p *CsvParser) FillStructFromSlice(structData interface{}, sliceData []string) error

Заполнить структуру из слайса ------------------------------

func (*CsvParser) Init

func (p *CsvParser) Init()

type FieldNotExistsInSliceError

type FieldNotExistsInSliceError struct {
	FieldName string
	FieldType string
	Index     int
}

Ошибка Поле отсутсвует в СЛайсе --------------------------------

func (*FieldNotExistsInSliceError) Error

type ParserFunc

type ParserFunc func(s string) (interface{}, error)

type ParserNotFoundError

type ParserNotFoundError struct {
	FieldType string
}

Ошибка Парсер не найден ------------------------

func (*ParserNotFoundError) Error

func (e *ParserNotFoundError) Error() string

Jump to

Keyboard shortcuts

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