flags

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationString

func DurationString(dur time.Duration) string

DurationString returns string representation of dur.

Types

type Bind

type Bind struct {
	DefaultHost string
	DefaultPort string
	Host, Port  string
}

func NewBind

func NewBind(defhost string, defport int) Bind

func (*Bind) Set

func (b *Bind) Set(input string) error

func (Bind) String

func (b Bind) String() string

String is to conform interfaces (flag.Value, fmt.Stringer).

func (Bind) Type added in v0.6.1

func (b Bind) Type() string

Type of pflag.Value interface

type Delay

type Delay struct {
	time.Duration
	Above *time.Duration // optional
	Below *time.Duration // optional
}

func (Delay) MarshalJSON

func (d Delay) MarshalJSON() ([]byte, error)

MarshalJSON is for encoding/json marshaling into Delay string representation

func (*Delay) Set

func (d *Delay) Set(input string) error

func (Delay) String

func (d Delay) String() string

String returns Delay string representation

func (Delay) Type added in v0.6.1

func (d Delay) Type() string

Type of pflag.Value interface

type DelayBounds

type DelayBounds struct{ Max, Min Delay }

Jump to

Keyboard shortcuts

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