bootstrap

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package bootstrap performs initial setup of the environment. Create a new `*env.Environment` and then pass it to `Into`.

Index

Constants

View Source
const (
	// ErrBuiltInNotFound is raised when a built-in procedure can't be resolved
	ErrBuiltInNotFound = "built-in not found: %s"

	// ErrSpecialNotFound is raised when a built-in special can't be resolved
	ErrSpecialNotFound = "special form not found: %s"

	// ErrMacroNotFound is raised when a built-in macro can't be resolved
	ErrMacroNotFound = "macro not found: %s"
)

Variables

This section is empty.

Functions

func DevNull

func DevNull(e *env.Environment)

DevNull binds *in*, *out*, and *err* to the operating system's bit bucket device (usually /dev/null)

func DevNullEnvironment

func DevNullEnvironment() *env.Environment

DevNullEnvironment configures a bootstrapped environment completely isolated from the top-level of the system. All I/O is rerouted to and from the operating system's bit bucket device (usually /dev/null)

func Into

func Into(e *env.Environment)

Into sets up initial built-ins and assets. This call is useful if you're wiring up your own Environments. Otherwise, calls to TopLevelEnvironment and DevNullEnvironment will perform this action for you.

func ProcessArgs

func ProcessArgs(e *env.Environment)

ProcessArgs binds *args* to the current Go app's command line arguments

func ProcessEnv

func ProcessEnv(e *env.Environment)

ProcessEnv binds *env* to the operating system's environment variables

func StandardIO

func StandardIO(e *env.Environment)

StandardIO binds *in*, *out*, and *err* to the operating system's standard input and output facilities

func TopLevelEnvironment

func TopLevelEnvironment() *env.Environment

TopLevelEnvironment configures an environment that could be used at the top-level of the system, such as the REPL. It has access to the *env*, *args*, and operating system's standard in/out/err file streams.

Types

This section is empty.

Jump to

Keyboard shortcuts

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