{"modulePath":"github.com/Method-Security/methodtenable","version":"v0.4.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cmd\n\nPackage cmd implements the CobraCLI commands for the methodtenable CLI. Subcommands for the CLI should all live within this package. Logic should be delegated to internal packages and functions to keep the CLI commands clean and focused on CLI I/O.\n\n## Types\n\n```go\ntype MethodTenable struct {\n\tVersion      string\n\tOutputConfig writer.OutputConfig\n\tOutputSignal signal.Signal\n\tRootFlags    config.RootFlags\n\tRootCmd      *cobra.Command\n\tVersionCmd   *cobra.Command\n\tSecretConfig methodtenablefern.SecretConfig\n}\n```\nMethodTenable is the main struct for the CLI. It contains the version, output configuration, output signal, and root flags for the CLI. It also contains all commands and subcommands for the CLI. The output signal is used to write the output of the command to the desired output format after the execution of the invoked command's Run function.\n\n```go\nfunc NewMethodTenable(version string) *MethodTenable\n```\nNewMethodTenable creates a new MethodTenable struct with the given version. It initializes the root command and all subcommands for the CLI. We pass the version command in here from the main.go file, where we set the version string during the build process.\n\n```go\nfunc (a *MethodTenable) InitRootCommand()\n```\nInitRootCommand initializes the root command for the methodtenable CLI. This function initializes the root command with a PersistentPreRunE function that is responsible for setting the output configuration properly, as well as a PersistentPostRunE function that is responsible for writing the output signal to the desired output format.\n\n```go\nfunc (a *MethodTenable) InitVMCommand()\n```\nInitVMCommand initializes the vm command and asset export subcommand.\n\n```go\nfunc (a *MethodTenable) InitWASCommand()\n```\nInitWASCommand initializes the WAS command and vulnerability export subcommand.\n\n","path":"github.com/Method-Security/methodtenable/cmd","name":"cmd","synopsis":"Package cmd implements the CobraCLI commands for the methodtenable CLI.","isRedistributable":true}
