ires 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -45
- data/ext/Gopkg.lock +31 -1
- data/ext/ires/image.go +227 -0
- data/ext/ires/ires.go +47 -59
- data/ext/ires/uri.go +143 -0
- data/ext/main.go +18 -9
- data/ext/vendor/github.com/PuerkitoBio/purell/LICENSE +12 -0
- data/ext/vendor/github.com/PuerkitoBio/purell/README.md +187 -0
- data/ext/vendor/github.com/PuerkitoBio/purell/bench_test.go +57 -0
- data/ext/vendor/github.com/PuerkitoBio/purell/benchmarks/v0.1.0 +9 -0
- data/ext/vendor/github.com/PuerkitoBio/purell/example_test.go +35 -0
- data/ext/vendor/github.com/PuerkitoBio/purell/purell.go +379 -0
- data/ext/vendor/github.com/PuerkitoBio/purell/purell_test.go +768 -0
- data/ext/vendor/github.com/PuerkitoBio/purell/urlnorm_test.go +53 -0
- data/ext/vendor/github.com/PuerkitoBio/urlesc/LICENSE +27 -0
- data/ext/vendor/github.com/PuerkitoBio/urlesc/README.md +16 -0
- data/ext/vendor/github.com/PuerkitoBio/urlesc/urlesc.go +180 -0
- data/ext/vendor/github.com/PuerkitoBio/urlesc/urlesc_test.go +641 -0
- data/ext/vendor/github.com/{satori/go.uuid → goware/urlx}/LICENSE +3 -1
- data/ext/vendor/github.com/goware/urlx/README.md +172 -0
- data/ext/vendor/github.com/goware/urlx/urlx.go +196 -0
- data/ext/vendor/github.com/goware/urlx/urlx_test.go +232 -0
- data/ext/vendor/golang.org/x/net/AUTHORS +3 -0
- data/ext/vendor/golang.org/x/net/CONTRIBUTING.md +31 -0
- data/ext/vendor/golang.org/x/net/CONTRIBUTORS +3 -0
- data/ext/vendor/golang.org/x/net/LICENSE +27 -0
- data/ext/vendor/golang.org/x/net/PATENTS +22 -0
- data/ext/vendor/golang.org/x/net/README.md +16 -0
- data/ext/vendor/golang.org/x/net/bpf/asm.go +41 -0
- data/ext/vendor/golang.org/x/net/bpf/constants.go +218 -0
- data/ext/vendor/golang.org/x/net/bpf/doc.go +82 -0
- data/ext/vendor/golang.org/x/net/bpf/instructions.go +704 -0
- data/ext/vendor/golang.org/x/net/bpf/instructions_test.go +525 -0
- data/ext/vendor/golang.org/x/net/bpf/setter.go +10 -0
- data/ext/vendor/golang.org/x/net/bpf/testdata/all_instructions.bpf +1 -0
- data/ext/vendor/golang.org/x/net/bpf/testdata/all_instructions.txt +79 -0
- data/ext/vendor/golang.org/x/net/bpf/vm.go +140 -0
- data/ext/vendor/golang.org/x/net/bpf/vm_aluop_test.go +512 -0
- data/ext/vendor/golang.org/x/net/bpf/vm_bpf_test.go +192 -0
- data/ext/vendor/golang.org/x/net/bpf/vm_extension_test.go +49 -0
- data/ext/vendor/golang.org/x/net/bpf/vm_instructions.go +174 -0
- data/ext/vendor/golang.org/x/net/bpf/vm_jump_test.go +380 -0
- data/ext/vendor/golang.org/x/net/bpf/vm_load_test.go +246 -0
- data/ext/vendor/golang.org/x/net/bpf/vm_ret_test.go +115 -0
- data/ext/vendor/golang.org/x/net/bpf/vm_scratch_test.go +247 -0
- data/ext/vendor/golang.org/x/net/bpf/vm_test.go +144 -0
- data/ext/vendor/golang.org/x/net/codereview.cfg +1 -0
- data/ext/vendor/golang.org/x/net/context/context.go +54 -0
- data/ext/vendor/golang.org/x/net/context/context_test.go +583 -0
- data/ext/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go +74 -0
- data/ext/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go +29 -0
- data/ext/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17.go +147 -0
- data/ext/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17_test.go +79 -0
- data/ext/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go +105 -0
- data/ext/vendor/golang.org/x/net/context/go17.go +72 -0
- data/ext/vendor/golang.org/x/net/context/go19.go +20 -0
- data/ext/vendor/golang.org/x/net/context/pre_go17.go +300 -0
- data/ext/vendor/golang.org/x/net/context/pre_go19.go +109 -0
- data/ext/vendor/golang.org/x/net/context/withtimeout_test.go +31 -0
- data/ext/vendor/golang.org/x/net/dict/dict.go +210 -0
- data/ext/vendor/golang.org/x/net/dns/dnsmessage/example_test.go +132 -0
- data/ext/vendor/golang.org/x/net/dns/dnsmessage/message.go +1997 -0
- data/ext/vendor/golang.org/x/net/dns/dnsmessage/message_test.go +1116 -0
- data/ext/vendor/golang.org/x/net/html/atom/atom.go +78 -0
- data/ext/vendor/golang.org/x/net/html/atom/atom_test.go +109 -0
- data/ext/vendor/golang.org/x/net/html/atom/gen.go +709 -0
- data/ext/vendor/golang.org/x/net/html/atom/table.go +777 -0
- data/ext/vendor/golang.org/x/net/html/atom/table_test.go +373 -0
- data/ext/vendor/golang.org/x/net/html/charset/charset.go +257 -0
- data/ext/vendor/golang.org/x/net/html/charset/charset_test.go +237 -0
- data/ext/vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html +48 -0
- data/ext/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html +48 -0
- data/ext/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html +49 -0
- data/ext/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html +49 -0
- data/ext/vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html +47 -0
- data/ext/vendor/golang.org/x/net/html/charset/testdata/README +9 -0
- data/ext/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html +0 -0
- data/ext/vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html +0 -0
- data/ext/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html +49 -0
- data/ext/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html +48 -0
- data/ext/vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html +48 -0
- data/ext/vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html +48 -0
- data/ext/vendor/golang.org/x/net/html/const.go +104 -0
- data/ext/vendor/golang.org/x/net/html/doc.go +106 -0
- data/ext/vendor/golang.org/x/net/html/doctype.go +156 -0
- data/ext/vendor/golang.org/x/net/html/entity.go +2253 -0
- data/ext/vendor/golang.org/x/net/html/entity_test.go +29 -0
- data/ext/vendor/golang.org/x/net/html/escape.go +258 -0
- data/ext/vendor/golang.org/x/net/html/escape_test.go +97 -0
- data/ext/vendor/golang.org/x/net/html/example_test.go +40 -0
- data/ext/vendor/golang.org/x/net/html/foreign.go +226 -0
- data/ext/vendor/golang.org/x/net/html/node.go +193 -0
- data/ext/vendor/golang.org/x/net/html/node_test.go +146 -0
- data/ext/vendor/golang.org/x/net/html/parse.go +2094 -0
- data/ext/vendor/golang.org/x/net/html/parse_test.go +388 -0
- data/ext/vendor/golang.org/x/net/html/render.go +271 -0
- data/ext/vendor/golang.org/x/net/html/render_test.go +156 -0
- data/ext/vendor/golang.org/x/net/html/testdata/go1.html +2237 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/README +28 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/adoption01.dat +194 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/adoption02.dat +31 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/comments01.dat +135 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/doctype01.dat +370 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/entities01.dat +603 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/entities02.dat +249 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/html5test-com.dat +246 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/inbody01.dat +43 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/isindex.dat +40 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat +0 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes.dat +52 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/plain-text-unsafe.dat +0 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/scriptdata01.dat +308 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat +15 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/scripted/webkit01.dat +28 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tables01.dat +212 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests1.dat +1952 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests10.dat +799 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests11.dat +482 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests12.dat +62 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests14.dat +74 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests15.dat +208 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests16.dat +2299 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests17.dat +153 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests18.dat +269 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests19.dat +1237 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests2.dat +763 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests20.dat +455 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests21.dat +221 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests22.dat +157 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests23.dat +155 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests24.dat +79 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests25.dat +219 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests26.dat +313 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests3.dat +305 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests4.dat +59 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests5.dat +191 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests6.dat +663 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests7.dat +390 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests8.dat +148 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests9.dat +457 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tests_innerHTML_1.dat +741 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/tricky01.dat +261 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/webkit01.dat +610 -0
- data/ext/vendor/golang.org/x/net/html/testdata/webkit/webkit02.dat +159 -0
- data/ext/vendor/golang.org/x/net/html/token.go +1219 -0
- data/ext/vendor/golang.org/x/net/html/token_test.go +748 -0
- data/ext/vendor/golang.org/x/net/http2/Dockerfile +51 -0
- data/ext/vendor/golang.org/x/net/http2/Makefile +3 -0
- data/ext/vendor/golang.org/x/net/http2/README +20 -0
- data/ext/vendor/golang.org/x/net/http2/ciphers.go +641 -0
- data/ext/vendor/golang.org/x/net/http2/ciphers_test.go +309 -0
- data/ext/vendor/golang.org/x/net/http2/client_conn_pool.go +256 -0
- data/ext/vendor/golang.org/x/net/http2/configure_transport.go +80 -0
- data/ext/vendor/golang.org/x/net/http2/databuffer.go +146 -0
- data/ext/vendor/golang.org/x/net/http2/databuffer_test.go +157 -0
- data/ext/vendor/golang.org/x/net/http2/errors.go +133 -0
- data/ext/vendor/golang.org/x/net/http2/errors_test.go +24 -0
- data/ext/vendor/golang.org/x/net/http2/flow.go +50 -0
- data/ext/vendor/golang.org/x/net/http2/flow_test.go +53 -0
- data/ext/vendor/golang.org/x/net/http2/frame.go +1579 -0
- data/ext/vendor/golang.org/x/net/http2/frame_test.go +1191 -0
- data/ext/vendor/golang.org/x/net/http2/go16.go +16 -0
- data/ext/vendor/golang.org/x/net/http2/go17.go +106 -0
- data/ext/vendor/golang.org/x/net/http2/go17_not18.go +36 -0
- data/ext/vendor/golang.org/x/net/http2/go18.go +56 -0
- data/ext/vendor/golang.org/x/net/http2/go18_test.go +79 -0
- data/ext/vendor/golang.org/x/net/http2/go19.go +16 -0
- data/ext/vendor/golang.org/x/net/http2/go19_test.go +60 -0
- data/ext/vendor/golang.org/x/net/http2/gotrack.go +170 -0
- data/ext/vendor/golang.org/x/net/http2/gotrack_test.go +33 -0
- data/ext/vendor/golang.org/x/net/http2/h2demo/Makefile +8 -0
- data/ext/vendor/golang.org/x/net/http2/h2demo/README +16 -0
- data/ext/vendor/golang.org/x/net/http2/h2demo/h2demo.go +538 -0
- data/ext/vendor/golang.org/x/net/http2/h2demo/launch.go +302 -0
- data/ext/vendor/golang.org/x/net/http2/h2demo/rootCA.key +27 -0
- data/ext/vendor/golang.org/x/net/http2/h2demo/rootCA.pem +26 -0
- data/ext/vendor/golang.org/x/net/http2/h2demo/rootCA.srl +1 -0
- data/ext/vendor/golang.org/x/net/http2/h2demo/server.crt +20 -0
- data/ext/vendor/golang.org/x/net/http2/h2demo/server.key +27 -0
- data/ext/vendor/golang.org/x/net/http2/h2demo/tmpl.go +1991 -0
- data/ext/vendor/golang.org/x/net/http2/h2i/README.md +97 -0
- data/ext/vendor/golang.org/x/net/http2/h2i/h2i.go +522 -0
- data/ext/vendor/golang.org/x/net/http2/headermap.go +78 -0
- data/ext/vendor/golang.org/x/net/http2/hpack/encode.go +240 -0
- data/ext/vendor/golang.org/x/net/http2/hpack/encode_test.go +386 -0
- data/ext/vendor/golang.org/x/net/http2/hpack/hpack.go +490 -0
- data/ext/vendor/golang.org/x/net/http2/hpack/hpack_test.go +722 -0
- data/ext/vendor/golang.org/x/net/http2/hpack/huffman.go +212 -0
- data/ext/vendor/golang.org/x/net/http2/hpack/tables.go +479 -0
- data/ext/vendor/golang.org/x/net/http2/hpack/tables_test.go +214 -0
- data/ext/vendor/golang.org/x/net/http2/http2.go +391 -0
- data/ext/vendor/golang.org/x/net/http2/http2_test.go +199 -0
- data/ext/vendor/golang.org/x/net/http2/not_go16.go +21 -0
- data/ext/vendor/golang.org/x/net/http2/not_go17.go +87 -0
- data/ext/vendor/golang.org/x/net/http2/not_go18.go +29 -0
- data/ext/vendor/golang.org/x/net/http2/not_go19.go +16 -0
- data/ext/vendor/golang.org/x/net/http2/pipe.go +163 -0
- data/ext/vendor/golang.org/x/net/http2/pipe_test.go +130 -0
- data/ext/vendor/golang.org/x/net/http2/server.go +2857 -0
- data/ext/vendor/golang.org/x/net/http2/server_push_test.go +521 -0
- data/ext/vendor/golang.org/x/net/http2/server_test.go +3721 -0
- data/ext/vendor/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml +5021 -0
- data/ext/vendor/golang.org/x/net/http2/transport.go +2285 -0
- data/ext/vendor/golang.org/x/net/http2/transport_test.go +3714 -0
- data/ext/vendor/golang.org/x/net/http2/write.go +370 -0
- data/ext/vendor/golang.org/x/net/http2/writesched.go +242 -0
- data/ext/vendor/golang.org/x/net/http2/writesched_priority.go +452 -0
- data/ext/vendor/golang.org/x/net/http2/writesched_priority_test.go +541 -0
- data/ext/vendor/golang.org/x/net/http2/writesched_random.go +72 -0
- data/ext/vendor/golang.org/x/net/http2/writesched_random_test.go +44 -0
- data/ext/vendor/golang.org/x/net/http2/writesched_test.go +125 -0
- data/ext/vendor/golang.org/x/net/http2/z_spec_test.go +356 -0
- data/ext/vendor/golang.org/x/net/icmp/dstunreach.go +41 -0
- data/ext/vendor/golang.org/x/net/icmp/echo.go +45 -0
- data/ext/vendor/golang.org/x/net/icmp/endpoint.go +113 -0
- data/ext/vendor/golang.org/x/net/icmp/example_test.go +63 -0
- data/ext/vendor/golang.org/x/net/icmp/extension.go +89 -0
- data/ext/vendor/golang.org/x/net/icmp/extension_test.go +259 -0
- data/ext/vendor/golang.org/x/net/icmp/helper_posix.go +75 -0
- data/ext/vendor/golang.org/x/net/icmp/interface.go +236 -0
- data/ext/vendor/golang.org/x/net/icmp/ipv4.go +61 -0
- data/ext/vendor/golang.org/x/net/icmp/ipv4_test.go +83 -0
- data/ext/vendor/golang.org/x/net/icmp/ipv6.go +23 -0
- data/ext/vendor/golang.org/x/net/icmp/listen_posix.go +100 -0
- data/ext/vendor/golang.org/x/net/icmp/listen_stub.go +33 -0
- data/ext/vendor/golang.org/x/net/icmp/message.go +152 -0
- data/ext/vendor/golang.org/x/net/icmp/message_test.go +134 -0
- data/ext/vendor/golang.org/x/net/icmp/messagebody.go +41 -0
- data/ext/vendor/golang.org/x/net/icmp/mpls.go +77 -0
- data/ext/vendor/golang.org/x/net/icmp/multipart.go +109 -0
- data/ext/vendor/golang.org/x/net/icmp/multipart_test.go +442 -0
- data/ext/vendor/golang.org/x/net/icmp/packettoobig.go +43 -0
- data/ext/vendor/golang.org/x/net/icmp/paramprob.go +63 -0
- data/ext/vendor/golang.org/x/net/icmp/ping_test.go +200 -0
- data/ext/vendor/golang.org/x/net/icmp/sys_freebsd.go +11 -0
- data/ext/vendor/golang.org/x/net/icmp/timeexceeded.go +39 -0
- data/ext/vendor/golang.org/x/net/idna/example_test.go +70 -0
- data/ext/vendor/golang.org/x/net/idna/idna.go +680 -0
- data/ext/vendor/golang.org/x/net/idna/idna_test.go +108 -0
- data/ext/vendor/golang.org/x/net/idna/punycode.go +203 -0
- data/ext/vendor/golang.org/x/net/idna/punycode_test.go +198 -0
- data/ext/vendor/golang.org/x/net/idna/tables.go +4477 -0
- data/ext/vendor/golang.org/x/net/idna/trie.go +72 -0
- data/ext/vendor/golang.org/x/net/idna/trieval.go +114 -0
- data/ext/vendor/golang.org/x/net/internal/iana/const.go +180 -0
- data/ext/vendor/golang.org/x/net/internal/iana/gen.go +293 -0
- data/ext/vendor/golang.org/x/net/internal/nettest/helper_bsd.go +53 -0
- data/ext/vendor/golang.org/x/net/internal/nettest/helper_nobsd.go +15 -0
- data/ext/vendor/golang.org/x/net/internal/nettest/helper_posix.go +31 -0
- data/ext/vendor/golang.org/x/net/internal/nettest/helper_stub.go +32 -0
- data/ext/vendor/golang.org/x/net/internal/nettest/helper_unix.go +29 -0
- data/ext/vendor/golang.org/x/net/internal/nettest/helper_windows.go +42 -0
- data/ext/vendor/golang.org/x/net/internal/nettest/interface.go +94 -0
- data/ext/vendor/golang.org/x/net/internal/nettest/rlimit.go +11 -0
- data/ext/vendor/golang.org/x/net/internal/nettest/stack.go +147 -0
- data/ext/vendor/golang.org/x/net/internal/socket/cmsghdr.go +11 -0
- data/ext/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go +13 -0
- data/ext/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go +14 -0
- data/ext/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go +14 -0
- data/ext/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go +14 -0
- data/ext/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go +17 -0
- data/ext/vendor/golang.org/x/net/internal/socket/defs_darwin.go +44 -0
- data/ext/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go +44 -0
- data/ext/vendor/golang.org/x/net/internal/socket/defs_freebsd.go +44 -0
- data/ext/vendor/golang.org/x/net/internal/socket/defs_linux.go +49 -0
- data/ext/vendor/golang.org/x/net/internal/socket/defs_netbsd.go +47 -0
- data/ext/vendor/golang.org/x/net/internal/socket/defs_openbsd.go +44 -0
- data/ext/vendor/golang.org/x/net/internal/socket/defs_solaris.go +44 -0
- data/ext/vendor/golang.org/x/net/internal/socket/error_unix.go +31 -0
- data/ext/vendor/golang.org/x/net/internal/socket/error_windows.go +26 -0
- data/ext/vendor/golang.org/x/net/internal/socket/iovec_32bit.go +19 -0
- data/ext/vendor/golang.org/x/net/internal/socket/iovec_64bit.go +19 -0
- data/ext/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go +19 -0
- data/ext/vendor/golang.org/x/net/internal/socket/iovec_stub.go +11 -0
- data/ext/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go +21 -0
- data/ext/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go +42 -0
- data/ext/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go +39 -0
- data/ext/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go +16 -0
- data/ext/vendor/golang.org/x/net/internal/socket/msghdr_linux.go +36 -0
- data/ext/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go +24 -0
- data/ext/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go +24 -0
- data/ext/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go +14 -0
- data/ext/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go +36 -0
- data/ext/vendor/golang.org/x/net/internal/socket/msghdr_stub.go +14 -0
- data/ext/vendor/golang.org/x/net/internal/socket/rawconn.go +66 -0
- data/ext/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go +74 -0
- data/ext/vendor/golang.org/x/net/internal/socket/rawconn_msg.go +77 -0
- data/ext/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go +18 -0
- data/ext/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go +18 -0
- data/ext/vendor/golang.org/x/net/internal/socket/rawconn_stub.go +25 -0
- data/ext/vendor/golang.org/x/net/internal/socket/reflect.go +62 -0
- data/ext/vendor/golang.org/x/net/internal/socket/socket.go +285 -0
- data/ext/vendor/golang.org/x/net/internal/socket/socket_go1_9_test.go +259 -0
- data/ext/vendor/golang.org/x/net/internal/socket/socket_test.go +46 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys.go +33 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_bsd.go +17 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go +14 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_darwin.go +7 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go +7 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux.go +27 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_386.go +55 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_386.s +11 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go +10 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go +10 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go +10 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go +10 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go +10 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go +10 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go +10 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go +10 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go +10 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go +55 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s +11 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_netbsd.go +25 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_posix.go +168 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_solaris.go +71 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s +11 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_stub.go +64 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_unix.go +33 -0
- data/ext/vendor/golang.org/x/net/internal/socket/sys_windows.go +70 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go +59 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go +61 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go +59 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go +61 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go +59 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go +61 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go +59 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go +63 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go +66 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go +63 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go +66 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go +63 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go +66 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go +66 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go +63 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go +66 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go +66 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go +66 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go +65 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go +68 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go +59 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go +59 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go +61 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go +59 -0
- data/ext/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go +60 -0
- data/ext/vendor/golang.org/x/net/internal/timeseries/timeseries.go +525 -0
- data/ext/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go +170 -0
- data/ext/vendor/golang.org/x/net/ipv4/batch.go +191 -0
- data/ext/vendor/golang.org/x/net/ipv4/bpf_test.go +93 -0
- data/ext/vendor/golang.org/x/net/ipv4/control.go +144 -0
- data/ext/vendor/golang.org/x/net/ipv4/control_bsd.go +40 -0
- data/ext/vendor/golang.org/x/net/ipv4/control_pktinfo.go +39 -0
- data/ext/vendor/golang.org/x/net/ipv4/control_stub.go +13 -0
- data/ext/vendor/golang.org/x/net/ipv4/control_test.go +21 -0
- data/ext/vendor/golang.org/x/net/ipv4/control_unix.go +73 -0
- data/ext/vendor/golang.org/x/net/ipv4/control_windows.go +16 -0
- data/ext/vendor/golang.org/x/net/ipv4/defs_darwin.go +77 -0
- data/ext/vendor/golang.org/x/net/ipv4/defs_dragonfly.go +38 -0
- data/ext/vendor/golang.org/x/net/ipv4/defs_freebsd.go +75 -0
- data/ext/vendor/golang.org/x/net/ipv4/defs_linux.go +122 -0
- data/ext/vendor/golang.org/x/net/ipv4/defs_netbsd.go +37 -0
- data/ext/vendor/golang.org/x/net/ipv4/defs_openbsd.go +37 -0
- data/ext/vendor/golang.org/x/net/ipv4/defs_solaris.go +84 -0
- data/ext/vendor/golang.org/x/net/ipv4/dgramopt.go +265 -0
- data/ext/vendor/golang.org/x/net/ipv4/doc.go +244 -0
- data/ext/vendor/golang.org/x/net/ipv4/endpoint.go +187 -0
- data/ext/vendor/golang.org/x/net/ipv4/example_test.go +224 -0
- data/ext/vendor/golang.org/x/net/ipv4/gen.go +199 -0
- data/ext/vendor/golang.org/x/net/ipv4/genericopt.go +57 -0
- data/ext/vendor/golang.org/x/net/ipv4/header.go +159 -0
- data/ext/vendor/golang.org/x/net/ipv4/header_test.go +228 -0
- data/ext/vendor/golang.org/x/net/ipv4/helper.go +63 -0
- data/ext/vendor/golang.org/x/net/ipv4/iana.go +34 -0
- data/ext/vendor/golang.org/x/net/ipv4/icmp.go +57 -0
- data/ext/vendor/golang.org/x/net/ipv4/icmp_linux.go +25 -0
- data/ext/vendor/golang.org/x/net/ipv4/icmp_stub.go +25 -0
- data/ext/vendor/golang.org/x/net/ipv4/icmp_test.go +95 -0
- data/ext/vendor/golang.org/x/net/ipv4/multicast_test.go +334 -0
- data/ext/vendor/golang.org/x/net/ipv4/multicastlistener_test.go +265 -0
- data/ext/vendor/golang.org/x/net/ipv4/multicastsockopt_test.go +195 -0
- data/ext/vendor/golang.org/x/net/ipv4/packet.go +69 -0
- data/ext/vendor/golang.org/x/net/ipv4/packet_go1_8.go +56 -0
- data/ext/vendor/golang.org/x/net/ipv4/packet_go1_9.go +67 -0
- data/ext/vendor/golang.org/x/net/ipv4/payload.go +23 -0
- data/ext/vendor/golang.org/x/net/ipv4/payload_cmsg.go +36 -0
- data/ext/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go +59 -0
- data/ext/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go +67 -0
- data/ext/vendor/golang.org/x/net/ipv4/payload_nocmsg.go +42 -0
- data/ext/vendor/golang.org/x/net/ipv4/readwrite_go1_8_test.go +248 -0
- data/ext/vendor/golang.org/x/net/ipv4/readwrite_go1_9_test.go +388 -0
- data/ext/vendor/golang.org/x/net/ipv4/readwrite_test.go +140 -0
- data/ext/vendor/golang.org/x/net/ipv4/sockopt.go +44 -0
- data/ext/vendor/golang.org/x/net/ipv4/sockopt_posix.go +71 -0
- data/ext/vendor/golang.org/x/net/ipv4/sockopt_stub.go +42 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_asmreq.go +119 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go +25 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_asmreqn.go +42 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go +21 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_bpf.go +23 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go +16 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_bsd.go +37 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_darwin.go +93 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_dragonfly.go +35 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_freebsd.go +76 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_linux.go +59 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_solaris.go +57 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_ssmreq.go +54 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go +21 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_stub.go +13 -0
- data/ext/vendor/golang.org/x/net/ipv4/sys_windows.go +67 -0
- data/ext/vendor/golang.org/x/net/ipv4/unicast_test.go +247 -0
- data/ext/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go +148 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_darwin.go +99 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go +31 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go +93 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go +95 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go +95 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_linux_386.go +148 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go +150 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go +148 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go +150 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go +148 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go +150 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go +150 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go +148 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go +148 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go +150 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go +150 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go +150 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_netbsd.go +30 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_openbsd.go +30 -0
- data/ext/vendor/golang.org/x/net/ipv4/zsys_solaris.go +100 -0
- data/ext/vendor/golang.org/x/net/ipv6/batch.go +119 -0
- data/ext/vendor/golang.org/x/net/ipv6/bpf_test.go +96 -0
- data/ext/vendor/golang.org/x/net/ipv6/control.go +187 -0
- data/ext/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go +48 -0
- data/ext/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go +94 -0
- data/ext/vendor/golang.org/x/net/ipv6/control_stub.go +13 -0
- data/ext/vendor/golang.org/x/net/ipv6/control_test.go +21 -0
- data/ext/vendor/golang.org/x/net/ipv6/control_unix.go +55 -0
- data/ext/vendor/golang.org/x/net/ipv6/control_windows.go +16 -0
- data/ext/vendor/golang.org/x/net/ipv6/defs_darwin.go +112 -0
- data/ext/vendor/golang.org/x/net/ipv6/defs_dragonfly.go +84 -0
- data/ext/vendor/golang.org/x/net/ipv6/defs_freebsd.go +105 -0
- data/ext/vendor/golang.org/x/net/ipv6/defs_linux.go +147 -0
- data/ext/vendor/golang.org/x/net/ipv6/defs_netbsd.go +80 -0
- data/ext/vendor/golang.org/x/net/ipv6/defs_openbsd.go +89 -0
- data/ext/vendor/golang.org/x/net/ipv6/defs_solaris.go +114 -0
- data/ext/vendor/golang.org/x/net/ipv6/dgramopt.go +302 -0
- data/ext/vendor/golang.org/x/net/ipv6/doc.go +243 -0
- data/ext/vendor/golang.org/x/net/ipv6/endpoint.go +128 -0
- data/ext/vendor/golang.org/x/net/ipv6/example_test.go +216 -0
- data/ext/vendor/golang.org/x/net/ipv6/gen.go +199 -0
- data/ext/vendor/golang.org/x/net/ipv6/genericopt.go +58 -0
- data/ext/vendor/golang.org/x/net/ipv6/header.go +55 -0
- data/ext/vendor/golang.org/x/net/ipv6/header_test.go +55 -0
- data/ext/vendor/golang.org/x/net/ipv6/helper.go +57 -0
- data/ext/vendor/golang.org/x/net/ipv6/iana.go +82 -0
- data/ext/vendor/golang.org/x/net/ipv6/icmp.go +60 -0
- data/ext/vendor/golang.org/x/net/ipv6/icmp_bsd.go +29 -0
- data/ext/vendor/golang.org/x/net/ipv6/icmp_linux.go +27 -0
- data/ext/vendor/golang.org/x/net/ipv6/icmp_solaris.go +27 -0
- data/ext/vendor/golang.org/x/net/ipv6/icmp_stub.go +23 -0
- data/ext/vendor/golang.org/x/net/ipv6/icmp_test.go +96 -0
- data/ext/vendor/golang.org/x/net/ipv6/icmp_windows.go +22 -0
- data/ext/vendor/golang.org/x/net/ipv6/mocktransponder_test.go +32 -0
- data/ext/vendor/golang.org/x/net/ipv6/multicast_test.go +264 -0
- data/ext/vendor/golang.org/x/net/ipv6/multicastlistener_test.go +261 -0
- data/ext/vendor/golang.org/x/net/ipv6/multicastsockopt_test.go +157 -0
- data/ext/vendor/golang.org/x/net/ipv6/payload.go +23 -0
- data/ext/vendor/golang.org/x/net/ipv6/payload_cmsg.go +35 -0
- data/ext/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go +55 -0
- data/ext/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go +57 -0
- data/ext/vendor/golang.org/x/net/ipv6/payload_nocmsg.go +41 -0
- data/ext/vendor/golang.org/x/net/ipv6/readwrite_go1_8_test.go +242 -0
- data/ext/vendor/golang.org/x/net/ipv6/readwrite_go1_9_test.go +373 -0
- data/ext/vendor/golang.org/x/net/ipv6/readwrite_test.go +148 -0
- data/ext/vendor/golang.org/x/net/ipv6/sockopt.go +43 -0
- data/ext/vendor/golang.org/x/net/ipv6/sockopt_posix.go +87 -0
- data/ext/vendor/golang.org/x/net/ipv6/sockopt_stub.go +46 -0
- data/ext/vendor/golang.org/x/net/ipv6/sockopt_test.go +133 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_asmreq.go +24 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go +17 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_bpf.go +23 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go +16 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_bsd.go +57 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_darwin.go +106 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_freebsd.go +92 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_linux.go +74 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_solaris.go +74 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_ssmreq.go +54 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go +21 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_stub.go +13 -0
- data/ext/vendor/golang.org/x/net/ipv6/sys_windows.go +75 -0
- data/ext/vendor/golang.org/x/net/ipv6/unicast_test.go +184 -0
- data/ext/vendor/golang.org/x/net/ipv6/unicastsockopt_test.go +120 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_darwin.go +131 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_dragonfly.go +88 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go +122 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go +124 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go +124 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_linux_386.go +170 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go +172 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go +170 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go +172 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go +170 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go +172 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go +172 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go +170 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go +170 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go +172 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go +172 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go +172 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_netbsd.go +84 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_openbsd.go +93 -0
- data/ext/vendor/golang.org/x/net/ipv6/zsys_solaris.go +131 -0
- data/ext/vendor/golang.org/x/net/lex/httplex/httplex.go +351 -0
- data/ext/vendor/golang.org/x/net/lex/httplex/httplex_test.go +119 -0
- data/ext/vendor/golang.org/x/net/lif/address.go +105 -0
- data/ext/vendor/golang.org/x/net/lif/address_test.go +123 -0
- data/ext/vendor/golang.org/x/net/lif/binary.go +115 -0
- data/ext/vendor/golang.org/x/net/lif/defs_solaris.go +90 -0
- data/ext/vendor/golang.org/x/net/lif/lif.go +43 -0
- data/ext/vendor/golang.org/x/net/lif/link.go +126 -0
- data/ext/vendor/golang.org/x/net/lif/link_test.go +63 -0
- data/ext/vendor/golang.org/x/net/lif/sys.go +21 -0
- data/ext/vendor/golang.org/x/net/lif/sys_solaris_amd64.s +8 -0
- data/ext/vendor/golang.org/x/net/lif/syscall.go +28 -0
- data/ext/vendor/golang.org/x/net/lif/zsys_solaris_amd64.go +103 -0
- data/ext/vendor/golang.org/x/net/nettest/conntest.go +456 -0
- data/ext/vendor/golang.org/x/net/nettest/conntest_go16.go +24 -0
- data/ext/vendor/golang.org/x/net/nettest/conntest_go17.go +24 -0
- data/ext/vendor/golang.org/x/net/nettest/conntest_test.go +76 -0
- data/ext/vendor/golang.org/x/net/netutil/listen.go +48 -0
- data/ext/vendor/golang.org/x/net/netutil/listen_test.go +101 -0
- data/ext/vendor/golang.org/x/net/proxy/direct.go +18 -0
- data/ext/vendor/golang.org/x/net/proxy/per_host.go +140 -0
- data/ext/vendor/golang.org/x/net/proxy/per_host_test.go +55 -0
- data/ext/vendor/golang.org/x/net/proxy/proxy.go +134 -0
- data/ext/vendor/golang.org/x/net/proxy/proxy_test.go +215 -0
- data/ext/vendor/golang.org/x/net/proxy/socks5.go +214 -0
- data/ext/vendor/golang.org/x/net/publicsuffix/gen.go +713 -0
- data/ext/vendor/golang.org/x/net/publicsuffix/list.go +135 -0
- data/ext/vendor/golang.org/x/net/publicsuffix/list_test.go +416 -0
- data/ext/vendor/golang.org/x/net/publicsuffix/table.go +9419 -0
- data/ext/vendor/golang.org/x/net/publicsuffix/table_test.go +16756 -0
- data/ext/vendor/golang.org/x/net/route/address.go +425 -0
- data/ext/vendor/golang.org/x/net/route/address_darwin_test.go +63 -0
- data/ext/vendor/golang.org/x/net/route/address_test.go +103 -0
- data/ext/vendor/golang.org/x/net/route/binary.go +90 -0
- data/ext/vendor/golang.org/x/net/route/defs_darwin.go +114 -0
- data/ext/vendor/golang.org/x/net/route/defs_dragonfly.go +113 -0
- data/ext/vendor/golang.org/x/net/route/defs_freebsd.go +337 -0
- data/ext/vendor/golang.org/x/net/route/defs_netbsd.go +112 -0
- data/ext/vendor/golang.org/x/net/route/defs_openbsd.go +116 -0
- data/ext/vendor/golang.org/x/net/route/interface.go +64 -0
- data/ext/vendor/golang.org/x/net/route/interface_announce.go +32 -0
- data/ext/vendor/golang.org/x/net/route/interface_classic.go +66 -0
- data/ext/vendor/golang.org/x/net/route/interface_freebsd.go +78 -0
- data/ext/vendor/golang.org/x/net/route/interface_multicast.go +30 -0
- data/ext/vendor/golang.org/x/net/route/interface_openbsd.go +90 -0
- data/ext/vendor/golang.org/x/net/route/message.go +72 -0
- data/ext/vendor/golang.org/x/net/route/message_darwin_test.go +34 -0
- data/ext/vendor/golang.org/x/net/route/message_freebsd_test.go +92 -0
- data/ext/vendor/golang.org/x/net/route/message_test.go +239 -0
- data/ext/vendor/golang.org/x/net/route/route.go +123 -0
- data/ext/vendor/golang.org/x/net/route/route_classic.go +67 -0
- data/ext/vendor/golang.org/x/net/route/route_openbsd.go +65 -0
- data/ext/vendor/golang.org/x/net/route/route_test.go +390 -0
- data/ext/vendor/golang.org/x/net/route/sys.go +39 -0
- data/ext/vendor/golang.org/x/net/route/sys_darwin.go +87 -0
- data/ext/vendor/golang.org/x/net/route/sys_dragonfly.go +76 -0
- data/ext/vendor/golang.org/x/net/route/sys_freebsd.go +155 -0
- data/ext/vendor/golang.org/x/net/route/sys_netbsd.go +71 -0
- data/ext/vendor/golang.org/x/net/route/sys_openbsd.go +80 -0
- data/ext/vendor/golang.org/x/net/route/syscall.go +28 -0
- data/ext/vendor/golang.org/x/net/route/zsys_darwin.go +99 -0
- data/ext/vendor/golang.org/x/net/route/zsys_dragonfly.go +98 -0
- data/ext/vendor/golang.org/x/net/route/zsys_freebsd_386.go +126 -0
- data/ext/vendor/golang.org/x/net/route/zsys_freebsd_amd64.go +123 -0
- data/ext/vendor/golang.org/x/net/route/zsys_freebsd_arm.go +123 -0
- data/ext/vendor/golang.org/x/net/route/zsys_netbsd.go +97 -0
- data/ext/vendor/golang.org/x/net/route/zsys_openbsd.go +101 -0
- data/ext/vendor/golang.org/x/net/trace/events.go +532 -0
- data/ext/vendor/golang.org/x/net/trace/histogram.go +365 -0
- data/ext/vendor/golang.org/x/net/trace/histogram_test.go +325 -0
- data/ext/vendor/golang.org/x/net/trace/trace.go +1082 -0
- data/ext/vendor/golang.org/x/net/trace/trace_go16.go +21 -0
- data/ext/vendor/golang.org/x/net/trace/trace_go17.go +21 -0
- data/ext/vendor/golang.org/x/net/trace/trace_test.go +178 -0
- data/ext/vendor/golang.org/x/net/webdav/file.go +796 -0
- data/ext/vendor/golang.org/x/net/webdav/file_go1.6.go +17 -0
- data/ext/vendor/golang.org/x/net/webdav/file_go1.7.go +16 -0
- data/ext/vendor/golang.org/x/net/webdav/file_test.go +1184 -0
- data/ext/vendor/golang.org/x/net/webdav/if.go +173 -0
- data/ext/vendor/golang.org/x/net/webdav/if_test.go +322 -0
- data/ext/vendor/golang.org/x/net/webdav/internal/xml/README +11 -0
- data/ext/vendor/golang.org/x/net/webdav/internal/xml/atom_test.go +56 -0
- data/ext/vendor/golang.org/x/net/webdav/internal/xml/example_test.go +151 -0
- data/ext/vendor/golang.org/x/net/webdav/internal/xml/marshal.go +1223 -0
- data/ext/vendor/golang.org/x/net/webdav/internal/xml/marshal_test.go +1939 -0
- data/ext/vendor/golang.org/x/net/webdav/internal/xml/read.go +692 -0
- data/ext/vendor/golang.org/x/net/webdav/internal/xml/read_test.go +744 -0
- data/ext/vendor/golang.org/x/net/webdav/internal/xml/typeinfo.go +371 -0
- data/ext/vendor/golang.org/x/net/webdav/internal/xml/xml.go +1998 -0
- data/ext/vendor/golang.org/x/net/webdav/internal/xml/xml_test.go +752 -0
- data/ext/vendor/golang.org/x/net/webdav/litmus_test_server.go +94 -0
- data/ext/vendor/golang.org/x/net/webdav/lock.go +445 -0
- data/ext/vendor/golang.org/x/net/webdav/lock_test.go +731 -0
- data/ext/vendor/golang.org/x/net/webdav/prop.go +418 -0
- data/ext/vendor/golang.org/x/net/webdav/prop_test.go +613 -0
- data/ext/vendor/golang.org/x/net/webdav/webdav.go +702 -0
- data/ext/vendor/golang.org/x/net/webdav/webdav_test.go +344 -0
- data/ext/vendor/golang.org/x/net/webdav/xml.go +519 -0
- data/ext/vendor/golang.org/x/net/webdav/xml_test.go +906 -0
- data/ext/vendor/golang.org/x/net/websocket/client.go +106 -0
- data/ext/vendor/golang.org/x/net/websocket/dial.go +24 -0
- data/ext/vendor/golang.org/x/net/websocket/dial_test.go +43 -0
- data/ext/vendor/golang.org/x/net/websocket/exampledial_test.go +31 -0
- data/ext/vendor/golang.org/x/net/websocket/examplehandler_test.go +26 -0
- data/ext/vendor/golang.org/x/net/websocket/hybi.go +583 -0
- data/ext/vendor/golang.org/x/net/websocket/hybi_test.go +608 -0
- data/ext/vendor/golang.org/x/net/websocket/server.go +113 -0
- data/ext/vendor/golang.org/x/net/websocket/websocket.go +448 -0
- data/ext/vendor/golang.org/x/net/websocket/websocket_test.go +665 -0
- data/ext/vendor/golang.org/x/net/xsrftoken/xsrf.go +94 -0
- data/ext/vendor/golang.org/x/net/xsrftoken/xsrf_test.go +83 -0
- data/ext/vendor/golang.org/x/text/AUTHORS +3 -0
- data/ext/vendor/golang.org/x/text/CONTRIBUTING.md +31 -0
- data/ext/vendor/golang.org/x/text/CONTRIBUTORS +3 -0
- data/ext/vendor/golang.org/x/text/LICENSE +27 -0
- data/ext/vendor/golang.org/x/text/PATENTS +22 -0
- data/ext/vendor/golang.org/x/text/README.md +91 -0
- data/ext/vendor/golang.org/x/text/cases/cases.go +162 -0
- data/ext/vendor/golang.org/x/text/cases/context.go +376 -0
- data/ext/vendor/golang.org/x/text/cases/context_test.go +438 -0
- data/ext/vendor/golang.org/x/text/cases/example_test.go +53 -0
- data/ext/vendor/golang.org/x/text/cases/fold.go +34 -0
- data/ext/vendor/golang.org/x/text/cases/fold_test.go +51 -0
- data/ext/vendor/golang.org/x/text/cases/gen.go +839 -0
- data/ext/vendor/golang.org/x/text/cases/gen_trieval.go +219 -0
- data/ext/vendor/golang.org/x/text/cases/icu.go +61 -0
- data/ext/vendor/golang.org/x/text/cases/icu_test.go +210 -0
- data/ext/vendor/golang.org/x/text/cases/info.go +82 -0
- data/ext/vendor/golang.org/x/text/cases/map.go +816 -0
- data/ext/vendor/golang.org/x/text/cases/map_test.go +950 -0
- data/ext/vendor/golang.org/x/text/cases/tables.go +2251 -0
- data/ext/vendor/golang.org/x/text/cases/tables_test.go +1158 -0
- data/ext/vendor/golang.org/x/text/cases/trieval.go +215 -0
- data/ext/vendor/golang.org/x/text/cmd/gotext/doc.go +35 -0
- data/ext/vendor/golang.org/x/text/cmd/gotext/extract.go +195 -0
- data/ext/vendor/golang.org/x/text/cmd/gotext/main.go +356 -0
- data/ext/vendor/golang.org/x/text/cmd/gotext/message.go +127 -0
- data/ext/vendor/golang.org/x/text/codereview.cfg +1 -0
- data/ext/vendor/golang.org/x/text/collate/build/builder.go +702 -0
- data/ext/vendor/golang.org/x/text/collate/build/builder_test.go +290 -0
- data/ext/vendor/golang.org/x/text/collate/build/colelem.go +294 -0
- data/ext/vendor/golang.org/x/text/collate/build/colelem_test.go +215 -0
- data/ext/vendor/golang.org/x/text/collate/build/contract.go +309 -0
- data/ext/vendor/golang.org/x/text/collate/build/contract_test.go +266 -0
- data/ext/vendor/golang.org/x/text/collate/build/order.go +393 -0
- data/ext/vendor/golang.org/x/text/collate/build/order_test.go +229 -0
- data/ext/vendor/golang.org/x/text/collate/build/table.go +81 -0
- data/ext/vendor/golang.org/x/text/collate/build/trie.go +290 -0
- data/ext/vendor/golang.org/x/text/collate/build/trie_test.go +107 -0
- data/ext/vendor/golang.org/x/text/collate/collate.go +403 -0
- data/ext/vendor/golang.org/x/text/collate/collate_test.go +482 -0
- data/ext/vendor/golang.org/x/text/collate/export_test.go +51 -0
- data/ext/vendor/golang.org/x/text/collate/index.go +32 -0
- data/ext/vendor/golang.org/x/text/collate/maketables.go +553 -0
- data/ext/vendor/golang.org/x/text/collate/option.go +239 -0
- data/ext/vendor/golang.org/x/text/collate/option_test.go +209 -0
- data/ext/vendor/golang.org/x/text/collate/reg_test.go +230 -0
- data/ext/vendor/golang.org/x/text/collate/sort.go +81 -0
- data/ext/vendor/golang.org/x/text/collate/sort_test.go +55 -0
- data/ext/vendor/golang.org/x/text/collate/table_test.go +291 -0
- data/ext/vendor/golang.org/x/text/collate/tables.go +73789 -0
- data/ext/vendor/golang.org/x/text/collate/tools/colcmp/Makefile +7 -0
- data/ext/vendor/golang.org/x/text/collate/tools/colcmp/chars.go +1156 -0
- data/ext/vendor/golang.org/x/text/collate/tools/colcmp/col.go +97 -0
- data/ext/vendor/golang.org/x/text/collate/tools/colcmp/colcmp.go +529 -0
- data/ext/vendor/golang.org/x/text/collate/tools/colcmp/darwin.go +111 -0
- data/ext/vendor/golang.org/x/text/collate/tools/colcmp/gen.go +183 -0
- data/ext/vendor/golang.org/x/text/collate/tools/colcmp/icu.go +209 -0
- data/ext/vendor/golang.org/x/text/currency/common.go +66 -0
- data/ext/vendor/golang.org/x/text/currency/currency.go +185 -0
- data/ext/vendor/golang.org/x/text/currency/currency_test.go +171 -0
- data/ext/vendor/golang.org/x/text/currency/example_test.go +27 -0
- data/ext/vendor/golang.org/x/text/currency/format.go +215 -0
- data/ext/vendor/golang.org/x/text/currency/format_test.go +70 -0
- data/ext/vendor/golang.org/x/text/currency/gen.go +400 -0
- data/ext/vendor/golang.org/x/text/currency/gen_common.go +70 -0
- data/ext/vendor/golang.org/x/text/currency/query.go +152 -0
- data/ext/vendor/golang.org/x/text/currency/query_test.go +107 -0
- data/ext/vendor/golang.org/x/text/currency/tables.go +2574 -0
- data/ext/vendor/golang.org/x/text/currency/tables_test.go +93 -0
- data/ext/vendor/golang.org/x/text/doc.go +13 -0
- data/ext/vendor/golang.org/x/text/encoding/charmap/charmap.go +249 -0
- data/ext/vendor/golang.org/x/text/encoding/charmap/charmap_test.go +258 -0
- data/ext/vendor/golang.org/x/text/encoding/charmap/maketables.go +556 -0
- data/ext/vendor/golang.org/x/text/encoding/charmap/tables.go +7410 -0
- data/ext/vendor/golang.org/x/text/encoding/encoding.go +335 -0
- data/ext/vendor/golang.org/x/text/encoding/encoding_test.go +290 -0
- data/ext/vendor/golang.org/x/text/encoding/example_test.go +42 -0
- data/ext/vendor/golang.org/x/text/encoding/htmlindex/gen.go +173 -0
- data/ext/vendor/golang.org/x/text/encoding/htmlindex/htmlindex.go +86 -0
- data/ext/vendor/golang.org/x/text/encoding/htmlindex/htmlindex_test.go +144 -0
- data/ext/vendor/golang.org/x/text/encoding/htmlindex/map.go +105 -0
- data/ext/vendor/golang.org/x/text/encoding/htmlindex/tables.go +352 -0
- data/ext/vendor/golang.org/x/text/encoding/ianaindex/example_test.go +27 -0
- data/ext/vendor/golang.org/x/text/encoding/ianaindex/gen.go +192 -0
- data/ext/vendor/golang.org/x/text/encoding/ianaindex/ianaindex.go +209 -0
- data/ext/vendor/golang.org/x/text/encoding/ianaindex/ianaindex_test.go +192 -0
- data/ext/vendor/golang.org/x/text/encoding/ianaindex/tables.go +2348 -0
- data/ext/vendor/golang.org/x/text/encoding/internal/enctest/enctest.go +180 -0
- data/ext/vendor/golang.org/x/text/encoding/internal/identifier/gen.go +137 -0
- data/ext/vendor/golang.org/x/text/encoding/internal/identifier/identifier.go +81 -0
- data/ext/vendor/golang.org/x/text/encoding/internal/identifier/mib.go +1621 -0
- data/ext/vendor/golang.org/x/text/encoding/internal/internal.go +75 -0
- data/ext/vendor/golang.org/x/text/encoding/japanese/all.go +12 -0
- data/ext/vendor/golang.org/x/text/encoding/japanese/all_test.go +248 -0
- data/ext/vendor/golang.org/x/text/encoding/japanese/eucjp.go +225 -0
- data/ext/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go +299 -0
- data/ext/vendor/golang.org/x/text/encoding/japanese/maketables.go +161 -0
- data/ext/vendor/golang.org/x/text/encoding/japanese/shiftjis.go +189 -0
- data/ext/vendor/golang.org/x/text/encoding/japanese/tables.go +26971 -0
- data/ext/vendor/golang.org/x/text/encoding/korean/all_test.go +94 -0
- data/ext/vendor/golang.org/x/text/encoding/korean/euckr.go +177 -0
- data/ext/vendor/golang.org/x/text/encoding/korean/maketables.go +143 -0
- data/ext/vendor/golang.org/x/text/encoding/korean/tables.go +34152 -0
- data/ext/vendor/golang.org/x/text/encoding/simplifiedchinese/all.go +12 -0
- data/ext/vendor/golang.org/x/text/encoding/simplifiedchinese/all_test.go +143 -0
- data/ext/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go +269 -0
- data/ext/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go +245 -0
- data/ext/vendor/golang.org/x/text/encoding/simplifiedchinese/maketables.go +161 -0
- data/ext/vendor/golang.org/x/text/encoding/simplifiedchinese/tables.go +43999 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/candide-gb18030.txt +510 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/candide-utf-16le.txt +0 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/candide-utf-32be.txt +0 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/candide-utf-8.txt +510 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/candide-windows-1252.txt +510 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/rashomon-euc-jp.txt +178 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/rashomon-iso-2022-jp.txt +178 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/rashomon-shift-jis.txt +178 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/rashomon-utf-8.txt +178 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/sunzi-bingfa-gb-levels-1-and-2-hz-gb2312.txt +107 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/sunzi-bingfa-gb-levels-1-and-2-utf-8.txt +107 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/sunzi-bingfa-simplified-gbk.txt +107 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/sunzi-bingfa-simplified-utf-8.txt +107 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/sunzi-bingfa-traditional-big5.txt +106 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/sunzi-bingfa-traditional-utf-8.txt +106 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/unsu-joh-eun-nal-euc-kr.txt +175 -0
- data/ext/vendor/golang.org/x/text/encoding/testdata/unsu-joh-eun-nal-utf-8.txt +175 -0
- data/ext/vendor/golang.org/x/text/encoding/traditionalchinese/all_test.go +114 -0
- data/ext/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go +199 -0
- data/ext/vendor/golang.org/x/text/encoding/traditionalchinese/maketables.go +140 -0
- data/ext/vendor/golang.org/x/text/encoding/traditionalchinese/tables.go +37142 -0
- data/ext/vendor/golang.org/x/text/encoding/unicode/override.go +82 -0
- data/ext/vendor/golang.org/x/text/encoding/unicode/unicode.go +434 -0
- data/ext/vendor/golang.org/x/text/encoding/unicode/unicode_test.go +499 -0
- data/ext/vendor/golang.org/x/text/encoding/unicode/utf32/utf32.go +296 -0
- data/ext/vendor/golang.org/x/text/encoding/unicode/utf32/utf32_test.go +248 -0
- data/ext/vendor/golang.org/x/text/feature/plural/common.go +70 -0
- data/ext/vendor/golang.org/x/text/feature/plural/data_test.go +190 -0
- data/ext/vendor/golang.org/x/text/feature/plural/example_test.go +46 -0
- data/ext/vendor/golang.org/x/text/feature/plural/gen.go +513 -0
- data/ext/vendor/golang.org/x/text/feature/plural/gen_common.go +74 -0
- data/ext/vendor/golang.org/x/text/feature/plural/message.go +244 -0
- data/ext/vendor/golang.org/x/text/feature/plural/message_test.go +197 -0
- data/ext/vendor/golang.org/x/text/feature/plural/plural.go +258 -0
- data/ext/vendor/golang.org/x/text/feature/plural/plural_test.go +216 -0
- data/ext/vendor/golang.org/x/text/feature/plural/tables.go +540 -0
- data/ext/vendor/golang.org/x/text/gen.go +318 -0
- data/ext/vendor/golang.org/x/text/internal/catmsg/catmsg.go +366 -0
- data/ext/vendor/golang.org/x/text/internal/catmsg/catmsg_test.go +316 -0
- data/ext/vendor/golang.org/x/text/internal/catmsg/codec.go +407 -0
- data/ext/vendor/golang.org/x/text/internal/catmsg/varint.go +62 -0
- data/ext/vendor/golang.org/x/text/internal/catmsg/varint_test.go +123 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/collate_test.go +121 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/collelem.go +371 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/collelem_test.go +183 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/colltab.go +105 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/colltab_test.go +64 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/contract.go +145 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/contract_test.go +131 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/iter.go +178 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/iter_test.go +63 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/numeric.go +236 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/numeric_test.go +159 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/table.go +275 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/trie.go +159 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/trie_test.go +106 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/weighter.go +31 -0
- data/ext/vendor/golang.org/x/text/internal/colltab/weighter_test.go +42 -0
- data/ext/vendor/golang.org/x/text/internal/export/README +4 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/common_test.go +55 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/example_test.go +68 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/gen.go +276 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/gen_common.go +59 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/gen_test.go +91 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/gen_trieval.go +123 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/idna.go +717 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/idna_test.go +308 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/punycode.go +201 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/punycode_test.go +198 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/tables.go +4557 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/trie.go +70 -0
- data/ext/vendor/golang.org/x/text/internal/export/idna/trieval.go +119 -0
- data/ext/vendor/golang.org/x/text/internal/format/format.go +41 -0
- data/ext/vendor/golang.org/x/text/internal/gen.go +52 -0
- data/ext/vendor/golang.org/x/text/internal/gen/code.go +351 -0
- data/ext/vendor/golang.org/x/text/internal/gen/gen.go +281 -0
- data/ext/vendor/golang.org/x/text/internal/gen_test.go +38 -0
- data/ext/vendor/golang.org/x/text/internal/internal.go +51 -0
- data/ext/vendor/golang.org/x/text/internal/internal_test.go +38 -0
- data/ext/vendor/golang.org/x/text/internal/match.go +67 -0
- data/ext/vendor/golang.org/x/text/internal/match_test.go +56 -0
- data/ext/vendor/golang.org/x/text/internal/number/common.go +40 -0
- data/ext/vendor/golang.org/x/text/internal/number/decimal.go +498 -0
- data/ext/vendor/golang.org/x/text/internal/number/decimal_test.go +329 -0
- data/ext/vendor/golang.org/x/text/internal/number/format.go +540 -0
- data/ext/vendor/golang.org/x/text/internal/number/format_test.go +522 -0
- data/ext/vendor/golang.org/x/text/internal/number/gen.go +458 -0
- data/ext/vendor/golang.org/x/text/internal/number/gen_common.go +44 -0
- data/ext/vendor/golang.org/x/text/internal/number/number.go +154 -0
- data/ext/vendor/golang.org/x/text/internal/number/number_test.go +100 -0
- data/ext/vendor/golang.org/x/text/internal/number/pattern.go +485 -0
- data/ext/vendor/golang.org/x/text/internal/number/pattern_test.go +438 -0
- data/ext/vendor/golang.org/x/text/internal/number/roundingmode_string.go +16 -0
- data/ext/vendor/golang.org/x/text/internal/number/tables.go +1154 -0
- data/ext/vendor/golang.org/x/text/internal/number/tables_test.go +125 -0
- data/ext/vendor/golang.org/x/text/internal/stringset/set.go +86 -0
- data/ext/vendor/golang.org/x/text/internal/stringset/set_test.go +53 -0
- data/ext/vendor/golang.org/x/text/internal/tables.go +117 -0
- data/ext/vendor/golang.org/x/text/internal/tag/tag.go +100 -0
- data/ext/vendor/golang.org/x/text/internal/tag/tag_test.go +67 -0
- data/ext/vendor/golang.org/x/text/internal/testtext/codesize.go +53 -0
- data/ext/vendor/golang.org/x/text/internal/testtext/flag.go +22 -0
- data/ext/vendor/golang.org/x/text/internal/testtext/gc.go +14 -0
- data/ext/vendor/golang.org/x/text/internal/testtext/gccgo.go +11 -0
- data/ext/vendor/golang.org/x/text/internal/testtext/go1_6.go +23 -0
- data/ext/vendor/golang.org/x/text/internal/testtext/go1_7.go +17 -0
- data/ext/vendor/golang.org/x/text/internal/testtext/text.go +105 -0
- data/ext/vendor/golang.org/x/text/internal/triegen/compact.go +58 -0
- data/ext/vendor/golang.org/x/text/internal/triegen/data_test.go +875 -0
- data/ext/vendor/golang.org/x/text/internal/triegen/example_compact_test.go +71 -0
- data/ext/vendor/golang.org/x/text/internal/triegen/example_test.go +148 -0
- data/ext/vendor/golang.org/x/text/internal/triegen/gen_test.go +68 -0
- data/ext/vendor/golang.org/x/text/internal/triegen/print.go +251 -0
- data/ext/vendor/golang.org/x/text/internal/triegen/triegen.go +494 -0
- data/ext/vendor/golang.org/x/text/internal/ucd/example_test.go +81 -0
- data/ext/vendor/golang.org/x/text/internal/ucd/ucd.go +371 -0
- data/ext/vendor/golang.org/x/text/internal/ucd/ucd_test.go +105 -0
- data/ext/vendor/golang.org/x/text/internal/utf8internal/utf8internal.go +87 -0
- data/ext/vendor/golang.org/x/text/language/Makefile +16 -0
- data/ext/vendor/golang.org/x/text/language/common.go +16 -0
- data/ext/vendor/golang.org/x/text/language/coverage.go +197 -0
- data/ext/vendor/golang.org/x/text/language/coverage_test.go +154 -0
- data/ext/vendor/golang.org/x/text/language/display/dict.go +92 -0
- data/ext/vendor/golang.org/x/text/language/display/dict_test.go +39 -0
- data/ext/vendor/golang.org/x/text/language/display/display.go +420 -0
- data/ext/vendor/golang.org/x/text/language/display/display_test.go +705 -0
- data/ext/vendor/golang.org/x/text/language/display/examples_test.go +116 -0
- data/ext/vendor/golang.org/x/text/language/display/lookup.go +251 -0
- data/ext/vendor/golang.org/x/text/language/display/maketables.go +602 -0
- data/ext/vendor/golang.org/x/text/language/display/tables.go +50344 -0
- data/ext/vendor/golang.org/x/text/language/doc.go +102 -0
- data/ext/vendor/golang.org/x/text/language/examples_test.go +413 -0
- data/ext/vendor/golang.org/x/text/language/gen.go +1706 -0
- data/ext/vendor/golang.org/x/text/language/gen_common.go +20 -0
- data/ext/vendor/golang.org/x/text/language/gen_index.go +162 -0
- data/ext/vendor/golang.org/x/text/language/go1_1.go +38 -0
- data/ext/vendor/golang.org/x/text/language/go1_2.go +11 -0
- data/ext/vendor/golang.org/x/text/language/httpexample_test.go +48 -0
- data/ext/vendor/golang.org/x/text/language/index.go +769 -0
- data/ext/vendor/golang.org/x/text/language/language.go +887 -0
- data/ext/vendor/golang.org/x/text/language/language_test.go +878 -0
- data/ext/vendor/golang.org/x/text/language/lookup.go +396 -0
- data/ext/vendor/golang.org/x/text/language/lookup_test.go +457 -0
- data/ext/vendor/golang.org/x/text/language/match.go +933 -0
- data/ext/vendor/golang.org/x/text/language/match_test.go +505 -0
- data/ext/vendor/golang.org/x/text/language/parse.go +859 -0
- data/ext/vendor/golang.org/x/text/language/parse_test.go +517 -0
- data/ext/vendor/golang.org/x/text/language/tables.go +3675 -0
- data/ext/vendor/golang.org/x/text/language/tags.go +143 -0
- data/ext/vendor/golang.org/x/text/language/testdata/CLDRLocaleMatcherTest.txt +389 -0
- data/ext/vendor/golang.org/x/text/language/testdata/GoLocaleMatcherTest.txt +226 -0
- data/ext/vendor/golang.org/x/text/message/catalog.go +28 -0
- data/ext/vendor/golang.org/x/text/message/catalog/catalog.go +292 -0
- data/ext/vendor/golang.org/x/text/message/catalog/catalog_test.go +194 -0
- data/ext/vendor/golang.org/x/text/message/catalog/dict.go +90 -0
- data/ext/vendor/golang.org/x/text/message/doc.go +100 -0
- data/ext/vendor/golang.org/x/text/message/examples_test.go +42 -0
- data/ext/vendor/golang.org/x/text/message/fmt_test.go +1889 -0
- data/ext/vendor/golang.org/x/text/message/format.go +532 -0
- data/ext/vendor/golang.org/x/text/message/message.go +169 -0
- data/ext/vendor/golang.org/x/text/message/message_test.go +181 -0
- data/ext/vendor/golang.org/x/text/message/print.go +1194 -0
- data/ext/vendor/golang.org/x/text/number/doc.go +28 -0
- data/ext/vendor/golang.org/x/text/number/examples_test.go +28 -0
- data/ext/vendor/golang.org/x/text/number/format.go +122 -0
- data/ext/vendor/golang.org/x/text/number/format_test.go +107 -0
- data/ext/vendor/golang.org/x/text/number/number.go +77 -0
- data/ext/vendor/golang.org/x/text/number/number_test.go +190 -0
- data/ext/vendor/golang.org/x/text/number/option.go +177 -0
- data/ext/vendor/golang.org/x/text/runes/cond.go +187 -0
- data/ext/vendor/golang.org/x/text/runes/cond_test.go +282 -0
- data/ext/vendor/golang.org/x/text/runes/example_test.go +60 -0
- data/ext/vendor/golang.org/x/text/runes/runes.go +355 -0
- data/ext/vendor/golang.org/x/text/runes/runes_test.go +664 -0
- data/ext/vendor/golang.org/x/text/search/index.go +35 -0
- data/ext/vendor/golang.org/x/text/search/pattern.go +155 -0
- data/ext/vendor/golang.org/x/text/search/pattern_test.go +357 -0
- data/ext/vendor/golang.org/x/text/search/search.go +237 -0
- data/ext/vendor/golang.org/x/text/search/tables.go +12448 -0
- data/ext/vendor/golang.org/x/text/secure/bidirule/bench_test.go +54 -0
- data/ext/vendor/golang.org/x/text/secure/bidirule/bidirule.go +340 -0
- data/ext/vendor/golang.org/x/text/secure/bidirule/bidirule_test.go +851 -0
- data/ext/vendor/golang.org/x/text/secure/doc.go +6 -0
- data/ext/vendor/golang.org/x/text/secure/precis/benchmark_test.go +82 -0
- data/ext/vendor/golang.org/x/text/secure/precis/class.go +36 -0
- data/ext/vendor/golang.org/x/text/secure/precis/class_test.go +50 -0
- data/ext/vendor/golang.org/x/text/secure/precis/context.go +139 -0
- data/ext/vendor/golang.org/x/text/secure/precis/doc.go +14 -0
- data/ext/vendor/golang.org/x/text/secure/precis/enforce_test.go +396 -0
- data/ext/vendor/golang.org/x/text/secure/precis/gen.go +310 -0
- data/ext/vendor/golang.org/x/text/secure/precis/gen_trieval.go +68 -0
- data/ext/vendor/golang.org/x/text/secure/precis/nickname.go +72 -0
- data/ext/vendor/golang.org/x/text/secure/precis/options.go +157 -0
- data/ext/vendor/golang.org/x/text/secure/precis/profile.go +402 -0
- data/ext/vendor/golang.org/x/text/secure/precis/profile_test.go +149 -0
- data/ext/vendor/golang.org/x/text/secure/precis/profiles.go +78 -0
- data/ext/vendor/golang.org/x/text/secure/precis/tables.go +3887 -0
- data/ext/vendor/golang.org/x/text/secure/precis/tables_test.go +69 -0
- data/ext/vendor/golang.org/x/text/secure/precis/transformer.go +32 -0
- data/ext/vendor/golang.org/x/text/secure/precis/trieval.go +64 -0
- data/ext/vendor/golang.org/x/text/transform/examples_test.go +37 -0
- data/ext/vendor/golang.org/x/text/transform/transform.go +705 -0
- data/ext/vendor/golang.org/x/text/transform/transform_test.go +1317 -0
- data/ext/vendor/golang.org/x/text/unicode/bidi/bidi.go +198 -0
- data/ext/vendor/golang.org/x/text/unicode/bidi/bracket.go +335 -0
- data/ext/vendor/golang.org/x/text/unicode/bidi/core.go +1058 -0
- data/ext/vendor/golang.org/x/text/unicode/bidi/core_test.go +224 -0
- data/ext/vendor/golang.org/x/text/unicode/bidi/gen.go +133 -0
- data/ext/vendor/golang.org/x/text/unicode/bidi/gen_ranges.go +57 -0
- data/ext/vendor/golang.org/x/text/unicode/bidi/gen_trieval.go +64 -0
- data/ext/vendor/golang.org/x/text/unicode/bidi/prop.go +206 -0
- data/ext/vendor/golang.org/x/text/unicode/bidi/ranges_test.go +53 -0
- data/ext/vendor/golang.org/x/text/unicode/bidi/tables.go +1813 -0
- data/ext/vendor/golang.org/x/text/unicode/bidi/tables_test.go +82 -0
- data/ext/vendor/golang.org/x/text/unicode/bidi/trieval.go +60 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/base.go +100 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/cldr.go +130 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/cldr_test.go +27 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/collate.go +359 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/collate_test.go +275 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/data_test.go +186 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/decode.go +171 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/examples_test.go +21 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/makexml.go +400 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/resolve.go +602 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/resolve_test.go +368 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/slice.go +144 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/slice_test.go +175 -0
- data/ext/vendor/golang.org/x/text/unicode/cldr/xml.go +1487 -0
- data/ext/vendor/golang.org/x/text/unicode/doc.go +8 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/composition.go +508 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/composition_test.go +130 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/example_iter_test.go +82 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/example_test.go +27 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/forminfo.go +259 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/forminfo_test.go +54 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/input.go +109 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/iter.go +457 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/iter_test.go +98 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/maketables.go +976 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/norm_test.go +14 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/normalize.go +609 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/normalize_test.go +1287 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/readwriter.go +125 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/readwriter_test.go +56 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/tables.go +7651 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/transform.go +88 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/transform_test.go +101 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/trie.go +54 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/triegen.go +117 -0
- data/ext/vendor/golang.org/x/text/unicode/norm/ucd_test.go +275 -0
- data/ext/vendor/golang.org/x/text/unicode/rangetable/gen.go +115 -0
- data/ext/vendor/golang.org/x/text/unicode/rangetable/merge.go +260 -0
- data/ext/vendor/golang.org/x/text/unicode/rangetable/merge_test.go +184 -0
- data/ext/vendor/golang.org/x/text/unicode/rangetable/rangetable.go +70 -0
- data/ext/vendor/golang.org/x/text/unicode/rangetable/rangetable_test.go +55 -0
- data/ext/vendor/golang.org/x/text/unicode/rangetable/tables.go +6376 -0
- data/ext/vendor/golang.org/x/text/unicode/runenames/bits.go +59 -0
- data/ext/vendor/golang.org/x/text/unicode/runenames/example_test.go +118 -0
- data/ext/vendor/golang.org/x/text/unicode/runenames/gen.go +195 -0
- data/ext/vendor/golang.org/x/text/unicode/runenames/gen_bits.go +63 -0
- data/ext/vendor/golang.org/x/text/unicode/runenames/runenames.go +48 -0
- data/ext/vendor/golang.org/x/text/unicode/runenames/runenames_test.go +46 -0
- data/ext/vendor/golang.org/x/text/unicode/runenames/tables.go +15514 -0
- data/ext/vendor/golang.org/x/text/width/common_test.go +92 -0
- data/ext/vendor/golang.org/x/text/width/example_test.go +52 -0
- data/ext/vendor/golang.org/x/text/width/gen.go +115 -0
- data/ext/vendor/golang.org/x/text/width/gen_common.go +96 -0
- data/ext/vendor/golang.org/x/text/width/gen_trieval.go +34 -0
- data/ext/vendor/golang.org/x/text/width/kind_string.go +16 -0
- data/ext/vendor/golang.org/x/text/width/runes_test.go +461 -0
- data/ext/vendor/golang.org/x/text/width/tables.go +1316 -0
- data/ext/vendor/golang.org/x/text/width/tables_test.go +59 -0
- data/ext/vendor/golang.org/x/text/width/transform.go +239 -0
- data/ext/vendor/golang.org/x/text/width/transform_test.go +701 -0
- data/ext/vendor/golang.org/x/text/width/trieval.go +30 -0
- data/ext/vendor/golang.org/x/text/width/width.go +206 -0
- data/lib/ires/version.rb +1 -1
- data/shared/darwin/ires.so +0 -0
- data/shared/linux/ires.so +0 -0
- metadata +1011 -23
- data/ext/operate/image.go +0 -176
- data/ext/util/uri/uri.go +0 -105
- data/ext/vendor/github.com/satori/go.uuid/README.md +0 -65
- data/ext/vendor/github.com/satori/go.uuid/benchmarks_test.go +0 -121
- data/ext/vendor/github.com/satori/go.uuid/uuid.go +0 -488
- data/ext/vendor/github.com/satori/go.uuid/uuid_test.go +0 -633
@@ -0,0 +1,53 @@
|
|
1
|
+
// Copyright 2014 The Go Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style
|
3
|
+
// license that can be found in the LICENSE file.
|
4
|
+
|
5
|
+
package cases_test
|
6
|
+
|
7
|
+
import (
|
8
|
+
"fmt"
|
9
|
+
|
10
|
+
"golang.org/x/text/cases"
|
11
|
+
"golang.org/x/text/language"
|
12
|
+
)
|
13
|
+
|
14
|
+
func Example() {
|
15
|
+
src := []string{
|
16
|
+
"hello world!",
|
17
|
+
"i with dot",
|
18
|
+
"'n ijsberg",
|
19
|
+
"here comes O'Brian",
|
20
|
+
}
|
21
|
+
for _, c := range []cases.Caser{
|
22
|
+
cases.Lower(language.Und),
|
23
|
+
cases.Upper(language.Turkish),
|
24
|
+
cases.Title(language.Dutch),
|
25
|
+
cases.Title(language.Und, cases.NoLower),
|
26
|
+
} {
|
27
|
+
fmt.Println()
|
28
|
+
for _, s := range src {
|
29
|
+
fmt.Println(c.String(s))
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
// Output:
|
34
|
+
// hello world!
|
35
|
+
// i with dot
|
36
|
+
// 'n ijsberg
|
37
|
+
// here comes o'brian
|
38
|
+
//
|
39
|
+
// HELLO WORLD!
|
40
|
+
// İ WİTH DOT
|
41
|
+
// 'N İJSBERG
|
42
|
+
// HERE COMES O'BRİAN
|
43
|
+
//
|
44
|
+
// Hello World!
|
45
|
+
// I With Dot
|
46
|
+
// 'n IJsberg
|
47
|
+
// Here Comes O'brian
|
48
|
+
//
|
49
|
+
// Hello World!
|
50
|
+
// I With Dot
|
51
|
+
// 'N Ijsberg
|
52
|
+
// Here Comes O'Brian
|
53
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// Copyright 2016 The Go Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style
|
3
|
+
// license that can be found in the LICENSE file.
|
4
|
+
|
5
|
+
package cases
|
6
|
+
|
7
|
+
import "golang.org/x/text/transform"
|
8
|
+
|
9
|
+
type caseFolder struct{ transform.NopResetter }
|
10
|
+
|
11
|
+
// caseFolder implements the Transformer interface for doing case folding.
|
12
|
+
func (t *caseFolder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
|
13
|
+
c := context{dst: dst, src: src, atEOF: atEOF}
|
14
|
+
for c.next() {
|
15
|
+
foldFull(&c)
|
16
|
+
c.checkpoint()
|
17
|
+
}
|
18
|
+
return c.ret()
|
19
|
+
}
|
20
|
+
|
21
|
+
func (t *caseFolder) Span(src []byte, atEOF bool) (n int, err error) {
|
22
|
+
c := context{src: src, atEOF: atEOF}
|
23
|
+
for c.next() && isFoldFull(&c) {
|
24
|
+
c.checkpoint()
|
25
|
+
}
|
26
|
+
return c.retSpan()
|
27
|
+
}
|
28
|
+
|
29
|
+
func makeFold(o options) transform.SpanningTransformer {
|
30
|
+
// TODO: Special case folding, through option Language, Special/Turkic, or
|
31
|
+
// both.
|
32
|
+
// TODO: Implement Compact options.
|
33
|
+
return &caseFolder{}
|
34
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
// Copyright 2016 The Go Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style
|
3
|
+
// license that can be found in the LICENSE file.
|
4
|
+
|
5
|
+
package cases
|
6
|
+
|
7
|
+
import (
|
8
|
+
"testing"
|
9
|
+
|
10
|
+
"golang.org/x/text/internal/testtext"
|
11
|
+
)
|
12
|
+
|
13
|
+
var foldTestCases = []string{
|
14
|
+
"βß\u13f8", // "βssᏰ"
|
15
|
+
"ab\u13fc\uab7aꭰ", // abᏴᎪᎠ
|
16
|
+
"affifflast", // affifflast
|
17
|
+
"Iİiı\u0345", // ii̇iıι
|
18
|
+
"µµΜΜςσΣΣ", // μμμμσσσσ
|
19
|
+
}
|
20
|
+
|
21
|
+
func TestFold(t *testing.T) {
|
22
|
+
for _, tc := range foldTestCases {
|
23
|
+
testEntry := func(name string, c Caser, m func(r rune) string) {
|
24
|
+
want := ""
|
25
|
+
for _, r := range tc {
|
26
|
+
want += m(r)
|
27
|
+
}
|
28
|
+
if got := c.String(tc); got != want {
|
29
|
+
t.Errorf("%s(%s) = %+q; want %+q", name, tc, got, want)
|
30
|
+
}
|
31
|
+
dst := make([]byte, 256) // big enough to hold any result
|
32
|
+
src := []byte(tc)
|
33
|
+
v := testtext.AllocsPerRun(20, func() {
|
34
|
+
c.Transform(dst, src, true)
|
35
|
+
})
|
36
|
+
if v > 0 {
|
37
|
+
t.Errorf("%s(%s): number of allocs was %f; want 0", name, tc, v)
|
38
|
+
}
|
39
|
+
}
|
40
|
+
testEntry("FullFold", Fold(), func(r rune) string {
|
41
|
+
return runeFoldData(r).full
|
42
|
+
})
|
43
|
+
// TODO:
|
44
|
+
// testEntry("SimpleFold", Fold(Compact), func(r rune) string {
|
45
|
+
// return runeFoldData(r).simple
|
46
|
+
// })
|
47
|
+
// testEntry("SpecialFold", Fold(Turkic), func(r rune) string {
|
48
|
+
// return runeFoldData(r).special
|
49
|
+
// })
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,839 @@
|
|
1
|
+
// Copyright 2014 The Go Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style
|
3
|
+
// license that can be found in the LICENSE file.
|
4
|
+
|
5
|
+
// +build ignore
|
6
|
+
|
7
|
+
// This program generates the trie for casing operations. The Unicode casing
|
8
|
+
// algorithm requires the lookup of various properties and mappings for each
|
9
|
+
// rune. The table generated by this generator combines several of the most
|
10
|
+
// frequently used of these into a single trie so that they can be accessed
|
11
|
+
// with a single lookup.
|
12
|
+
package main
|
13
|
+
|
14
|
+
import (
|
15
|
+
"bytes"
|
16
|
+
"fmt"
|
17
|
+
"io"
|
18
|
+
"io/ioutil"
|
19
|
+
"log"
|
20
|
+
"reflect"
|
21
|
+
"strconv"
|
22
|
+
"strings"
|
23
|
+
"unicode"
|
24
|
+
|
25
|
+
"golang.org/x/text/internal/gen"
|
26
|
+
"golang.org/x/text/internal/triegen"
|
27
|
+
"golang.org/x/text/internal/ucd"
|
28
|
+
"golang.org/x/text/unicode/norm"
|
29
|
+
)
|
30
|
+
|
31
|
+
func main() {
|
32
|
+
gen.Init()
|
33
|
+
genTables()
|
34
|
+
genTablesTest()
|
35
|
+
gen.Repackage("gen_trieval.go", "trieval.go", "cases")
|
36
|
+
}
|
37
|
+
|
38
|
+
// runeInfo contains all information for a rune that we care about for casing
|
39
|
+
// operations.
|
40
|
+
type runeInfo struct {
|
41
|
+
Rune rune
|
42
|
+
|
43
|
+
entry info // trie value for this rune.
|
44
|
+
|
45
|
+
CaseMode info
|
46
|
+
|
47
|
+
// Simple case mappings.
|
48
|
+
Simple [1 + maxCaseMode][]rune
|
49
|
+
|
50
|
+
// Special casing
|
51
|
+
HasSpecial bool
|
52
|
+
Conditional bool
|
53
|
+
Special [1 + maxCaseMode][]rune
|
54
|
+
|
55
|
+
// Folding
|
56
|
+
FoldSimple rune
|
57
|
+
FoldSpecial rune
|
58
|
+
FoldFull []rune
|
59
|
+
|
60
|
+
// TODO: FC_NFKC, or equivalent data.
|
61
|
+
|
62
|
+
// Properties
|
63
|
+
SoftDotted bool
|
64
|
+
CaseIgnorable bool
|
65
|
+
Cased bool
|
66
|
+
DecomposeGreek bool
|
67
|
+
BreakType string
|
68
|
+
BreakCat breakCategory
|
69
|
+
|
70
|
+
// We care mostly about 0, Above, and IotaSubscript.
|
71
|
+
CCC byte
|
72
|
+
}
|
73
|
+
|
74
|
+
type breakCategory int
|
75
|
+
|
76
|
+
const (
|
77
|
+
breakBreak breakCategory = iota
|
78
|
+
breakLetter
|
79
|
+
breakMid
|
80
|
+
)
|
81
|
+
|
82
|
+
// mapping returns the case mapping for the given case type.
|
83
|
+
func (r *runeInfo) mapping(c info) string {
|
84
|
+
if r.HasSpecial {
|
85
|
+
return string(r.Special[c])
|
86
|
+
}
|
87
|
+
if len(r.Simple[c]) != 0 {
|
88
|
+
return string(r.Simple[c])
|
89
|
+
}
|
90
|
+
return string(r.Rune)
|
91
|
+
}
|
92
|
+
|
93
|
+
func parse(file string, f func(p *ucd.Parser)) {
|
94
|
+
ucd.Parse(gen.OpenUCDFile(file), f)
|
95
|
+
}
|
96
|
+
|
97
|
+
func parseUCD() []runeInfo {
|
98
|
+
chars := make([]runeInfo, unicode.MaxRune)
|
99
|
+
|
100
|
+
get := func(r rune) *runeInfo {
|
101
|
+
c := &chars[r]
|
102
|
+
c.Rune = r
|
103
|
+
return c
|
104
|
+
}
|
105
|
+
|
106
|
+
parse("UnicodeData.txt", func(p *ucd.Parser) {
|
107
|
+
ri := get(p.Rune(0))
|
108
|
+
ri.CCC = byte(p.Int(ucd.CanonicalCombiningClass))
|
109
|
+
ri.Simple[cLower] = p.Runes(ucd.SimpleLowercaseMapping)
|
110
|
+
ri.Simple[cUpper] = p.Runes(ucd.SimpleUppercaseMapping)
|
111
|
+
ri.Simple[cTitle] = p.Runes(ucd.SimpleTitlecaseMapping)
|
112
|
+
if p.String(ucd.GeneralCategory) == "Lt" {
|
113
|
+
ri.CaseMode = cTitle
|
114
|
+
}
|
115
|
+
})
|
116
|
+
|
117
|
+
// <code>; <property>
|
118
|
+
parse("PropList.txt", func(p *ucd.Parser) {
|
119
|
+
if p.String(1) == "Soft_Dotted" {
|
120
|
+
chars[p.Rune(0)].SoftDotted = true
|
121
|
+
}
|
122
|
+
})
|
123
|
+
|
124
|
+
// <code>; <word break type>
|
125
|
+
parse("DerivedCoreProperties.txt", func(p *ucd.Parser) {
|
126
|
+
ri := get(p.Rune(0))
|
127
|
+
switch p.String(1) {
|
128
|
+
case "Case_Ignorable":
|
129
|
+
ri.CaseIgnorable = true
|
130
|
+
case "Cased":
|
131
|
+
ri.Cased = true
|
132
|
+
case "Lowercase":
|
133
|
+
ri.CaseMode = cLower
|
134
|
+
case "Uppercase":
|
135
|
+
ri.CaseMode = cUpper
|
136
|
+
}
|
137
|
+
})
|
138
|
+
|
139
|
+
// <code>; <lower> ; <title> ; <upper> ; (<condition_list> ;)?
|
140
|
+
parse("SpecialCasing.txt", func(p *ucd.Parser) {
|
141
|
+
// We drop all conditional special casing and deal with them manually in
|
142
|
+
// the language-specific case mappers. Rune 0x03A3 is the only one with
|
143
|
+
// a conditional formatting that is not language-specific. However,
|
144
|
+
// dealing with this letter is tricky, especially in a streaming
|
145
|
+
// context, so we deal with it in the Caser for Greek specifically.
|
146
|
+
ri := get(p.Rune(0))
|
147
|
+
if p.String(4) == "" {
|
148
|
+
ri.HasSpecial = true
|
149
|
+
ri.Special[cLower] = p.Runes(1)
|
150
|
+
ri.Special[cTitle] = p.Runes(2)
|
151
|
+
ri.Special[cUpper] = p.Runes(3)
|
152
|
+
} else {
|
153
|
+
ri.Conditional = true
|
154
|
+
}
|
155
|
+
})
|
156
|
+
|
157
|
+
// TODO: Use text breaking according to UAX #29.
|
158
|
+
// <code>; <word break type>
|
159
|
+
parse("auxiliary/WordBreakProperty.txt", func(p *ucd.Parser) {
|
160
|
+
ri := get(p.Rune(0))
|
161
|
+
ri.BreakType = p.String(1)
|
162
|
+
|
163
|
+
// We collapse the word breaking properties onto the categories we need.
|
164
|
+
switch p.String(1) { // TODO: officially we need to canonicalize.
|
165
|
+
case "MidLetter", "MidNumLet", "Single_Quote":
|
166
|
+
ri.BreakCat = breakMid
|
167
|
+
if !ri.CaseIgnorable {
|
168
|
+
// finalSigma relies on the fact that all breakMid runes are
|
169
|
+
// also a Case_Ignorable. Revisit this code when this changes.
|
170
|
+
log.Fatalf("Rune %U, which has a break category mid, is not a case ignorable", ri)
|
171
|
+
}
|
172
|
+
case "ALetter", "Hebrew_Letter", "Numeric", "Extend", "ExtendNumLet", "Format", "ZWJ":
|
173
|
+
ri.BreakCat = breakLetter
|
174
|
+
}
|
175
|
+
})
|
176
|
+
|
177
|
+
// <code>; <type>; <mapping>
|
178
|
+
parse("CaseFolding.txt", func(p *ucd.Parser) {
|
179
|
+
ri := get(p.Rune(0))
|
180
|
+
switch p.String(1) {
|
181
|
+
case "C":
|
182
|
+
ri.FoldSimple = p.Rune(2)
|
183
|
+
ri.FoldFull = p.Runes(2)
|
184
|
+
case "S":
|
185
|
+
ri.FoldSimple = p.Rune(2)
|
186
|
+
case "T":
|
187
|
+
ri.FoldSpecial = p.Rune(2)
|
188
|
+
case "F":
|
189
|
+
ri.FoldFull = p.Runes(2)
|
190
|
+
default:
|
191
|
+
log.Fatalf("%U: unknown type: %s", p.Rune(0), p.String(1))
|
192
|
+
}
|
193
|
+
})
|
194
|
+
|
195
|
+
return chars
|
196
|
+
}
|
197
|
+
|
198
|
+
func genTables() {
|
199
|
+
chars := parseUCD()
|
200
|
+
verifyProperties(chars)
|
201
|
+
|
202
|
+
t := triegen.NewTrie("case")
|
203
|
+
for i := range chars {
|
204
|
+
c := &chars[i]
|
205
|
+
makeEntry(c)
|
206
|
+
t.Insert(rune(i), uint64(c.entry))
|
207
|
+
}
|
208
|
+
|
209
|
+
w := gen.NewCodeWriter()
|
210
|
+
defer w.WriteGoFile("tables.go", "cases")
|
211
|
+
|
212
|
+
gen.WriteUnicodeVersion(w)
|
213
|
+
|
214
|
+
// TODO: write CLDR version after adding a mechanism to detect that the
|
215
|
+
// tables on which the manually created locale-sensitive casing code is
|
216
|
+
// based hasn't changed.
|
217
|
+
|
218
|
+
w.WriteVar("xorData", string(xorData))
|
219
|
+
w.WriteVar("exceptions", string(exceptionData))
|
220
|
+
|
221
|
+
sz, err := t.Gen(w, triegen.Compact(&sparseCompacter{}))
|
222
|
+
if err != nil {
|
223
|
+
log.Fatal(err)
|
224
|
+
}
|
225
|
+
w.Size += sz
|
226
|
+
}
|
227
|
+
|
228
|
+
func makeEntry(ri *runeInfo) {
|
229
|
+
if ri.CaseIgnorable {
|
230
|
+
if ri.Cased {
|
231
|
+
ri.entry = cIgnorableCased
|
232
|
+
} else {
|
233
|
+
ri.entry = cIgnorableUncased
|
234
|
+
}
|
235
|
+
} else {
|
236
|
+
ri.entry = ri.CaseMode
|
237
|
+
}
|
238
|
+
|
239
|
+
// TODO: handle soft-dotted.
|
240
|
+
|
241
|
+
ccc := cccOther
|
242
|
+
switch ri.CCC {
|
243
|
+
case 0: // Not_Reordered
|
244
|
+
ccc = cccZero
|
245
|
+
case above: // Above
|
246
|
+
ccc = cccAbove
|
247
|
+
}
|
248
|
+
switch ri.BreakCat {
|
249
|
+
case breakBreak:
|
250
|
+
ccc = cccBreak
|
251
|
+
case breakMid:
|
252
|
+
ri.entry |= isMidBit
|
253
|
+
}
|
254
|
+
|
255
|
+
ri.entry |= ccc
|
256
|
+
|
257
|
+
if ri.CaseMode == cUncased {
|
258
|
+
return
|
259
|
+
}
|
260
|
+
|
261
|
+
// Need to do something special.
|
262
|
+
if ri.CaseMode == cTitle || ri.HasSpecial || ri.mapping(cTitle) != ri.mapping(cUpper) {
|
263
|
+
makeException(ri)
|
264
|
+
return
|
265
|
+
}
|
266
|
+
if f := string(ri.FoldFull); len(f) > 0 && f != ri.mapping(cUpper) && f != ri.mapping(cLower) {
|
267
|
+
makeException(ri)
|
268
|
+
return
|
269
|
+
}
|
270
|
+
|
271
|
+
// Rune is either lowercase or uppercase.
|
272
|
+
|
273
|
+
orig := string(ri.Rune)
|
274
|
+
mapped := ""
|
275
|
+
if ri.CaseMode == cUpper {
|
276
|
+
mapped = ri.mapping(cLower)
|
277
|
+
} else {
|
278
|
+
mapped = ri.mapping(cUpper)
|
279
|
+
}
|
280
|
+
|
281
|
+
if len(orig) != len(mapped) {
|
282
|
+
makeException(ri)
|
283
|
+
return
|
284
|
+
}
|
285
|
+
|
286
|
+
if string(ri.FoldFull) == ri.mapping(cUpper) {
|
287
|
+
ri.entry |= inverseFoldBit
|
288
|
+
}
|
289
|
+
|
290
|
+
n := len(orig)
|
291
|
+
|
292
|
+
// Create per-byte XOR mask.
|
293
|
+
var b []byte
|
294
|
+
for i := 0; i < n; i++ {
|
295
|
+
b = append(b, orig[i]^mapped[i])
|
296
|
+
}
|
297
|
+
|
298
|
+
// Remove leading 0 bytes, but keep at least one byte.
|
299
|
+
for ; len(b) > 1 && b[0] == 0; b = b[1:] {
|
300
|
+
}
|
301
|
+
|
302
|
+
if len(b) == 1 && b[0]&0xc0 == 0 {
|
303
|
+
ri.entry |= info(b[0]) << xorShift
|
304
|
+
return
|
305
|
+
}
|
306
|
+
|
307
|
+
key := string(b)
|
308
|
+
x, ok := xorCache[key]
|
309
|
+
if !ok {
|
310
|
+
xorData = append(xorData, 0) // for detecting start of sequence
|
311
|
+
xorData = append(xorData, b...)
|
312
|
+
|
313
|
+
x = len(xorData) - 1
|
314
|
+
xorCache[key] = x
|
315
|
+
}
|
316
|
+
ri.entry |= info(x<<xorShift) | xorIndexBit
|
317
|
+
}
|
318
|
+
|
319
|
+
var xorCache = map[string]int{}
|
320
|
+
|
321
|
+
// xorData contains byte-wise XOR data for the least significant bytes of a
|
322
|
+
// UTF-8 encoded rune. An index points to the last byte. The sequence starts
|
323
|
+
// with a zero terminator.
|
324
|
+
var xorData = []byte{}
|
325
|
+
|
326
|
+
// See the comments in gen_trieval.go re "the exceptions slice".
|
327
|
+
var exceptionData = []byte{0}
|
328
|
+
|
329
|
+
// makeException encodes case mappings that cannot be expressed in a simple
|
330
|
+
// XOR diff.
|
331
|
+
func makeException(ri *runeInfo) {
|
332
|
+
ccc := ri.entry & cccMask
|
333
|
+
// Set exception bit and retain case type.
|
334
|
+
ri.entry &= 0x0007
|
335
|
+
ri.entry |= exceptionBit
|
336
|
+
|
337
|
+
if len(exceptionData) >= 1<<numExceptionBits {
|
338
|
+
log.Fatalf("%U:exceptionData too large %x > %d bits", ri.Rune, len(exceptionData), numExceptionBits)
|
339
|
+
}
|
340
|
+
|
341
|
+
// Set the offset in the exceptionData array.
|
342
|
+
ri.entry |= info(len(exceptionData) << exceptionShift)
|
343
|
+
|
344
|
+
orig := string(ri.Rune)
|
345
|
+
tc := ri.mapping(cTitle)
|
346
|
+
uc := ri.mapping(cUpper)
|
347
|
+
lc := ri.mapping(cLower)
|
348
|
+
ff := string(ri.FoldFull)
|
349
|
+
|
350
|
+
// addString sets the length of a string and adds it to the expansions array.
|
351
|
+
addString := func(s string, b *byte) {
|
352
|
+
if len(s) == 0 {
|
353
|
+
// Zero-length mappings exist, but only for conditional casing,
|
354
|
+
// which we are representing outside of this table.
|
355
|
+
log.Fatalf("%U: has zero-length mapping.", ri.Rune)
|
356
|
+
}
|
357
|
+
*b <<= 3
|
358
|
+
if s != orig {
|
359
|
+
n := len(s)
|
360
|
+
if n > 7 {
|
361
|
+
log.Fatalf("%U: mapping larger than 7 (%d)", ri.Rune, n)
|
362
|
+
}
|
363
|
+
*b |= byte(n)
|
364
|
+
exceptionData = append(exceptionData, s...)
|
365
|
+
}
|
366
|
+
}
|
367
|
+
|
368
|
+
// byte 0:
|
369
|
+
exceptionData = append(exceptionData, byte(ccc)|byte(len(ff)))
|
370
|
+
|
371
|
+
// byte 1:
|
372
|
+
p := len(exceptionData)
|
373
|
+
exceptionData = append(exceptionData, 0)
|
374
|
+
|
375
|
+
if len(ff) > 7 { // May be zero-length.
|
376
|
+
log.Fatalf("%U: fold string larger than 7 (%d)", ri.Rune, len(ff))
|
377
|
+
}
|
378
|
+
exceptionData = append(exceptionData, ff...)
|
379
|
+
ct := ri.CaseMode
|
380
|
+
if ct != cLower {
|
381
|
+
addString(lc, &exceptionData[p])
|
382
|
+
}
|
383
|
+
if ct != cUpper {
|
384
|
+
addString(uc, &exceptionData[p])
|
385
|
+
}
|
386
|
+
if ct != cTitle {
|
387
|
+
// If title is the same as upper, we set it to the original string so
|
388
|
+
// that it will be marked as not present. This implies title case is
|
389
|
+
// the same as upper case.
|
390
|
+
if tc == uc {
|
391
|
+
tc = orig
|
392
|
+
}
|
393
|
+
addString(tc, &exceptionData[p])
|
394
|
+
}
|
395
|
+
}
|
396
|
+
|
397
|
+
// sparseCompacter is a trie value block Compacter. There are many cases where
|
398
|
+
// successive runes alternate between lower- and upper-case. This Compacter
|
399
|
+
// exploits this by adding a special case type where the case value is obtained
|
400
|
+
// from or-ing it with the least-significant bit of the rune, creating large
|
401
|
+
// ranges of equal case values that compress well.
|
402
|
+
type sparseCompacter struct {
|
403
|
+
sparseBlocks [][]uint16
|
404
|
+
sparseOffsets []uint16
|
405
|
+
sparseCount int
|
406
|
+
}
|
407
|
+
|
408
|
+
// makeSparse returns the number of elements that compact block would contain
|
409
|
+
// as well as the modified values.
|
410
|
+
func makeSparse(vals []uint64) ([]uint16, int) {
|
411
|
+
// Copy the values.
|
412
|
+
values := make([]uint16, len(vals))
|
413
|
+
for i, v := range vals {
|
414
|
+
values[i] = uint16(v)
|
415
|
+
}
|
416
|
+
|
417
|
+
alt := func(i int, v uint16) uint16 {
|
418
|
+
if cm := info(v & fullCasedMask); cm == cUpper || cm == cLower {
|
419
|
+
// Convert cLower or cUpper to cXORCase value, which has the form 11x.
|
420
|
+
xor := v
|
421
|
+
xor &^= 1
|
422
|
+
xor |= uint16(i&1) ^ (v & 1)
|
423
|
+
xor |= 0x4
|
424
|
+
return xor
|
425
|
+
}
|
426
|
+
return v
|
427
|
+
}
|
428
|
+
|
429
|
+
var count int
|
430
|
+
var previous uint16
|
431
|
+
for i, v := range values {
|
432
|
+
if v != 0 {
|
433
|
+
// Try if the unmodified value is equal to the previous.
|
434
|
+
if v == previous {
|
435
|
+
continue
|
436
|
+
}
|
437
|
+
|
438
|
+
// Try if the xor-ed value is equal to the previous value.
|
439
|
+
a := alt(i, v)
|
440
|
+
if a == previous {
|
441
|
+
values[i] = a
|
442
|
+
continue
|
443
|
+
}
|
444
|
+
|
445
|
+
// This is a new value.
|
446
|
+
count++
|
447
|
+
|
448
|
+
// Use the xor-ed value if it will be identical to the next value.
|
449
|
+
if p := i + 1; p < len(values) && alt(p, values[p]) == a {
|
450
|
+
values[i] = a
|
451
|
+
v = a
|
452
|
+
}
|
453
|
+
}
|
454
|
+
previous = v
|
455
|
+
}
|
456
|
+
return values, count
|
457
|
+
}
|
458
|
+
|
459
|
+
func (s *sparseCompacter) Size(v []uint64) (int, bool) {
|
460
|
+
_, n := makeSparse(v)
|
461
|
+
|
462
|
+
// We limit using this method to having 16 entries.
|
463
|
+
if n > 16 {
|
464
|
+
return 0, false
|
465
|
+
}
|
466
|
+
|
467
|
+
return 2 + int(reflect.TypeOf(valueRange{}).Size())*n, true
|
468
|
+
}
|
469
|
+
|
470
|
+
func (s *sparseCompacter) Store(v []uint64) uint32 {
|
471
|
+
h := uint32(len(s.sparseOffsets))
|
472
|
+
values, sz := makeSparse(v)
|
473
|
+
s.sparseBlocks = append(s.sparseBlocks, values)
|
474
|
+
s.sparseOffsets = append(s.sparseOffsets, uint16(s.sparseCount))
|
475
|
+
s.sparseCount += sz
|
476
|
+
return h
|
477
|
+
}
|
478
|
+
|
479
|
+
func (s *sparseCompacter) Handler() string {
|
480
|
+
// The sparse global variable and its lookup method is defined in gen_trieval.go.
|
481
|
+
return "sparse.lookup"
|
482
|
+
}
|
483
|
+
|
484
|
+
func (s *sparseCompacter) Print(w io.Writer) (retErr error) {
|
485
|
+
p := func(format string, args ...interface{}) {
|
486
|
+
_, err := fmt.Fprintf(w, format, args...)
|
487
|
+
if retErr == nil && err != nil {
|
488
|
+
retErr = err
|
489
|
+
}
|
490
|
+
}
|
491
|
+
|
492
|
+
ls := len(s.sparseBlocks)
|
493
|
+
if ls == len(s.sparseOffsets) {
|
494
|
+
s.sparseOffsets = append(s.sparseOffsets, uint16(s.sparseCount))
|
495
|
+
}
|
496
|
+
p("// sparseOffsets: %d entries, %d bytes\n", ls+1, (ls+1)*2)
|
497
|
+
p("var sparseOffsets = %#v\n\n", s.sparseOffsets)
|
498
|
+
|
499
|
+
ns := s.sparseCount
|
500
|
+
p("// sparseValues: %d entries, %d bytes\n", ns, ns*4)
|
501
|
+
p("var sparseValues = [%d]valueRange {", ns)
|
502
|
+
for i, values := range s.sparseBlocks {
|
503
|
+
p("\n// Block %#x, offset %#x", i, s.sparseOffsets[i])
|
504
|
+
var v uint16
|
505
|
+
for i, nv := range values {
|
506
|
+
if nv != v {
|
507
|
+
if v != 0 {
|
508
|
+
p(",hi:%#02x},", 0x80+i-1)
|
509
|
+
}
|
510
|
+
if nv != 0 {
|
511
|
+
p("\n{value:%#04x,lo:%#02x", nv, 0x80+i)
|
512
|
+
}
|
513
|
+
}
|
514
|
+
v = nv
|
515
|
+
}
|
516
|
+
if v != 0 {
|
517
|
+
p(",hi:%#02x},", 0x80+len(values)-1)
|
518
|
+
}
|
519
|
+
}
|
520
|
+
p("\n}\n\n")
|
521
|
+
return
|
522
|
+
}
|
523
|
+
|
524
|
+
// verifyProperties that properties of the runes that are relied upon in the
|
525
|
+
// implementation. Each property is marked with an identifier that is referred
|
526
|
+
// to in the places where it is used.
|
527
|
+
func verifyProperties(chars []runeInfo) {
|
528
|
+
for i, c := range chars {
|
529
|
+
r := rune(i)
|
530
|
+
|
531
|
+
// Rune properties.
|
532
|
+
|
533
|
+
// A.1: modifier never changes on lowercase. [ltLower]
|
534
|
+
if c.CCC > 0 && unicode.ToLower(r) != r {
|
535
|
+
log.Fatalf("%U: non-starter changes when lowercased", r)
|
536
|
+
}
|
537
|
+
|
538
|
+
// A.2: properties of decompositions starting with I or J. [ltLower]
|
539
|
+
d := norm.NFD.PropertiesString(string(r)).Decomposition()
|
540
|
+
if len(d) > 0 {
|
541
|
+
if d[0] == 'I' || d[0] == 'J' {
|
542
|
+
// A.2.1: we expect at least an ASCII character and a modifier.
|
543
|
+
if len(d) < 3 {
|
544
|
+
log.Fatalf("%U: length of decomposition was %d; want >= 3", r, len(d))
|
545
|
+
}
|
546
|
+
|
547
|
+
// All subsequent runes are modifiers and all have the same CCC.
|
548
|
+
runes := []rune(string(d[1:]))
|
549
|
+
ccc := chars[runes[0]].CCC
|
550
|
+
|
551
|
+
for _, mr := range runes[1:] {
|
552
|
+
mc := chars[mr]
|
553
|
+
|
554
|
+
// A.2.2: all modifiers have a CCC of Above or less.
|
555
|
+
if ccc == 0 || ccc > above {
|
556
|
+
log.Fatalf("%U: CCC of successive rune (%U) was %d; want (0,230]", r, mr, ccc)
|
557
|
+
}
|
558
|
+
|
559
|
+
// A.2.3: a sequence of modifiers all have the same CCC.
|
560
|
+
if mc.CCC != ccc {
|
561
|
+
log.Fatalf("%U: CCC of follow-up modifier (%U) was %d; want %d", r, mr, mc.CCC, ccc)
|
562
|
+
}
|
563
|
+
|
564
|
+
// A.2.4: for each trailing r, r in [0x300, 0x311] <=> CCC == Above.
|
565
|
+
if (ccc == above) != (0x300 <= mr && mr <= 0x311) {
|
566
|
+
log.Fatalf("%U: modifier %U in [U+0300, U+0311] != ccc(%U) == 230", r, mr, mr)
|
567
|
+
}
|
568
|
+
|
569
|
+
if i += len(string(mr)); i >= len(d) {
|
570
|
+
break
|
571
|
+
}
|
572
|
+
}
|
573
|
+
}
|
574
|
+
}
|
575
|
+
|
576
|
+
// A.3: no U+0307 in decomposition of Soft-Dotted rune. [ltUpper]
|
577
|
+
if unicode.Is(unicode.Soft_Dotted, r) && strings.Contains(string(d), "\u0307") {
|
578
|
+
log.Fatalf("%U: decomposition of soft-dotted rune may not contain U+0307", r)
|
579
|
+
}
|
580
|
+
|
581
|
+
// A.4: only rune U+0345 may be of CCC Iota_Subscript. [elUpper]
|
582
|
+
if c.CCC == iotaSubscript && r != 0x0345 {
|
583
|
+
log.Fatalf("%U: only rune U+0345 may have CCC Iota_Subscript", r)
|
584
|
+
}
|
585
|
+
|
586
|
+
// A.5: soft-dotted runes do not have exceptions.
|
587
|
+
if c.SoftDotted && c.entry&exceptionBit != 0 {
|
588
|
+
log.Fatalf("%U: soft-dotted has exception", r)
|
589
|
+
}
|
590
|
+
|
591
|
+
// A.6: Greek decomposition. [elUpper]
|
592
|
+
if unicode.Is(unicode.Greek, r) {
|
593
|
+
if b := norm.NFD.PropertiesString(string(r)).Decomposition(); b != nil {
|
594
|
+
runes := []rune(string(b))
|
595
|
+
// A.6.1: If a Greek rune decomposes and the first rune of the
|
596
|
+
// decomposition is greater than U+00FF, the rune is always
|
597
|
+
// great and not a modifier.
|
598
|
+
if f := runes[0]; unicode.IsMark(f) || f > 0xFF && !unicode.Is(unicode.Greek, f) {
|
599
|
+
log.Fatalf("%U: expected first rune of Greek decomposition to be letter, found %U", r, f)
|
600
|
+
}
|
601
|
+
// A.6.2: Any follow-up rune in a Greek decomposition is a
|
602
|
+
// modifier of which the first should be gobbled in
|
603
|
+
// decomposition.
|
604
|
+
for _, m := range runes[1:] {
|
605
|
+
switch m {
|
606
|
+
case 0x0313, 0x0314, 0x0301, 0x0300, 0x0306, 0x0342, 0x0308, 0x0304, 0x345:
|
607
|
+
default:
|
608
|
+
log.Fatalf("%U: modifier %U is outside of expected Greek modifier set", r, m)
|
609
|
+
}
|
610
|
+
}
|
611
|
+
}
|
612
|
+
}
|
613
|
+
|
614
|
+
// Breaking properties.
|
615
|
+
|
616
|
+
// B.1: all runes with CCC > 0 are of break type Extend.
|
617
|
+
if c.CCC > 0 && c.BreakType != "Extend" {
|
618
|
+
log.Fatalf("%U: CCC == %d, but got break type %s; want Extend", r, c.CCC, c.BreakType)
|
619
|
+
}
|
620
|
+
|
621
|
+
// B.2: all cased runes with c.CCC == 0 are of break type ALetter.
|
622
|
+
if c.CCC == 0 && c.Cased && c.BreakType != "ALetter" {
|
623
|
+
log.Fatalf("%U: cased, but got break type %s; want ALetter", r, c.BreakType)
|
624
|
+
}
|
625
|
+
|
626
|
+
// B.3: letter category.
|
627
|
+
if c.CCC == 0 && c.BreakCat != breakBreak && !c.CaseIgnorable {
|
628
|
+
if c.BreakCat != breakLetter {
|
629
|
+
log.Fatalf("%U: check for letter break type gave %d; want %d", r, c.BreakCat, breakLetter)
|
630
|
+
}
|
631
|
+
}
|
632
|
+
}
|
633
|
+
}
|
634
|
+
|
635
|
+
func genTablesTest() {
|
636
|
+
w := &bytes.Buffer{}
|
637
|
+
|
638
|
+
fmt.Fprintln(w, "var (")
|
639
|
+
printProperties(w, "DerivedCoreProperties.txt", "Case_Ignorable", verifyIgnore)
|
640
|
+
|
641
|
+
// We discard the output as we know we have perfect functions. We run them
|
642
|
+
// just to verify the properties are correct.
|
643
|
+
n := printProperties(ioutil.Discard, "DerivedCoreProperties.txt", "Cased", verifyCased)
|
644
|
+
n += printProperties(ioutil.Discard, "DerivedCoreProperties.txt", "Lowercase", verifyLower)
|
645
|
+
n += printProperties(ioutil.Discard, "DerivedCoreProperties.txt", "Uppercase", verifyUpper)
|
646
|
+
if n > 0 {
|
647
|
+
log.Fatalf("One of the discarded properties does not have a perfect filter.")
|
648
|
+
}
|
649
|
+
|
650
|
+
// <code>; <lower> ; <title> ; <upper> ; (<condition_list> ;)?
|
651
|
+
fmt.Fprintln(w, "\tspecial = map[rune]struct{ toLower, toTitle, toUpper string }{")
|
652
|
+
parse("SpecialCasing.txt", func(p *ucd.Parser) {
|
653
|
+
// Skip conditional entries.
|
654
|
+
if p.String(4) != "" {
|
655
|
+
return
|
656
|
+
}
|
657
|
+
r := p.Rune(0)
|
658
|
+
fmt.Fprintf(w, "\t\t0x%04x: {%q, %q, %q},\n",
|
659
|
+
r, string(p.Runes(1)), string(p.Runes(2)), string(p.Runes(3)))
|
660
|
+
})
|
661
|
+
fmt.Fprint(w, "\t}\n\n")
|
662
|
+
|
663
|
+
// <code>; <type>; <runes>
|
664
|
+
table := map[rune]struct{ simple, full, special string }{}
|
665
|
+
parse("CaseFolding.txt", func(p *ucd.Parser) {
|
666
|
+
r := p.Rune(0)
|
667
|
+
t := p.String(1)
|
668
|
+
v := string(p.Runes(2))
|
669
|
+
if t != "T" && v == string(unicode.ToLower(r)) {
|
670
|
+
return
|
671
|
+
}
|
672
|
+
x := table[r]
|
673
|
+
switch t {
|
674
|
+
case "C":
|
675
|
+
x.full = v
|
676
|
+
x.simple = v
|
677
|
+
case "S":
|
678
|
+
x.simple = v
|
679
|
+
case "F":
|
680
|
+
x.full = v
|
681
|
+
case "T":
|
682
|
+
x.special = v
|
683
|
+
}
|
684
|
+
table[r] = x
|
685
|
+
})
|
686
|
+
fmt.Fprintln(w, "\tfoldMap = map[rune]struct{ simple, full, special string }{")
|
687
|
+
for r := rune(0); r < 0x10FFFF; r++ {
|
688
|
+
x, ok := table[r]
|
689
|
+
if !ok {
|
690
|
+
continue
|
691
|
+
}
|
692
|
+
fmt.Fprintf(w, "\t\t0x%04x: {%q, %q, %q},\n", r, x.simple, x.full, x.special)
|
693
|
+
}
|
694
|
+
fmt.Fprint(w, "\t}\n\n")
|
695
|
+
|
696
|
+
// Break property
|
697
|
+
notBreak := map[rune]bool{}
|
698
|
+
parse("auxiliary/WordBreakProperty.txt", func(p *ucd.Parser) {
|
699
|
+
switch p.String(1) {
|
700
|
+
case "Extend", "Format", "MidLetter", "MidNumLet", "Single_Quote",
|
701
|
+
"ALetter", "Hebrew_Letter", "Numeric", "ExtendNumLet", "ZWJ":
|
702
|
+
notBreak[p.Rune(0)] = true
|
703
|
+
}
|
704
|
+
})
|
705
|
+
|
706
|
+
fmt.Fprintln(w, "\tbreakProp = []struct{ lo, hi rune }{")
|
707
|
+
inBreak := false
|
708
|
+
for r := rune(0); r <= lastRuneForTesting; r++ {
|
709
|
+
if isBreak := !notBreak[r]; isBreak != inBreak {
|
710
|
+
if isBreak {
|
711
|
+
fmt.Fprintf(w, "\t\t{0x%x, ", r)
|
712
|
+
} else {
|
713
|
+
fmt.Fprintf(w, "0x%x},\n", r-1)
|
714
|
+
}
|
715
|
+
inBreak = isBreak
|
716
|
+
}
|
717
|
+
}
|
718
|
+
if inBreak {
|
719
|
+
fmt.Fprintf(w, "0x%x},\n", lastRuneForTesting)
|
720
|
+
}
|
721
|
+
fmt.Fprint(w, "\t}\n\n")
|
722
|
+
|
723
|
+
// Word break test
|
724
|
+
// Filter out all samples that do not contain cased characters.
|
725
|
+
cased := map[rune]bool{}
|
726
|
+
parse("DerivedCoreProperties.txt", func(p *ucd.Parser) {
|
727
|
+
if p.String(1) == "Cased" {
|
728
|
+
cased[p.Rune(0)] = true
|
729
|
+
}
|
730
|
+
})
|
731
|
+
|
732
|
+
fmt.Fprintln(w, "\tbreakTest = []string{")
|
733
|
+
parse("auxiliary/WordBreakTest.txt", func(p *ucd.Parser) {
|
734
|
+
c := strings.Split(p.String(0), " ")
|
735
|
+
|
736
|
+
const sep = '|'
|
737
|
+
numCased := 0
|
738
|
+
test := ""
|
739
|
+
for ; len(c) >= 2; c = c[2:] {
|
740
|
+
if c[0] == "÷" && test != "" {
|
741
|
+
test += string(sep)
|
742
|
+
}
|
743
|
+
i, err := strconv.ParseUint(c[1], 16, 32)
|
744
|
+
r := rune(i)
|
745
|
+
if err != nil {
|
746
|
+
log.Fatalf("Invalid rune %q.", c[1])
|
747
|
+
}
|
748
|
+
if r == sep {
|
749
|
+
log.Fatalf("Separator %q not allowed in test data. Pick another one.", sep)
|
750
|
+
}
|
751
|
+
if cased[r] {
|
752
|
+
numCased++
|
753
|
+
}
|
754
|
+
test += string(r)
|
755
|
+
}
|
756
|
+
if numCased > 1 {
|
757
|
+
fmt.Fprintf(w, "\t\t%q,\n", test)
|
758
|
+
}
|
759
|
+
})
|
760
|
+
fmt.Fprintln(w, "\t}")
|
761
|
+
|
762
|
+
fmt.Fprintln(w, ")")
|
763
|
+
|
764
|
+
gen.WriteGoFile("tables_test.go", "cases", w.Bytes())
|
765
|
+
}
|
766
|
+
|
767
|
+
// These functions are just used for verification that their definition have not
|
768
|
+
// changed in the Unicode Standard.
|
769
|
+
|
770
|
+
func verifyCased(r rune) bool {
|
771
|
+
return verifyLower(r) || verifyUpper(r) || unicode.IsTitle(r)
|
772
|
+
}
|
773
|
+
|
774
|
+
func verifyLower(r rune) bool {
|
775
|
+
return unicode.IsLower(r) || unicode.Is(unicode.Other_Lowercase, r)
|
776
|
+
}
|
777
|
+
|
778
|
+
func verifyUpper(r rune) bool {
|
779
|
+
return unicode.IsUpper(r) || unicode.Is(unicode.Other_Uppercase, r)
|
780
|
+
}
|
781
|
+
|
782
|
+
// verifyIgnore is an approximation of the Case_Ignorable property using the
|
783
|
+
// core unicode package. It is used to reduce the size of the test data.
|
784
|
+
func verifyIgnore(r rune) bool {
|
785
|
+
props := []*unicode.RangeTable{
|
786
|
+
unicode.Mn,
|
787
|
+
unicode.Me,
|
788
|
+
unicode.Cf,
|
789
|
+
unicode.Lm,
|
790
|
+
unicode.Sk,
|
791
|
+
}
|
792
|
+
for _, p := range props {
|
793
|
+
if unicode.Is(p, r) {
|
794
|
+
return true
|
795
|
+
}
|
796
|
+
}
|
797
|
+
return false
|
798
|
+
}
|
799
|
+
|
800
|
+
// printProperties prints tables of rune properties from the given UCD file.
|
801
|
+
// A filter func f can be given to exclude certain values. A rune r will have
|
802
|
+
// the indicated property if it is in the generated table or if f(r).
|
803
|
+
func printProperties(w io.Writer, file, property string, f func(r rune) bool) int {
|
804
|
+
verify := map[rune]bool{}
|
805
|
+
n := 0
|
806
|
+
varNameParts := strings.Split(property, "_")
|
807
|
+
varNameParts[0] = strings.ToLower(varNameParts[0])
|
808
|
+
fmt.Fprintf(w, "\t%s = map[rune]bool{\n", strings.Join(varNameParts, ""))
|
809
|
+
parse(file, func(p *ucd.Parser) {
|
810
|
+
if p.String(1) == property {
|
811
|
+
r := p.Rune(0)
|
812
|
+
verify[r] = true
|
813
|
+
if !f(r) {
|
814
|
+
n++
|
815
|
+
fmt.Fprintf(w, "\t\t0x%.4x: true,\n", r)
|
816
|
+
}
|
817
|
+
}
|
818
|
+
})
|
819
|
+
fmt.Fprint(w, "\t}\n\n")
|
820
|
+
|
821
|
+
// Verify that f is correct, that is, it represents a subset of the property.
|
822
|
+
for r := rune(0); r <= lastRuneForTesting; r++ {
|
823
|
+
if !verify[r] && f(r) {
|
824
|
+
log.Fatalf("Incorrect filter func for property %q.", property)
|
825
|
+
}
|
826
|
+
}
|
827
|
+
return n
|
828
|
+
}
|
829
|
+
|
830
|
+
// The newCaseTrie, sparseValues and sparseOffsets definitions below are
|
831
|
+
// placeholders referred to by gen_trieval.go. The real definitions are
|
832
|
+
// generated by this program and written to tables.go.
|
833
|
+
|
834
|
+
func newCaseTrie(int) int { return 0 }
|
835
|
+
|
836
|
+
var (
|
837
|
+
sparseValues [0]valueRange
|
838
|
+
sparseOffsets [0]uint16
|
839
|
+
)
|