config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitConfig

type CommitConfig struct {
	IssueRegex         string // Regex for issue numbers in branch name
	OutputIssuePrefix  string // Prefix before each issue number in the commit message
	OutputIssueSuffix  string // Suffix after each issue number in the commit message
	OutputStringPrefix string // Prefix before the list of issues in the commit message
	OutputStringSuffix string // Suffix after the list of issues and before the user's message
}

Representation of settings that can be set from the config file

func MakeDefaultConfig

func MakeDefaultConfig() CommitConfig

Helper function to create a default config

func ReadCommitConfig

func ReadCommitConfig(fileReader FileReading, configFilePath string) (CommitConfig, error)

Reads config at the file path and unmarshals it into commitConfig struct

type FileReader

type FileReader struct{}

Simple facade around the os file reading functions

func (FileReader) ReadFile

func (FileReader) ReadFile(filename string) ([]byte, error)

func (FileReader) Stat

func (FileReader) Stat(filename string) (fs.FileInfo, error)

type FileReading

type FileReading interface {
	ReadFile(filename string) ([]byte, error)
	Stat(filename string) (fs.FileInfo, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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