runtime

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBuiltinPackages

func AddBuiltinPackages(s *symbols.SymbolTable)

AddBuiltinPackages adds in the pre-defined package receivers for things like the table and rest systems.

func Eval

func Eval(symbols *symbols.SymbolTable, args []interface{}) (interface{}, error)

Eval implements the eval() function which accepts a string representation of an expression and returns the expression result. This can also be used to convert string expressions of structs or arrays.

func FormatSymbols

func FormatSymbols(s *symbols.SymbolTable, args []interface{}) (interface{}, error)

FormatSymbols implements the util.symbols() function. We skip over the current symbol table, which was created just for this function call and will always be empty.

func GetDeclaration

func GetDeclaration(fname string) *data.FunctionDeclaration

func InitProfileDefaults

func InitProfileDefaults() error

func Pad

func Pad(v interface{}, w int) string

Pad the formatted value of a given object to the specified number of characters. Negative numbers are right-aligned, positive numbers are left-aligned.

func Prompt

func Prompt(symbols *symbols.SymbolTable, args []interface{}) (interface{}, error)

Prompt implements the prompt() function, which uses the console reader.

func ReadConsoleText

func ReadConsoleText(prompt string) string

ReadConsoleText reads a line of text from the user's console.

func SymbolTables

func SymbolTables(s *symbols.SymbolTable, args []interface{}) (interface{}, error)

func TypeCompiler

func TypeCompiler(t string) *data.Type

Types

type URLString

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

The object that knows how to semantically add values to a URL to forma a valid string. Note that this does not have to be a valid complete URL, but may consist of just the path and parameters.

func URLBuilder

func URLBuilder(initialParts ...interface{}) *URLString

URLBuilder creates a new instance of a URLBuilder, and optionally populates it with the arguments provided. The parts are treated as a path name and optional path arguments. If no initial parts are provided in the call, then the URLString starts as an empty string.

func (*URLString) Parameter

func (u *URLString) Parameter(name string, arguments ...interface{}) *URLString

Parameter adds a parameter to the URL being constructed. The name string contains the parameter name. This is added to the URL being built. The arguments are optional additional arguments which follow the parameter value if specified.

func (*URLString) Path

func (u *URLString) Path(format string, parts ...interface{}) *URLString

Path adds path eleemnts to the URL being constructed. The format string contains the literal text, and can contain standard Go format operators like %s or %d. The array of parts items is read to fill in the format operators in the format string. Any remaining items in the parts array are treated as URL parameter values to add to the URL.

func (*URLString) String

func (u *URLString) String() string

String converts the URL that was constructed to a string value.

Directories

Path Synopsis
The db package manages the Ego data base interfaces, similar to the sql package in conventional Go.
The db package manages the Ego data base interfaces, similar to the sql package in conventional Go.

Jump to

Keyboard shortcuts

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