Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchFilter ¶
type BranchFilter struct {
// contains filtered or unexported fields
}
BranchFilter matches branch names against a set of comma-separated glob patterns. An empty filter matches all branches.
func New ¶
func New(filterStr string) *BranchFilter
New creates a BranchFilter from a comma-separated list of glob patterns (e.g. "main,release-*,feature/*"). An empty string matches everything.
func (*BranchFilter) FilterBranches ¶
func (f *BranchFilter) FilterBranches(branches []string) []string
FilterBranches returns only the branches that match the filter.
func (*BranchFilter) IsEmpty ¶
func (f *BranchFilter) IsEmpty() bool
IsEmpty reports whether the filter has no patterns (matches everything).
func (*BranchFilter) Match ¶
func (f *BranchFilter) Match(branchName string) bool
Match reports whether branchName matches any of the filter's patterns. Returns true (matches everything) when the filter has no patterns.
func (*BranchFilter) Patterns ¶
func (f *BranchFilter) Patterns() []string
Patterns returns the raw glob patterns that were used to create this filter.
Click to show internal directories.
Click to hide internal directories.