config

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagConfig = "config"
	FlagRepo   = "repo"
)
View Source
const (
	SortAscending  = "asc"
	SortDescending = "desc"

	HashDisabled = -1
)

Variables

View Source
var (
	ErrNotAGitRepository = errors.New("not a git repository (or any of the parent directories)")
	ErrNotADirectory     = errors.New("not a directory")
)

Functions

func RegisterFlags

func RegisterFlags(cmd *cobra.Command)

Types

type Config

type Config struct {
	Tag     Tag      `yaml:"tag"`
	Sort    string   `yaml:"sort"`
	Abbrev  int      `yaml:"abbrev"`
	Groups  []*Group `yaml:"groups"`
	Divider string   `yaml:"divider"`
	Filters Filters  `yaml:"filters"`
}

func Load

func Load(cmd *cobra.Command) (*Config, error)

func NewDefault

func NewDefault() *Config

func (*Config) String

func (c *Config) String() string

type Filters

type Filters struct {
	Exclude []string `yaml:"exclude"`

	Include []string `yaml:"include"`
	// contains filtered or unexported fields
}

func (*Filters) Match

func (f *Filters) Match(c *object.Commit) bool

type Group

type Group struct {
	Title  string `yaml:"title"`
	Order  int    `yaml:"order"`
	Regexp string `yaml:"regexp"`

	Commits []*object.Commit `yaml:"-"`
	// contains filtered or unexported fields
}

func (*Group) AddCommit

func (g *Group) AddCommit(c *object.Commit)

func (*Group) Matches

func (g *Group) Matches(c *object.Commit) bool

func (*Group) Sort

func (g *Group) Sort(sort string)

func (*Group) String

func (g *Group) String(conf *Config) string

type Tag

type Tag struct {
	Regexp string `yaml:"regexp"`
	// contains filtered or unexported fields
}

func (*Tag) Match

func (t *Tag) Match(s string) bool

Jump to

Keyboard shortcuts

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