github.com/kelleygo/clashcore@v1.0.2/component/process/process_android.go (about)

     1  //go:build android && cmfa
     2  
     3  package process
     4  
     5  import "github.com/kelleygo/clashcore/constant"
     6  
     7  type PackageNameResolver func(metadata *constant.Metadata) (string, error)
     8  
     9  var DefaultPackageNameResolver PackageNameResolver
    10  
    11  func FindPackageName(metadata *constant.Metadata) (string, error) {
    12  	if resolver := DefaultPackageNameResolver; resolver != nil {
    13  		return resolver(metadata)
    14  	}
    15  	return "", ErrPlatformNotSupport
    16  }