flags

package
Version: v1.48.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Overview

Package flags provide convenience types and routines to accept specific types of flag values on the command line.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationSlice

func DurationSlice(name string, defaultVal []time.Duration, usage string) *[]time.Duration

DurationSlice returns a flag representing a slice of time.Duration objects.

func IntSlice

func IntSlice(name string, defaultVal []int, usage string) *[]int

IntSlice returns a flag representing a slice of ints.

func StringSlice added in v1.27.0

func StringSlice(name string, defaultVal []string, usage string) *[]string

StringSlice returns a flag representing a slice of strings.

func StringWithAllowedValues

func StringWithAllowedValues(name, defaultVal, usage string, allowed []string) *string

StringWithAllowedValues returns a flag variable of type stringFlagWithAllowedValues configured with the provided parameters. 'allowed` is the set of values that this flag can be set to.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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