Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Preload ¶
Preload adds json to the given Lua state's package.preload table. After it has been preloaded, it can be loaded using require:
local json = require("json")
func Quote ¶
Example ¶
L := lua.NewState() Preload(L) source := ` local shellescape = require("shellescape") print(shellescape.quote("foo")) ` if err := L.DoString(source); err != nil { log.Fatal(err) }
Output: foo
func QuoteCommand ¶
Example ¶
L := lua.NewState() Preload(L) source := ` local shellescape = require("shellescape") print(shellescape.quote_command({"echo", "foo bar baz"})) ` if err := L.DoString(source); err != nil { log.Fatal(err) }
Output: echo 'foo bar baz'
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.