MCPcopy Index your code
hub / github.com/devspace-sh/devspace / AssetInfo

Function AssetInfo

assets/assets.go:171–181  ·  view source on GitHub ↗

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

(name string)

Source from the content-addressed store, hash-verified

169// It returns an error if the asset could not be found or
170// could not be loaded.
171func AssetInfo(name string) (os.FileInfo, error) {
172 cannonicalName := strings.Replace(name, "\\", "/", -1)
173 if f, ok := _bindata[cannonicalName]; ok {
174 a, err := f()
175 if err != nil {
176 return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
177 }
178 return a.info, nil
179 }
180 return nil, fmt.Errorf("AssetInfo %s not found", name)
181}
182
183// AssetNames returns the names of the assets.
184func AssetNames() []string {

Callers 1

RestoreAssetFunction · 0.85

Calls 1

ErrorfMethod · 0.45

Tested by

no test coverage detected