cmd

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Verbose  bool
	NoColors bool
)

Functions

func AddConfigYaml

func AddConfigYaml(fs afero.Fs)

AddConfigYaml write lefthook.yml in root project directory

func AddGitHooks

func AddGitHooks(fs afero.Fs)

AddGitHooks write existed directories in source_dir as hooks in .git/hooks

func DeleteGitHooks added in v0.7.3

func DeleteGitHooks(fs afero.Fs)

DeleteGitHooks read the config and remove all git hooks except

func EnableColors added in v0.7.3

func EnableColors() bool

EnableColors shows is colors supported for current output or not. If `colors` explicitly specified in config, will return this value. Otherwise enabled for TTY and disabled for non-terminal output.

func Execute

func Execute()

func FilterExclude added in v0.1.3

func FilterExclude(vs []string, matcher string) []string

func FilterGlob added in v0.1.4

func FilterGlob(vs []string, matcher string) []string

func FilterInclude added in v0.1.3

func FilterInclude(vs []string, matcher string) []string

func FilterRelative added in v0.7.3

func FilterRelative(vs []string, matcher string) []string

func InstallCmdExecutor

func InstallCmdExecutor(args []string, fs afero.Fs)

InstallCmdExecutor execute basic configuration

func RunCmdExecutor

func RunCmdExecutor(args []string, fs afero.Fs) error

RunCmdExecutor run executables in hook groups

func VerbosePrint added in v0.7.3

func VerbosePrint(v ...interface{})

VerbosePrint print text if Verbose flag persist

Types

type Spinner added in v0.7.3

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

func NewSpinner added in v0.7.3

func NewSpinner() *Spinner

func (*Spinner) RestartWithMsg added in v0.7.3

func (s *Spinner) RestartWithMsg(msgs ...interface{})

func (*Spinner) Start added in v0.7.3

func (s *Spinner) Start()

func (*Spinner) Stop added in v0.7.3

func (s *Spinner) Stop()

Jump to

Keyboard shortcuts

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