tscsv

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseErrors

func ParseErrors(errs []ImportError) (errString string)

ParseErrors 将错误数组解析为字符串

Types

type CsvRow

type CsvRow struct {
	Row map[string]string
}

CsvRow csv中的一行

func (*CsvRow) IntValue

func (c *CsvRow) IntValue(field string) (int, error)

IntValue 得到int型数据

func (*CsvRow) StringValue

func (c *CsvRow) StringValue(field string) string

StringValue 得到string型数据

type CsvTable

type CsvTable struct {
	FileName string
	Rows     []CsvRow
}

CsvTable csv表格

func LoadCSVFile

func LoadCSVFile(fileName string, withFieldName bool) (*CsvTable, error)

LoadCSVFile 加载csv文件

type ImportError

type ImportError struct {
	Row      int
	Column   int
	ErrorMsg string
}

ImportError 导入错误

func (ImportError) Error

func (e ImportError) Error() string

Jump to

Keyboard shortcuts

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