Load loads the given resource(s) into memory, stopping at the first error.
(urls ...string)
| 106 | |
| 107 | // Load loads the given resource(s) into memory, stopping at the first error. |
| 108 | func (formats *Formats) Load(urls ...string) error { |
| 109 | for _, url := range urls { |
| 110 | err := formats.load(url) |
| 111 | if err != nil { |
| 112 | return err |
| 113 | } |
| 114 | } |
| 115 | return nil |
| 116 | } |
| 117 | |
| 118 | // LoadReaderData loads a resource when you already have the reader for it. |
| 119 | func (formats *Formats) LoadReaderData(url string, f io.Reader) error { |