MCPcopy
hub / github.com/EngoEngine/engo / Resource

Method Resource

assets.go:142–148  ·  view source on GitHub ↗

Resource returns the given resource, and an error if it didn't succeed.

(url string)

Source from the content-addressed store, hash-verified

140
141// Resource returns the given resource, and an error if it didn't succeed.
142func (formats *Formats) Resource(url string) (Resource, error) {
143 ext := getExt(url)
144 if loader, ok := Files.formats[ext]; ok {
145 return loader.Resource(url)
146 }
147 return nil, fmt.Errorf("no `FileLoader` associated with this extension: %q in url %q", ext, url)
148}

Callers

nothing calls this directly

Calls 2

getExtFunction · 0.70
ResourceMethod · 0.65

Tested by

no test coverage detected