internal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfigNotFound = errors.New("config file not found")
	ErrEmptyKinds     = errors.New("kinds list must not be empty")
)
View Source
var ErrGitDirNotFound = errors.New(".git directory not found")

Functions

func FindConfig added in v0.2.0

func FindConfig(startDir string) (string, error)

func FindConfigUpward

func FindConfigUpward() (string, error)

func FindGitDir added in v0.2.0

func FindGitDir(startDir string) (string, error)

func FindGitDirUpward added in v0.2.0

func FindGitDirUpward() (string, error)

func SortChanges

func SortChanges(changes []Change, kinds []KindConfig)

Types

type Change

type Change struct {
	Kind string    `yaml:"kind"`
	Body string    `yaml:"body"`
	Time time.Time `yaml:"time"`
}

func LoadChange

func LoadChange(path string) (*Change, error)

func (*Change) Marshal

func (c *Change) Marshal() ([]byte, error)

type Config

type Config struct {
	ChangesDir    string       `yaml:"changesDir"`
	UnreleasedDir string       `yaml:"unreleasedDir"`
	ChangelogPath string       `yaml:"changelogPath"`
	VersionFormat string       `yaml:"versionFormat"`
	KindFormat    string       `yaml:"kindFormat"`
	ChangeFormat  string       `yaml:"changeFormat"`
	Kinds         []KindConfig `yaml:"kinds"`
}

func DefaultConfig

func DefaultConfig() *Config

func LoadConfig

func LoadConfig() (*Config, error)

func LoadConfigFromPath

func LoadConfigFromPath(path string) (*Config, error)

func (*Config) FindKind

func (c *Config) FindKind(name string) (*KindConfig, bool)

func (*Config) UnreleasedPath

func (c *Config) UnreleasedPath() string

func (*Config) Validate

func (c *Config) Validate() error

type KindConfig

type KindConfig struct {
	Label string `yaml:"label"`
	Auto  string `yaml:"auto,omitempty"`
}

Jump to

Keyboard shortcuts

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