gluaflag

package module
v0.0.0-...-078088d Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2016 License: MIT Imports: 9 Imported by: 0 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

gluaflag

gluaflag is a flag module for gopher-lua

Documentation

Index

Constants

This section is empty.

Variables

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

UserDataTypeError is returned when it is not a flag userdata received

Functions

func Loader

func Loader(L *lua.LState) int

Loader is used for preloading the module

func New

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

New returns a new flagset userdata

func Parse

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

Parse the command line parameters

Types

type FlagSet

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

FlagSet is the background userdata component

func (*FlagSet) ArgDefaults

func (fs *FlagSet) ArgDefaults() string

ArgDefaults returns the flagsets help string for the possitional arguments

func (*FlagSet) Compgen

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

func (fs *FlagSet) FlagDefaults() string

FlagDefaults returns the flagsets help string for the flags

func (*FlagSet) ShortUsage

func (fs *FlagSet) ShortUsage() string

ShortUsage returns the usage string for a flagset

func (*FlagSet) Usage

func (fs *FlagSet) Usage() string

Usage returns the usage message for the flag set

Jump to

Keyboard shortcuts

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