config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd

func NewCmd(ctx *ccm.CmdContext) *cobra.Command

NewCmd creates this new command.

func RunUpdate

func RunUpdate(ctx *ccm.CmdContext, opts *SetOptions)

RunUpdate runs an automatic Githooks update.

Types

type GitOptions

type GitOptions struct {
	Local  bool
	Global bool
}

GitOptions for local or global Git configuration.

type OptionsMapping

type OptionsMapping struct {
	Print     string
	PrintDesc string
	Set       string
	SetDesc   string
	Unset     string
	UnsetDesc string
	Reset     string
	ResetDesc string
}

OptionsMapping holds mappings for the print/set/unset/reset actions.

type SetOptions

type SetOptions struct {
	Print bool
	Reset bool

	Unset  bool
	Set    bool
	Values []string
}

SetOptions holds data for setting Git options to either print/reset/unset/set a value.

func (*SetOptions) AssertOptions

func (s *SetOptions) AssertOptions(log cm.ILogContext, optsMap *OptionsMapping, noValues bool, args []string)

AssertOptions asserts that all set actions are exclusive etc.

Jump to

Keyboard shortcuts

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