brinfo

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// MatchAny match any one as success(default)
	MatchAny = iota
	// MatchAll match all as success
	MatchAll
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchMatcher

type BranchMatcher interface {
	fmt.Stringer
	// Match branch name, no remote prefix
	Match(branch string) bool
}

BranchMatcher interface

func NewBranchMatcher

func NewBranchMatcher(pattern string, regex bool) BranchMatcher

NewBranchMatcher create a new branch matcher

func NewContainsMatch

func NewContainsMatch(pattern string) BranchMatcher

NewContainsMatch create a new contains matcher

func NewGlobMatch

func NewGlobMatch(pattern string) BranchMatcher

NewGlobMatch create a new glob matcher

func NewMatcher

func NewMatcher(pattern string, typ ...string) BranchMatcher

NewMatcher create a branch matcher by type and pattern

func NewPrefixMatch

func NewPrefixMatch(pattern string) BranchMatcher

NewPrefixMatch create a new prefix matcher

func NewRegexMatch

func NewRegexMatch(pattern string) BranchMatcher

NewRegexMatch create a new regex matcher

func NewSuffixMatch

func NewSuffixMatch(pattern string) BranchMatcher

NewSuffixMatch create a new suffix matcher

type ContainsMatch

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

ContainsMatch handle contains matching

func (*ContainsMatch) Match

func (c *ContainsMatch) Match(branch string) bool

Match branch name by contains pattern

func (*ContainsMatch) String

func (c *ContainsMatch) String() string

String get string

type GlobMatch

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

GlobMatch handle glob matching

func (*GlobMatch) Match

func (g *GlobMatch) Match(branch string) bool

Match branch name by glob pattern

func (*GlobMatch) String

func (g *GlobMatch) String() string

String get string

type MultiMatcher

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

MultiMatcher match branch name by multi matcher

func NewMulti

func NewMulti(ms ...BranchMatcher) *MultiMatcher

NewMulti create a multi matcher by matchers

func QuickMulti

func QuickMulti(typWithPatterns ...string) *MultiMatcher

QuickMulti quick create a multi matcher by type and patterns

Usage:

m := QuickMulti("contains:feat", "prefix:fix", "suffix:bug")
m := QuickMulti("contains:feat", "prefix:fix", "suffix:bug").WithMode(MatchAll)

func (*MultiMatcher) Add

func (m *MultiMatcher) Add(ms ...BranchMatcher)

Add matcher to multi matcher

func (*MultiMatcher) IsEmpty

func (m *MultiMatcher) IsEmpty() bool

IsEmpty check

func (*MultiMatcher) Len

func (m *MultiMatcher) Len() int

Len of multi matcher

func (*MultiMatcher) Match

func (m *MultiMatcher) Match(branch string) bool

Match branch name by multi matcher

func (*MultiMatcher) String

func (m *MultiMatcher) String() string

String get string

func (*MultiMatcher) WithMode

func (m *MultiMatcher) WithMode(mode uint8) *MultiMatcher

WithMode set mode

type PrefixMatch

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

PrefixMatch handle prefix matching

func (*PrefixMatch) Match

func (p *PrefixMatch) Match(branch string) bool

Match branch name by prefix pattern

func (*PrefixMatch) String

func (p *PrefixMatch) String() string

String get string

type RegexMatch

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

RegexMatch handle regex matching

func (*RegexMatch) Match

func (r *RegexMatch) Match(branch string) bool

Match branch name by regex pattern

func (*RegexMatch) String

func (r *RegexMatch) String() string

String get string

type SuffixMatch

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

SuffixMatch handle suffix matching

func (*SuffixMatch) Match

func (s *SuffixMatch) Match(branch string) bool

Match branch name by suffix pattern

func (*SuffixMatch) String

func (s *SuffixMatch) String() string

String get string

Jump to

Keyboard shortcuts

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