Documentation
¶
Overview ¶
Package config loads git-customs TOML configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
DefaultPath returns ~/.config/git-customs/config.toml.
Types ¶
type Config ¶
type Config struct {
Command string `toml:"command"`
Commands []string `toml:"commands"`
Timeout string `toml:"timeout"`
ClearPattern string `toml:"clear_pattern"`
Repos map[string]bool `toml:"repos"`
Visibility VisibilityConfig `toml:"visibility"`
}
Config is the git-customs configuration.
func (*Config) CommandList ¶
CommandList returns the commands to run, in order. `commands` takes precedence over the single `command`; each command receives the full diff on stdin and must pass for the push to be allowed.
func (*Config) TimeoutDuration ¶
TimeoutDuration parses Timeout, defaulting to 60s on error.
type VisibilityConfig ¶
type VisibilityConfig struct {
SkipHosts []string `toml:"skip_hosts"`
SkipOwners []string `toml:"skip_owners"`
}
VisibilityConfig lists hosts/owners always treated as private.
Click to show internal directories.
Click to hide internal directories.