flagutil

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2016 License: Apache-2.0 Imports: 6 Imported by: 20

Documentation

Overview

Package flagutil is a collection of helper functions for Kythe binaries using the flag package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SimpleUsage

func SimpleUsage(description string, args ...string) func()

SimpleUsage returns a basic flag.Usage function that prints the given description and list of arguments in the following format:

Usage: binary <arg0> <arg1> ... <argN>
<description>

<build.VersionLine()>

Flags:
<flag.PrintDefaults()>

func UsageError

func UsageError(msg string)

UsageError prints msg to stderr, calls flag.Usage, and exits the program unsuccessfully.

func UsageErrorf

func UsageErrorf(str string, vals ...interface{})

UsageErrorf prints str formatted with the given vals to stderr, calls flag.Usage, and exits the program unsuccessfully.

Types

This section is empty.

Jump to

Keyboard shortcuts

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