Documentation
¶
Index ¶
- func AreAllStrsInSlice(queries []string, list []string) bool
- func BoolPtr(val bool) *bool
- func CheckAlphaNumericDashDotUnderscore(s string) bool
- func CheckAlphaNumericDashUnderscore(s string) bool
- func CheckDns1035(s string) bool
- func CleanURL(urlStr string) string
- func CloseSilent(closers ...io.Closer)
- func CopyFloat32Slice(vals []float32) []float32
- func CopyFloat64Slice(vals []float64) []float64
- func CopyInt32Slice(vals []int32) []int32
- func CopyInt64Slice(vals []int64) []int64
- func CopyIntSlice(vals []int) []int
- func CopyStrSet(set map[string]bool) map[string]bool
- func CopyStrSlice(vals []string) []string
- func CopyTimePtr(t *time.Time) *time.Time
- func CreateDirIfMissing(path string) (bool, error)
- func DirPaths(paths []string, addTrailingSlash bool) []string
- func DoStrSetsOverlap(set1 map[string]bool, set2 map[string]bool) bool
- func FileTree(paths []string, cwd string, dirsOrder DirsOrder) string
- func FilterStrs(strs []string, filterFn func(string) bool) []string
- func FindDuplicateStrs(in []string) []string
- func FlattenAllStrValues(obj interface{}) ([]string, error)
- func FlattenAllStrValuesAsSet(obj interface{}) (map[string]bool, error)
- func Float32Ptr(val float32) *float32
- func Float64Ptr(val float64) *float64
- func HasDuplicateStr(in []string) bool
- func HashBytes(bytes []byte) string
- func HashFile(path string) (string, error)
- func HashObj(obj interface{}) string
- func HashStr(str string) string
- func IgnoreDotFiles(path string, fi os.FileInfo) (bool, error)
- func IgnoreNonPython(path string, fi os.FileInfo) (bool, error)
- func IgnoreNonYAML(path string, fi os.FileInfo) (bool, error)
- func IndirectSafe(obj interface{}) interface{}
- func Int16Ptr(val int16) *int16
- func Int32Ptr(val int32) *int32
- func Int64Ptr(val int64) *int64
- func Int8Ptr(val int8) *int8
- func IntPtr(val int) *int
- func InterfaceMapKeys(myMap map[string]interface{}) []string
- func InterfaceMapKeysUnsafe(myMap interface{}) []string
- func InterfaceMapSortedKeys(myMap map[string]interface{}) []string
- func InterfaceMapsKeysMatch(map1 map[string]interface{}, map2 map[string]interface{}) bool
- func IntersectStrSets(set1 map[string]bool, set2 map[string]bool) map[string]bool
- func IsAnyStrInSlice(queries []string, list []string) bool
- func IsDir(path string) bool
- func IsFile(path string) bool
- func IsFileOrDir(path string) bool
- func IsFilePathPython(path string) bool
- func IsFilePathYAML(path string) bool
- func IsFloat32InSlice(query float32, list []float32) bool
- func IsFloat64InSlice(query float64, list []float64) bool
- func IsInt32InSlice(query int32, list []int32) bool
- func IsInt64InSlice(query int64, list []int64) bool
- func IsIntInSlice(query int, list []int) bool
- func IsStrInSlice(query string, list []string) bool
- func IsValidS3aPath(s3aPath string) bool
- func ListDir(dir string, relative bool) ([]string, error)
- func ListDirRecursive(dir string, relative bool, ignoreFns ...IgnoreFn) ([]string, error)
- func LocalHourNow() string
- func LocalTimestamp(t *time.Time) string
- func LocalTimestampHuman(t *time.Time) string
- func MakeEmptyFile(path string) error
- func MakeEmptyFiles(paths ...string) error
- func MakeEmptyFilesInDir(dir string, paths ...string) error
- func MapStrs(strs []string, mapFn func(string) string) []string
- func MarshalJSON(obj interface{}) ([]byte, error)
- func MarshalJSONStr(obj interface{}) (string, error)
- func MarshalMsgpack(obj interface{}) ([]byte, error)
- func MatchAnyRegex(s string, regexes []*regexp.Regexp) bool
- func MaxInt(vals ...int) int
- func MergeStrMaps(maps ...map[string]string) map[string]string
- func MergeStrSets(sets ...map[string]bool) map[string]bool
- func MergeStrSlices(slices ...[]string) []string
- func MicrosecsStr(t time.Time) string
- func MillisecsStr(t time.Time) string
- func MinInt(vals ...int) int
- func MustMarshalMsgpack(obj interface{}) []byte
- func NowTimestamp() string
- func OlderThanSeconds(t time.Time, secs float64) bool
- func ParentDir(dir string) string
- func Pp(obj interface{})
- func Ppg(obj interface{})
- func Ppj(obj interface{})
- func ReadReqFile(r *http.Request, fileName string) ([]byte, error)
- func RelPath(userPath string, baseDir string) string
- func RemoveEmpties(strs []string) []string
- func RemoveEmptiesAndUnique(strs []string) []string
- func Round(val float64, decimalPlaces int, pad bool) string
- func RunInParallel(fns ...func() error) []error
- func RunInParallelFirstErr(fns ...func() error) error
- func SearchForFile(filename string, dir string) (string, error)
- func SortFilePaths(paths []string, dirsOrder DirsOrder) []string
- func SortFloat32s(a []float32)
- func SortFloat32sCopy(a []float32) []float32
- func SortFloat64sCopy(a []float64) []float64
- func SortInt32s(a []int32)
- func SortInt32sCopy(a []int32) []int32
- func SortInt64s(a []int64)
- func SortInt64sCopy(a []int64) []int64
- func SortIntsCopy(a []int) []int
- func SortStrsCopy(a []string) []string
- func SplitS3aPath(s3aPath string) (string, string, error)
- func Sppg(obj interface{}) string
- func StrMapKeys(myMap map[string]string) []string
- func StrMapValues(myMap map[string]string) []string
- func StrPtr(val string) *string
- func StrSetToSlice(set map[string]bool) []string
- func StrSliceElementsMatch(strs1 []string, strs2 []string) bool
- func StrSliceToSet(strs []string) map[string]bool
- func StrSlicesEqual(strs1 []string, strs2 []string) bool
- func SubtractStrSets(set1 map[string]bool, set2 map[string]bool) map[string]bool
- func SubtractStrSlice(slice1 []string, slice2 []string) []string
- func TimeDifference(t1 *time.Time, t2 *time.Time) string
- func TimeNowPtr() *time.Time
- func TimePtrsEqual(t1 *time.Time, t2 *time.Time) bool
- func TimeSince(t *time.Time) string
- func Timestamp(t time.Time) string
- func TmpDir() (string, error)
- func TrimDirPrefix(fullPath string, dirPath string) string
- func URLJoin(strs ...string) string
- func UniqueStrs(strs []string) []string
- func UnmarshalMsgpack(b []byte, obj interface{}) error
- func UnmarshalMsgpackToInterface(b []byte) (interface{}, error)
- func Unzip(src string, destPath string) ([]string, error)
- func UnzipFileToMem(src string) (map[string][]byte, error)
- func UnzipMemToMem(zipBytes []byte) (map[string][]byte, error)
- func UnzipToMem(r *zip.Reader) (map[string][]byte, error)
- func UserPath(userPath string) string
- func WriteJSON(obj interface{}, outPath string) error
- func Zip(zipInput *ZipInput, destPath string) error
- func ZipStrsToMap(strs1 []string, strs2 []string) map[string]string
- func ZipToMem(zipInput *ZipInput) ([]byte, error)
- func ZipToWriter(zipInput *ZipInput, writer io.Writer) error
- type DirsOrder
- type Float32Slice
- type IgnoreFn
- type Int32Slice
- type Int64Slice
- type ZipBytesInput
- type ZipDirInput
- type ZipFileInput
- type ZipFileListInput
- type ZipInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreAllStrsInSlice ¶
func CheckDns1035 ¶
func CloseSilent ¶
func CopyFloat32Slice ¶
func CopyFloat64Slice ¶
func CopyInt32Slice ¶
func CopyInt64Slice ¶
func CopyIntSlice ¶
func CopyStrSlice ¶
func CreateDirIfMissing ¶
func FindDuplicateStrs ¶
func FlattenAllStrValues ¶
The order for maps is deterministic
func Float32Ptr ¶
func Float64Ptr ¶
func HasDuplicateStr ¶
func IndirectSafe ¶
func IndirectSafe(obj interface{}) interface{}
Dereference if obj is a pointer, otherwise no-op
func InterfaceMapKeys ¶
func InterfaceMapKeysUnsafe ¶
func InterfaceMapKeysUnsafe(myMap interface{}) []string
func InterfaceMapSortedKeys ¶
func InterfaceMapsKeysMatch ¶
func IntersectStrSets ¶
func IsAnyStrInSlice ¶
func IsFileOrDir ¶
func IsFilePathPython ¶
func IsFilePathYAML ¶
func IsFloat32InSlice ¶
func IsFloat64InSlice ¶
func IsInt32InSlice ¶
func IsInt64InSlice ¶
func IsIntInSlice ¶
func IsStrInSlice ¶
func IsValidS3aPath ¶
func ListDirRecursive ¶
func LocalHourNow ¶
func LocalHourNow() string
func LocalTimestamp ¶
func LocalTimestampHuman ¶
func MakeEmptyFile ¶
func MakeEmptyFiles ¶
func MakeEmptyFilesInDir ¶
func MarshalJSON ¶
func MarshalJSONStr ¶
func MarshalMsgpack ¶
func MergeStrSlices ¶
func MicrosecsStr ¶
func MillisecsStr ¶
func MustMarshalMsgpack ¶
func MustMarshalMsgpack(obj interface{}) []byte
func NowTimestamp ¶
func NowTimestamp() string
func ReadReqFile ¶
Returns nil if no file
func RemoveEmpties ¶
func RemoveEmptiesAndUnique ¶
func RunInParallel ¶
func RunInParallelFirstErr ¶
func SortFilePaths ¶
func SortFloat32s ¶
func SortFloat32s(a []float32)
func SortFloat32sCopy ¶
func SortFloat64sCopy ¶
func SortInt32s ¶
func SortInt32s(a []int32)
func SortInt32sCopy ¶
func SortInt64s ¶
func SortInt64s(a []int64)
func SortInt64sCopy ¶
func SortIntsCopy ¶
func SortStrsCopy ¶
func StrMapKeys ¶
func StrMapValues ¶
func StrSetToSlice ¶
func StrSliceElementsMatch ¶
func StrSliceToSet ¶
func StrSlicesEqual ¶
func SubtractStrSets ¶
func SubtractStrSlice ¶
func TimeNowPtr ¶
func TrimDirPrefix ¶
func UniqueStrs ¶
func UnmarshalMsgpack ¶
Types ¶
type DirsOrder ¶
type DirsOrder string
var DirsOnBottom DirsOrder = "bottom"
var DirsOnTop DirsOrder = "top"
var DirsSorted DirsOrder = "sorted"
type Float32Slice ¶
type Float32Slice []float32
func (Float32Slice) Len ¶
func (p Float32Slice) Len() int
func (Float32Slice) Less ¶
func (p Float32Slice) Less(i, j int) bool
func (Float32Slice) Swap ¶
func (p Float32Slice) Swap(i, j int)
type Int32Slice ¶
type Int32Slice []int32
func (Int32Slice) Len ¶
func (p Int32Slice) Len() int
func (Int32Slice) Less ¶
func (p Int32Slice) Less(i, j int) bool
func (Int32Slice) Swap ¶
func (p Int32Slice) Swap(i, j int)
type Int64Slice ¶
type Int64Slice []int64
func (Int64Slice) Len ¶
func (p Int64Slice) Len() int
func (Int64Slice) Less ¶
func (p Int64Slice) Less(i, j int) bool
func (Int64Slice) Swap ¶
func (p Int64Slice) Swap(i, j int)
type ZipBytesInput ¶
type ZipDirInput ¶
type ZipFileInput ¶
type ZipFileListInput ¶
type ZipInput ¶
type ZipInput struct { Files []ZipFileInput Bytes []ZipBytesInput Dirs []ZipDirInput FileLists []ZipFileListInput AddPrefix string // Gets added to every item EmptyFiles []string // Empty files to be created AllowMissing bool // Don't error if a file/dir doesn't exist AllowOverwrite bool // Don't error if a file in the zip is overwritten }
Click to show internal directories.
Click to hide internal directories.