label

package
v1.26.4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 8 Imported by: 0 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

This section is empty.

Variables

This section is empty.

Functions

func IsErrTemplateLoad

func IsErrTemplateLoad(err error) bool

IsErrTemplateLoad checks if an error is a ErrTemplateLoad.

func LoadTemplateDescription added in v1.19.1

func LoadTemplateDescription(fileName string) (string, error)

LoadTemplateDescription loads the labels from a template file, returns a description string by joining each Label.Name with comma

func NormalizeColor

func NormalizeColor(color string) (string, error)

NormalizeColor normalizes a color string to a 6-character hex code

Types

type ErrTemplateLoad

type ErrTemplateLoad struct {
	TemplateFile  string
	OriginalError error
}

ErrTemplateLoad represents a "ErrTemplateLoad" kind of error.

func (ErrTemplateLoad) Error

func (err ErrTemplateLoad) Error() string

type Label

type Label struct {
	Name           string `yaml:"name"`
	Color          string `yaml:"color"`
	Description    string `yaml:"description,omitempty"`
	Exclusive      bool   `yaml:"exclusive,omitempty"`
	ExclusiveOrder int    `yaml:"exclusive_order,omitempty"`
}

Label represents label information loaded from template

func LoadTemplateFile added in v1.19.1

func LoadTemplateFile(fileName string) ([]*Label, error)

LoadTemplateFile loads the label template file by given file name, returns a slice of Label structs.

Jump to

Keyboard shortcuts

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