gpflag

package
Version: v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2016 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTo

func GenerateTo(src []*sflags.Flag, dst flagSet)

GenerateTo takes a list of sflag.Flag, that are parsed from some config structure, and put it to dst.

func Parse

func Parse(cfg interface{}, optFuncs ...sflags.OptFunc) (*pflag.FlagSet, error)

Parse parses cfg, that is a pointer to some structure, puts it to the new pflag.FlagSet and returns it.

func ParseTo

func ParseTo(cfg interface{}, dst flagSet, optFuncs ...sflags.OptFunc) error

ParseTo parses cfg, that is a pointer to some structure, and puts it to dst.

func ParseToDef

func ParseToDef(cfg interface{}, optFuncs ...sflags.OptFunc) error

ParseToDef parses cfg, that is a pointer to some structure and puts it to the default pflag.CommandLine.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL