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 ParseUint32Range(value string) (uint32, uint32, error)
- 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
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 ParseUint32Range ¶ added in v0.7.0
ParseUint32Range parses a uint32 range in the form "number" or "start-end". Returns the start number and the size of the range.
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.
Types ¶
This section is empty.