builtins

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Overview

Package builtins contains rq-specific builtins.

Index

Constants

This section is empty.

Variables

View Source
var Args = []string{}

Args is exposed to the script via the rq.args() builtin.

View Source
var ScriptPath = ""

ScriptPath is exposed to the script via the rq.scriptpath() builtin.

Functions

func InterfaceToSpec

func InterfaceToSpec(iface interface{}) (*rqio.DataSpec, error)

InterfaceToSpec converts an arbitrary interface to a DataSpec. If it encodes a map[string]interface{}, then this is parsed out into a DataSpec as if it was JSON. If it encodes any other type, is is parsed as a DataSpec string.

Types

type ErrorFromBuiltin added in v0.0.8

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

ErrorFromBuiltin represents errors raised by the rq.error() builtin, which are treated specially for output formatting purposes elsewhere.

func (ErrorFromBuiltin) Error added in v0.0.8

func (e ErrorFromBuiltin) Error() string

Jump to

Keyboard shortcuts

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