go_csv

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 9 Imported by: 0

README

Simple Go to read CSV file

Documentation

Index

Constants

View Source
const COLUMN_CASE_SENTITIVE_DEFAULT = false
View Source
const COLUMN_CASE_SENTITIVE_DOC = "If set to false all column will change to uppercase"
View Source
const COLUMN_CASE_SENTITIVE_KEY = "column.case.sensitive"
View Source
const COLUMN_SERIALIZE_DOC = "If parser.enable.header set to false will use this to define column name"
View Source
const COLUMN_SERIALIZE_KEY = "column.serialize"
View Source
const ENABLE_HEADER_DEFAULT = false
View Source
const ENABLE_HEADER_DOC = "Enable header for column name"
View Source
const ENABLE_HEADER_KEY = "parser.enable.header"
View Source
const FILE_ENCODE_DEFAULT = "UTF-8"
View Source
const FILE_ENCODE_DOC = "File encode for reader"
View Source
const FILE_ENCODE_KEY = "file.encode"
View Source
const HALT_IF_ERROR_DEFAULT = true
View Source
const HALT_IF_ERROR_DOC = "If set to true process will return error and stop process if set to false it will ignore and skip line"
View Source
const HALT_IF_ERROR_KEY = "parser.halt.if.error"
View Source
const NIL_CHARACTER_DEFAULT = ""
View Source
const NIL_CHARACTER_DOC = "If match this character value will turn to nil"
View Source
const NIL_CHARACTER_KEY = "parser.nil.character"
View Source
const SEPARATOR_CHARACTER_DEFAULT = ","
View Source
const SEPARATOR_CHARACTER_DOC = "Character for separate column"
View Source
const SEPARATOR_CHARACTER_KEY = "parser.separator.character"
View Source
const VALUE_LEFT_TRIM_DEFAULT = false
View Source
const VALUE_LEFT_TRIM_DOC = "left trim value"
View Source
const VALUE_LEFT_TRIM_KEY = "value.left.trim"
View Source
const VALUE_RIGHT_TRIM_DEFAULT = false
View Source
const VALUE_RIGHT_TRIM_DOC = "right trim value"
View Source
const VALUE_RIGHT_TRIM_KEY = "value.right.trim"

Variables

This section is empty.

Functions

func ReadProperties

func ReadProperties(path string) (map[string]string, error)

Types

type CsvInfo

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

func Make

func Make(prop map[string]string, toCall func(map[string]interface{}), toCallWhenError func(string)) *CsvInfo

func (*CsvInfo) ReadAndCall

func (info *CsvInfo) ReadAndCall(handle io.Reader)

func (*CsvInfo) ReadAndCallByFile

func (info *CsvInfo) ReadAndCallByFile(fileToRead string)

Jump to

Keyboard shortcuts

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