Documentation ¶
Index ¶
- Constants
- func CheckPath(path string) (exists bool, isDir bool, err error)
- func DetectContentType(data []byte, ext string) string
- func DirExists(dirPath string) bool
- func FileExists(path string) bool
- func IsFile(path string) bool
- func IsMusicExt(ext string) bool
- func IsUnique[T comparable](arr []T) bool
- func MD5Hex(data []byte) (string, error)
- func MkdirIfNotExist(path string, perm os.FileMode) error
- func ParseBytes(input string) (int64, error)
- func SplitSlice[T any](input []T, chunkSize int) ([][]T, error)
- func Ternary[T any](condition bool, trueVal, falseVal T) T
- func TimeUntilMidnight(timeZone string) (time.Duration, error)
Constants ¶
View Source
const ( B int64 = 1 << (10 * iota) KB MB GB TB PB )
Variables ¶
This section is empty.
Functions ¶
func DetectContentType ¶
func IsMusicExt ¶
func IsUnique ¶
func IsUnique[T comparable](arr []T) bool
func SplitSlice ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.