Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultVersion is the default version of the specification DefaultVersion = 1 // DefaultFilename is the default filename of the specification DefaultFilename = ".ghc.yaml" )
Variables ¶
View Source
var ErrHookNotExist = errors.New("hook does not exist")
ErrHookNotExist is an error when the hook does not exist
View Source
var GitHooks = []string{
"applypatch-msg",
"commit-msg",
"post-applypatch",
"post-checkout",
"post-commit",
"post-merge",
"post-rewrite",
"pre-applypatch",
"pre-auto-gc",
"pre-commit",
"pre-merge-commit",
"pre-push",
"pre-rebase",
"prepare-commit-msg",
}
GitHooks is a list of git hooks See: https://git-scm.com/docs/githooks
Functions ¶
Types ¶
type Spec ¶
type Spec struct {
// Version is the version of the specification
Version int `yaml:"version" validate:"required"`
// Name is a given name of the project or repository (optional)
Name string `yaml:"name,omitempty"`
// Description is a short description of the project or repository (optional)
Description string `yaml:"description,omitempty"`
// Hooks is a list of hooks to be executed
Hooks Hooks `yaml:"hooks" validate:"required"`
// Stdout is a list of hooks to be executed
Stdout bool `yaml:"stdout,omitempty"`
// Stderr is a list of hooks to be
Stderr bool `yaml:"stderr,omitempty"`
sync.Mutex `yaml:"-"`
}
Spec is the specification of the repository
func (*Spec) UnmarshalYAML ¶
UnmarshalYAML unmarshals the YAML data into the Spec struct
Click to show internal directories.
Click to hide internal directories.