@@ -114,12 +114,12 @@ func AssetDir(name string) ([]string, error) {
114
114
for _, p := range pathList {
115
115
node = node.Children[p]
116
116
if node == nil {
117
- return nil, fmt.Errorf("Asset %%s not found", name)
117
+ return nil, os.ErrNotExist
118
118
}
119
119
}
120
120
}
121
121
if node.Func != nil {
122
- return nil, fmt.Errorf("Asset %%s not found", name)
122
+ return nil, os.ErrNotExist
123
123
}
124
124
rv := make([]string, 0, len(node.Children))
125
125
for childName := range node.Children {
@@ -171,7 +171,7 @@ func Asset(name string) ([]byte, error) {
171
171
}
172
172
return a.bytes, nil
173
173
}
174
- return nil, fmt.Errorf("Asset %%s not found", name)
174
+ return nil, os.ErrNotExist
175
175
}
176
176
177
177
// MustAsset is like Asset but panics when Asset would return an error.
@@ -197,7 +197,7 @@ func AssetInfo(name string) (os.FileInfo, error) {
197
197
}
198
198
return a.info, nil
199
199
}
200
- return nil, fmt.Errorf("AssetInfo %%s not found", name)
200
+ return nil, os.ErrNotExist
201
201
}
202
202
203
203
// AssetNames returns the names of the assets.
0 commit comments