msds

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: MIT Imports: 12 Imported by: 1

Documentation

Index

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 OpenFile added in v0.0.2

func OpenFile(path string) (*os.File, error)

OpenFile tries to open the file at `path`.

func StringInArray

func StringInArray(str string, arrayOfStrings *[]string) bool

StringInArray loops over `arrayOfStrings` and returns `true` if `str` is in the array.

func StringifyFileSize

func StringifyFileSize(size int64) string

StringifyFileSize converts bytes to something more readable.

func WildcardMatch added in v0.1.0

func WildcardMatch(str, pattern string) bool

WildcardMatch matches strings using "*" and "?".

func Writer

func Writer(outputDir string, skipData []string, skipTables []string, bus ChannelBus)

Writer writes the data from the different channels to different files.

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

Jump to

Keyboard shortcuts

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