Documentation ¶
Index ¶
- Variables
- func CloseLogFile()
- func ExecCommandOutput(cmd string, args []string) (string, int, error)
- func FileCheck(e error)
- func FileDelete(path string) error
- func FileExists(path string) (exists bool, dir bool, err error)
- func FileGetStrings(path string) (line []string, err error)
- func FileGetStringsWithPattern(path string, pattern string) (filelines []string, err error)
- func FileReadFirstLine(path string) (line string, er error)
- func FileSaveGob(path string, object interface{}) error
- func FileWriteString(path, line string) (err error)
- func FileWriteStrings(path string, lines []string) (err error)
- func FileloadGob(path string, object interface{}) error
- func FindStringSubmatchMap(s string, r *regexp.Regexp) map[string]string
- func HTTPLogger(inner http.Handler, name string) http.Handler
- func OpenLog(debug bool) error
- func OpenLogFile(filePath string, maxSizeMB int, maxFiles int, maxAgeDays int, debug bool) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ExecCommandOutput ¶
ExecCommandOutput returns stdout and stderr in a single string, the return code, and error. If the return code is not zero, error will not be nil. Stdout and Stderr are dumped to the log at the debug level. Return code of 999 indicates an error starting the command.
func FileExists ¶
FileExists does a stat on the path and returns true if it exists In addition, dir returns true if the path is a directory
func FileGetStrings ¶
FileGetStrings : get the file contents as array of string
func FileGetStringsWithPattern ¶
FileGetStringsWithPattern : get the filecontents as array of string matching pattern pattern
func FileReadFirstLine ¶
FileReadFirstLine read first line from a file TODO: make it OS independent
func FileSaveGob ¶
FileSaveGob : save the Gob file
func FileWriteString ¶
FileWriteString : write line to the path
func FileWriteStrings ¶
FileWriteStrings writes all lines to file specified by path. Newline is appended to each line
func FileloadGob ¶
FileloadGob : Load and Decode Gob file
func FindStringSubmatchMap ¶
FindStringSubmatchMap : find and build the map of named groups
func HTTPLogger ¶
HTTPLogger : wrapper for http logging
Types ¶
This section is empty.