commands

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Add = &cli.Command{
	Name:  "add",
	Usage: "adds a new git hook",
	Subcommands: []*cli.Command{
		{
			Name:  "gitleaks",
			Usage: "pre-commit hook to run gitleaks detect",
			Action: func(c *cli.Context) error {
				return addGitLeaks()
			},
		},
	},
}
View Source
var Config = &cli.Command{
	Name:  "config",
	Usage: "Configure git-hooks",
	Action: func(c *cli.Context) error {
		return configureGitHooks()
	},
}
View Source
var Hooks = &cli.Command{
	Name:  "hook",
	Usage: "",
	Action: func(c *cli.Context) error {
		if c.NArg() == 0 {
			return cli.ShowAppHelp(c)
		}

		hookName := c.Args().First()
		return executeHook(hookName)
	},
}
View Source
var Implode = &cli.Command{
	Name:  "implode",
	Usage: "Revert git-hooks configuration",
	Action: func(c *cli.Context) error {
		return implodeGitHooks()
	},
}
View Source
var Remove = &cli.Command{
	Name:  "remove",
	Usage: "removes a git hook",
	Subcommands: []*cli.Command{
		{
			Name:  "gitleaks",
			Usage: "remove the gitleaks pre-commit hook",
			Action: func(c *cli.Context) error {
				return removeGitLeaks()
			},
		},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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