chore: Cleanup code

This commit is contained in:
H1JK
2023-11-17 23:12:10 +08:00
parent fef5ad780d
commit 1479b449df
32 changed files with 77 additions and 56 deletions

View File

@@ -63,7 +63,7 @@ func ParseRuleProvider(name string, mapping map[string]interface{}, parse func(t
case "http":
if schema.Path != "" {
path := C.Path.Resolve(schema.Path)
if !features.Contains("cmfa") && !C.Path.IsSafePath(path) {
if !features.CMFA && !C.Path.IsSafePath(path) {
return nil, fmt.Errorf("%w: %s", errSubPath, path)
}
vehicle = resource.NewHTTPVehicle(schema.URL, path)

View File

@@ -1,4 +1,4 @@
// +build android,cmfa
//go:build android && cmfa
package provider