package flags
import "google.golang.org/grpc/benchmark/flags"
Package flags provide convenience types and routines to accept specific types of flag values on the command line.
Index ¶
- func DurationSlice(name string, defaultVal []time.Duration, usage string) *[]time.Duration
- func IntSlice(name string, defaultVal []int, usage string) *[]int
- func StringSlice(name string, defaultVal []string, usage string) *[]string
- func StringWithAllowedValues(name, defaultVal, usage string, allowed []string) *string
Functions ¶
func DurationSlice ¶
DurationSlice returns a flag representing a slice of time.Duration objects.
func IntSlice ¶
IntSlice returns a flag representing a slice of ints.
func StringSlice ¶
StringSlice returns a flag representing a slice of strings.
func StringWithAllowedValues ¶
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.
Source Files ¶
flags.go
- Version
- v1.70.0 (latest)
- Published
- Jan 23, 2025
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 17 hours ago –
Tools for package owners.