cmdutil

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DispatchCommand

func DispatchCommand(cmdList []*SubCommand)

DispatchCommand runs sub command out of specified cmdList based on the first command line argument.

Types

type SubCommand

type SubCommand struct {
	// Main is command entry point.
	Main func()

	// Name is sub-command name used to execute it.
	Name string

	// Short describes command in one line of text.
	Short string

	// Examples shows one or more sub-command execution examples.
	Examples []string
}

SubCommand is an implementation of a linter sub-command.

Jump to

Keyboard shortcuts

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