label

package
v1.21.5 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 6 Imported by: 8

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"`
}

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