base_int

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseQuickSetupArgs

func ParseQuickSetupArgs(s string) ([]int, error)

ParseQuickSetupArgs parses numbers to Args. Format: "[int]..."

func QuickSetup

func QuickSetup(f MatchFunc) func(_ sequence.BQ, s string) (sequence.Matcher, error)

QuickSetup returns a sequence.ExecQuickSetupFunc.

Types

type IntMatcher

type IntMatcher map[int]struct{}

func (IntMatcher) Has

func (m IntMatcher) Has(i int) bool

type MatchFunc

type MatchFunc func(qCtx *query_context.Context, m IntMatcher) (bool, error)

type Matcher

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

func NewMatcher

func NewMatcher(args []int, f MatchFunc) (*Matcher, error)

func (*Matcher) Match

func (m *Matcher) Match(_ context.Context, qCtx *query_context.Context) (bool, error)

Jump to

Keyboard shortcuts

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