flagslayer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package flagslayer is used to handle flags as a configuration layer this package is compatible with standard flags library

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlagLayer

type FlagLayer interface {
	onion.Layer

	// SetBool set a boolean value
	SetBool(configkey, name string, value bool, usage string)
	// SetDuration set a duration value
	SetDuration(configkey, name string, value time.Duration, usage string)
	//SetInt64 set an int64 value from flags library
	SetInt64(configkey, name string, value int64, usage string)
	//SetString set a string
	SetString(configkey, name string, value string, usage string)

	// GetDelimiter is used to get current delimiter for this layer. since
	// this layer needs to work with keys, the delimiter is needed
	GetDelimiter() string
	// SetDelimiter is used to set delimiter on this layer
	SetDelimiter(d string)
}

FlagLayer is for handling the layer

func NewFlagLayer

func NewFlagLayer(f *flag.FlagSet) FlagLayer

NewFlagLayer return a flag layer

Jump to

Keyboard shortcuts

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