mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-06 18:28:00 -05:00
19 lines
390 B
Go
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
|
|
}
|