Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSV2Struct ¶
type CSV2Struct struct {
// contains filtered or unexported fields
}
CSV2Struct defines the structure for the package
func NewCSV2Struct ¶
func NewCSV2Struct() *CSV2Struct
NewCSV2Struct initializes a new instance of CSV2Struct
func (*CSV2Struct) GenerateStruct ¶
func (c *CSV2Struct) GenerateStruct(filePath string) (interface{}, error)
GenerateStruct automatically generates a struct based on CSV headers
func (*CSV2Struct) GetColumnType ¶
func (c *CSV2Struct) GetColumnType(out interface{}) map[string]string
GetColumnType retrieves the type of each column in the struct
func (*CSV2Struct) LoadCSV ¶
func (c *CSV2Struct) LoadCSV(filePath string, out interface{}) error
LoadCSV loads a CSV file and unmarshals it into the given struct slice
func (*CSV2Struct) SetCustomMap ¶
func (c *CSV2Struct) SetCustomMap(customMap map[string]string)
SetCustomMap sets custom mappings for CSV column headers
Click to show internal directories.
Click to hide internal directories.