16 lines
408 B
Go
16 lines
408 B
Go
// +build android
|
|
|
|
package process
|
|
|
|
import "github.com/metacubex/mihomo/constant"
|
|
|
|
type PackageNameResolver func(metadata *constant.Metadata) (string, error)
|
|
|
|
var DefaultPackageNameResolver PackageNameResolver
|
|
|
|
func FindPackageName(metadata *constant.Metadata) (string, error) {
|
|
if resolver := DefaultPackageNameResolver; resolver != nil {
|
|
return resolver(metadata)
|
|
}
|
|
return "", ErrPlatformNotSupport
|
|
}
|