config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigFlag     = "config"
	RepoFlag       = "repo"
	CompletionFlag = "completion"
)
View Source
const (
	SortAscending  = "asc"
	SortDescending = "desc"

	HashDisabled = -1
)

Variables

This section is empty.

Functions

func RegisterFlags added in v1.0.0

func RegisterFlags(cmd *cobra.Command)

Types

type Config

type Config struct {
	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 added in v0.1.0

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

Jump to

Keyboard shortcuts

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