commitparser

package
v0.0.0-...-4604cca Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: EUPL-1.2 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TrailerKeyBreakingChangePrefix = "BREAKING"
	TrailerKeyBreakingChange       = TrailerKeyBreakingChangePrefix + " CHANGE"
	TrailerKeyBreakingChangeAlt    = TrailerKeyBreakingChangePrefix + "-" + TrailerKeyBreakingChange
)

Variables

View Source
var (
	ErrInvalidType    = errors.New("invalid commit type")
	ErrInvalidScope   = errors.New("invalid commit scope")
	ErrInvalidSubject = errors.New("invalid commit subject")
	ErrInvalidMessage = errors.New("invalid commit message")
	ErrInvalidTrailer = errors.New("invalid trailer in commit message")
)

Functions

This section is empty.

Types

type CommitMessage

type CommitMessage struct {
	Type     string
	Scope    string
	Subject  string
	Body     string
	Trailers map[string][]string
	Breaking bool
	Revert   bool
	Merge    bool
}

func Parse

func Parse(message string) (CommitMessage, error)

type ParseError

type ParseError struct {
	Pos int
	// contains filtered or unexported fields
}

func (ParseError) Error

func (err ParseError) Error() string

func (ParseError) Unwrap

func (err ParseError) Unwrap() error

Jump to

Keyboard shortcuts

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