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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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