os

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: ISC Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VImport

func VImport(ctx *goal.Context, args []goal.V) goal.V

VImport implements the import dyad.

import "name" : evaluate file "name.goal" with prefix "name"

pfx import "name" : evaluate file "name.goal" with custom prefix pfx

It returns 0 and does nothing if a file has already been evaluated.

func VPrint

func VPrint(ctx *goal.Context, args []goal.V) goal.V

VPrint implements the print dyad.

print x : outputs x to standard output. It returns a true value on success.

w print x : outputs x to w, where w is an io.Writer or a filename (goal.S).

func VSay

func VSay(ctx *goal.Context, args []goal.V) goal.V

VSay implements the say dyad. It is the same as print, but appends a newline to the result.

func VShell

func VShell(ctx *goal.Context, args []goal.V) goal.V

VShell implements the shell monad.

shell cmd : sends cmd to the shell as-is. It returns the standard output of the command, or an error.

func VSlurp

func VSlurp(ctx *goal.Context, args []goal.V) goal.V

VSlurp implements the slurp monad.

slurp x returns the contents of the file with filename x, or an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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