depot/third_party/nixpkgs/pkgs/data/misc/sing-geosite/main.go
Default email 5557ff764c Project import generated by Copybara.
GitOrigin-RevId: 988cc958c57ce4350ec248d2d53087777f9e1949
2023-02-22 11:55:15 +01:00

19 lines
343 B
Go

func main() {
outputFile, err := os.Create("geosite.db")
if err != nil {
panic(err)
}
defer outputFile.Close()
vData, err := ioutil.ReadFile("@geosite_data@")
if err != nil {
panic(err)
}
domainMap, err := parse(vData)
if err != nil {
panic(err)
}
err = geosite.Write(outputFile, domainMap)
if err != nil {
panic(err)
}
}