tags

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expr

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

func NewExpr

func NewExpr(expr string) (ex Expr, err error)

NewExpr creates a new tag expression from `expr`. Since we parse it as a Go build line `//go:build <expr>` only `_` and `.` are allowed in tags, we allow also "-", which we internally replace with `.`.

func (Expr) MarshalYAML

func (v Expr) MarshalYAML() (any, error)

MarshalYAML marshals to YAML. NOTE: needs to be value-receiver to be called!

func (*Expr) Matches

func (e *Expr) Matches(tags []Tag) bool

Matches reports if this tag expression matches for the given `tags`.

func (*Expr) String

func (e *Expr) String() string

String returns the expression.

func (*Expr) UnmarshalYAML

func (v *Expr) UnmarshalYAML(unmarshal func(any) error) (err error)

UnmarshalYAML unmarshals from YAML.

type Tag

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

func NewTag

func NewTag(tag string) Tag

NewTag creates a new tag.

func (Tag) MarshalYAML

func (v Tag) MarshalYAML() (any, error)

MarshalYAML marshals to YAML. NOTE: needs to be value-receiver to be called!

func (*Tag) UnmarshalYAML

func (v *Tag) UnmarshalYAML(unmarshal func(any) error) (err error)

UnmarshalYAML unmarshals from YAML.

Jump to

Keyboard shortcuts

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