luci: go.chromium.org/luci/common/flag Index | Files | Directories

package flag

import "go.chromium.org/luci/common/flag"

Index

Package Files

boolslice.go choice.go commalist.go fieldslice.go int32.go int64slice.go jsonmap.go reltime.go stringslice.go strpairs.go

func BoolSlice Uses

func BoolSlice(b *[]bool) flag.Getter

BoolSlice returns a flag.Getter which reads flags into the given []bool pointer.

func CommaList Uses

func CommaList(s *[]string) flag.Getter

CommaList returns a flag.Getter for parsing a comma separated flag argument into a string slice.

func FieldSlice Uses

func FieldSlice(f *[]googleapi.Field) flag.Getter

FieldSlice returns a flag.Getter which reads flags into the given []googleapi.Field pointer.

func Int32 Uses

func Int32(i *int32) flag.Getter

Int32 returns a flag.Getter which reads flags into the given int32 pointer.

func Int64Slice Uses

func Int64Slice(i *[]int64) flag.Getter

Int64Slice returns a flag.Getter which reads flags into the given []int64 pointer.

func JSONMap Uses

func JSONMap(m *map[string]string) flag.Value

JSONMap returns a flag.Value that can be passed to flag.Var to parse a JSON string into a map.

func StringPairs Uses

func StringPairs(m strpair.Map) flag.Getter

StringPairs returns a flag.Getter for parsing strpair.Map from a a set of colon-separated strings. Example: -f a:1 -f a:2 -f b:3 Panics if m is nil.

func StringSlice Uses

func StringSlice(s *[]string) flag.Getter

StringSlice returns a flag.Getter which reads flags into the given []string pointer.

type Choice Uses

type Choice struct {
    // contains filtered or unexported fields
}

Choice is an implementation of flag.Value for parsing a multiple-choice string.

func NewChoice Uses

func NewChoice(output *string, choices ...string) Choice

NewChoice creates a Choice value

func (Choice) Set Uses

func (f Choice) Set(s string) error

Set implements the flag.Value interface.

func (Choice) String Uses

func (f Choice) String() string

String implements the flag.Value interface.

type RelativeTime Uses

type RelativeTime struct {
    T *time.Time
    // contains filtered or unexported fields
}

RelativeTime is an implementation of flag.Value for parsing a time by a relative day offset.

func (RelativeTime) Set Uses

func (f RelativeTime) Set(s string) error

Set implements the flag.Value interface.

func (RelativeTime) String Uses

func (f RelativeTime) String() string

String implements the flag.Value interface.

Directories

PathSynopsis
fixflagpos
flagenumPackage flagenum is a utility package which facilitates implementation of flag.Value, json.Marshaler, and json.Unmarshaler interfaces via a string-to- value mapping.
multiflagPackage multiflag is a package providing a flag.Value implementation capable of switching between multiple registered sub-flags, each of which have their own set of parameter flags.
nestedflagset
stringlistflagPackage stringlistflag provides a flag.Value implementation which resolves multiple args into a []string.
stringmapflagPackage stringmapflag provides a flag.Value that, when parsed, augments a map[string]string with the supplied parameter.
stringsetflagPackage stringsetflag provides a flag.Value implementation which resolves multiple args into a stringset.

Package flag imports 9 packages (graph) and is imported by 9 packages. Updated 2019-08-17. Refresh now. Tools for package owners.