generate

package
v0.0.3-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParent

func GetParent(c interface{}) *cobra.Command

GetParent is a convenience function written when the CLI code is scaffolded to return the parent command and avoid scaffolding code with bad imports.

Types

type GenerateFunc

type GenerateFunc func(*GenerateSubCommand) error

type GenerateSubCommand

type GenerateSubCommand struct {
	*cobra.Command

	// flags
	WorkloadManifest   string
	CollectionManifest string
	APIVersion         string

	// options
	Name                  string
	Description           string
	CollectionKind        string
	UseCollectionManifest bool
	WorkloadKind          string
	UseWorkloadManifest   bool
	SubCommandOf          *cobra.Command

	// execution
	GenerateFunc GenerateFunc
}

func NewBaseGenerateSubCommand

func NewBaseGenerateSubCommand(parentCommand *cobra.Command) *GenerateSubCommand

NewBaseGenerateSubCommand returns a subcommand that is meant to belong to a parent subcommand but have subcommands itself.

func (*GenerateSubCommand) Setup

func (g *GenerateSubCommand) Setup()

Setup sets up this command to be used as a command.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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