util

package
v0.0.0-...-ac4698a Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Percentiler

type Percentiler interface {
	Percentile(p float64) int
}

func NewPercentiler

func NewPercentiler(min, max int) Percentiler

type Ranking

type Ranking interface {
	Add(v int)
	GetPercentile(v int) float64
}

func NewRanking

func NewRanking(v ...int) Ranking

type RegexpPair

type RegexpPair interface {
	Accept() *regexp.Regexp
	Deny() *regexp.Regexp
	MatchString(string) bool
}

func NewRegexpPair

func NewRegexpPair(accept, deny *regexp.Regexp) RegexpPair

type StringBuilder

type StringBuilder struct {
	strings.Builder
}

func (*StringBuilder) Write

func (s *StringBuilder) Write(v string) error

func (*StringBuilder) Writef

func (s *StringBuilder) Writef(format string, v ...interface{}) error

func (*StringBuilder) Writeln

func (s *StringBuilder) Writeln(v string) error

func (*StringBuilder) Writelnf

func (s *StringBuilder) Writelnf(format string, v ...interface{}) error

type StringSet

type StringSet interface {
	Add(string) StringSet
	In(string) bool
	Len() int
}

func NewStringSet

func NewStringSet(seed ...string) StringSet

Jump to

Keyboard shortcuts

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