generate

package
v0.12.0-rc Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

generate package provides the base of the generate command which allows to run generators for tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AfterGenerator

type AfterGenerator interface {
	// AfterGenerate receives the context and other params so it can determine if should
	// run or not.
	core.Plugin
	AfterGenerate(context.Context, string, []string) error
}

After generator is something that runs after generators are executed.

type Command

type Command struct {
	// contains filtered or unexported fields
}

func (Command) Alias

func (c Command) Alias() string

func (Command) HelpText

func (c Command) HelpText() string

func (Command) Name

func (c Command) Name() string

func (Command) ParentName

func (c Command) ParentName() string

func (*Command) Receive

func (c *Command) Receive(plugins []core.Plugin)

func (*Command) Run

func (c *Command) Run(ctx context.Context, root string, args []string) error

type Generator

type Generator interface {
	core.Plugin
	InvocationName() string
	Generate(context.Context, string, []string) error
}

Generator allows to identify those plugins that are generators.

Jump to

Keyboard shortcuts

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