cli

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(opts ...Option)

Main is the entry point for programs provided by this package.

Types

type Command

type Command struct {
	Name      string
	ShortDesc string
	Build     func(ConfigBuilder) flags.Commander
}

Command is an option that adds a subcommand to the program.

type Config

type Config interface {
	Git() gateway.Git
	Repo() *repo.Repo
	GitHub() gateway.GitHub
	CurrentGitHubUser() string
}

Config is the common configuration for all programs in this package.

type ConfigBuilder

type ConfigBuilder func() (Config, error)

ConfigBuilder builds a configuration lazily.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option configures the behavior of Main.

type ShortDesc

type ShortDesc string

ShortDesc is an Option that specifies a short description of the program.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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