Documentation ¶
Index ¶
- func CsvToSlice(file *os.File, colSep rune, model interface{}, params Params) (dataSlice interface{}, err error)
- func ExcelColIdToColNo(colID string) (int, error)
- func ExcelColNoToColId(colNo int) (string, error)
- func GetDbFields(model interface{}) ([]string, error)
- func GetHeadings(file *os.File, colSep rune) ([]string, error)
- func GuessSeparator(file *os.File) (rune, error)
- func StringToType(input string, outType reflect.Type, params Params) reflect.Value
- type Params
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CsvToSlice ¶
func CsvToSlice(file *os.File, colSep rune, model interface{}, params Params) (dataSlice interface{}, err error)
converts the content of a CSV file to a slice of 'models' colMap maps the feldnames of the model to the column numbers (beginning at 1) of the CSV file the result is an interface, which will need to be typecast by the caller
func ExcelColIdToColNo ¶
func ExcelColNoToColId ¶
func GetDbFields ¶
func GuessSeparator ¶
inputReader would normally be the file or stream to read
Types ¶
Click to show internal directories.
Click to hide internal directories.