eclier: Index | Files

package gluaflag

import ""


Package Files

flag.go flagset.go helpers.go module.go types.go


var ErrUserDataType = fmt.Errorf("Expected gluaflag userdata")

UserDataTypeError is returned when it is not a flag userdata received

func Loader Uses

func Loader(L *lua.LState) int

Loader is used for preloading the module

func New Uses

func New(L *lua.LState, name string) *lua.LUserData

New returns a new flagset userdata

func Parse Uses

func Parse(L *lua.LState, ud *lua.LUserData, args []string) (*lua.LTable, error)

Parse the command line parameters

type FlagSet Uses

type FlagSet struct {
    // contains filtered or unexported fields

FlagSet is the background userdata component

func (*FlagSet) ArgDefaults Uses

func (fs *FlagSet) ArgDefaults() string

ArgDefaults returns the flagsets help string for the possitional arguments

func (*FlagSet) Compgen Uses

func (fs *FlagSet) Compgen(L *lua.LState, compCWords int, compWords []string) []string

Compgen returns a string with possible options for the flag

func (*FlagSet) FlagDefaults Uses

func (fs *FlagSet) FlagDefaults() string

FlagDefaults returns the flagsets help string for the flags

func (*FlagSet) ShortUsage Uses

func (fs *FlagSet) ShortUsage() string

ShortUsage returns the usage string for a flagset

func (*FlagSet) Usage Uses

func (fs *FlagSet) Usage() string

Usage returns the usage message for the flag set

Package gluaflag imports 10 packages (graph). Updated 2019-07-28. Refresh now. Tools for package owners.