mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-02 01:34:17 -04:00
18 lines
378 B
Go
18 lines
378 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 {
|
|
loadedData, errLoad := v.VerifyAndLoad(name)
|
|
if errLoad == nil {
|
|
return loadedData, nil
|
|
}
|
|
err = newError(k, " is not loading executable file").Base(errLoad)
|
|
}
|
|
return nil, err
|
|
}
|