git

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2018 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commit

func Commit(commit CommitMessage)

Commit runs `git commit` and returns the output/error strings

func GetRoot

func GetRoot() (string, error)

GetRoot returns the absolute path of top-level git directory

func IsInstalled

func IsInstalled() bool

IsInstalled checks if 'git' command exists in the PATH

Types

type CommitMessage

type CommitMessage struct {
	Type    string
	Scope   string
	Subject string
	Body    string
	Close   string
}

CommitMessage type

func (CommitMessage) Format

func (c CommitMessage) Format() string

Format outputs Conventional Commits spec friendly commit message To keep it simple; I ignored the breaking changes segment. I think using the CLI to write breaking changes is hard, so, you will propably write the commit Message using an editor instead. Ref: https://conventionalcommits.org

Jump to

Keyboard shortcuts

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