package
0.0.0-20220308165833-04a4f9fe5e88
Repository: https://github.com/icwells/go-tools.git
Documentation: pkg.go.dev
# Functions
AppendFile opens the file at the given file path and returns file stream in append mode.
CheckError returns true if err is nil; otherwise, if code is 0 it prints a warning and returns false.
CreateFile creates a file at the given file path and returns a file stream.
Exists seturns true if the given file or directory exists.
FindDelim returns delimiter (tab, comma, pipe, semicolon, colon, or space) from a text file.
FormatPath returns path name with trailing slash (os.PathSeparator) and makes the directory if makenew is true.
GetDelim returns delimiter (tab, comma, pipe, semicolon, colon, or space) from a line of a text file.
GetExt returns the file extension (everthing after the last period) from file.
GetFileName returns the base name (everything between the final slash and first period) from file.
GetGOPATH returns gopath environent environment variable.
GetHeader returns a map of header names to indeces.
GetParent returns name of parent directory from path.
GetScanner determines if a file is gzipped or not returns the appropriate scanner.
Gzip compresses infile to same directory.
OpenFile opens the file at the given file path and returns a file stream.
ReadFile reads in compressed and uncompressed text files as a two dimensional slice of strings and the header as a map of indeces.
WriteToCSV writes a string header and a two dimensional slice of strings to csv.
YieldFile reads compressed and uncompressed text files and returns the header as a map of indeces and the lines as an iterable channel of string slices.
# Variables
No description provided by the author