cmd

package
v0.0.0-...-9fddba8 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd

func NewCmd(runner Runner) *cobra.Command

func WaitInterrupted

func WaitInterrupted(ctx context.Context) error

Types

type AppContext

type AppContext struct {
	// Name holds the current application name.
	Name string
	// ConfigPath holds the current application's config path, if any.
	ConfigPath string
	// Version holds string representation of a current application's version.
	Version string
}

AppContext represents the application context.

func (*AppContext) RunWithHomeExpand

func (m *AppContext) RunWithHomeExpand(runner Runner) error

RunWithHomeExpand runs the given runner, expanding the config path field by taking in action HOME directory symbol (~) if it exists.

type Runner

type Runner func(appContext AppContext) error

Runner func starts service wrapper by Cobra command.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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