tflag

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2019 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(short string, long string, value bool, usage string) *bool

Bool is a convenience wrapper for BoolVar

func BoolVar

func BoolVar(flagVar *bool, short string, long string, value bool, usage string) *bool

BoolVar adds a boolean flag to the parameters list. This is using the golang flag package internally.

func Float64

func Float64(short string, long string, value float64, usage string) *float64

Float64 is a convenience wrapper for Float64Var

func Float64Var

func Float64Var(flagVar *float64, short string, long string, value float64, usage string) *float64

Float64Var adds a float flag to the parameters list. This is using the golang flag package internally.

func Int

func Int(short string, long string, value int, usage string) *int

Int is a convenience wrapper for IntVar

func Int64

func Int64(short string, long string, value int64, usage string) *int64

Int64 is a convenience wrapper for Int64Var

func Int64Var

func Int64Var(flagVar *int64, short string, long string, value int64, usage string) *int64

Int64Var adds am int64 flag to the parameters list. This is using the golang flag package internally.

func IntVar

func IntVar(flagVar *int, short string, long string, value int, usage string) *int

IntVar adds an integer flag to the parameters list. This is using the golang flag package internally.

func Parse

func Parse()

Parse is a wrapper to golang's flag.parse

func PrintFlags

func PrintFlags(header string)

PrintFlags prints information about the flags set for this application

func String

func String(short string, long string, value string, usage string) *string

String is a convenience wrapper for StringVar

func StringVar

func StringVar(flagVar *string, short string, long string, value string, usage string) *string

StringVar adds a string flag to the parameters list. This is using the golang flag package internally.

func Switch

func Switch(short string, long string, usage string) *bool

Switch is a convenience wrapper for SwitchVar

func SwitchVar

func SwitchVar(flagVar *bool, short string, long string, usage string) *bool

SwitchVar adds a boolean flag that is meant to be used without value. If it is given the value is true, otherwise false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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