goflags

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Preserve disable default values and get only visited parameters thus preserving the values passed in the structure, default false
	Preserve bool

	// Prefix is a string that would be placed at the beginning of the generated tags.
	Prefix string

	//Usage is a function to show the help, can be replaced by your own version.
	Usage func()
)

Functions

func DefaultUsage

func DefaultUsage()

DefaultUsage is assigned for Usage function by default

func Parse

func Parse(config interface{}) (err error)

Parse configuration

func PrintDefaults

func PrintDefaults()

PrintDefaults print the default help

func Reset

func Reset()

Reset maps caling setup function

func SetTag

func SetTag(tag string)

SetTag set a new tag

func SetTagDefault

func SetTagDefault(tag string)

SetTagDefault set a new TagDefault to retorn default values

func SetTagHelper added in v1.2.0

func SetTagHelper(tag string)

SetTagHelper set a new TagHelper

func Setup

func Setup(tag, tagDefault, TagHelper string)

Setup maps and variables

Types

This section is empty.

Jump to

Keyboard shortcuts

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