function

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// token start from parser.CUSTOM
	A  parser.Token = parser.CUSTOM + 1 + iota // a
	U                                          // u
	S                                          // s
	G                                          // g
	O                                          // o
	R                                          // r
	W                                          // w
	X                                          // xq
	XU                                         // X
)

Variables

This section is empty.

Functions

func AllFileDirectoryFlags

func AllFileDirectoryFlags() []*args.Flags

func AllHttpFlags

func AllHttpFlags() []*args.Flags

func AllLogFlags

func AllLogFlags() []*args.Flags

func AllPathFlags

func AllPathFlags() []*args.Flags

func AllStringFlags

func AllStringFlags() []*args.Flags

func Chmod

func Chmod(file string, raw string) error

func GetFDModePerm

func GetFDModePerm(file string) (os.FileMode, error)

provide for test file only

func IsExist

func IsExist(name string) bool

func UnixStringPermission

func UnixStringPermission(m os.FileMode, isDir bool) string

Types

type BaseFunction

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

func NewBaseFunction

func NewBaseFunction(flags *args.Flags, fh FuncHandler, alias ...string) *BaseFunction

func (*BaseFunction) Alias

func (bf *BaseFunction) Alias() []string

func (*BaseFunction) Apply

func (bf *BaseFunction) Apply(args []*args.FunctionArg) (interface{}, error)

func (*BaseFunction) Flags

func (bf *BaseFunction) Flags() *args.Flags

func (*BaseFunction) Name

func (bf *BaseFunction) Name() string

type FileModeParser

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

func (*FileModeParser) Parse

func (fm *FileModeParser) Parse(origin os.FileMode, mode string) (m os.FileMode, err error)

type FuncHandler

type FuncHandler func(f Function, i interface{}) (interface{}, error)

type Function

type Function interface {
	Apply([]*args.FunctionArg) (interface{}, error)
	Name() string
	Flags() *args.Flags
	Alias() []string
}

func GetFunction

func GetFunction(name string) Function

Jump to

Keyboard shortcuts

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