rule

package
v6.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package rule provides functions to handle release rule configuration.

Index

Constants

View Source
const FlagType = "JSON string"

Variables

View Source
var (
	ErrInvalidCommitType    = errors.New("invalid commit type")
	ErrInvalidReleaseType   = errors.New("invalid release type")
	ErrDuplicateReleaseRule = errors.New("duplicate release rule for the same commit type")
	ErrNoRules              = errors.New("no rule found")
)
View Source
var Default = Rules{
	Map: map[string]string{
		"feat":   "minor",
		"fix":    "patch",
		"perf":   "patch",
		"revert": "patch",
	},
}

Functions

This section is empty.

Types

type Flag

type Flag map[string][]string

func (*Flag) Set

func (f *Flag) Set(value string) error

func (*Flag) String

func (f *Flag) String() string

func (*Flag) Type

func (f *Flag) Type() string

type Rules

type Rules struct {
	Map map[string]string
}

func Unmarshall

func Unmarshall(input map[string][]string) (Rules, error)

Unmarshall takes a raw Viper configuration and returns a Rules struct representing release rules configuration.

Jump to

Keyboard shortcuts

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