util

package
v0.0.0-...-53e496d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFullName

func BuildFullName(name, idnum string) string

BuildFullName builds the full name of the table or inline table

func FindNextTableRef

func FindNextTableRef(tableEntry string) ([]string, bool)

FindNextTableRef parses the string for '{.*}' and returns true if the string contains these characters and returns a slice that contains all characters prior to the first occurance in element 0, the actual reference in element 1 and all remaining characters in element 2

func IsNotEmpty

func IsNotEmpty(stringVal, yamlName, section string, vr *validate.ValidationResult)

IsNotEmpty validates that the incoming string is not ""

func IsValidIdentifier

func IsValidIdentifier(stringVal, yamlName, section string, vr *validate.ValidationResult)

IsValidIdentifier validates the supplied string against the valid id regex

func NewLuaState

func NewLuaState() *lua.LState

NewLuaState creates a new lua state/VM

Set up a new lua VM. Limit the lua basic lib to essential functions in an attempt to reduce the scope of malicious scripts. This is actually really hard to do and the modules here are still condsidered dangerously unsafe but are neccessary if lua is to be used at all. Note that clever attackers can easily work around these limitations.

See http://lua-users.org/wiki/SandBoxes for info on the relative futility of trying to make lua VMs both safe and functional

Types

This section is empty.

Jump to

Keyboard shortcuts

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