flags

package
v0.0.0-...-c937b9e Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2015 License: MIT Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
const (
	DefaultDescTag = "desc"
	DefaultFlagTag = "flag"
	DefaultEnvTag  = "env"
)

Variables

This section is empty.

Functions

func CamelToFlag

func CamelToFlag(s string) string

transform s from CamelCase to camel-case

func FlagToCamel

func FlagToCamel(s string) string

transform s from camel-case to CamelCase

func FlagToEnv

func FlagToEnv(s string) string

transform s from camel-case to CAMEL_CASE

func GenerateFlags

func GenerateFlags(cfg interface{}, opts ...Opts) []cli.Flag

func ParseFlags

func ParseFlags(cfg interface{}, ctx *cli.Context, opts ...Opts) error

Types

type Opts

type Opts struct {
	DescTag   string
	FlagTag   string
	Prefix    string
	EnvPrefix string
}

Jump to

Keyboard shortcuts

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