Help us shape the future of Go! Take the 2026 Go Developer Survey

label

package
v1.27.3 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 8 Imported by: 0

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

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

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