command

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoCommand      = errors.New("no command given")
	ErrInvalidCommand = errors.New("no such command")
)
View Source
var ErrInvalidArgs = errors.New("invalid args")

Functions

This section is empty.

Types

type Command

type Command interface {
	Run(args []string) error
}

Command runs commands.

type Gen

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

Gen implements Command to generate go files.

func NewGen

func NewGen(cfgService config.Service) *Gen

NewGen is a constructor.

func (*Gen) Run

func (g *Gen) Run(args []string) error

Run generates mappers, as per a the spec in the comments of the file.

type Manager

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

Manager implements Command by delegating to other commands.

func NewManager

func NewManager(commands map[string]Command) *Manager

NewManager is a constructor.

func (*Manager) Run

func (m *Manager) Run(args []string) error

Run runs the manager.

Jump to

Keyboard shortcuts

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