functions

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Code generated by gobindlua; DO NOT EDIT.

Example
package main

import (
	"log"

	"github.com/ChrisTrenkamp/gobindlua"
	lua "github.com/yuin/gopher-lua"
)

const script = `
functions.print_me(functions.split("foo_bar", "_"), functions.split("eggs&ham", "&"))

print("NotIncluded was excluded from the bindings: " .. tostring(functions.not_included == nil))
`

func main() {
	L := lua.NewState()
	defer L.Close()

	gobindlua.Register(L, gobindlua.Funcs(RegisterFunctionsLuaType))

	if err := L.DoString(script); err != nil {
		log.Fatal(err)
	}

}
Output:

[foo bar] [eggs ham]
NotIncluded was excluded from the bindings: true

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotIncluded

func NotIncluded()

Since the -i option was specified, this function was not included.

func PrintMe

func PrintMe(args ...any)

func RegisterFunctionsLuaType

func RegisterFunctionsLuaType(L *lua.LState)

func Split

func Split(s string, spl string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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