cli

package
v0.0.0-...-3b62c27 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogFile = &lumberjack.Logger{
	Filename:   filepath.Join(os.TempDir(), "vine-debug.log"),
	MaxSize:    500,
	MaxBackups: 10,
	MaxAge:     365,
	Compress:   false,
}

LogFile is the command line program log file

Functions

func New

func New() *cobra.Command

New returns a new 'vine' root command

Types

type CommandError

type CommandError struct {
	Msg, Use string
}

CommandError is an error returned by cli commands

func (*CommandError) Error

func (ce *CommandError) Error() string

type Config

type Config struct {
	Wallet string `yaml:"wallet" default:"default"`
	Editor string `yaml:"editor" env:"EDITOR"`

	// LogLevel will set the log level for all logs that are
	// written to standard out
	LogLevel string `yaml:"loglevel" default:"info"`
	NoColor  bool   `yaml:"nocolor"`

	// Config is the config directory used for the cli
	Config string `yaml:"config" env:"VINE_CONFIG"`

	// Data directory (defaults to the same as the config dir)
	Data string `yaml:"data"`
}

Config is the command line configuration structure

type GlobalFlags

type GlobalFlags struct {
	Silent bool
	// contains filtered or unexported fields
}

GlobalFlags are the cli's global persisant flags

var Flags GlobalFlags

Flags are the GLOBAL flags... someone help me... why am i using globals

type StatusError

type StatusError struct {
	Msg  string
	Code int
}

StatusError is an error that carries an exit status.

func (*StatusError) Error

func (se *StatusError) Error() string

Jump to

Keyboard shortcuts

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