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)
| 281 | // It returns an error if the asset could not be found or |
| 282 | // could not be loaded. |
| 283 | func Asset(name string) ([]byte, error) { |
| 284 | canonicalName := strings.Replace(name, "\\", "/", -1) |
| 285 | if f, ok := _bindata[canonicalName]; ok { |
| 286 | a, err := f() |
| 287 | if err != nil { |
| 288 | return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) |
| 289 | } |
| 290 | return a.bytes, nil |
| 291 | } |
| 292 | return nil, fmt.Errorf("Asset %s not found", name) |
| 293 | } |
| 294 | |
| 295 | // MustAsset is like Asset but panics when Asset would return an error. |
| 296 | // It simplifies safe initialization of global variables. |
no outgoing calls
no test coverage detected