Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
Register a package against a name.
If these packages are a single word (contains no '.' or '/' in them) then those packages are global and are accessible in scripts without requiring an import statement.
This allows for a globally defined object similar to a package of functions or constants.
This will panic if name has already been registered.
func RegisterPackage ¶
func RegisterPackage(f any)
RegisterPackage registers a package using its go package name as the name within g-script.
Limitations:
Only one package can be registered per go package. If a second package is registered for the same go package this will panic.
Packages registered with RegisterPackage must be imported manually within a script using the import statement just like in go.
Types ¶
This section is empty.