options

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ArmorOpt is name of armor option
	ArmorOpt = "armor"
	//DebugOpt is name of debug option
	DebugOpt = "debug"
	//GDumpOpt is name of gdump option
	GDumpOpt = "gdump"
	//IntegerOpt is name of int option
	IntegerOpt = "int"
	//JSONOpt is name of json option (CLI only)
	JSONOpt = "json"
	//LiteralOpt is name of literal option
	LiteralOpt = "literal"
	//MarkerOpt is name of marker option
	MarkerOpt = "marker"
	//PrivateOpt is name of private option
	PrivateOpt = "private"
	//UTCOpt is name of utc option
	UTCOpt = "utc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OptFunc

type OptFunc func(*Options)

OptFunc is self-referential function for functional options pattern

func Set

func Set(name string, f bool) OptFunc

Set returns closure as type OptFunc

type Options

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

Options for gpgpdump

func New added in v0.2.1

func New(opts ...OptFunc) *Options

New returns a new Options instance

func (*Options) Armor

func (o *Options) Armor() bool

Armor return flag value of armorFlag

func (*Options) Debug

func (o *Options) Debug() bool

Debug return flag value of debugFlag

func (*Options) GDump

func (o *Options) GDump() bool

GDump return flag value of gdumpFlag

func (*Options) Integer

func (o *Options) Integer() bool

Integer return flag value of intFlag

func (*Options) Literal

func (o *Options) Literal() bool

Literal return flag value of literalFlag

func (*Options) Marker

func (o *Options) Marker() bool

Marker return flag value of markerFlag

func (*Options) Private

func (o *Options) Private() bool

Private return flag value of privateFlag

func (*Options) Set

func (o *Options) Set(name string, f bool)

Set sets option to Options.

func (*Options) String

func (o *Options) String() string

Stringer

func (*Options) UTC

func (o *Options) UTC() bool

UTC return flag value of utcFlag

Jump to

Keyboard shortcuts

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