mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 06:23:45 +00:00
Merge pull request #1438 from lightpanda-io/update_public_suffix_list
Update the public suffix list
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -27,16 +27,22 @@ func main() {
|
||||
}
|
||||
|
||||
lookup :=
|
||||
"const std = @import(\"std\");\n\n" +
|
||||
"const std = @import(\"std\");\n" +
|
||||
"const builtin = @import(\"builtin\");\n\n" +
|
||||
"pub fn lookup(value: []const u8) bool {\n" +
|
||||
" return public_suffix_list.has(value);\n" +
|
||||
"}\n"
|
||||
fmt.Println(lookup)
|
||||
|
||||
fmt.Println("const public_suffix_list = std.StaticStringMap(void).initComptime([_]struct { []const u8, void }{")
|
||||
fmt.Println("const public_suffix_list = std.StaticStringMap(void).initComptime(entries);\n")
|
||||
fmt.Println("const entries: []const struct { []const u8, void } =")
|
||||
fmt.Println(" if (builtin.is_test) &.{")
|
||||
fmt.Println(" .{ \"api.gov.uk\", {} },")
|
||||
fmt.Println(" .{ \"gov.uk\", {} },")
|
||||
fmt.Println(" } else &.{")
|
||||
for _, domain := range domains {
|
||||
fmt.Printf(` .{ "%s", {} },`, domain)
|
||||
fmt.Printf(` .{ "%s", {} },`, domain)
|
||||
fmt.Println()
|
||||
}
|
||||
fmt.Println("});")
|
||||
fmt.Println(" };")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user