assets

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Import

func Import(assets http.FileSystem) script.Library

Import the assets library to enable scripts to load assets from the provided filesystem.

func Load

func Load(assets http.FileSystem) script.Func

Load uses assets.Open to load the asset and then it reads all the bytes.

@param asset: A string for the path of the asset in the assets folder.

@return (assetContent, nil) iff success; (nil, err) o/w

@example

load("assets", "load")
load("sys", "write")

myBotAsset = load("/myBot/myBot.bin")
write("path/for/bot", myBotAsset)

Types

This section is empty.

Jump to

Keyboard shortcuts

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