util

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Util added in v0.0.3

type Util struct {
	Description string
	FlagContext flags.FlagContext
	Name        string
	Version     string
}

Util is a configuration struct for the util

func New added in v0.0.3

func New(name string, version string, description string) *Util

New returns a new instance of Util

func (*Util) CheckError added in v0.0.3

func (util *Util) CheckError(err error, printUsage bool)

CheckError checks the error and if it exists, exits with exit code 1

func (*Util) CheckFlags added in v0.0.3

func (util *Util) CheckFlags()

CheckFlags checks which command line flags are set

func (*Util) GetArgsDir added in v0.0.3

func (util *Util) GetArgsDir() (string, error)

GetArgsDir returns the directory provided via arguments

func (*Util) GetUsage added in v0.0.3

func (util *Util) GetUsage() string

GetUsage returns the usage text

func (*Util) LogAndExit added in v0.0.3

func (util *Util) LogAndExit(messages ...interface{})

LogAndExit logs one or more messages and exits with exit code 0

Jump to

Keyboard shortcuts

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