subcmd

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2019 License: MIT Imports: 4 Imported by: 2

README

Subcmd

CircleCI

subcmd is very simple sub commands dispatcher.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Main

type Main func([]string) error

Main represents entry point of a sub-command

type Main2

type Main2 func(*flag.FlagSet, []string) error

Main2 represents entry point of a sub-command

type Subcmds

type Subcmds map[string]interface{}

Subcmds represents sub-commands table. This should has Main, Main2 or Subcmds as values.

func (Subcmds) Run

func (sc Subcmds) Run(args []string) error

Run parses args and executes one of sub-commands.

func (Subcmds) RunWithName

func (sc Subcmds) RunWithName(name string, args []string) error

RunWithName parses args and executes one of sub-commands with name of flag.FlagSet which passed to Main2 entry points.

Jump to

Keyboard shortcuts

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