csv

package
v0.0.0-...-0067e11 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CsvFormatType_Int = iota
	CsvFormatType_Float
	CsvFormatType_String
	CsvFormatType_Int_Array
	CsvFormatType_Int_Array2
)

Variables

This section is empty.

Functions

func GetColumnsWithID

func GetColumnsWithID(fnode, colunmName string) map[int]*CsvFormat

func GetColumnsWithLine

func GetColumnsWithLine(fnode, colunmName string) map[int]*CsvFormat

func GetRowByID

func GetRowByID(fnode string, number int) map[string]*CsvFormat

func GetRowByLine

func GetRowByLine(fnode string, line int) map[string]*CsvFormat

func GetRowsNum

func GetRowsNum(fnode string) int

func Load

func Load() error

func Loading

func Loading(ctx context.Context, sec int, report bool)

func PrintAll

func PrintAll() (string, error)

Types

type Csv

type Csv struct {
	// contains filtered or unexported fields
}

func NewCsvReader

func NewCsvReader(folder string) *Csv

func SetFolder

func SetFolder(folder string) *Csv

func Use

func Use(files ...string) *Csv

func (*Csv) GetColumnsWithID

func (c *Csv) GetColumnsWithID(fnode, colunmName string) map[int]*CsvFormat

func (*Csv) GetColumnsWithLine

func (c *Csv) GetColumnsWithLine(fnode, colunmName string) map[int]*CsvFormat

func (*Csv) GetRowByID

func (c *Csv) GetRowByID(fnode string, number int) map[string]*CsvFormat

func (*Csv) GetRowByLine

func (c *Csv) GetRowByLine(fnode string, line int) map[string]*CsvFormat

func (*Csv) GetRowsNum

func (c *Csv) GetRowsNum(fnode string) int

func (*Csv) Load

func (c *Csv) Load() error

func (*Csv) Loading

func (c *Csv) Loading(ctx context.Context, sec int, report bool)

func (*Csv) PrintAll

func (c *Csv) PrintAll() (string, error)

func (*Csv) SetFolder

func (c *Csv) SetFolder(folder string) *Csv

func (*Csv) Use

func (c *Csv) Use(files ...string) *Csv

type CsvFormat

type CsvFormat struct {
	// contains filtered or unexported fields
}

func NewCsvFormat

func NewCsvFormat(t int, s string) *CsvFormat

func (*CsvFormat) Parse

func (f *CsvFormat) Parse() error

func (*CsvFormat) ToFloat64

func (f *CsvFormat) ToFloat64() float64

The corresponding type must be accurate, and if the type does not correspond, the preparation cannot be guaranteed.

func (*CsvFormat) ToInt

func (f *CsvFormat) ToInt() int

The corresponding type must be accurate, and if the type does not correspond, the preparation cannot be guaranteed.

func (*CsvFormat) ToIntSlice

func (f *CsvFormat) ToIntSlice() []int

The corresponding type must be accurate, and if the type does not correspond, the preparation cannot be guaranteed.

func (*CsvFormat) ToIntSlice2

func (f *CsvFormat) ToIntSlice2() [][]int

The corresponding type must be accurate, and if the type does not correspond, the preparation cannot be guaranteed.

func (*CsvFormat) ToString

func (f *CsvFormat) ToString() string

The corresponding type must be accurate, and if the type does not correspond, the preparation cannot be guaranteed.

type Header struct {
	Name string
	Type string
	Desc string
}

Jump to

Keyboard shortcuts

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