flags: github.com/simonleung8/flags Index | Files | Directories

package flags

import "github.com/simonleung8/flags"

Index

Package Files

flag_constructor.go flags.go flags_usage.go

type FlagContext Uses

type FlagContext interface {
    Parse(...string) error
    Args() []string
    Int(string) int
    Float64(string) float64
    Bool(string) bool
    String(string) string
    StringSlice(string) []string
    IsSet(string) bool
    SkipFlagParsing(bool)
    NewStringFlag(name string, shortName string, usage string)
    NewStringFlagWithDefault(name string, shortName string, usage string, value string)
    NewBoolFlag(name string, shortName string, usage string)
    NewIntFlag(name string, shortName string, usage string)
    NewIntFlagWithDefault(name string, shortName string, usage string, value int)
    NewFloat64Flag(name string, shortName string, usage string)
    NewFloat64FlagWithDefault(name string, shortName string, usage string, value float64)
    NewStringSliceFlag(name string, shortName string, usage string)
    NewStringSliceFlagWithDefault(name string, shortName string, usage string, value []string)
    ShowUsage(leadingSpace int) string
}

func New Uses

func New() FlagContext

func NewFlagContext Uses

func NewFlagContext(cmdFlags map[string]FlagSet) FlagContext

type FlagSet Uses

type FlagSet interface {
    fmt.Stringer
    GetName() string
    GetShortName() string
    GetValue() interface{}
    Set(string)
}

Directories

PathSynopsis
flag

Package flags imports 5 packages (graph) and is imported by 43 packages. Updated 2017-07-10. Refresh now. Tools for package owners.