MCPcopy Create free account
hub / github.com/crossoverJie/gscript / Asset

Function Asset

internal/internal.go:49–55  ·  view source on GitHub ↗

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

(name string)

Source from the content-addressed store, hash-verified

47// It returns an error if the asset could not be found or
48// could not be loaded.
49func Asset(name string) ([]byte, error) {
50 cannonicalName := strings.Replace(name, "\\", "/", -1)
51 if f, ok := _bindata[cannonicalName]; ok {
52 return f()
53 }
54 return nil, fmt.Errorf("Asset %s not found", name)
55}
56
57// AssetNames returns the names of the assets.
58func AssetNames() []string {

Callers 1

loadInternalMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected