command

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Env      Env
	Checkers []core.Checker
	Config   core.Config
	Registry tools.Registry
	Logger   *zap.SugaredLogger
}

func (*Check) Run

func (check *Check) Run() error

type Command

type Command interface {
	Run() error
}

func NewCheck

func NewCheck(env Env, config core.Config, checkers []core.Checker, logger *zap.SugaredLogger, registry tools.Registry) Command

func NewCommand

func NewCommand(params Params) (Command, error)

func NewVersion

func NewVersion(env Env) Command

type Env

type Env struct {
	Args      []string
	OutWriter io.Writer
	ErrWriter io.Writer

	Version string
	Commit  string
	Date    string
}

type None

type None struct {
}

None command is needed when we need to display help section.

This is handled by flags package and we effectively do not need to do anything.

func (*None) Run

func (*None) Run() error

type Params

type Params struct {
	fx.In

	Type     Type
	Env      Env
	Checkers []core.Checker `group:"checkers"`
	Registry tools.Registry
	Config   core.Config
	Logger   *zap.SugaredLogger
}

type Type

type Type int
const (
	RunCheck Type = iota
	RunVersion
	RunNone
)

type Version

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

func (*Version) Run

func (version *Version) Run() error

Jump to

Keyboard shortcuts

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