MCPcopy Index your code
hub / github.com/bytesizedhosting/bcd / MustAsset

Function MustAsset

plugins/plugin_data.go:906–913  ·  view source on GitHub ↗

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

(name string)

Source from the content-addressed store, hash-verified

904// MustAsset is like Asset but panics when Asset would return an error.
905// It simplifies safe initialization of global variables.
906func MustAsset(name string) []byte {
907 a, err := Asset(name)
908 if err != nil {
909 panic("asset: Asset(" + name + "): " + err.Error())
910 }
911
912 return a
913}
914
915// AssetInfo loads and returns the asset info for the given name.
916// It returns an error if the asset could not be found or

Callers

nothing calls this directly

Calls 1

AssetFunction · 0.85

Tested by

no test coverage detected