diff options
Diffstat (limited to 'vendor/golang.org/x/net/publicsuffix/table.go')
-rw-r--r-- | vendor/golang.org/x/net/publicsuffix/table.go | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/vendor/golang.org/x/net/publicsuffix/table.go b/vendor/golang.org/x/net/publicsuffix/table.go new file mode 100644 index 0000000..78d400f --- /dev/null +++ b/vendor/golang.org/x/net/publicsuffix/table.go | |||
@@ -0,0 +1,70 @@ | |||
1 | // generated by go run gen.go; DO NOT EDIT | ||
2 | |||
3 | package publicsuffix | ||
4 | |||
5 | import _ "embed" | ||
6 | |||
7 | const version = "publicsuffix.org's public_suffix_list.dat, git revision 63cbc63d470d7b52c35266aa96c4c98c96ec499c (2023-08-03T10:01:25Z)" | ||
8 | |||
9 | const ( | ||
10 | nodesBits = 40 | ||
11 | nodesBitsChildren = 10 | ||
12 | nodesBitsICANN = 1 | ||
13 | nodesBitsTextOffset = 16 | ||
14 | nodesBitsTextLength = 6 | ||
15 | |||
16 | childrenBitsWildcard = 1 | ||
17 | childrenBitsNodeType = 2 | ||
18 | childrenBitsHi = 14 | ||
19 | childrenBitsLo = 14 | ||
20 | ) | ||
21 | |||
22 | const ( | ||
23 | nodeTypeNormal = 0 | ||
24 | nodeTypeException = 1 | ||
25 | nodeTypeParentOnly = 2 | ||
26 | ) | ||
27 | |||
28 | // numTLD is the number of top level domains. | ||
29 | const numTLD = 1474 | ||
30 | |||
31 | // text is the combined text of all labels. | ||
32 | // | ||
33 | //go:embed data/text | ||
34 | var text string | ||
35 | |||
36 | // nodes is the list of nodes. Each node is represented as a 40-bit integer, | ||
37 | // which encodes the node's children, wildcard bit and node type (as an index | ||
38 | // into the children array), ICANN bit and text. | ||
39 | // | ||
40 | // The layout within the node, from MSB to LSB, is: | ||
41 | // | ||
42 | // [ 7 bits] unused | ||
43 | // [10 bits] children index | ||
44 | // [ 1 bits] ICANN bit | ||
45 | // [16 bits] text index | ||
46 | // [ 6 bits] text length | ||
47 | // | ||
48 | //go:embed data/nodes | ||
49 | var nodes uint40String | ||
50 | |||
51 | // children is the list of nodes' children, the parent's wildcard bit and the | ||
52 | // parent's node type. If a node has no children then their children index | ||
53 | // will be in the range [0, 6), depending on the wildcard bit and node type. | ||
54 | // | ||
55 | // The layout within the uint32, from MSB to LSB, is: | ||
56 | // | ||
57 | // [ 1 bits] unused | ||
58 | // [ 1 bits] wildcard bit | ||
59 | // [ 2 bits] node type | ||
60 | // [14 bits] high nodes index (exclusive) of children | ||
61 | // [14 bits] low nodes index (inclusive) of children | ||
62 | // | ||
63 | //go:embed data/children | ||
64 | var children uint32String | ||
65 | |||
66 | // max children 743 (capacity 1023) | ||
67 | // max text offset 30876 (capacity 65535) | ||
68 | // max text length 31 (capacity 63) | ||
69 | // max hi 9322 (capacity 16383) | ||
70 | // max lo 9317 (capacity 16383) | ||