Documentation ¶
Index ¶
- func CopyFile(src, dst string) (int64, error)
- func CopyFolder(source, dest string) error
- func CopyFolderWithFilter(source, dest string, includeFilter IncludeFilter) (err error)
- func ExeDir() (string, error)
- func ExecAndCaptureOutput(command string, args ...string) (string, string, error)
- func FileExists(filePath string) bool
- func GetFirstLineFromFile(netFile string) (string, error)
- func IsDir(path string) bool
- func RaiseRlimit(amount uint64) error
- type IncludeFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFile ¶
CopyFile uses io.Copy() to copy a file to another location This was copied from https://opensource.com/article/18/6/copying-files-go
func CopyFolder ¶
CopyFolder recursively copies an entire directory to another location (ignoring symlinks)
func CopyFolderWithFilter ¶
func CopyFolderWithFilter(source, dest string, includeFilter IncludeFilter) (err error)
CopyFolderWithFilter recursively copies an entire directory to another location (ignoring symlinks) with an optional filter function to include/exclude folders or files
func ExeDir ¶
ExeDir returns the absolute path to the current executing binary (not including the filename)
func ExecAndCaptureOutput ¶
ExecAndCaptureOutput runs the specified command and args and captures stdout into a string, returning the string or an error upon completion.
func FileExists ¶
FileExists checks to see if the specified file (or directory) exists
func GetFirstLineFromFile ¶
GetFirstLineFromFile retrieves the first line of the specified file.
func RaiseRlimit ¶
RaiseRlimit increases the number of file descriptors we can have
Types ¶
Directories ¶
Path | Synopsis |
---|---|
Package bloom implements Bloom filters.
|
Package bloom implements Bloom filters. |
Package db defines database utility functions.
|
Package db defines database utility functions. |
Package metrics provides a metric logging wrappers for Prometheus server.
|
Package metrics provides a metric logging wrappers for Prometheus server. |
Package timers provides a Clock abstraction useful for simulating timeouts.
|
Package timers provides a Clock abstraction useful for simulating timeouts. |