flags

package
v0.0.0-...-987ed72 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DurationString

type DurationString time.Duration

DurationString is a flag.Value implementation that accepts a duration string and produces a time.Duration.

func (*DurationString) Set

func (s *DurationString) Set(value string) error

Set accepts a string value and parses it as a time.Duration to be used by a flag.FlagSet.

func (*DurationString) String

func (s *DurationString) String() string

String returns the string representation of the DurationString.

type StringSlice

type StringSlice []string

StringSlice is a flag.Value implementation that accepts a comma delemited string and produces a string slice.

func (*StringSlice) Set

func (s *StringSlice) Set(value string) error

Set accepts a string value and sets s to a string slice derived from value by splitting on ",".

func (*StringSlice) String

func (s *StringSlice) String() string

String creates a string derived from s by joining each element in s with a ",".

Jump to

Keyboard shortcuts

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