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)
| 890 | // It returns an error if the asset could not be found or |
| 891 | // could not be loaded. |
| 892 | func Asset(name string) ([]byte, error) { |
| 893 | cannonicalName := strings.Replace(name, "\\", "/", -1) |
| 894 | if f, ok := _bindata[cannonicalName]; ok { |
| 895 | a, err := f() |
| 896 | if err != nil { |
| 897 | return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) |
| 898 | } |
| 899 | return a.bytes, nil |
| 900 | } |
| 901 | return nil, fmt.Errorf("Asset %s not found", name) |
| 902 | } |
| 903 | |
| 904 | // MustAsset is like Asset but panics when Asset would return an error. |
| 905 | // It simplifies safe initialization of global variables. |
no outgoing calls
no test coverage detected