vitess: github.com/youtube/vitess/go/flagutil Index | Files

package flagutil

import "github.com/youtube/vitess/go/flagutil"

Package flagutil contains flags that parse string lists and string maps.

Index

Package Files

flagutil.go

func StringListVar Uses

func StringListVar(p *[]string, name string, defaultValue []string, usage string)

StringListVar defines a []string flag with the specified name, value and usage string. The argument 'p' points to a []string in which to store the value of the flag.

type StringListValue Uses

type StringListValue []string

StringListValue is a []string flag that accepts a comma separated list of elements. To include an element containing a comma, quote it with a backslash '\'.

func (StringListValue) Get Uses

func (value StringListValue) Get() interface{}

Get returns the []string value of this flag.

func (*StringListValue) Set Uses

func (value *StringListValue) Set(v string) error

Set sets the value of this flag from parsing the given string.

func (StringListValue) String Uses

func (value StringListValue) String() string

String returns the string representation of this flag.

type StringMapValue Uses

type StringMapValue map[string]string

StringMapValue is a map[string]string flag. It accepts a comma-separated list of key value pairs, of the form key:value. The keys cannot contain colons.

func (StringMapValue) Get Uses

func (value StringMapValue) Get() interface{}

Get returns the map[string]string value of this flag.

func (*StringMapValue) Set Uses

func (value *StringMapValue) Set(v string) error

Set sets the value of this flag from parsing the given string.

func (StringMapValue) String Uses

func (value StringMapValue) String() string

String returns the string representation of this flag.

Package flagutil imports 3 packages (graph) and is imported by 23 packages. Updated 2017-10-26. Refresh now. Tools for package owners.