github.com/kelleygo/clashcore@v1.0.2/component/mmdb/patch_android.go (about)

     1  //go:build android && cmfa
     2  
     3  package mmdb
     4  
     5  import "github.com/oschwald/maxminddb-golang"
     6  
     7  func InstallOverride(override *maxminddb.Reader) {
     8  	newReader := IPReader{Reader: override}
     9  	switch override.Metadata.DatabaseType {
    10  	case "sing-geoip":
    11  		IPreader.databaseType = typeSing
    12  	case "Meta-geoip0":
    13  		IPreader.databaseType = typeMetaV0
    14  	default:
    15  		IPreader.databaseType = typeMaxmind
    16  	}
    17  	IPreader = newReader
    18  }