conventionalcommit

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TypesRegex  = regexp.MustCompile(`^(feat|fix|build|chore|ci|docs|perf|refactor|revert|style|test)$`)
	HeaderRegex = regexp.MustCompile(`^(?P<type>\w+)(\((?P<scope>[\w/.-]+)\))?(?P<breaking>!)?:( +)?(?P<header>.+)`)
)
View Source
var Types = map[string]string{
	"feat":     "Features",
	"fix":      "Bug Fixes",
	"build":    "",
	"chore":    "",
	"ci":       "",
	"docs":     "",
	"perf":     "",
	"refactor": "",
	"revert":   "",
	"style":    "",
	"test":     "",
}

Functions

This section is empty.

Types

type CommitMsg

type CommitMsg struct {
	Type           string
	BreakingChange bool
	Scope          string
	Header         string
	Body           string
}

func ParseCommitMsg

func ParseCommitMsg(commitMsg string) (*CommitMsg, error)

func (CommitMsg) MarshalText

func (v CommitMsg) MarshalText() ([]byte, error)

func (CommitMsg) String

func (v CommitMsg) String() string

func (*CommitMsg) UnmarshalText

func (v *CommitMsg) UnmarshalText(data []byte) error

Jump to

Keyboard shortcuts

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