utils

package
v0.0.0-...-b7b153a Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionMajor = 1        // Major version component of the current release
	VersionMinor = 0        // Minor version component of the current release
	VersionPatch = 0        // Patch version component of the current release
	VersionMeta  = "stable" // Version metadata to append to the version string
)

Variables

View Source
var GlogGangstaFlags = []cli.Flag{
	cli.IntFlag{
		Name: "v", Value: 0, Usage: "log level for V logs",
	},
	cli.BoolFlag{
		Name: "logtostderr", Usage: "log to standard error instead of files",
	},
	cli.IntFlag{
		Name:  "stderrthreshold",
		Usage: "logs at or above this threshold go to stderr",
	},
	cli.BoolFlag{
		Name: "alsologtostderr", Usage: "log to standard error as well as files",
	},
	cli.StringFlag{
		Name:  "vmodule",
		Usage: "comma-separated list of pattern=N settings for file-filtered logging",
	},
	cli.StringFlag{
		Name: "log_dir", Usage: "If non-empty, write log files in this directory",
	},
	cli.StringFlag{
		Name:  "log_backtrace_at",
		Usage: "when logging hits line file:N, emit a stack trace",
		Value: ":0",
	},
}
View Source
var Version = func() string {
	v := fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch)
	if VersionMeta != "" {
		v += "-" + VersionMeta
	}
	return v
}()

Version holds the textual version string.

Functions

func GlogShim

func GlogShim(c *cli.Context)

Types

type App

type App struct {
	*cli.App
}

func NewApp

func NewApp(usage string) *App

func (*App) AddAfter

func (app *App) AddAfter(after cli.AfterFunc)

func (*App) AddBefore

func (app *App) AddBefore(before cli.BeforeFunc)

func (*App) AddCommand

func (app *App) AddCommand(cmd cli.Command)

func (*App) AddCommands

func (app *App) AddCommands(cmds []cli.Command)

func (*App) AddFlag

func (app *App) AddFlag(flag cli.Flag)

func (*App) AddFlags

func (app *App) AddFlags(flag []cli.Flag)

Jump to

Keyboard shortcuts

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