Documentation ¶
Index ¶
- func CombineFiles(filePath, outputDir string, bus ChannelBus)
- func LineParser(bus ChannelBus, combineFiles bool)
- func LineReader(file *os.File, bus ChannelBus)
- func Logger(bus ChannelBus)
- func OpenFile(path string) (*os.File, error)
- func StringInArray(str string, arrayOfStrings *[]string) bool
- func StringifyFileSize(size int64) string
- func WildcardMatch(str, pattern string) bool
- func Writer(outputDir string, skipData []string, skipTables []string, bus ChannelBus)
- type ChannelBus
- type CsvFlagType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineFiles ¶
func CombineFiles(filePath, outputDir string, bus ChannelBus)
CombineFiles combines all files ina directory into a single file
func LineParser ¶ added in v0.0.3
func LineParser(bus ChannelBus, combineFiles bool)
LineParser reads the CurrentLine and figures out which channel to put it in.
func LineReader ¶ added in v0.0.3
func LineReader(file *os.File, bus ChannelBus)
LineReader reads `file` line-by-line and adds it to the `bus.CurrentLine` channel. Note: This function closes `file`.
func Logger ¶ added in v0.0.3
func Logger(bus ChannelBus)
Logger reads messages from `bus.Log` and outputs them to the logger.
func StringInArray ¶
StringInArray loops over `arrayOfStrings` and returns `true` if `str` is in the array.
func StringifyFileSize ¶
StringifyFileSize converts bytes to something more readable.
func WildcardMatch ¶ added in v0.1.0
WildcardMatch matches strings using "*" and "?".
Types ¶
type ChannelBus ¶ added in v0.0.3
type ChannelBus struct { Finished chan bool Log chan string CurrentLine chan string TableName chan string TableScheme chan string TableData chan string }
ChannelBus a struct to hold all channels used by the different go routines
type CsvFlagType ¶ added in v0.1.0
type CsvFlagType []string
CsvFlagType converts a comma separated list into an array of strings.
func (*CsvFlagType) Set ¶ added in v0.1.0
func (s *CsvFlagType) Set(value string) error
Set sets the value
func (*CsvFlagType) String ¶ added in v0.1.0
func (s *CsvFlagType) String() string