cmdutil

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(options RunOptions) error

Run executes a command

Types

type RunOptions

type RunOptions interface {
	// - Step 1: verify that the command can be run (e.g., go version, project version, arguments, ...)
	Validate() error
	// - Step 2: create the Scaffolder instance
	GetScaffolder() (Scaffolder, error)
	// - Step 3: call the Scaffold method of the Scaffolder instance. Doesn't need any method
	// - Step 4: finish the command execution
	PostScaffold() error
}

RunOptions represent the types used to implement the different commands

type Scaffolder added in v0.0.2

type Scaffolder interface {
	// Scaffold performs the scaffolding
	Scaffold() error
}

Scaffolder interface creates files to set up a controller manager

Jump to

Keyboard shortcuts

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