testpat

package
v0.24.5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map map[string]*Pattern

Map - a simple helper to provide patterns w/o a db.

func (Map) GetRules

func (m Map) GetRules(patname string) (ret pattern.RuleSet, err error)

type Pattern

type Pattern struct {
	Name   string
	Return string     // name of return field; empty if none ( could be an index but slightly safer this way )
	Labels []string   // one label for every parameter
	Fields []rt.Field // flat list of params and locals and an optional return
	Rules  []rt.Rule
}

func (*Pattern) GetLabels

func (p *Pattern) GetLabels() []string

type Runtime

type Runtime struct {
	Map // pattern definitions
	testutil.Runtime
}

func (*Runtime) Call

func (run *Runtime) Call(name string, aff affine.Affinity, keys []string, vals []rt.Value) (ret rt.Value, err error)

fix? follows from qna, but isnt an exact copy: improving the way inits work would probably help...

func (*Runtime) GetField

func (run *Runtime) GetField(object, field string) (ret rt.Value, err error)

Jump to

Keyboard shortcuts

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