Unload releases the given resource from memory.
(url string)
| 131 | |
| 132 | // Unload releases the given resource from memory. |
| 133 | func (formats *Formats) Unload(url string) error { |
| 134 | ext := getExt(url) |
| 135 | if loader, ok := Files.formats[ext]; ok { |
| 136 | return loader.Unload(url) |
| 137 | } |
| 138 | return fmt.Errorf("no `FileLoader` associated with this extension: %q in url %q", ext, url) |
| 139 | } |
| 140 | |
| 141 | // Resource returns the given resource, and an error if it didn't succeed. |
| 142 | func (formats *Formats) Resource(url string) (Resource, error) { |