Versions in this module Expand all Collapse all v1 v1.4.5 Jul 25, 2019 Changes in this version + const OS_ALL_R + const OS_ALL_RW + const OS_ALL_RWX + const OS_ALL_W + const OS_ALL_X + const OS_EX + const OS_GROUP_R + const OS_GROUP_RW + const OS_GROUP_RWX + const OS_GROUP_SHIFT + const OS_GROUP_W + const OS_GROUP_X + const OS_OTH_R + const OS_OTH_RW + const OS_OTH_RWX + const OS_OTH_SHIFT + const OS_OTH_W + const OS_OTH_X + const OS_READ + const OS_USER_R + const OS_USER_RW + const OS_USER_RWX + const OS_USER_SHIFT + const OS_USER_W + const OS_USER_X + const OS_WRITE + func AppendAt(slice []string, pos int, insert ...string) []string + func BaseNoExt(filename string) (outFilename string) + func BinFilesToHexFile(outFilename string, assets []VarFile, doBackup bool) (err error) + func BinToHexString(filename string) (outString string, err error) + func Bpcheck(val1, val2 int, pos ...int) + func ByteCountBinary(b int64) string + func ByteCountDecimal(b int64) string + func ByteToHexStr(bytes []byte) string + func CharsetToUtf8(str string) string — linux/amd64 + func Check(err error, message ...string) (state bool) + func CheckCmd(cmd string) bool + func CheckE(err error, message ...string) + func CheckForDupSl2d(sl [][]string) bool + func CheckMime(filename string) (mime string, err error) + func CmpRemSl2d(sl1, sl2 [][]string) (outSlice [][]string) + func CopyFile(inFile, outFile string, doBackup ...bool) (err error) + func CreateTarballGzip(tarballFilePath string, filePaths []string, compressLvl int) (countedWrittenFiles int, err error) + func CreateTarballXz(tarballFilePath string, filePaths []string, compressLvl int) (countedWrittenFiles int, err error) + func DeleteSl(slice []string, pos int) []string + func DeleteSl1(slice []string, pos int) []string + func DetectCharsetFile(filename string) (name string) — linux/amd64 + func DetectCharsetStr(inputStr string) (name string) — linux/amd64 + func DispRights(value int) + func ExecCommand(commands string, args ...string) (output []byte, err error) + func ExtEnsure(filename, ext string) (outFilename string) + func FileCharsetSwitch(inCharset, outCharset, inFilename string, outFilename ...string) — linux/amd64 + func FileExist(name string) bool + func FindDate(inputString, fmtDate string) []string + func FindDir(dir, mask string, returnedStrSlice *[][]string, ...) error + func FormatDate(fmtDate string, inpDate string) time.Time + func FormatText(str string, max int, truncateWordOverMaxSize bool, indenT ...string) string + func FormatTextParagraphFormatting(str string, max int, truncateWordOverMaxSize bool, indentFirstLinetr ...string) string + func FormatTextQuoteBlankLines(str string) (out string) + func GenFileName() string + func GenericReader(filename string) (io.Reader, *os.File, error) + func GetCurrentDir() (dir string, err error) + func GetFileBytesString(filename string, from, to int) (outString string) + func GetFileEOL(filename string) (outString string, err error) + func GetFileMime(filename string) string + func GetOsLineEnd() string + func GetOsPathSep() string + func GetSep(str string) []string + func GetStdin(ask string) (input string) + func GetStrIndex(slice []string, item string) int + func GetStrIndex2dCol(slice [][]string, value string, col int) int + func GetTextEOL(inTextBytes []byte) (outString string) + func GetUser() (realUser, currentUser *user.User, err error) + func GoFormatting(filename string) + func Gzip(source, target string) error + func HexToBytes(varPath string, gzipData []byte) (outByte []byte) + func Increment(inSL []string, separator string, startAt int, atLeft ...bool) (outSL []string) + func IsDate(inString string) bool + func IsDirEmpty(name string) (empty bool, err error) + func IsError(err error) bool + func IsExist2d(slice [][]string, cmpRow []string) bool + func IsExist2dCol(slice [][]string, value string, col int) bool + func IsExistSl(slice []string, item string) bool + func IsFloat(inString string) bool + func IsTextFile(filename string) (fileType string, err error) + func JsonRead(filename string, interf interface{}) (err error) + func JsonWrite(filename string, interf interface{}) (err error) + func LinesToTextFile(filename string, values interface{}) error + func Lorem(wordCount ...int) string + func LoremGenerateTextFile(filename string, maxWords, maxChars int) error + func LowercaseAtFirst(inString string) bool + func Md5String(inString string) string + func Md5Sum(filename string) string + func NewDateFormat() []string + func Preppend(slice []string, prepend ...string) []string + func ReadCsv(filename, comma string, fields, startLine int, endLine ...int) (records [][]string, err error) + func ReadFile(filename string) (data []byte, err error) + func RecurseScanSymlink(path, linkEndPoint string) (fileList []string, err error) + func RemoveDupSl(slice []string) []string + func RemoveDupSl2d(slice [][]string, col int) (outSlice [][]string) + func RemoveNonAlNum(inString string) string + func RemoveNonNum(inString string) string + func RemoveSpace(inString string) string + func ReplacePunct(inString string) string + func ReplaceSpace(inString string) string + func ScanDir(root string, showDirs ...bool) (files []string, err error) + func ScanDirDepth(root string, depth int, showDirs ...bool) (files []string, err error) + func ScanFile(file string) (fi fileInfos) + func ScanFiles(inFiles []string) (outFiles []fileInfos) + func ScanSubDir(root string, showDirs ...bool) (files []string, err error) + func SearchSl(find string, table [][]string, ...) (out [][]string, err error) + func SetFileEOL(filename, eol string) error + func SetTextEOL(inTextBytes []byte, eol string) (outTextBytes []byte, err error) + func SliceSortDate(slice [][]string, fmtDate string, dateCol, secDateCol int, ascendant bool) [][]string + func SliceSortFloat(slice [][]string, col int, ascendant bool, decimalChar string) + func SliceSortString(slice [][]string, col int, ascendant, caseSensitive, numbered bool) + func SplitAtEOL(data []byte) (outSlice []string) + func SplitNumeric(inString string) (outText []string, err error) + func StringDecimalSwitchFloat(decimalChar, inString string) float64 + func StringToCharacterClasses(inpString string, caseSensitive, strictMode bool) (outString string) + func Tar(source, target string) error + func TempMake(prefix string) string + func TempRemove(fName string) (err error) + func TextFileToLines(filename string, opt ...string) (stringsText []string, err error) + func TimeStamp() *timeStamp + func ToCamel(inString string, lowerAtFirst ...bool) (outString string) + func TrimSpace(inputString string, cmds ...string) (newstring string, err error) + func TruncatePath(fullpath string, count ...int) (reduced string) + func TruncateString(inString, prefix string, max, option int) string + func UnGzip(source, target string) error + func Untar(tarball, target string) error + func UntarGzip(sourcefile, dst string, filesList *[]string, removeDir bool) (countedWrittenFiles int, err error) + func UrlsGet(inString string) []string + func Use(vals ...interface{}) + func WordsFrequency(text string) (list [][]string) + func WriteCsv(filename, comma string, rows [][]string) error + func WriteFile(filename string, datas []byte, doBackup ...bool) (err error) + func WriteTextFile(filename, data string, appendIfExist ...bool) error + func Zip(source, target string) error + type Bench struct + Average string + Display bool + Results []string + func (b *Bench) Lapse(label ...string) + func (b *Bench) Stop() + type CharsetList struct — linux/amd64 + FullCharsetList []string + SimpleCharsetList []string + func NewCharsetList() CharsetList + func (cl *CharsetList) GetCharset(pos int) (chLong, chShort string) + func (cl *CharsetList) GetPos(ch string) (posLong, posShort int) + func (cl *CharsetList) Init() + type DateEntry struct + InPos int + OutPos int + Str string + Val int + type Filepath struct + Absolute string + Base string + BaseNoExt string + ExecFullName string + Ext string + IsDir bool + OsSeparator string + OutputAppendFilename string + OutputNewExt string + Path string + RealName string + RealPath string + Relative string + SymLink bool + SymLinkTo string + func SplitFilepath(filename string, newExt ...string) Filepath + type Find_s struct + CaseSensitive bool + DoReplace bool + FileName string + LineEnd string + POSIXcharClass bool + POSIXstrictMode bool + Positions Pos_s + Regex bool + ReplaceWith string + TextBytes []byte + ToSearch string + UseEscapeChar bool + WholeWord bool + Wildcard bool + func SearchAndReplaceInMultipleFiles(filenames []string, toSearch, replaceWith string, ...) (founds []Find_s, err error) + func (s *Find_s) SearchAndReplace() (err error) + type GoDeclarations struct + Filename string + FoundRows []storeDecl + FullFunc []storeDecl + FunctNoComment []storeDecl + Functions []storeDecl + Imports []storeDecl + PackageName string + Types []storeDecl + TypesNoComment []storeDecl + func (d *GoDeclarations) GoSourceGetInfos(filename string, funcName ...string) (err error) + func (d *GoDeclarations) GoSourceGetLines(filename string, wholeWord bool, terms ...string) (exist bool, err error) + type Pos_s struct + AllLines []int + Line []int + WordsPos [][]int + type Process interface + Executable func() string + PPid func() int + Pid func() int + func FindProcess(pid int) (Process, error) + func Processes() ([]Process, error) + type RowStore struct + Cnt int + Idx int + Str string + Tot int + func AppendIfMissing(inputSlice []RowStore, input RowStore) []RowStore + func AppendIfMissingC(inputSlice []RowStore, input RowStore) []RowStore + func FindCountStr(str, regExpression string) []RowStore + func FindQuote(str string, sep string) []RowStore + type Search struct + BrowsedFiles int + CaseSensitive bool + POSIXcharClass bool + POSIXstrictMode bool + Ready bool + Regex bool + SearchTime searchTime + ShowDir bool + Type searchType + UseEscapeChar bool + WholeWord bool + Wildcard bool + func SearchNew() *Search + func (s *Search) SearchAdd(searchFor, wWord, logicalOp string) + func (s *Search) SearchCompile() + func (s *Search) SearchInAdd(searchIn string) + func (toFind *Search) Find(root string) (files []string, err error) + func (toFind *Search) FindDepth(root string, depth int) (files []string, err error) + func (toFind *Search) FindDepthTest(root string, depth int) (files []string, err error) + type StringWriter struct + func (w *StringWriter) Write(p []byte) (n int, err error) + type UnixProcess struct + func (p *UnixProcess) Executable() string + func (p *UnixProcess) PPid() int + func (p *UnixProcess) Pid() int + func (p *UnixProcess) Refresh() error + type VarFile struct + Filename string + VarName string + type WordWithDigit struct + ForceRightDigit bool + func (w *WordWithDigit) FillWordToMatchMaxLength(inString string, removeExt ...bool) (outString string) + func (w *WordWithDigit) Init(words []string)