1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-06 18:28:00 -05:00
v2fly/common/platform/securedload/file.go
2021-03-20 21:59:30 +00:00

19 lines
390 B
Go

package securedload
import "path/filepath"
func GetAssetSecured(name string) ([]byte, error) {
name = filepath.FromSlash(name)
var err error
for k, v := range knownProtectedLoader {
if loadedData, errLoad := v.VerifyAndLoad(name); errLoad == nil {
return loadedData, nil
} else {
err = newError(k, " is not loading executable file").Base(errLoad)
}
}
return nil, err
}