Documentation
¶
Index ¶
- func DeepCopy(src, dest any) error
- func DownloadFileHash(ctx context.Context, httpClient *http.Client, useragent string, ...) (int64, error)
- func IsFalse(value string) bool
- func IsFalseOrEmpty(value string) bool
- func IsTrue(value string) bool
- func IsTrueOrEmpty(value string) bool
- func PathExists(name string) bool
- func PathIsWritable(path string) bool
- func SplitNTrimSpace(s string, sep string, n int, nilIfEmpty bool) []string
- func StringHasPrefix(value string, prefixes ...string) bool
- func StringPrefixInSlice(key string, list []string) bool
- func ValueInSlice[T comparable](key T, list []T) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFileHash ¶
func DownloadFileHash(ctx context.Context, httpClient *http.Client, useragent string, progress func(progress ioprogress.ProgressData), canceler *cancel.HTTPRequestCanceller, filename string, url string, hash string, hashFunc hash.Hash, target io.WriteSeeker) (int64, error)
func IsFalseOrEmpty ¶
IsFalseOrEmpty returns true if value is empty or if IsFalse() returns true.
func IsTrueOrEmpty ¶
IsTrueOrEmpty returns true if value is empty or if IsTrue() returns true.
func PathExists ¶
func PathIsWritable ¶
func SplitNTrimSpace ¶
SplitNTrimSpace returns result of strings.SplitN() and then strings.TrimSpace() on each element. Accepts nilIfEmpty argument which if true, will return nil slice if s is empty (after trimming space).
func StringHasPrefix ¶
StringHasPrefix returns true if value has one of the supplied prefixes.
func StringPrefixInSlice ¶
StringPrefixInSlice returns true if any element in the list has the given prefix.
func ValueInSlice ¶
func ValueInSlice[T comparable](key T, list []T) bool
ValueInSlice returns true if key is in list.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.