simple

package
v0.0.0-...-f342e06 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Answer = 42

Answer is the Answer to Life, the Universe and Everything.

Variables

View Source
var RegisteredFuncs = make(map[string]*types.FuncValue) // must initialize

RegisteredFuncs maps a function name to the corresponding static, pure func.

Functions

func DefaultEnv

func DefaultEnv(input []types.Value) (types.Value, error)

DefaultEnv gets environment variable by name or returns default if non existing.

func Env

func Env(input []types.Value) (types.Value, error)

Env returns a map of all keys and their values.

func GetEnv

func GetEnv(input []types.Value) (types.Value, error)

GetEnv gets environment variable by name or returns empty string if non existing.

func HasEnv

func HasEnv(input []types.Value) (types.Value, error)

HasEnv returns true if environment variable exists.

func Pow

func Pow(input []types.Value) (types.Value, error)

Pow returns x ^ y, the base-x exponential of y.

func Register

func Register(name string, fn *types.FuncValue)

Register registers a simple, static, pure function. It is easier to use than the raw function API, but also limits you to simple, static, pure functions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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