Skip to content

Commit

Permalink
update(cmd): disable autogen tag for commands
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
  • Loading branch information
leodido authored and leogr committed Apr 9, 2020
1 parent 7c01a1b commit 7211e07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func New(configOptions *ConfigOptions) *cobra.Command {
rootCmd := &cobra.Command{
Use: "event-generator",
Short: "A command line tool to perform a variety of suspect actions.",
DisableAutoGenTag: true,
PersistentPreRun: func(c *cobra.Command, args []string) {
// PersistentPreRun runs before flags validation but after args validation.
// Do not assume initialization completed during args validation.
Expand Down
14 changes: 8 additions & 6 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@ import (
"regexp"

"github.com/falcosecurity/event-generator/events"
_ "github.com/falcosecurity/event-generator/events/k8saudit"
_ "github.com/falcosecurity/event-generator/events/syscall"
_ "github.com/falcosecurity/event-generator/events/k8saudit" // needs a comment justifying it
_ "github.com/falcosecurity/event-generator/events/syscall" // needs a comment justifying it
"github.com/falcosecurity/event-generator/pkg/runner"
logger "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
cmdutil "k8s.io/kubectl/pkg/cmd/util"
)

// DefaultNamespace const contains the name of the default Kubernetes namespace.
const DefaultNamespace = "default"

// NewRun instantiates the run subcommand.
func NewRun() *cobra.Command {

c := &cobra.Command{
Use: "run [regexp]",
Short: "Run actions",
Args: cobra.MaximumNArgs(1),
Use: "run [regexp]",
Short: "Run actions",
Args: cobra.MaximumNArgs(1),
DisableAutoGenTag: true,
}

flags := c.Flags()
Expand Down

0 comments on commit 7211e07

Please sign in to comment.