eql

package
v2.9.20+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEndRequired is returned if eql script doesn't end by `%>`.
	ErrEndRequired = errors.New("eql script requires `%>` to end")

	// ErrEndOfString is returned if string doesn't end.
	ErrEndOfString = errors.New("string doesn't end")
)
View Source
var Exports = map[string]interface{}{
	"parse":   Parse,
	"subst":   Subst,
	"var":     getVar,
	"imports": imports,

	"ErrEndRequired": ErrEndRequired,
	"ErrEndOfString": ErrEndOfString,
}

Exports is the export table of this module.

Functions

func Parse

func Parse(source string) (code []byte, err error)

Parse parses eql source into qlang code.

func Subst

func Subst(text string, param ...interface{}) string

Subst substs variables in text.

Types

type Variables

type Variables interface {
	Var(name string) (v interface{}, ok bool)
}

Variables represent how to get value of a variable.

var DefaultVars Variables

DefaultVars is the default variables.

Jump to

Keyboard shortcuts

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