Documentation ¶
Index ¶
- func Decrypt(ctx context.Context, encKey []byte, encData string) (string, error)
- func Encrypt(ctx context.Context, encKey []byte, data string) (string, error)
- func IsCtxDone(ctx context.Context) bool
- func LongestCommonPrefix(list []string) string
- func NoArticle(name string) string
- func SanitizeStrings(text ...string) string
- func SanitizeText(text string) string
- func TempFileName(prefix, suffix string) string
- func ToMillis(t time.Time) int64
- func ToTime(millis int64) time.Time
- type CachedHTTPClient
- type IndexGroups
- type MergeFS
- type WeightedChooser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LongestCommonPrefix ¶
func SanitizeStrings ¶
func SanitizeText ¶ added in v0.47.0
func TempFileName ¶ added in v0.52.0
Types ¶
type CachedHTTPClient ¶ added in v0.44.0
type CachedHTTPClient struct {
// contains filtered or unexported fields
}
func NewCachedHTTPClient ¶ added in v0.44.0
func NewCachedHTTPClient(wrapped httpDoer, ttl time.Duration) *CachedHTTPClient
type IndexGroups ¶
func ParseIndexGroups ¶
func ParseIndexGroups(spec string) IndexGroups
ParseIndexGroups The specification is a space-separated list of index entries. Normally, each entry is just a single character, but you may also specify multiple characters. For instance, the entry "The" will link to all files and folders starting with "The".
You may also create an entry using a group of index characters in parentheses. For instance, the entry "A-E(ABCDE)" will display as "A-E" and link to all files and folders starting with either A, B, C, D or E. This may be useful for grouping less-frequently used characters (such and X, Y and Z), or for grouping accented characters (such as A, \u00C0 and \u00C1)
Files and folders that are not covered by an index entry will be placed under the index entry "#".
type MergeFS ¶ added in v0.45.0
MergeFS implements a simple merged fs.FS, that can combine a Base FS with an Overlay FS. The semantics are: - Files from the Overlay FS will override files with the same name in the Base FS - Directories are combined, with priority for the Overlay FS over the Base FS for files with matching names
type WeightedChooser ¶ added in v0.47.0
type WeightedChooser struct {
// contains filtered or unexported fields
}
func NewWeightedRandomChooser ¶ added in v0.44.0
func NewWeightedRandomChooser() *WeightedChooser
func (*WeightedChooser) Add ¶ added in v0.49.0
func (w *WeightedChooser) Add(value interface{}, weight int)
func (*WeightedChooser) GetAndRemove ¶ added in v0.47.0
func (w *WeightedChooser) GetAndRemove() (interface{}, error)
GetAndRemove choose a random entry based on their weights, and removes it from the list
func (*WeightedChooser) Remove ¶ added in v0.47.0
func (w *WeightedChooser) Remove(i int)
func (*WeightedChooser) Size ¶ added in v0.47.0
func (w *WeightedChooser) Size() int
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package gg implements simple "extensions" to Go language.
|
Package gg implements simple "extensions" to Go language. |
Package pl implements some Data Pipeline helper functions.
|
Package pl implements some Data Pipeline helper functions. |