gopt

package
v0.0.0-...-34e4804 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2016 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(optstr string) (opts []string)

'-f' -> [-f, -f=] '--file' -> [-file, -file=, --file, --file=] '-f --file' -> [-f, -f=, -file, -file=, --file, --file=]

Types

type BoolOption

type BoolOption struct {
	// contains filtered or unexported fields
}

func (*BoolOption) String

func (b *BoolOption) String() string

type GetOpt

type GetOpt struct {
	// contains filtered or unexported fields
}

func New

func New() *GetOpt

func (*GetOpt) BoolOption

func (g *GetOpt) BoolOption(optstr string)

func (*GetOpt) Get

func (g *GetOpt) Get(o string) string

func (*GetOpt) GetFloat32

func (g *GetOpt) GetFloat32(o string) (float32, error)

func (*GetOpt) GetFloat64

func (g *GetOpt) GetFloat64(o string) (float64, error)

func (*GetOpt) GetInt

func (g *GetOpt) GetInt(o string) (int, error)

func (*GetOpt) GetMultiple

func (g *GetOpt) GetMultiple(o string) []string

func (*GetOpt) IsSet

func (g *GetOpt) IsSet(o string) bool

func (*GetOpt) Parse

func (g *GetOpt) Parse(argv []string) (args []string)

func (*GetOpt) Reset

func (g *GetOpt) Reset()

func (*GetOpt) StringOption

func (g *GetOpt) StringOption(optstr string)

func (*GetOpt) StringOptionFancy

func (g *GetOpt) StringOptionFancy(optstr string)

type Option

type Option interface {
	// contains filtered or unexported methods
}

type StringOption

type StringOption struct {
	// contains filtered or unexported fields
}

func (*StringOption) String

func (s *StringOption) String() string

Jump to

Keyboard shortcuts

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