flags

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: ISC Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(args *[]string)

Parse parses flags and returns extra args

func PrintUsage

func PrintUsage()

PrintUsage prints CLI flags usage

func PrintUsageAndExit

func PrintUsageAndExit()

PrintUsageAndExit prints CLI flags usage and exits with code 1

func PrintUsageAndExitWithCode

func PrintUsageAndExitWithCode(code int)

PrintUsageAndExitWithCode prints CLI flags usage and exits with code

func RegisterBoolFlag

func RegisterBoolFlag(reference *bool, shortName string, longName string, description string)

RegisterBoolFlag registers a boolean flag

func RegisterStringFlag

func RegisterStringFlag(reference *string, shortName string, longName string, description string)

RegisterStringFlag registers a string flag

func RegisterUintFlag

func RegisterUintFlag(reference *uint, shortName string, longName string, description string)

RegisterUintFlag registers a uint flag

func SetDetails

func SetDetails(name string, link string)

SetDetails set CLI details line

func SetExample

func SetExample(example string)

SetExample set the CLI example

Types

This section is empty.

Jump to

Keyboard shortcuts

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