label

package
v1.7.8 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(_ *github.Label) bool

All Keep all labels.

func FilterAndTransform

func FilterAndTransform(labels []*github.Label, filter Predicate, transform NameTransform) []string

FilterAndTransform Filter and transform labels.

func NameIdentity

func NameIdentity(name string) string

NameIdentity Identity transformation.

func Nothing

func Nothing(_ *github.Label) bool

Nothing Exclude all labels.

Types

type NameTransform

type NameTransform func(name string) string

NameTransform A name transformation.

func Chain

func Chain(nts ...NameTransform) NameTransform

Chain transformations.

func TrimAllPrefix

func TrimAllPrefix(values []string) NameTransform

TrimAllPrefix Trim all prefix.

func TrimPrefix

func TrimPrefix(prefix string) NameTransform

TrimPrefix transformation.

type Predicate

type Predicate func(label *github.Label) bool

Predicate A label predicate.

func AllMatch

func AllMatch(predicates ...Predicate) Predicate

AllMatch label predicate.

func AnyMatch

func AnyMatch(predicates ...Predicate) Predicate

AnyMatch label predicate.

func ExcludedBy

func ExcludedBy(namePredicate func(string) Predicate, values []string) Predicate

ExcludedBy Exclude labels by a Predicate.

func FilteredBy

func FilteredBy(namePredicate func(string) Predicate, values []string) Predicate

FilteredBy Filter labels by a Predicate.

func HasPrefix

func HasPrefix(prefix string) Predicate

HasPrefix label predicate.

func HasSuffix

func HasSuffix(suffix string) Predicate

HasSuffix label predicate.

func Not

func Not(predicate Predicate) Predicate

Not Negate a predicate.

Jump to

Keyboard shortcuts

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