Documentation
¶
Index ¶
- func CopyFile(src, dst string) error
- func DirExists(name string) bool
- func FileExists(name string) bool
- func GetRandomInt(min, max int) int
- func GetRandomString(chars string, length int) string
- func GetRandomStringFromList(strings ...string) string
- func IntFromString(str string, def int) int
- func ListFiles(directory string) []string
- func ReadFile(filename string) ([]byte, error)
- func RemoveNonPrintable(str string) string
- type FilesCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirExists ¶
DirExists reports whether the dir exists as a boolean, taken from https://stackoverflow.com/a/49697453 / https://stackoverflow.com/a/51870143/3337885
func FileExists ¶
func GetRandomInt ¶
func GetRandomString ¶
func GetRandomStringFromList ¶
func IntFromString ¶
func RemoveNonPrintable ¶
Types ¶
type FilesCache ¶
type FilesCache struct {
// contains filtered or unexported fields
}
func NewFilesCache ¶
func NewFilesCache(path string, errorHandler func(err error)) *FilesCache
func (*FilesCache) GetRandomLineFromFile ¶
func (fc *FilesCache) GetRandomLineFromFile(file string) string
Click to show internal directories.
Click to hide internal directories.