Versions in this module Expand all Collapse all v0 v0.3.0 Sep 22, 2023 Changes in this version + type Set map[T]struct + func SetOf(values ...T) Set[T] + func (s Set[T]) Add(value T) bool + func (s Set[T]) AddMultiple(values ...T) + func (s Set[T]) Contains(value T) bool + func (s Set[T]) Remove(value T) bool + func (s Set[T]) Values() []T v0.1.0 Mar 21, 2023 Changes in this version + var ErrAlreadyExist = errors.New("resource already exists") + var ErrInvalidArgument = errors.New("invalid argument") + var ErrNotExist = errors.New("resource does not exist") + var ErrPermissionDenied = errors.New("permission denied") + func AESGCMDecrypt(key, ciphertext []byte) ([]byte, error) + func AESGCMEncrypt(key, plaintext []byte) ([]byte, error) + func ApplyUmask(f string, newMode os.FileMode) error + func CommonSkip(name string) bool + func CopyFile(src, dest string) error + func CryptoRandomBytes(length int64) ([]byte, error) + func CryptoRandomInt(limit int64) (int64, error) + func CryptoRandomString(length int64) (string, error) + func Dedent(s string) string + func EnsureAbsolutePath(path, absoluteBase string) string + func ExistsInSlice(target string, slice []string) bool + func FileURLToPath(u *url.URL) (string, error) + func GetDirectorySize(path string) (int64, error) + func HomeDir() (home string, err error) + func IsDir(dir string) (bool, error) + func IsEmptyString(s string) bool + func IsEqualSlice(target, source []string) bool + func IsExist(path string) (bool, error) + func IsFile(filePath string) (bool, error) + func IsInt64InSlice(target int64, slice []int64) bool + func IsSliceInt64Eq(a, b []int64) bool + func IsStringInSlice(target string, slice []string, insensitive ...bool) bool + func Max(a, b int) int + func MergeInto(dict map[string]interface{}, values ...interface{}) (map[string]interface{}, error) + func Min(a, b int) int + func NormalizeEOL(input []byte) []byte + func NumberIntoInt64(number interface{}) int64 + func PaginateSlice(list interface{}, page, pageSize int) interface + func PathEscapeSegments(path string) string + func ReadAtMost(r io.Reader, buf []byte) (n int, err error) + func Remove(name string) error + func RemoveAll(name string) error + func RemoveIDFromList(list []int64, id int64) ([]int64, bool) + func Rename(oldpath, newpath string) error + func SanitizeCredentialURLs(s string) string + func SanitizeErrorCredentialURLs(err error) error + func SecToTime(duration int64) string + func ShellEscape(toEscape string) string + func SplitStringAtByteN(input string, n int) (left, right string) + func SplitStringAtRuneN(input string, n int) (left, right string) + func StatDir(rootPath string, includeDir ...bool) ([]string, error) + func StopTimer(t *time.Timer) bool + func ToSnakeCase(input string) string + func ToTitleCase(s string) string + func ToUpperASCII(s string) string + func URLJoin(base string, elems ...string) string + type Int64Slice []int64 + func (p Int64Slice) Len() int + func (p Int64Slice) Less(i, j int) bool + func (p Int64Slice) Swap(i, j int) + type OptionalBool byte + const OptionalBoolFalse + const OptionalBoolNone + const OptionalBoolTrue + func OptionalBoolOf(b bool) OptionalBool + func OptionalBoolParse(s string) OptionalBool + func (o OptionalBool) IsFalse() bool + func (o OptionalBool) IsNone() bool + func (o OptionalBool) IsTrue() bool