util

package
v0.0.0-...-5315466 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BoolSlicePool = &sync.Pool{
	New: func() interface{} {
		return []bool{}
	},
}
View Source
var BufferPool = &sync.Pool{
	New: func() interface{} {
		return new(bytes.Buffer)
	},
}

Functions

func EditDistance

func EditDistance(ss, tt []rune) int

func FormatDuration

func FormatDuration(t time.Duration) string

func ParseDuration

func ParseDuration(s string) (time.Duration, error)

func Silimar

func Silimar(s, t string, rv config.RelativeValue) bool

func StartProfile

func StartProfile(ctx *cli.Context) error

func StopProfile

func StopProfile(ctx *cli.Context) error

Types

type Replacer

type Replacer struct {
	// contains filtered or unexported fields
}

func MustNewReplacer

func MustNewReplacer(rule []config.Replace) Replacer

func (Replacer) Replace

func (r Replacer) Replace(s string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL