Help us shape the future of Go! Take the 2026 Go Developer Survey

flags

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOptionalBool

func NewOptionalBool(b **bool) flag.Value

NewOptionalString returns a flag.Value implementation where there is no default value. This avoids sending a default value over the wire as using flag.StringVar() would.

func NewOptionalInt

func NewOptionalInt(i **int) flag.Value

NewOptionalString returns a flag.Value implementation where there is no default value. This avoids sending a default value over the wire as using flag.StringVar() would.

func NewOptionalString

func NewOptionalString(s **string) flag.Value

NewOptionalString returns a flag.Value implementation where there is no default value. This avoids sending a default value over the wire as using flag.StringVar() would.

func NewURLFlag

func NewURLFlag(u **url.URL) flag.Value

NewURLFlag returns a flag.Value.

Types

type ShareFlag

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

func NewSharesFlag

func NewSharesFlag(shares **types.SharesInfo) *ShareFlag

func (*ShareFlag) Set

func (s *ShareFlag) Set(val string) error

func (*ShareFlag) String

func (s *ShareFlag) String() string

type URLFlag

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

func (*URLFlag) Get

func (f *URLFlag) Get() interface{}

func (*URLFlag) IsBoolFlag

func (f *URLFlag) IsBoolFlag() bool

func (*URLFlag) Set

func (f *URLFlag) Set(s string) error

Set will add a protocol (https) if there isn't a :// match. This ensures tha url.Parse can correctly extract user:password from raw URLs such as user:password@hostname

func (*URLFlag) String

func (f *URLFlag) String() string

Jump to

Keyboard shortcuts

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