config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindConfig added in v1.1.0

func FindConfig() string

FindConfig find config

func InitConfig

func InitConfig(cfgFile string)

InitConfig load config

Types

type Commands

type Commands struct {
	Name   string            `mapstructure:"name"`
	Run    string            `mapstructure:"run"`
	Silent bool              `mapstructure:"silent"`
	Env    map[string]string `mapstructure:"env"`
}

type Configuration

type Configuration struct {
	PreCommit      Hook `mapstructure:"pre-commit"`
	CommitMsg      Hook `mapstructure:"commit-msg"`
	PrePush        Hook `mapstructure:"pre-push"`
	PreMergeCommit Hook `mapstructure:"pre-merge-commit"`
	PreRebase      Hook `mapstructure:"pre-rebase"`
	PreReceive     Hook `mapstructure:"pre-receive"`
}
var Config Configuration

type Hook

type Hook struct {
	FailFast bool       `mapstructure:"fail-fast"`
	Timeout  string     `mapstructure:"timeout"`
	Commands []Commands `mapstructure:"commands"`
}

Jump to

Keyboard shortcuts

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