Documentation ¶
Index ¶
- func AbsPath(fromExec bool, elem ...string) string
- func ConcatFiles(dest string, append bool, files ...string) error
- func CreateTempFile(content string) (string, func(), error)
- func DeleteAll(basePath string, items ...string) error
- func GenerateInt(min, max int) int
- func GenerateIntSlice(size, min, max int) []Generic
- func GenerateString(minLen, maxLen int) string
- func GenerateStringSlice(size, minLen, maxLen int) []Generic
- func IsIntIn(n int, list ...int) bool
- func IsSorted(items []Generic, compare Compare) bool
- func IsStringIn(s string, list ...string) bool
- func MaxFloat64(nums ...float64) float64
- func MaxInt(nums ...int) int
- func MinFloat64(nums ...float64) float64
- func MinInt(nums ...int) int
- func MkDirs(basePath string, dirs ...string) (func(), error)
- func PipeStdAll() (inR, inW, outR, outW, errR, errW *os.File, restore func(), err error)
- func PipeStderr() (errR, errW *os.File, restore func(), err error)
- func PipeStdin() (inR, inW *os.File, restore func(), err error)
- func PipeStdout() (outR, outW *os.File, restore func(), err error)
- func PipeStdoutAndStderr() (r, w *os.File, restore func(), err error)
- func ReadFromStderrPipe(errR, errW *os.File, str string) (string, error)
- func ReadFromStdoutPipe(outR, outW *os.File, str string) (string, error)
- func ReplaceOSArgs(args []string) func()
- func SeedWithNow()
- func Shuffle(a []Generic)
- func WriteToStdinPipe(inR, inW *os.File, str string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConcatFiles ¶
ConcatFiles concats a set files into a new or existing file
func CreateTempFile ¶
CreateTempFile writes a file in your os temp directory
func GenerateIntSlice ¶
func GenerateIntSlice(size, min, max int) []Generic
GenerateIntSlice generates an array with random integers
func GenerateString ¶
GenerateString generates a random string
func GenerateStringSlice ¶
func GenerateStringSlice(size, minLen, maxLen int) []Generic
GenerateStringSlice generates an array with random strings
func IsSorted ¶
func IsSorted(items []Generic, compare Compare) bool
IsSorted checks if an array is ascendingly sorted
func IsStringIn ¶
IsStringIn checks if a string is in a list of strings
func MaxFloat64 ¶
MaxFloat64 returns maximum of float64 numbers
func MinFloat64 ¶
MinFloat64 returns minimun of float64 numbers
func PipeStdAll ¶
PipeStdAll pipes all standard streams temporarily
func PipeStderr ¶
PipeStderr pipes standard error stream temporarily
func PipeStdout ¶
PipeStdout pipes standard output stream temporarily
func PipeStdoutAndStderr ¶
PipeStdoutAndStderr pipes standard out and error streams together temporarily
func ReadFromStderrPipe ¶
ReadFromStderrPipe reads a written string to stderr through a pipe
func ReadFromStdoutPipe ¶
ReadFromStdoutPipe reads a written string to stdout through a pipe
func ReplaceOSArgs ¶
func ReplaceOSArgs(args []string) func()
ReplaceOSArgs replaces current args with custom args and returns a restore function
Types ¶
This section is empty.