internal

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blue

func Blue(title string, message string)

func Commit

func Commit(projectPath, message string) error

func Error

func Error(message string)

func Green

func Green(title string, message string)

func HasStagedChanges

func HasStagedChanges(p string) bool

func Info

func Info(message string)

func IsGitRepository

func IsGitRepository(p string) bool

func Red

func Red(title string, message string)

func Success

func Success(message string)

func SuggestOtherCommand

func SuggestOtherCommand(useCase, command, helpCommand string)

func Warning

func Warning(message string)

func YNQuestion

func YNQuestion(defaultValue *bool, message string)

func Yellow

func Yellow(title string, message string)

Types

type CommitMessage

type CommitMessage struct {
	Type        ConfigItem
	Scope       *ConfigItem
	Description string
	Body        string
	Footers     string
}

func (*CommitMessage) String

func (c *CommitMessage) String() string

type ConfigItem

type ConfigItem struct {
	Name        string
	Description string
}

func AddConfigItem

func AddConfigItem(it string) (scope *ConfigItem, err error)

type Project

type Project struct {
	ConfigFilePath string
	Path           string
	Version        string
	Scopes         []ConfigItem
	Conventions    []ConfigItem
}

func LoadProject

func LoadProject() (p *Project, err error)

func (*Project) AddConventions

func (p *Project) AddConventions() (err error)

func (*Project) AddScopes

func (p *Project) AddScopes() (err error)

func (*Project) Commit

func (p *Project) Commit() (err error)

func (*Project) CreateCommitMessage

func (p *Project) CreateCommitMessage() (commit *CommitMessage, err error)

func (*Project) CreateGitCommand

func (p *Project) CreateGitCommand() error

func (*Project) New

func (p *Project) New(version string) (err error)

func (*Project) ResetScopes

func (p *Project) ResetScopes()

func (*Project) ScopeFromString

func (p *Project) ScopeFromString(typeString string) *ConfigItem

func (*Project) ScopeString

func (p *Project) ScopeString() []string

func (*Project) TypeFromString

func (p *Project) TypeFromString(typeString string) *ConfigItem

func (*Project) TypesString

func (p *Project) TypesString() []string

func (*Project) WriteConfigFile

func (p *Project) WriteConfigFile() (err error)

Jump to

Keyboard shortcuts

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