vars

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Fmttype_Invalid = proto.Fmttype_Invalid
	Fmttype_Json    = proto.Fmttype_Json
	Fmttype_Form    = proto.Fmttype_Form
	Fmttype_Text    = proto.Fmttype_Text
	Fmttype_Jsonstr = proto.Fmttype_Jsonstr
)

Variables

View Source
var (
	ErrNotVar           = errors.New("assign to a non variable expression")
	ErrUnmatchedValue   = errors.New("unmatched value")
	ErrSliceLenNotEqual = errors.New("slice length not equal")
)

Functions

This section is empty.

Types

type Context

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

func New

func New() *Context

func (*Context) DeleteVar

func (p *Context) DeleteVar(key string)

func (*Context) GetVar

func (p *Context) GetVar(key string) (v interface{}, ok bool)

func (*Context) GetVars

func (p *Context) GetVars() map[string]interface{}

func (*Context) Let

func (p *Context) Let(vexp, vreal interface{}) (err error)

func (*Context) Match

func (p *Context) Match(vexp, vreal interface{}) (err error)

func (*Context) MatchVar

func (p *Context) MatchVar(key string, vreal interface{}) (err error)

func (*Context) Subst

func (p *Context) Subst(vexp interface{}, ft int) (vres interface{}, err error)

func (*Context) SubstText

func (p *Context) SubstText(exprvar string, ft int) (v string, err error)

Jump to

Keyboard shortcuts

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