custom-libs

command
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Example custom-libs adds a user-authored library to pooled States via Config.ExtraLibs — without restating the sandbox defaults. ExtraLibs run after the default libs (and after load/loadfile/dofile are stripped), so the sandbox stays intact while scripts gain the custom API. Each entry runs once per pooled State, on the goroutine that owns it, so shared Go state a lib closes over must be goroutine-safe (here a read-only allowlist map).

Jump to

Keyboard shortcuts

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