tags

package
v0.4.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 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 Matcher

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

Matcher matches tags.

func (*Matcher) Match

func (m *Matcher) Match(tags map[string]string) bool

Match returns true if the tag referenced by the matcher's name is present and matches its regular expression.

type Matchers

type Matchers []*Matcher

Matchers is a list of Matchers.

func MustParse added in v0.5.0

func MustParse(query string) Matchers

MustParse panics if a parse error happens.

func ParseTagMatcher

func ParseTagMatcher(query string) (Matchers, error)

ParseTagMatcher parses a tag query and returns the matcher list.

func (Matchers) Match

func (m Matchers) Match(tags map[string]string) bool

Match returns true if all matchers match for this set of tags.

Jump to

Keyboard shortcuts

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