luacfg

package
v0.34.5 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2020 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Example
Output:

hello

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scope

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

Scope represents a collection of values registered in a Lua namespace.

func NewScope

func NewScope() *Scope

NewScope creates an empty Scope.

func (*Scope) RegisterType

func (scope *Scope) RegisterType(name string, example interface{}) error

RegisterType allows you to add a Lua function that creates new values of the given type to the scope.

func (*Scope) RegisterVal

func (scope *Scope) RegisterVal(name string, value interface{}) error

RegisterVal adds the Go value 'value', including Go functions, to the Lua scope.

func (*Scope) Run

func (scope *Scope) Run(in io.Reader) error

Run runs the Lua source represented by in

Jump to

Keyboard shortcuts

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