body

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package body provides the configuration of the commit message body, including its length interval and the functional options to build the config.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config represents the configuration of the commit message body.

func NewConfig

func NewConfig(opts ...Option) Config

NewConfig creates a new body config with the provided functional options.

func (Config) Length

func (c Config) Length() value.Range

Length returns the allowed length interval of the body text.

func (Config) Mandate

func (c Config) Mandate() mandate.Config

Mandate returns the mandate config of the body config.

type Option

type Option func(*Config)

Option is a functional option that modifies the body config on its creation.

func WithLength

func WithLength(length value.Range) Option

WithLength sets the allowed length interval for the body config.

func WithMandate

func WithMandate(cfg mandate.Config) Option

WithMandate sets the mandate config for the body config.

Directories

Path Synopsis
Package mandate configures the set of commit types for which the commit message body is mandatory.
Package mandate configures the set of commit types for which the commit message body is mandatory.

Jump to

Keyboard shortcuts

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