cliby

package module
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: May 14, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LOG_FORMAT = "%{color}%{time:2006-01-02T15:04:05.000Z07:00} %{level:-5s} [%{shortfile}]%{color:reset} %{message}"

Functions

func InitLogging

func InitLogging()

func LoadConfigs

func LoadConfigs(iface Interface, configFile string)

func MergeArrays added in v1.0.3

func MergeArrays(ov, nv reflect.Value) reflect.Value

func MergeMaps added in v1.0.3

func MergeMaps(ov, nv reflect.Value)

func MergeStructs added in v1.0.3

func MergeStructs(ov, nv reflect.Value)

func ProcessAllOptions

func ProcessAllOptions(i Interface) (string, error)

func RunCommand

func RunCommand(i Interface, command string) error

Types

type Cli

type Cli struct {
	// contains filtered or unexported fields
}

func New

func New(name string) *Cli

func (*Cli) Browse

func (c *Cli) Browse(uri string) error

func (*Cli) CommandLine

func (c *Cli) CommandLine() *kingpin.Application

func (*Cli) GetCommand

func (c *Cli) GetCommand(command string) func() error

func (*Cli) GetCommands added in v1.0.7

func (c *Cli) GetCommands() map[string]func() error

func (*Cli) GetDefaults

func (c *Cli) GetDefaults() interface{}

func (*Cli) GetOptions

func (c *Cli) GetOptions() interface{}

func (*Cli) GetTemplate

func (c *Cli) GetTemplate(template string) string

func (*Cli) Name

func (c *Cli) Name() string

func (*Cli) NewOptions

func (c *Cli) NewOptions() interface{}

func (*Cli) SetCommands

func (c *Cli) SetCommands(commands map[string]func() error)

func (*Cli) SetDefaults

func (c *Cli) SetDefaults(val interface{})

func (*Cli) SetOptions

func (c *Cli) SetOptions(val interface{})

func (*Cli) SetTemplates

func (c *Cli) SetTemplates(templates map[string]string)

type Exit

type Exit struct{ Code int }

type Interface

type Interface interface {
	// SetCookieFile(string) *Cli
	// GetCookieFile(string) *Cli
	Name() string
	GetDefaults() interface{}
	NewOptions() interface{}
	GetOptions() interface{}
	SetOptions(interface{})
	CommandLine() *kingpin.Application
	SetCommands(map[string]func() error)
	GetCommand(string) func() error
}

type NoChangesFound

type NoChangesFound struct{}

func (NoChangesFound) Error

func (f NoChangesFound) Error() string

type Options

type Options struct {
	ConfigFile string `json:"config-file"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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