@ttsc/win32-arm64 0.33.1 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/go/VERSION +2 -2
- package/bin/go/bin/go.exe +0 -0
- package/bin/go/bin/gofmt.exe +0 -0
- package/bin/go/lib/time/update.bash +2 -2
- package/bin/go/lib/time/zoneinfo.zip +0 -0
- package/bin/go/pkg/include/asm_ppc64x.h +0 -16
- package/bin/go/pkg/tool/windows_arm64/asm.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/cgo.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/compile.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/cover.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/fix.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/link.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/preprofile.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/vet.exe +0 -0
- package/bin/go/src/archive/tar/reader.go +2 -1
- package/bin/go/src/archive/zip/reader.go +5 -29
- package/bin/go/src/archive/zip/struct.go +5 -6
- package/bin/go/src/archive/zip/writer.go +120 -60
- package/bin/go/src/bufio/bufio.go +1 -1
- package/bin/go/src/bytes/buffer.go +3 -3
- package/bin/go/src/bytes/bytes.go +45 -25
- package/bin/go/src/compress/flate/deflate.go +512 -363
- package/bin/go/src/compress/flate/deflatefast.go +156 -262
- package/bin/go/src/compress/flate/dict_decoder.go +1 -4
- package/bin/go/src/compress/flate/huffman_bit_writer.go +673 -250
- package/bin/go/src/compress/flate/huffman_code.go +164 -92
- package/bin/go/src/compress/flate/level1.go +195 -0
- package/bin/go/src/compress/flate/level2.go +190 -0
- package/bin/go/src/compress/flate/level3.go +228 -0
- package/bin/go/src/compress/flate/level4.go +200 -0
- package/bin/go/src/compress/flate/level5.go +287 -0
- package/bin/go/src/compress/flate/level6.go +297 -0
- package/bin/go/src/compress/flate/load_store.go +43 -0
- package/bin/go/src/compress/flate/regmask_amd64.go +9 -0
- package/bin/go/src/compress/flate/regmask_other.go +11 -0
- package/bin/go/src/compress/flate/token.go +238 -26
- package/bin/go/src/compress/gzip/gzip.go +8 -0
- package/bin/go/src/compress/zlib/writer.go +12 -0
- package/bin/go/src/context/context.go +6 -5
- package/bin/go/src/crypto/cipher/gcm.go +0 -4
- package/bin/go/src/crypto/crypto.go +27 -4
- package/bin/go/src/crypto/des/const.go +1 -1
- package/bin/go/src/crypto/ecdsa/ecdsa.go +21 -4
- package/bin/go/src/crypto/ed25519/ed25519.go +13 -0
- package/bin/go/src/crypto/internal/boring/aes.go +2 -3
- package/bin/go/src/crypto/internal/cryptotest/aead.go +53 -0
- package/bin/go/src/crypto/internal/cryptotest/boundary.go +34 -0
- package/bin/go/src/crypto/internal/cryptotest/boundary_compat.go +16 -0
- package/bin/go/src/crypto/internal/cryptotest/fetchmodule.go +9 -3
- package/bin/go/src/crypto/internal/cryptotest/fips140.go +62 -3
- package/bin/go/src/crypto/internal/cryptotest/hash.go +14 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/_schema/go.mod +19 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/_schema/go.sum +27 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/_schema/schema_gen.go +151 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/schema.go +9792 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/schemaversion.go +11 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/wycheproof.go +165 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/_schema/go.mod +14 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/_schema/go.sum +25 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/_schema/schema_gen.go +125 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/schema.go +591 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/schemaversion.go +14 -0
- package/bin/go/src/crypto/internal/fips140/aes/_asm/ctr/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/aes/_asm/standard/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/aes/gcm/_asm/gcm/gcm_amd64_asm.go +36 -32
- package/bin/go/src/crypto/internal/fips140/aes/gcm/_asm/gcm/go.mod +5 -5
- package/bin/go/src/crypto/internal/fips140/aes/gcm/_asm/gcm/go.sum +8 -6
- package/bin/go/src/crypto/internal/fips140/aes/gcm/gcm_amd64.s +29 -17
- package/bin/go/src/crypto/internal/fips140/aes/gcm/gcm_arm64.s +73 -72
- package/bin/go/src/crypto/internal/fips140/aes/gcm/ghash.go +140 -124
- package/bin/go/src/crypto/internal/fips140/bigmod/nat.go +18 -0
- package/bin/go/src/crypto/internal/fips140/check/checktest/asm_loong64.s +23 -0
- package/bin/go/src/crypto/internal/fips140/check/checktest/asm_none.go +1 -1
- package/bin/go/src/crypto/internal/fips140/check/checktest/asm_stub.go +1 -1
- package/bin/go/src/crypto/internal/fips140/drbg/rand.go +12 -4
- package/bin/go/src/crypto/internal/fips140/ecdsa/ecdsa.go +17 -10
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/_asm/fe_amd64_asm.go +0 -90
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe.go +64 -97
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe_amd64.go +0 -5
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe_amd64.s +0 -167
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe_amd64_noasm.go +0 -2
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe_generic.go +57 -1
- package/bin/go/src/crypto/internal/fips140/edwards25519/scalarmult.go +3 -2
- package/bin/go/src/crypto/internal/fips140/mldsa/mldsa.go +31 -25
- package/bin/go/src/crypto/internal/fips140/mldsa/semiexpanded.go +2 -2
- package/bin/go/src/crypto/internal/fips140/nistec/_asm/go.mod +4 -4
- package/bin/go/src/crypto/internal/fips140/nistec/_asm/go.sum +6 -0
- package/bin/go/src/crypto/internal/fips140/nistec/_asm/p256_asm.go +1 -613
- package/bin/go/src/crypto/internal/fips140/nistec/p256.go +2 -2
- package/bin/go/src/crypto/internal/fips140/nistec/p256_asm.go +7 -6
- package/bin/go/src/crypto/internal/fips140/nistec/p256_asm_amd64.s +0 -503
- package/bin/go/src/crypto/internal/fips140/nistec/p256_asm_arm64.s +4 -429
- package/bin/go/src/crypto/internal/fips140/nistec/p256_ordinv.go +511 -47
- package/bin/go/src/crypto/internal/fips140/pbkdf2/pbkdf2.go +1 -1
- package/bin/go/src/crypto/internal/fips140/rsa/keygen.go +48 -46
- package/bin/go/src/crypto/internal/fips140/rsa/largeexponent.go +365 -0
- package/bin/go/src/crypto/internal/fips140/rsa/pkcs1v15.go +27 -0
- package/bin/go/src/crypto/internal/fips140/sha256/_asm/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/sha3/_asm/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/sha512/_asm/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/subtle/constant_time.go +1 -1
- package/bin/go/src/crypto/internal/fips140/subtle/xor_asm.go +1 -1
- package/bin/go/src/crypto/internal/fips140/subtle/xor_riscv64.go +18 -0
- package/bin/go/src/crypto/internal/fips140/subtle/xor_riscv64.s +33 -2
- package/bin/go/src/crypto/internal/fips140deps/cpu/cpu.go +2 -0
- package/bin/go/src/crypto/internal/fips140deps/time/time.go +7 -4
- package/bin/go/src/crypto/internal/fips140only/fips140only.go +0 -7
- package/bin/go/src/crypto/internal/fips140only/random_fips140v1.0.go +17 -0
- package/bin/go/src/crypto/internal/fips140only/random_fips140v1.28.go +16 -0
- package/bin/go/src/crypto/internal/fips140test/acvp_capabilities_fips140v1.28.json +86 -0
- package/bin/go/src/crypto/internal/fips140test/acvp_test_fips140v1.28.config.json +58 -0
- package/bin/go/src/crypto/internal/rand/rand.go +14 -14
- package/bin/go/src/crypto/internal/rand/random_fips140v1.0.go +20 -0
- package/bin/go/src/crypto/internal/rand/random_fips140v1.28.go +19 -0
- package/bin/go/src/crypto/mldsa/mldsa.go +97 -0
- package/bin/go/src/crypto/mldsa/mldsa_fips140v1.0.go +116 -0
- package/bin/go/src/crypto/mldsa/mldsa_fips140v1.26.go +226 -0
- package/bin/go/src/crypto/mlkem/mlkem.go +8 -2
- package/bin/go/src/crypto/rsa/fips.go +26 -8
- package/bin/go/src/crypto/rsa/pkcs1v15.go +2 -2
- package/bin/go/src/crypto/rsa/rsa.go +25 -2
- package/bin/go/src/crypto/sha1/sha1block_decl.go +1 -1
- package/bin/go/src/crypto/sha1/sha1block_generic.go +1 -1
- package/bin/go/src/crypto/sha1/sha1block_loong64.s +24 -8
- package/bin/go/src/crypto/sha1/sha1block_riscv64.s +225 -0
- package/bin/go/src/crypto/sha3/sha3.go +3 -2
- package/bin/go/src/crypto/tls/alert.go +2 -0
- package/bin/go/src/crypto/tls/auth.go +31 -0
- package/bin/go/src/crypto/tls/bogo_config.json +12 -23
- package/bin/go/src/crypto/tls/cipher_suites.go +3 -11
- package/bin/go/src/crypto/tls/common.go +106 -59
- package/bin/go/src/crypto/tls/common_string.go +18 -5
- package/bin/go/src/crypto/tls/conn.go +33 -35
- package/bin/go/src/crypto/tls/defaults.go +26 -20
- package/bin/go/src/crypto/tls/defaults_fips140.go +9 -0
- package/bin/go/src/crypto/tls/ech.go +9 -4
- package/bin/go/src/crypto/tls/generate_cert.go +8 -2
- package/bin/go/src/crypto/tls/handshake_client.go +17 -17
- package/bin/go/src/crypto/tls/handshake_client_tls13.go +8 -3
- package/bin/go/src/crypto/tls/handshake_server.go +26 -19
- package/bin/go/src/crypto/tls/handshake_server_tls13.go +8 -5
- package/bin/go/src/crypto/tls/key_agreement.go +5 -1
- package/bin/go/src/crypto/tls/key_schedule.go +42 -17
- package/bin/go/src/crypto/tls/prf.go +1 -1
- package/bin/go/src/crypto/tls/quic.go +6 -7
- package/bin/go/src/crypto/tls/tls.go +25 -29
- package/bin/go/src/crypto/x509/cert_pool.go +8 -4
- package/bin/go/src/crypto/x509/constraints.go +5 -0
- package/bin/go/src/crypto/x509/parser.go +101 -15
- package/bin/go/src/crypto/x509/pkcs8.go +45 -4
- package/bin/go/src/crypto/x509/pkix/pkix.go +33 -9
- package/bin/go/src/crypto/x509/root.go +113 -0
- package/bin/go/src/crypto/x509/root_darwin.go +8 -4
- package/bin/go/src/crypto/x509/root_plan9.go +2 -23
- package/bin/go/src/crypto/x509/root_unix.go +0 -97
- package/bin/go/src/crypto/x509/root_windows.go +8 -3
- package/bin/go/src/crypto/x509/verify.go +43 -4
- package/bin/go/src/crypto/x509/x509.go +169 -30
- package/bin/go/src/database/sql/closemu.go +119 -0
- package/bin/go/src/database/sql/convert.go +63 -4
- package/bin/go/src/database/sql/driver/driver.go +26 -0
- package/bin/go/src/database/sql/driver/types.go +4 -0
- package/bin/go/src/database/sql/internal/sql.go +22 -0
- package/bin/go/src/database/sql/sql.go +89 -40
- package/bin/go/src/debug/buildinfo/buildinfo.go +0 -13
- package/bin/go/src/debug/dwarf/buf.go +7 -1
- package/bin/go/src/debug/dwarf/class_string.go +3 -2
- package/bin/go/src/debug/elf/file.go +80 -50
- package/bin/go/src/debug/elf/reader.go +1 -1
- package/bin/go/src/debug/gosym/symtab.go +26 -30
- package/bin/go/src/debug/macho/file.go +2 -2
- package/bin/go/src/debug/macho/reloctype_string.go +12 -8
- package/bin/go/src/debug/pe/file.go +6 -3
- package/bin/go/src/encoding/base32/base32.go +29 -31
- package/bin/go/src/encoding/base64/base64.go +24 -29
- package/bin/go/src/encoding/gob/decode.go +7 -1
- package/bin/go/src/encoding/gob/type.go +6 -6
- package/bin/go/src/encoding/hex/hex.go +6 -6
- package/bin/go/src/encoding/json/decode.go +4 -3
- package/bin/go/src/encoding/json/encode.go +1 -2
- package/bin/go/src/encoding/json/fold.go +1 -1
- package/bin/go/src/encoding/json/internal/internal.go +11 -1
- package/bin/go/src/encoding/json/internal/jsonflags/flags.go +17 -9
- package/bin/go/src/encoding/json/internal/jsonopts/options.go +52 -37
- package/bin/go/src/encoding/json/internal/jsonopts/options_format.go +124 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/canada_geometry.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/citm_catalog.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/golang_source.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/string_escaped.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/string_unicode.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/synthea_fhir.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/twitter_status.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/testdata.go +10 -4
- package/bin/go/src/encoding/json/internal/jsonwire/decode.go +13 -36
- package/bin/go/src/encoding/json/internal/jsonwire/encode.go +7 -7
- package/bin/go/src/encoding/json/internal/jsonwire/wire.go +30 -38
- package/bin/go/src/encoding/json/jsontext/decode.go +49 -14
- package/bin/go/src/encoding/json/jsontext/doc.go +6 -11
- package/bin/go/src/encoding/json/jsontext/encode.go +55 -39
- package/bin/go/src/encoding/json/jsontext/errors.go +34 -3
- package/bin/go/src/encoding/json/jsontext/export.go +14 -0
- package/bin/go/src/encoding/json/jsontext/options.go +8 -8
- package/bin/go/src/encoding/json/jsontext/quote.go +2 -2
- package/bin/go/src/encoding/json/jsontext/state.go +14 -14
- package/bin/go/src/encoding/json/jsontext/token.go +246 -101
- package/bin/go/src/encoding/json/jsontext/value.go +31 -16
- package/bin/go/src/encoding/json/stream.go +14 -2
- package/bin/go/src/encoding/json/v2/arshal.go +100 -114
- package/bin/go/src/encoding/json/v2/arshal_any.go +6 -5
- package/bin/go/src/encoding/json/v2/arshal_default.go +292 -189
- package/bin/go/src/encoding/json/v2/{arshal_inlined.go → arshal_embedded.go} +14 -14
- package/bin/go/src/encoding/json/v2/arshal_funcs.go +28 -47
- package/bin/go/src/encoding/json/v2/arshal_methods.go +98 -29
- package/bin/go/src/encoding/json/v2/arshal_time.go +33 -13
- package/bin/go/src/encoding/json/v2/doc.go +40 -55
- package/bin/go/src/encoding/json/v2/errors.go +29 -9
- package/bin/go/src/encoding/json/v2/fields.go +83 -81
- package/bin/go/src/encoding/json/v2/intern.go +2 -2
- package/bin/go/src/encoding/json/v2/options.go +57 -41
- package/bin/go/src/encoding/json/v2_decode.go +21 -9
- package/bin/go/src/encoding/json/v2_encode.go +21 -10
- package/bin/go/src/encoding/json/v2_indent.go +2 -0
- package/bin/go/src/encoding/json/v2_inject.go +7 -4
- package/bin/go/src/encoding/json/v2_options.go +37 -30
- package/bin/go/src/encoding/json/v2_scanner.go +6 -1
- package/bin/go/src/encoding/json/v2_stream.go +49 -14
- package/bin/go/src/encoding/pem/pem.go +6 -2
- package/bin/go/src/fmt/doc.go +11 -1
- package/bin/go/src/fmt/print.go +69 -82
- package/bin/go/src/go/ast/ast.go +4 -4
- package/bin/go/src/go/ast/filter.go +1 -1
- package/bin/go/src/go/ast/scope.go +2 -2
- package/bin/go/src/go/build/build.go +1 -1
- package/bin/go/src/go/build/constraint/vers.go +4 -1
- package/bin/go/src/go/build/read.go +2 -2
- package/bin/go/src/go/constant/kind_string.go +3 -2
- package/bin/go/src/go/constant/value.go +26 -4
- package/bin/go/src/go/doc/comment/std.go +1 -0
- package/bin/go/src/go/importer/importer.go +4 -3
- package/bin/go/src/go/internal/gccgoimporter/parser.go +2 -0
- package/bin/go/src/go/internal/gcimporter/ureader.go +141 -56
- package/bin/go/src/go/parser/parser.go +11 -22
- package/bin/go/src/go/printer/math.go +28 -0
- package/bin/go/src/go/printer/nodes.go +28 -11
- package/bin/go/src/go/printer/printer.go +3 -1
- package/bin/go/src/go/scanner/errors.go +2 -0
- package/bin/go/src/go/scanner/scanner.go +40 -28
- package/bin/go/src/go/token/position.go +7 -16
- package/bin/go/src/go/types/alias.go +0 -18
- package/bin/go/src/go/types/api.go +4 -10
- package/bin/go/src/go/types/api_predicates.go +2 -2
- package/bin/go/src/go/types/assignments.go +44 -38
- package/bin/go/src/go/types/builtins.go +199 -168
- package/bin/go/src/go/types/call.go +155 -138
- package/bin/go/src/go/types/check.go +0 -83
- package/bin/go/src/go/types/const.go +22 -10
- package/bin/go/src/go/types/conversions.go +19 -19
- package/bin/go/src/go/types/cycles.go +29 -42
- package/bin/go/src/go/types/decl.go +33 -81
- package/bin/go/src/go/types/expr.go +191 -183
- package/bin/go/src/go/types/gotype.go +1 -0
- package/bin/go/src/go/types/hash.go +309 -0
- package/bin/go/src/go/types/index.go +91 -61
- package/bin/go/src/go/types/infer.go +11 -11
- package/bin/go/src/go/types/instantiate.go +27 -15
- package/bin/go/src/go/types/interface.go +2 -2
- package/bin/go/src/go/types/literals.go +56 -32
- package/bin/go/src/go/types/lookup.go +31 -14
- package/bin/go/src/go/types/named.go +58 -54
- package/bin/go/src/go/types/object.go +4 -3
- package/bin/go/src/go/types/operand.go +50 -34
- package/bin/go/src/go/types/range.go +19 -16
- package/bin/go/src/go/types/recording.go +24 -7
- package/bin/go/src/go/types/resolver.go +16 -18
- package/bin/go/src/go/types/scope.go +1 -15
- package/bin/go/src/go/types/selection.go +3 -1
- package/bin/go/src/go/types/signature.go +10 -11
- package/bin/go/src/go/types/stmt.go +34 -28
- package/bin/go/src/go/types/subst.go +82 -5
- package/bin/go/src/go/types/trie.go +93 -0
- package/bin/go/src/go/types/typelists.go +28 -0
- package/bin/go/src/go/types/typestring.go +5 -9
- package/bin/go/src/go/types/typexpr.go +17 -28
- package/bin/go/src/go/types/unify.go +12 -3
- package/bin/go/src/go/types/universe.go +12 -40
- package/bin/go/src/go/types/version.go +4 -0
- package/bin/go/src/go.mod +5 -5
- package/bin/go/src/go.sum +8 -8
- package/bin/go/src/hash/maphash/hasher.go +139 -0
- package/bin/go/src/hash/maphash/maphash.go +59 -4
- package/bin/go/src/html/template/attr_string.go +3 -2
- package/bin/go/src/html/template/delim_string.go +3 -2
- package/bin/go/src/html/template/element_string.go +3 -2
- package/bin/go/src/html/template/jsctx_string.go +3 -2
- package/bin/go/src/html/template/state_string.go +3 -2
- package/bin/go/src/html/template/template.go +7 -4
- package/bin/go/src/html/template/transition.go +1 -1
- package/bin/go/src/html/template/urlpart_string.go +3 -2
- package/bin/go/src/image/format.go +9 -0
- package/bin/go/src/image/gif/reader.go +18 -0
- package/bin/go/src/image/jpeg/huffman.go +22 -3
- package/bin/go/src/image/jpeg/reader.go +54 -29
- package/bin/go/src/image/jpeg/scan.go +68 -38
- package/bin/go/src/image/png/writer.go +8 -0
- package/bin/go/src/index/suffixarray/suffixarray.go +14 -6
- package/bin/go/src/internal/abi/abi_generic.go +1 -1
- package/bin/go/src/internal/abi/abi_s390x.go +0 -2
- package/bin/go/src/internal/abi/compiletype.go +30 -0
- package/bin/go/src/internal/abi/iface.go +13 -1
- package/bin/go/src/internal/abi/map.go +21 -3
- package/bin/go/src/internal/abi/type.go +136 -27
- package/bin/go/src/internal/buildcfg/exp.go +8 -8
- package/bin/go/src/internal/buildcfg/zbootstrap.go +1 -1
- package/bin/go/src/internal/bytealg/bytealg.go +16 -16
- package/bin/go/src/internal/bytealg/compare_s390x.s +0 -24
- package/bin/go/src/internal/bytealg/equal_s390x.s +0 -18
- package/bin/go/src/internal/bytealg/indexbyte_arm64.s +28 -0
- package/bin/go/src/internal/bytealg/indexbyte_s390x.s +0 -33
- package/bin/go/src/internal/coverage/encodemeta/encode.go +1 -1
- package/bin/go/src/internal/cpu/cpu.go +22 -7
- package/bin/go/src/internal/cpu/cpu_arm64.go +8 -1
- package/bin/go/src/internal/cpu/cpu_arm64.s +7 -0
- package/bin/go/src/internal/cpu/cpu_arm64_darwin.go +2 -0
- package/bin/go/src/internal/cpu/cpu_arm64_freebsd.go +2 -1
- package/bin/go/src/internal/cpu/cpu_arm64_hwcap.go +2 -0
- package/bin/go/src/internal/cpu/cpu_arm64_openbsd.go +6 -1
- package/bin/go/src/internal/cpu/cpu_arm64_other.go +1 -1
- package/bin/go/src/internal/cpu/cpu_arm64_windows.go +26 -0
- package/bin/go/src/internal/cpu/cpu_loong64.go +14 -2
- package/bin/go/src/internal/cpu/cpu_riscv64.go +10 -0
- package/bin/go/src/internal/cpu/cpu_riscv64_linux.go +21 -0
- package/bin/go/src/internal/cpu/cpu_windows.go +20 -0
- package/bin/go/src/internal/cpu/cpu_x86.go +2 -0
- package/bin/go/src/internal/filepathlite/path_windows.go +30 -17
- package/bin/go/src/internal/fuzz/fuzz.go +5 -1
- package/bin/go/src/internal/fuzz/mutator.go +2 -2
- package/bin/go/src/internal/fuzz/worker.go +1 -1
- package/bin/go/src/internal/gate/gate.go +76 -0
- package/bin/go/src/internal/godebugs/table.go +29 -10
- package/bin/go/src/internal/goexperiment/exp_mapsplitgroup_off.go +8 -0
- package/bin/go/src/internal/goexperiment/exp_mapsplitgroup_on.go +8 -0
- package/bin/go/src/internal/goexperiment/flags.go +5 -3
- package/bin/go/src/internal/goversion/goversion.go +1 -1
- package/bin/go/src/internal/lazyregexp/lazyre.go +4 -0
- package/bin/go/src/internal/nettest/conn.go +437 -0
- package/bin/go/src/internal/nettest/listener.go +148 -0
- package/bin/go/src/internal/nettest/packetconn.go +250 -0
- package/bin/go/src/internal/nettest/queue.go +33 -0
- package/bin/go/src/internal/pkgbits/syncmarker_string.go +4 -4
- package/bin/go/src/internal/pkgbits/version.go +27 -1
- package/bin/go/src/internal/platform/supported.go +8 -10
- package/bin/go/src/internal/platform/zosarch.go +1 -3
- package/bin/go/src/internal/poll/fd_mutex.go +49 -10
- package/bin/go/src/internal/poll/fd_unix.go +6 -1
- package/bin/go/src/internal/poll/fd_windows.go +175 -191
- package/bin/go/src/internal/poll/fd_writev_libc.go +1 -1
- package/bin/go/src/internal/poll/fd_writev_unix.go +1 -1
- package/bin/go/src/internal/poll/file_plan9.go +4 -4
- package/bin/go/src/internal/poll/sendfile_windows.go +1 -3
- package/bin/go/src/internal/poll/splice_linux.go +1 -1
- package/bin/go/src/internal/profile/encode.go +1 -1
- package/bin/go/src/internal/profile/profile.go +5 -3
- package/bin/go/src/internal/profilerecord/profilerecord.go +2 -2
- package/bin/go/src/internal/reflectlite/value.go +1 -15
- package/bin/go/src/internal/runtime/atomic/atomic_386.go +0 -6
- package/bin/go/src/internal/runtime/atomic/atomic_amd64.go +0 -6
- package/bin/go/src/internal/runtime/atomic/atomic_andor_generic.go +0 -11
- package/bin/go/src/internal/runtime/atomic/atomic_arm.go +0 -6
- package/bin/go/src/internal/runtime/atomic/atomic_loong64.go +2 -2
- package/bin/go/src/internal/runtime/atomic/atomic_loong64.s +22 -11
- package/bin/go/src/internal/runtime/atomic/atomic_mipsx.go +0 -10
- package/bin/go/src/internal/runtime/atomic/atomic_riscv64.s +4 -4
- package/bin/go/src/internal/runtime/atomic/atomic_s390x.go +0 -6
- package/bin/go/src/internal/runtime/atomic/atomic_wasm.go +0 -31
- package/bin/go/src/internal/runtime/atomic/linkname.go +34 -0
- package/bin/go/src/internal/runtime/exithook/hooks.go +0 -4
- package/bin/go/src/internal/runtime/gc/scan/expand_amd64.s +2285 -2285
- package/bin/go/src/internal/runtime/gc/scan/mkasm.go +1 -1
- package/bin/go/src/internal/runtime/gc/scan/scan_amd64.go +2 -1
- package/bin/go/src/internal/runtime/gc/scan/scan_amd64.s +4 -2
- package/bin/go/src/internal/runtime/maps/group.go +22 -13
- package/bin/go/src/internal/runtime/maps/map.go +35 -14
- package/bin/go/src/internal/runtime/maps/memhash_386.s +408 -0
- package/bin/go/src/internal/runtime/maps/memhash_aes.go +38 -0
- package/bin/go/src/internal/runtime/maps/memhash_aes_asm.go +24 -0
- package/bin/go/src/internal/runtime/maps/memhash_aes_simd.go +49 -0
- package/bin/go/src/internal/runtime/maps/memhash_align_check.go +10 -0
- package/bin/go/src/internal/runtime/maps/memhash_align_nocheck.go +16 -0
- package/bin/go/src/internal/runtime/maps/memhash_amd64.s +426 -0
- package/bin/go/src/internal/runtime/maps/memhash_arm64.s +366 -0
- package/bin/go/src/internal/runtime/maps/memhash_noaes.go +43 -0
- package/bin/go/src/internal/runtime/maps/memhash_nosimd_amd64.s +33 -0
- package/bin/go/src/internal/runtime/maps/runtime.go +37 -88
- package/bin/go/src/internal/runtime/maps/runtime_alg.go +93 -0
- package/bin/go/src/internal/runtime/maps/runtime_fast32.go +111 -97
- package/bin/go/src/internal/runtime/maps/runtime_fast64.go +137 -98
- package/bin/go/src/internal/runtime/maps/runtime_faststr.go +96 -89
- package/bin/go/src/{runtime/hash32.go → internal/runtime/maps/runtime_hash32.go} +8 -10
- package/bin/go/src/{runtime/hash64.go → internal/runtime/maps/runtime_hash64.go} +8 -8
- package/bin/go/src/internal/runtime/maps/table.go +66 -3
- package/bin/go/src/internal/runtime/math/math.go +0 -21
- package/bin/go/src/internal/runtime/startlinetest/func_amd64.s +2 -1
- package/bin/go/src/internal/runtime/sys/dit_arm64.go +3 -0
- package/bin/go/src/internal/runtime/sys/dit_arm64.s +16 -3
- package/bin/go/src/internal/runtime/syscall/linux/asm_linux_s390x.s +0 -23
- package/bin/go/src/internal/runtime/syscall/windows/asm_windows_386.s +7 -4
- package/bin/go/src/internal/runtime/syscall/windows/asm_windows_amd64.s +10 -8
- package/bin/go/src/internal/runtime/syscall/windows/asm_windows_arm64.s +0 -1
- package/bin/go/src/internal/runtime/syscall/windows/defs_windows.go +4 -0
- package/bin/go/src/internal/runtime/syscall/windows/syscall_windows.go +7 -9
- package/bin/go/src/internal/strconv/atof.go +69 -42
- package/bin/go/src/internal/strconv/atoi.go +1 -0
- package/bin/go/src/internal/strconv/ftoa.go +329 -357
- package/bin/go/src/internal/strconv/itoa.go +53 -59
- package/bin/go/src/internal/strconv/pow10gen.go +15 -3
- package/bin/go/src/internal/strconv/pow10tab.go +670 -670
- package/bin/go/src/internal/strconv/uscale.go +290 -0
- package/bin/go/src/internal/stringslite/strings.go +14 -42
- package/bin/go/src/internal/syscall/unix/asm_openbsd.s +0 -2
- package/bin/go/src/internal/syscall/unix/at.go +1 -1
- package/bin/go/src/internal/syscall/unix/at_fstatat.go +1 -1
- package/bin/go/src/internal/syscall/unix/at_libc2.go +1 -1
- package/bin/go/src/internal/syscall/unix/at_openbsd.go +0 -2
- package/bin/go/src/internal/syscall/unix/faccessat_bsd.go +1 -1
- package/bin/go/src/internal/syscall/unix/faccessat_openbsd.go +0 -2
- package/bin/go/src/internal/syscall/windows/at_windows.go +5 -5
- package/bin/go/src/internal/syscall/windows/net_windows.go +1 -0
- package/bin/go/src/internal/syscall/windows/string_windows.go +6 -3
- package/bin/go/src/internal/syscall/windows/syscall_windows.go +2 -0
- package/bin/go/src/internal/syscall/windows/types_windows.go +89 -4
- package/bin/go/src/internal/syscall/windows/zsyscall_windows.go +7 -0
- package/bin/go/src/internal/testenv/testenv.go +24 -1
- package/bin/go/src/internal/trace/event.go +1 -1
- package/bin/go/src/internal/trace/tracev2/events.go +2 -0
- package/bin/go/src/internal/trace/traceviewer/pprof.go +1 -0
- package/bin/go/src/internal/types/errors/generrordocs.go +1 -1
- package/bin/go/src/io/fs/fs.go +4 -1
- package/bin/go/src/io/fs/glob.go +1 -1
- package/bin/go/src/io/fs/readdir.go +3 -3
- package/bin/go/src/io/fs/readfile.go +3 -3
- package/bin/go/src/io/fs/stat.go +1 -1
- package/bin/go/src/io/fs/sub.go +4 -2
- package/bin/go/src/iter/iter.go +2 -2
- package/bin/go/src/log/slog/handler.go +0 -1
- package/bin/go/src/log/slog/json_handler.go +7 -1
- package/bin/go/src/log/slog/logger.go +16 -0
- package/bin/go/src/log/slog/text_handler.go +10 -1
- package/bin/go/src/log/slog/value.go +1 -1
- package/bin/go/src/log/syslog/doc.go +5 -0
- package/bin/go/src/math/abs.go +1 -1
- package/bin/go/src/math/big/accuracy_string.go +4 -4
- package/bin/go/src/math/big/arith.go +1 -1
- package/bin/go/src/math/big/arith_loong64.s +2 -4
- package/bin/go/src/math/big/float.go +2 -0
- package/bin/go/src/math/big/ftoa.go +11 -5
- package/bin/go/src/math/big/int.go +84 -1
- package/bin/go/src/math/big/intconv.go +19 -4
- package/bin/go/src/math/big/internal/asmgen/loong64.go +2 -0
- package/bin/go/src/math/big/nat.go +68 -17
- package/bin/go/src/math/big/natdiv.go +8 -5
- package/bin/go/src/math/big/roundingmode_string.go +3 -2
- package/bin/go/src/math/copysign.go +1 -2
- package/bin/go/src/math/exp2_asm.go +1 -1
- package/bin/go/src/math/exp2_noasm.go +1 -1
- package/bin/go/src/math/exp_asm.go +1 -1
- package/bin/go/src/math/exp_loong64.s +4 -12
- package/bin/go/src/math/exp_noasm.go +1 -1
- package/bin/go/src/math/exp_riscv64.s +236 -0
- package/bin/go/src/math/nextafter.go +4 -2
- package/bin/go/src/math/pow10.go +1 -1
- package/bin/go/src/math/rand/v2/rand.go +14 -4
- package/bin/go/src/mime/type.go +3 -2
- package/bin/go/src/net/dial.go +10 -6
- package/bin/go/src/net/dnsclient_unix.go +37 -8
- package/bin/go/src/net/dnsconfig.go +6 -0
- package/bin/go/src/net/fd_plan9.go +13 -6
- package/bin/go/src/net/fd_unix.go +3 -7
- package/bin/go/src/net/fd_windows.go +4 -9
- package/bin/go/src/net/file_plan9.go +1 -1
- package/bin/go/src/net/file_posix.go +1 -5
- package/bin/go/src/net/http/client.go +21 -4
- package/bin/go/src/net/http/clientconn.go +20 -1
- package/bin/go/src/net/http/clone.go +1 -10
- package/bin/go/src/net/http/cookie.go +5 -6
- package/bin/go/src/net/http/cookiejar/jar.go +6 -4
- package/bin/go/src/net/http/fcgi/fcgi.go +1 -2
- package/bin/go/src/net/http/fs.go +8 -1
- package/bin/go/src/net/http/http.go +29 -12
- package/bin/go/src/net/http/http2.go +561 -0
- package/bin/go/src/net/http/httptest/server.go +305 -60
- package/bin/go/src/net/http/httptrace/trace.go +78 -27
- package/bin/go/src/net/http/httputil/reverseproxy.go +0 -30
- package/bin/go/src/net/http/internal/common.go +14 -0
- package/bin/go/src/net/http/internal/http2/api.go +161 -0
- package/bin/go/src/net/http/internal/http2/ascii.go +53 -0
- package/bin/go/src/net/http/internal/http2/ciphers.go +641 -0
- package/bin/go/src/net/http/internal/http2/client_conn_pool.go +285 -0
- package/bin/go/src/net/http/internal/http2/config.go +118 -0
- package/bin/go/src/net/http/internal/http2/databuffer.go +146 -0
- package/bin/go/src/net/http/internal/http2/errors.go +173 -0
- package/bin/go/src/net/http/internal/http2/flow.go +175 -0
- package/bin/go/src/net/http/internal/http2/frame.go +1905 -0
- package/bin/go/src/net/http/internal/http2/gotrack.go +181 -0
- package/bin/go/src/net/http/internal/http2/http2.go +403 -0
- package/bin/go/src/net/http/internal/http2/pipe.go +184 -0
- package/bin/go/src/net/http/internal/http2/server.go +3238 -0
- package/bin/go/src/net/http/internal/http2/transport.go +3267 -0
- package/bin/go/src/net/http/internal/http2/write.go +380 -0
- package/bin/go/src/net/http/internal/http2/writesched.go +289 -0
- package/bin/go/src/net/http/internal/http2/writesched_priority_rfc9218.go +224 -0
- package/bin/go/src/net/http/internal/http2/writesched_roundrobin.go +119 -0
- package/bin/go/src/net/http/internal/httpcommon/httpcommon.go +8 -0
- package/bin/go/src/net/http/internal/httpsfv/httpsfv.go +666 -0
- package/bin/go/src/net/http/internal/sniff.go +304 -0
- package/bin/go/src/net/http/omithttp2.go +28 -49
- package/bin/go/src/net/http/pprof/pprof.go +11 -17
- package/bin/go/src/net/http/request.go +30 -3
- package/bin/go/src/net/http/response.go +6 -2
- package/bin/go/src/net/http/server.go +366 -144
- package/bin/go/src/net/http/sniff.go +2 -289
- package/bin/go/src/net/http/transfer.go +64 -21
- package/bin/go/src/net/http/transport.go +288 -83
- package/bin/go/src/net/ip.go +4 -0
- package/bin/go/src/net/ipsock_plan9.go +4 -4
- package/bin/go/src/net/ipsock_posix.go +8 -2
- package/bin/go/src/net/lookup.go +10 -0
- package/bin/go/src/net/lookup_windows.go +1 -1
- package/bin/go/src/net/mail/message.go +8 -3
- package/bin/go/src/net/net.go +2 -0
- package/bin/go/src/net/netip/netip.go +68 -61
- package/bin/go/src/net/sock_posix.go +1 -4
- package/bin/go/src/net/textproto/reader.go +11 -3
- package/bin/go/src/net/udpsock_plan9.go +2 -7
- package/bin/go/src/net/unixsock.go +11 -3
- package/bin/go/src/net/url/url.go +33 -0
- package/bin/go/src/os/dir_darwin.go +7 -0
- package/bin/go/src/os/exec/exec.go +16 -2
- package/bin/go/src/os/exec.go +1 -0
- package/bin/go/src/os/file.go +8 -1
- package/bin/go/src/os/root_windows.go +5 -1
- package/bin/go/src/os/signal/doc.go +3 -2
- package/bin/go/src/os/signal/signal.go +18 -6
- package/bin/go/src/os/statat_unix.go +5 -1
- package/bin/go/src/path/filepath/path.go +4 -0
- package/bin/go/src/reflect/asm_s390x.s +0 -10
- package/bin/go/src/reflect/iter.go +13 -13
- package/bin/go/src/reflect/makefunc.go +2 -1
- package/bin/go/src/reflect/map.go +61 -18
- package/bin/go/src/reflect/type.go +63 -46
- package/bin/go/src/reflect/value.go +59 -16
- package/bin/go/src/regexp/exec.go +5 -5
- package/bin/go/src/regexp/regexp.go +382 -319
- package/bin/go/src/regexp/syntax/parse.go +19 -10
- package/bin/go/src/runtime/HACKING.md +19 -0
- package/bin/go/src/runtime/_mkmalloc/constants.go +6 -4
- package/bin/go/src/runtime/_mkmalloc/go.mod +1 -1
- package/bin/go/src/runtime/_mkmalloc/mkmalloc.go +405 -64
- package/bin/go/src/runtime/alg.go +21 -53
- package/bin/go/src/runtime/asm_386.s +11 -461
- package/bin/go/src/runtime/asm_amd64.s +30 -537
- package/bin/go/src/runtime/asm_arm.s +4 -39
- package/bin/go/src/runtime/asm_arm64.s +15 -428
- package/bin/go/src/runtime/asm_loong64.s +37 -47
- package/bin/go/src/runtime/asm_mips64x.s +15 -15
- package/bin/go/src/runtime/asm_mipsx.s +0 -15
- package/bin/go/src/runtime/asm_ppc64x.h +0 -16
- package/bin/go/src/runtime/asm_ppc64x.s +13 -59
- package/bin/go/src/runtime/asm_riscv64.s +30 -91
- package/bin/go/src/runtime/asm_s390x.s +49 -49
- package/bin/go/src/runtime/asm_wasm.s +0 -15
- package/bin/go/src/runtime/atomic_riscv64.s +1 -1
- package/bin/go/src/runtime/cgo/abi_riscv64.h +72 -0
- package/bin/go/src/runtime/cgo/asm_riscv64.s +7 -48
- package/bin/go/src/runtime/cgo/callbacks.go +0 -42
- package/bin/go/src/runtime/cgo/callbacks_unix.go +58 -0
- package/bin/go/src/runtime/cgo/cgo.go +6 -3
- package/bin/go/src/runtime/cgo/gcc_aix_ppc64.S +21 -9
- package/bin/go/src/runtime/cgo/gcc_android.c +0 -26
- package/bin/go/src/runtime/cgo/gcc_clearenv.c +1 -1
- package/bin/go/src/runtime/cgo/gcc_fatalf.c +14 -3
- package/bin/go/src/runtime/cgo/{gcc_libinit.c → gcc_libinit_unix.c} +18 -65
- package/bin/go/src/runtime/cgo/gcc_libinit_windows.c +23 -35
- package/bin/go/src/runtime/cgo/gcc_linux_ppc64x.S +16 -7
- package/bin/go/src/runtime/cgo/gcc_netbsd.c +8 -56
- package/bin/go/src/runtime/cgo/gcc_s390x.S +13 -4
- package/bin/go/src/runtime/cgo/gcc_sigaction.c +1 -1
- package/bin/go/src/runtime/cgo/gcc_unix.c +63 -0
- package/bin/go/src/runtime/cgo/gcc_util.c +0 -19
- package/bin/go/src/runtime/cgo/handle.go +3 -0
- package/bin/go/src/runtime/cgo/libcgo.h +7 -10
- package/bin/go/src/runtime/cgo/libcgo_unix.h +2 -10
- package/bin/go/src/runtime/cgo/pthread_unix.c +138 -0
- package/bin/go/src/runtime/cgo/sigaction.go +1 -1
- package/bin/go/src/runtime/cgo/windows.go +18 -1
- package/bin/go/src/runtime/cgo_ppc64x.go +1 -1
- package/bin/go/src/runtime/cgo_sigaction.go +1 -1
- package/bin/go/src/runtime/cgocall.go +10 -2
- package/bin/go/src/runtime/chan.go +2 -16
- package/bin/go/src/runtime/coro.go +2 -2
- package/bin/go/src/runtime/cpuflags.go +4 -3
- package/bin/go/src/runtime/debug/garbage.go +6 -6
- package/bin/go/src/runtime/debug/mod.go +1 -1
- package/bin/go/src/runtime/debug/stack.go +1 -1
- package/bin/go/src/runtime/debugcall.go +0 -3
- package/bin/go/src/runtime/error.go +6 -0
- package/bin/go/src/runtime/extern.go +5 -3
- package/bin/go/src/runtime/heapdump.go +1 -1
- package/bin/go/src/runtime/iface.go +20 -10
- package/bin/go/src/runtime/libinit.go +48 -0
- package/bin/go/src/runtime/lock_js.go +4 -2
- package/bin/go/src/runtime/lock_spinbit.go +13 -12
- package/bin/go/src/runtime/lock_wasip1.go +4 -2
- package/bin/go/src/runtime/lockrank.go +24 -21
- package/bin/go/src/runtime/lockrank_off.go +5 -2
- package/bin/go/src/runtime/lockrank_on.go +8 -7
- package/bin/go/src/runtime/malloc.go +10 -26
- package/bin/go/src/runtime/malloc_generated.go +819 -8628
- package/bin/go/src/runtime/malloc_stubs.go +187 -197
- package/bin/go/src/runtime/malloc_tables_generated.go +16 -882
- package/bin/go/src/runtime/map.go +4 -4
- package/bin/go/src/runtime/mbitmap.go +3 -1
- package/bin/go/src/runtime/mem.go +2 -6
- package/bin/go/src/runtime/mem_sbrk.go +4 -0
- package/bin/go/src/runtime/memclr_s390x.s +0 -5
- package/bin/go/src/runtime/memmove_s390x.s +0 -7
- package/bin/go/src/runtime/metrics/doc.go +5 -29
- package/bin/go/src/runtime/metrics/sample.go +3 -0
- package/bin/go/src/runtime/metrics.go +3 -2
- package/bin/go/src/runtime/mgc.go +41 -25
- package/bin/go/src/runtime/mgcmark.go +5 -0
- package/bin/go/src/runtime/mgcmark_greenteagc.go +1 -1
- package/bin/go/src/runtime/mgcpacer.go +1 -3
- package/bin/go/src/runtime/mgcscavenge.go +1 -1
- package/bin/go/src/runtime/mheap.go +1 -10
- package/bin/go/src/runtime/mklockrank.go +6 -1
- package/bin/go/src/runtime/mkpreempt.go +7 -0
- package/bin/go/src/runtime/mprof.go +12 -23
- package/bin/go/src/runtime/os2_aix.go +3 -3
- package/bin/go/src/runtime/os3_solaris.go +10 -0
- package/bin/go/src/runtime/os_aix.go +9 -2
- package/bin/go/src/runtime/os_darwin.go +3 -8
- package/bin/go/src/runtime/os_dragonfly.go +10 -0
- package/bin/go/src/runtime/os_js.go +10 -0
- package/bin/go/src/runtime/os_linux32.go +19 -6
- package/bin/go/src/runtime/os_netbsd.go +10 -0
- package/bin/go/src/runtime/os_openbsd.go +10 -0
- package/bin/go/src/runtime/os_plan9.go +10 -0
- package/bin/go/src/runtime/os_wasip1.go +10 -0
- package/bin/go/src/runtime/os_windows.go +45 -12
- package/bin/go/src/runtime/os_workdir_ios_arm64.go +98 -0
- package/bin/go/src/runtime/os_workdir_stub.go +9 -0
- package/bin/go/src/runtime/panic.go +93 -8
- package/bin/go/src/runtime/plugin.go +1 -3
- package/bin/go/src/runtime/pprof/pprof.go +11 -14
- package/bin/go/src/runtime/pprof/protomem.go +8 -15
- package/bin/go/src/runtime/preempt_loong64.s +8 -4
- package/bin/go/src/runtime/preempt_noxreg.go +2 -0
- package/bin/go/src/runtime/preempt_xreg.go +29 -2
- package/bin/go/src/runtime/print.go +9 -1
- package/bin/go/src/runtime/proc.go +68 -17
- package/bin/go/src/runtime/race_riscv64.s +40 -83
- package/bin/go/src/runtime/race_s390x.s +0 -16
- package/bin/go/src/runtime/rand.go +40 -12
- package/bin/go/src/runtime/{rt0_linux_ppc64le.s → rt0_linux_ppc64x.s} +12 -2
- package/bin/go/src/runtime/runtime-gdb.py +13 -2
- package/bin/go/src/runtime/runtime1.go +69 -18
- package/bin/go/src/runtime/runtime2.go +23 -22
- package/bin/go/src/runtime/secret/secret.go +7 -2
- package/bin/go/src/runtime/secret.go +27 -9
- package/bin/go/src/runtime/secret_nosecret.go +1 -1
- package/bin/go/src/runtime/sigaction.go +1 -1
- package/bin/go/src/runtime/signal_unix.go +5 -3
- package/bin/go/src/runtime/softfloat64.go +7 -2
- package/bin/go/src/runtime/string.go +4 -1
- package/bin/go/src/runtime/stubs.go +14 -4
- package/bin/go/src/runtime/stubs_amd64.go +4 -0
- package/bin/go/src/runtime/stubs_arm.go +10 -1
- package/bin/go/src/runtime/stubs_arm64.go +13 -0
- package/bin/go/src/runtime/stubs_loong64.go +18 -0
- package/bin/go/src/runtime/stubs_mips64x.go +9 -0
- package/bin/go/src/runtime/stubs_mipsx.go +11 -0
- package/bin/go/src/runtime/stubs_ppc64x.go +15 -0
- package/bin/go/src/runtime/stubs_riscv64.go +13 -0
- package/bin/go/src/runtime/stubs_s390x.go +18 -0
- package/bin/go/src/runtime/symtab.go +15 -16
- package/bin/go/src/runtime/synctest.go +2 -4
- package/bin/go/src/runtime/sys_aix_ppc64.s +9 -0
- package/bin/go/src/runtime/sys_darwin.go +2 -20
- package/bin/go/src/runtime/sys_darwin_amd64.s +1 -4
- package/bin/go/src/runtime/sys_darwin_arm64.s +3 -6
- package/bin/go/src/runtime/sys_freebsd_riscv64.s +2 -2
- package/bin/go/src/runtime/sys_ios_arm64.go +151 -0
- package/bin/go/src/runtime/sys_ios_arm64.s +78 -0
- package/bin/go/src/runtime/sys_linux_amd64.s +7 -1
- package/bin/go/src/runtime/sys_linux_loong64.s +8 -14
- package/bin/go/src/runtime/sys_linux_ppc64x.s +0 -12
- package/bin/go/src/runtime/sys_linux_riscv64.s +2 -2
- package/bin/go/src/runtime/sys_openbsd.go +1 -1
- package/bin/go/src/runtime/sys_openbsd_riscv64.s +16 -16
- package/bin/go/src/runtime/syscall_windows.go +2 -6
- package/bin/go/src/runtime/time.go +19 -57
- package/bin/go/src/runtime/trace/subscribe.go +0 -3
- package/bin/go/src/runtime/traceback.go +90 -13
- package/bin/go/src/runtime/traceregion.go +3 -3
- package/bin/go/src/runtime/tracestring.go +5 -0
- package/bin/go/src/runtime/type.go +85 -15
- package/bin/go/src/runtime/utf8.go +2 -2
- package/bin/go/src/simd/archsimd/_gen/go.mod +2 -2
- package/bin/go/src/simd/archsimd/_gen/go.sum +2 -2
- package/bin/go/src/simd/archsimd/_gen/main.go +106 -15
- package/bin/go/src/simd/archsimd/_gen/midway/comments.yaml +151 -0
- package/bin/go/src/simd/archsimd/_gen/midway/intersect_simd_ops.go +836 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/asbits.go +139 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/compare_natural.go +73 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/formatted_files.go +66 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/insert_ordered_map.go +159 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/merge_generic_ops.go +245 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arch.go +173 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arm64/emit.go +166 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arm64/instruction.go +642 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arm64/load.go +54 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arm64/operands.go +406 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/etetest.sh +1 -1
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdGenericOps.go +19 -52
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdIntrinsics.go +162 -98
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdMachineOps.go +50 -19
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdTypes.go +198 -140
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdrules.go +278 -57
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdssa.go +133 -68
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_utility.go +163 -30
- package/bin/go/src/simd/archsimd/_gen/simdgen/go_amd64.yaml +1 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/go_arm64.yaml +1 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/godefs.go +113 -15
- package/bin/go/src/simd/archsimd/_gen/simdgen/main.go +62 -17
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/AddSub/categories.yaml +12 -12
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/AddSub/{go.yaml → go_amd64.yaml} +12 -12
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/AddSub/go_arm64.yaml +91 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/BitwiseLogic/categories.yaml +11 -3
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/BitwiseLogic/go_arm64.yaml +43 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Compares/go_arm64.yaml +81 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Converts/categories.yaml +11 -6
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Converts/{go.yaml → go_amd64.yaml} +8 -8
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Converts/go_arm64.yaml +358 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/FPonlyArith/categories.yaml +5 -5
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/FPonlyArith/{go.yaml → go_amd64.yaml} +4 -4
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/FPonlyArith/go_arm64.yaml +52 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/GaloisField/categories.yaml +29 -11
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/GaloisField/{go.yaml → go_amd64.yaml} +1 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/GaloisField/go_arm64.yaml +10 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/IntOnlyArith/categories.yaml +2 -5
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/IntOnlyArith/{go.yaml → go_amd64.yaml} +2 -3
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/IntOnlyArith/go_arm64.yaml +35 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MLOps/categories.yaml +5 -8
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MLOps/{go.yaml → go_amd64.yaml} +7 -5
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MLOps/go_arm64.yaml +31 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MinMax/go_arm64.yaml +61 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Moves/categories.yaml +79 -23
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Moves/{go.yaml → go_amd64.yaml} +213 -104
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Moves/go_arm64.yaml +264 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Mul/categories.yaml +6 -2
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Mul/{go.yaml → go_amd64.yaml} +3 -3
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Mul/go_arm64.yaml +38 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/NegAbs/categories.yaml +7 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/NegAbs/go_arm64.yaml +36 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Others/categories.yaml +5 -1
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Others/go_arm64.yaml +19 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Reduce/categories.yaml +16 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Reduce/go_arm64.yaml +71 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/ShiftRotate/categories.yaml +156 -41
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/ShiftRotate/go_amd64.yaml +299 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/ShiftRotate/go_arm64.yaml +202 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/types.yaml +2 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/xed.go +44 -11
- package/bin/go/src/simd/archsimd/_gen/tmplgen/main.go +668 -123
- package/bin/go/src/simd/archsimd/_gen/unify/closure.go +1 -1
- package/bin/go/src/simd/archsimd/_gen/unify/env.go +35 -3
- package/bin/go/src/simd/archsimd/_gen/unify/yaml.go +4 -4
- package/bin/go/src/simd/archsimd/_gen/wasmgen/main.go +2064 -0
- package/bin/go/src/simd/archsimd/clmul_arm64.go +79 -0
- package/bin/go/src/simd/archsimd/clmul_emulated.go +103 -0
- package/bin/go/src/simd/archsimd/compare_gen_arm64.go +155 -0
- package/bin/go/src/simd/archsimd/cpu.go +1 -1
- package/bin/go/src/simd/archsimd/cpu_other.go +21 -0
- package/bin/go/src/simd/archsimd/doc.go +0 -2
- package/bin/go/src/simd/archsimd/dummy.s +1 -1
- package/bin/go/src/simd/archsimd/generate.go +1 -1
- package/bin/go/src/simd/archsimd/internal/test_helpers/checkslices.go +2 -2
- package/bin/go/src/simd/archsimd/maskmerge_gen_amd64.go +330 -0
- package/bin/go/src/simd/archsimd/maskmerge_gen_arm64.go +167 -0
- package/bin/go/src/simd/archsimd/ops_amd64.go +4210 -2475
- package/bin/go/src/simd/archsimd/ops_arm64.go +2186 -0
- package/bin/go/src/simd/archsimd/ops_emulated_amd64.go +205 -0
- package/bin/go/src/simd/archsimd/ops_emulated_wasm.go +212 -0
- package/bin/go/src/simd/archsimd/ops_internal_amd64.go +500 -56
- package/bin/go/src/simd/archsimd/ops_internal_arm64.go +234 -0
- package/bin/go/src/simd/archsimd/ops_wasm.go +1795 -0
- package/bin/go/src/simd/archsimd/other_gen_amd64.go +576 -72
- package/bin/go/src/simd/archsimd/other_gen_arm64.go +519 -0
- package/bin/go/src/simd/archsimd/shuffles_amd64.go +217 -76
- package/bin/go/src/simd/archsimd/slice_gen_amd64.go +594 -532
- package/bin/go/src/simd/archsimd/slice_gen_arm64.go +125 -0
- package/bin/go/src/simd/archsimd/slicepart_128.go +302 -0
- package/bin/go/src/simd/archsimd/slicepart_amd64.go +36 -235
- package/bin/go/src/simd/archsimd/slicepart_arm64.go +217 -0
- package/bin/go/src/simd/archsimd/slicepart_wasm.go +217 -0
- package/bin/go/src/simd/archsimd/string.go +1 -1
- package/bin/go/src/simd/archsimd/types_amd64.go +165 -341
- package/bin/go/src/simd/archsimd/types_arm64.go +224 -0
- package/bin/go/src/simd/archsimd/types_wasm.go +354 -0
- package/bin/go/src/simd/archsimd/unsafe_helpers.go +60 -0
- package/bin/go/src/simd/doc.go +91 -0
- package/bin/go/src/simd/dummy.s +7 -0
- package/bin/go/src/simd/internal/bridge/decls_amd64.go +4085 -0
- package/bin/go/src/simd/internal/bridge/decls_arm64.go +1369 -0
- package/bin/go/src/simd/internal/bridge/decls_wasm.go +1369 -0
- package/bin/go/src/simd/internal/bridge/import_hook.go +13 -0
- package/bin/go/src/simd/internal/bridge/simd_emulated.go +3275 -0
- package/bin/go/src/simd/internal/bridge/simd_types_emulated.go +95 -0
- package/bin/go/src/simd/internal/bridge/tofrom_128.go +65 -0
- package/bin/go/src/simd/internal/bridge/tofrom_amd64.go +123 -0
- package/bin/go/src/simd/internal/bridge/tofrom_emulated.go +63 -0
- package/bin/go/src/simd/midway_amd64.go +34 -0
- package/bin/go/src/simd/midway_arm64.go +22 -0
- package/bin/go/src/simd/midway_common.go +138 -0
- package/bin/go/src/simd/midway_wasm.go +13 -0
- package/bin/go/src/simd/simd_emulated.go +3275 -0
- package/bin/go/src/simd/simd_stubs.go +1041 -0
- package/bin/go/src/simd/simd_types.go +96 -0
- package/bin/go/src/simd/tofrom_amd64.go +374 -0
- package/bin/go/src/simd/tofrom_arm64.go +290 -0
- package/bin/go/src/simd/tofrom_wasm.go +290 -0
- package/bin/go/src/slices/slices.go +9 -7
- package/bin/go/src/strconv/isprint.go +81 -51
- package/bin/go/src/strings/builder.go +1 -1
- package/bin/go/src/strings/strings.go +44 -35
- package/bin/go/src/sync/atomic/doc.go +7 -0
- package/bin/go/src/sync/cond.go +4 -2
- package/bin/go/src/sync/pool.go +6 -15
- package/bin/go/src/sync/runtime2_lockrank.go +1 -2
- package/bin/go/src/syscall/exec_bsd.go +3 -3
- package/bin/go/src/syscall/exec_libc2.go +1 -1
- package/bin/go/src/syscall/exec_linux.go +7 -2
- package/bin/go/src/syscall/fs_js.go +9 -4
- package/bin/go/src/syscall/fs_wasip1.go +6 -0
- package/bin/go/src/syscall/js/js.go +2 -2
- package/bin/go/src/syscall/linkname_bsd.go +8 -0
- package/bin/go/src/syscall/linkname_libc.go +1 -1
- package/bin/go/src/syscall/linkname_openbsd.go +0 -2
- package/bin/go/src/syscall/mkall.sh +6 -17
- package/bin/go/src/syscall/syscall_aix.go +5 -0
- package/bin/go/src/syscall/syscall_linux_386.go +9 -0
- package/bin/go/src/syscall/syscall_linux_amd64.go +5 -0
- package/bin/go/src/syscall/syscall_linux_arm.go +4 -0
- package/bin/go/src/syscall/syscall_linux_arm64.go +3 -0
- package/bin/go/src/syscall/syscall_linux_loong64.go +3 -0
- package/bin/go/src/syscall/syscall_linux_mipsx.go +4 -0
- package/bin/go/src/syscall/syscall_linux_riscv64.go +3 -0
- package/bin/go/src/syscall/syscall_linux_s390x.go +5 -0
- package/bin/go/src/syscall/syscall_openbsd.go +77 -2
- package/bin/go/src/syscall/syscall_plan9.go +25 -0
- package/bin/go/src/syscall/syscall_solaris.go +11 -0
- package/bin/go/src/syscall/syscall_unix.go +19 -0
- package/bin/go/src/syscall/syscall_windows.go +1 -1
- package/bin/go/src/testing/synctest/synctest.go +21 -0
- package/bin/go/src/testing/testing.go +211 -52
- package/bin/go/src/text/template/parse/lex.go +6 -6
- package/bin/go/src/text/template/parse/node.go +21 -16
- package/bin/go/src/text/template/parse/parse.go +23 -6
- package/bin/go/src/text/template/template.go +5 -3
- package/bin/go/src/time/format.go +3 -0
- package/bin/go/src/time/sleep.go +0 -33
- package/bin/go/src/time/tick.go +3 -2
- package/bin/go/src/time/time.go +2 -2
- package/bin/go/src/time/tzdata/zzipdata.go +1 -1
- package/bin/go/src/time/zoneinfo.go +5 -4
- package/bin/go/src/time/zoneinfo_read.go +1 -1
- package/bin/go/src/unicode/tables.go +898 -417
- package/bin/go/src/uuid/uuid.go +273 -0
- package/bin/go/src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go +3 -3
- package/bin/go/src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s +2066 -6598
- package/bin/go/src/vendor/golang.org/x/crypto/hkdf/hkdf.go +100 -0
- package/bin/go/src/vendor/golang.org/x/net/dns/dnsmessage/message.go +5 -4
- package/bin/go/src/vendor/golang.org/x/net/http/httpproxy/proxy.go +4 -4
- package/bin/go/src/vendor/golang.org/x/net/http3/http3.go +46 -0
- package/bin/go/src/vendor/golang.org/x/net/idna/{idna10.0.0.go → idna.go} +133 -35
- package/bin/go/src/vendor/golang.org/x/net/idna/punycode.go +4 -1
- package/bin/go/src/vendor/golang.org/x/net/idna/tables15.0.0.go +1 -1
- package/bin/go/src/vendor/golang.org/x/net/idna/tables17.0.0.go +5302 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/body.go +231 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/conn.go +131 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/doc.go +10 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/errors.go +102 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/http3.go +95 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/qpack.go +356 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/qpack_decode.go +81 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/qpack_encode.go +61 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/qpack_static.go +142 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/quic.go +40 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/roundtrip.go +423 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/server.go +866 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/settings.go +66 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/stream.go +260 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/transport.go +333 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/varint.go +23 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/httpcommon/ascii.go +53 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/httpcommon/headermap.go +115 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/httpcommon/request.go +475 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/quic/quicwire/wire.go +150 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/ack_delay.go +26 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/acks.go +213 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/atomic_bits.go +31 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/config.go +158 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/congestion_reno.go +306 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn.go +434 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_close.go +340 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_flow.go +142 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_id.go +502 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_loss.go +85 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_recv.go +631 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_send.go +407 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_streams.go +483 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/crypto_stream.go +157 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/dgram.go +53 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/doc.go +50 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/endpoint.go +478 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/errors.go +129 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/frame_debug.go +730 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/gate.go +86 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/idle.go +168 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/log.go +67 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/loss.go +521 -0
- package/bin/go/src/{runtime/cgo/gcc_stack_windows.c → vendor/golang.org/x/net/quic/math.go} +7 -2
- package/bin/go/src/vendor/golang.org/x/net/quic/pacer.go +129 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet.go +267 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet_number.go +72 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet_parser.go +519 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet_protection.go +539 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet_writer.go +566 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/path.go +87 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/ping.go +14 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/pipe.go +173 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/qlog.go +272 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/queue.go +63 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/quic.go +221 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/race_disabled.go +10 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/race_enabled.go +27 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/rangeset.go +193 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/retry.go +240 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/rtt.go +71 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/sent_packet.go +119 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/sent_packet_list.go +93 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/sent_val.go +103 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/skip.go +62 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/stateless_reset.go +59 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/stream.go +1106 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/stream_limits.go +138 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/tls.go +123 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/transport_params.go +283 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp.go +28 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_darwin.go +45 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_linux.go +39 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_msg.go +245 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_other.go +62 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_packetconn.go +67 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/asm_darwin_arm64_gc.s +12 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu.go +12 -7
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_arm64.go +3 -6
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64.go +67 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64_other.go +31 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go +1 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go +2 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_loong64.go +14 -2
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go +4 -2
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_riscv64.go +1 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_windows.go +26 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_windows_arm64.go +38 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_x86.go +124 -50
- package/bin/go/src/vendor/golang.org/x/sys/cpu/syscall_darwin_arm64_gc.go +54 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/zcpu_windows.go +48 -0
- package/bin/go/src/vendor/golang.org/x/text/secure/bidirule/bidirule.go +4 -0
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables15.0.0.go +1 -1
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables17.0.0.go +2135 -0
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/forminfo.go +18 -8
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables15.0.0.go +1410 -1410
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/{tables13.0.0.go → tables17.0.0.go} +3530 -3186
- package/bin/go/src/vendor/modules.txt +14 -8
- package/bin/ttsc-cache.exe +0 -0
- package/bin/ttsc.exe +0 -0
- package/bin/ttscserver.exe +0 -0
- package/package.json +1 -1
- package/bin/go/src/crypto/internal/fips140/nistec/p256_ordinv_noasm.go +0 -13
- package/bin/go/src/go/internal/scannerhooks/hooks.go +0 -11
- package/bin/go/src/hash/maphash/maphash_purego.go +0 -200
- package/bin/go/src/hash/maphash/maphash_runtime.go +0 -64
- package/bin/go/src/internal/goexperiment/exp_goroutineleakprofile_off.go +0 -8
- package/bin/go/src/internal/goexperiment/exp_goroutineleakprofile_on.go +0 -8
- package/bin/go/src/internal/strconv/atofeisel.go +0 -166
- package/bin/go/src/internal/strconv/ftoadbox.go +0 -349
- package/bin/go/src/internal/strconv/ftoafixed.go +0 -184
- package/bin/go/src/internal/strconv/math.go +0 -179
- package/bin/go/src/net/http/h2_bundle.go +0 -12371
- package/bin/go/src/net/http/h2_error.go +0 -37
- package/bin/go/src/runtime/cgo/gcc_darwin_amd64.c +0 -61
- package/bin/go/src/runtime/cgo/gcc_darwin_arm64.c +0 -148
- package/bin/go/src/runtime/cgo/gcc_dragonfly_amd64.c +0 -61
- package/bin/go/src/runtime/cgo/gcc_freebsd.c +0 -72
- package/bin/go/src/runtime/cgo/gcc_freebsd_amd64.c +0 -72
- package/bin/go/src/runtime/cgo/gcc_linux.c +0 -67
- package/bin/go/src/runtime/cgo/gcc_linux_amd64.c +0 -92
- package/bin/go/src/runtime/cgo/gcc_linux_arm64.c +0 -88
- package/bin/go/src/runtime/cgo/gcc_linux_s390x.c +0 -64
- package/bin/go/src/runtime/cgo/gcc_openbsd.c +0 -62
- package/bin/go/src/runtime/cgo/gcc_ppc64x.c +0 -68
- package/bin/go/src/runtime/cgo/gcc_signal2_ios_arm64.c +0 -11
- package/bin/go/src/runtime/cgo/gcc_signal_ios_arm64.c +0 -213
- package/bin/go/src/runtime/cgo/gcc_signal_ios_nolldb.c +0 -10
- package/bin/go/src/runtime/cgo/gcc_solaris_amd64.c +0 -83
- package/bin/go/src/runtime/cgo/gcc_stack_darwin.c +0 -25
- package/bin/go/src/runtime/cgo/gcc_stack_unix.c +0 -48
- package/bin/go/src/runtime/cgo/gcc_windows_386.c +0 -55
- package/bin/go/src/runtime/cgo/gcc_windows_amd64.c +0 -54
- package/bin/go/src/runtime/cgo/gcc_windows_arm64.c +0 -42
- package/bin/go/src/runtime/cgo/libcgo_windows.h +0 -6
- package/bin/go/src/runtime/cgo/signal_ios_arm64.go +0 -10
- package/bin/go/src/runtime/cgo/signal_ios_arm64.s +0 -56
- package/bin/go/src/runtime/rt0_linux_ppc64.s +0 -28
- package/bin/go/src/runtime/stubs_ppc64.go +0 -12
- package/bin/go/src/simd/archsimd/_gen/simdgen/go.yaml +0 -1
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/ShiftRotate/go.yaml +0 -172
- package/bin/go/src/syscall/asm_openbsd_mips64.s +0 -129
- package/bin/go/src/syscall/syscall_openbsd1.go +0 -12
- package/bin/go/src/syscall/syscall_openbsd_libc.go +0 -84
- package/bin/go/src/syscall/syscall_openbsd_mips64.go +0 -43
- package/bin/go/src/syscall/zerrors_openbsd_mips64.go +0 -1682
- package/bin/go/src/syscall/zsyscall_openbsd_mips64.go +0 -1289
- package/bin/go/src/syscall/zsysnum_openbsd_mips64.go +0 -218
- package/bin/go/src/syscall/ztypes_openbsd_mips64.go +0 -443
- package/bin/go/src/vendor/golang.org/x/net/idna/go118.go +0 -13
- package/bin/go/src/vendor/golang.org/x/net/idna/idna9.0.0.go +0 -717
- package/bin/go/src/vendor/golang.org/x/net/idna/pre_go118.go +0 -11
- package/bin/go/src/vendor/golang.org/x/net/idna/tables10.0.0.go +0 -4559
- package/bin/go/src/vendor/golang.org/x/net/idna/tables11.0.0.go +0 -4653
- package/bin/go/src/vendor/golang.org/x/net/idna/tables12.0.0.go +0 -4733
- package/bin/go/src/vendor/golang.org/x/net/idna/tables13.0.0.go +0 -4959
- package/bin/go/src/vendor/golang.org/x/net/idna/tables9.0.0.go +0 -4486
- package/bin/go/src/vendor/golang.org/x/net/idna/trie12.0.0.go +0 -30
- package/bin/go/src/vendor/golang.org/x/net/idna/trie13.0.0.go +0 -30
- package/bin/go/src/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go +0 -11
- package/bin/go/src/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go +0 -14
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go +0 -1815
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go +0 -1887
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go +0 -1923
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables13.0.0.go +0 -1955
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go +0 -1781
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables10.0.0.go +0 -7657
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go +0 -7693
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go +0 -7710
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables9.0.0.go +0 -7637
- /package/bin/go/src/simd/archsimd/_gen/simdgen/ops/BitwiseLogic/{go.yaml → go_amd64.yaml} +0 -0
- /package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Compares/{go.yaml → go_amd64.yaml} +0 -0
- /package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MinMax/{go.yaml → go_amd64.yaml} +0 -0
- /package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Others/{go.yaml → go_amd64.yaml} +0 -0
|
@@ -9,10 +9,7 @@
|
|
|
9
9
|
// primitive data types such as booleans, strings, and numbers,
|
|
10
10
|
// in addition to structured data types such as objects and arrays.
|
|
11
11
|
//
|
|
12
|
-
//
|
|
13
|
-
// and not subject to the Go 1 compatibility promise.
|
|
14
|
-
// It only exists when building with the GOEXPERIMENT=jsonv2 environment variable set.
|
|
15
|
-
// Most users should use [encoding/json].
|
|
12
|
+
// See the [Working with JSON] tutorial for an introduction to this package.
|
|
16
13
|
//
|
|
17
14
|
// [Marshal] and [Unmarshal] encode and decode Go values
|
|
18
15
|
// to/from JSON text contained within a []byte.
|
|
@@ -58,7 +55,7 @@
|
|
|
58
55
|
// if [RejectUnknownMembers] is specified.
|
|
59
56
|
//
|
|
60
57
|
// The representation of each struct field can be customized in the
|
|
61
|
-
// "json" struct field tag, where the tag is a comma
|
|
58
|
+
// "json" struct field tag, where the tag is a comma-separated list of options.
|
|
62
59
|
// As a special case, if the entire tag is `json:"-"`,
|
|
63
60
|
// then the field is ignored with regard to its JSON representation.
|
|
64
61
|
// Some options also have equivalent behavior controlled by a caller-specified [Options].
|
|
@@ -66,11 +63,7 @@
|
|
|
66
63
|
//
|
|
67
64
|
// The first option is the JSON object name override for the Go struct field.
|
|
68
65
|
// If the name is not specified, then the Go struct field name
|
|
69
|
-
// is used as the JSON object name.
|
|
70
|
-
// or names identical to "" or "-", can be specified using
|
|
71
|
-
// a single-quoted string literal, where the syntax is identical to
|
|
72
|
-
// the Go grammar for a double-quoted string literal,
|
|
73
|
-
// but instead uses single quotes as the delimiters.
|
|
66
|
+
// is used as the JSON object name.
|
|
74
67
|
// By default, unmarshaling uses case-sensitive matching to identify
|
|
75
68
|
// the Go struct field associated with a JSON object name.
|
|
76
69
|
//
|
|
@@ -87,60 +80,49 @@
|
|
|
87
80
|
// encoded as a JSON null, empty string, empty object, or empty array.
|
|
88
81
|
// This option has no effect when unmarshaling.
|
|
89
82
|
//
|
|
90
|
-
// - string: The "string" option specifies that [StringifyNumbers]
|
|
91
|
-
//
|
|
92
|
-
// This causes
|
|
93
|
-
//
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
//
|
|
83
|
+
// - string: The "string" option specifies that [StringifyNumbers] be set
|
|
84
|
+
// when marshaling or unmarshaling a struct field value.
|
|
85
|
+
// This causes types that would normally be encoded as a JSON number
|
|
86
|
+
// to instead be encoded as a JSON number quoted within a JSON string,
|
|
87
|
+
// and to be decoded from a JSON string containing the JSON number
|
|
88
|
+
// without any surrounding whitespace.
|
|
89
|
+
// The "string" option only applies to the top-level of the Go struct field
|
|
90
|
+
// value. It is an error to apply this option to any type that does not
|
|
91
|
+
// encode as a JSON number.
|
|
92
|
+
// Note that composite types such as arrays, slices, structs, and maps do
|
|
93
|
+
// not encode as a JSON number, so applying this option will cause an error
|
|
94
|
+
// rather than affecting JSON numbers within such types.
|
|
95
|
+
// This extra level of encoding is often necessary since many JSON parsers
|
|
96
|
+
// cannot precisely represent 64-bit integers.
|
|
97
97
|
//
|
|
98
98
|
// - case: When unmarshaling, the "case" option specifies how
|
|
99
99
|
// JSON object names are matched with the JSON name for Go struct fields.
|
|
100
100
|
// The option is a key-value pair specified as "case:value" where
|
|
101
101
|
// the value must either be 'ignore' or 'strict'.
|
|
102
|
-
// The 'ignore' value specifies that matching is case-insensitive
|
|
103
|
-
//
|
|
104
|
-
// the
|
|
102
|
+
// The 'ignore' value specifies that matching is case-insensitive,
|
|
103
|
+
// and also ignores dashes and underscores. If multiple fields match,
|
|
104
|
+
// then the field with an exact name match is selected, otherwise an error
|
|
105
|
+
// is reported because the choice of field to unmarshal into is ambiguous.
|
|
105
106
|
// The 'strict' value specifies that matching is case-sensitive.
|
|
106
107
|
// This takes precedence over the [MatchCaseInsensitiveNames] option.
|
|
107
108
|
//
|
|
108
|
-
// -
|
|
109
|
+
// - embed: The "embed" option specifies that
|
|
109
110
|
// the JSON representable content of this field type is to be promoted
|
|
110
|
-
// as if
|
|
111
|
+
// as if it were specified in the parent struct.
|
|
111
112
|
// It is the JSON equivalent of Go struct embedding.
|
|
112
|
-
// A Go embedded field is implicitly
|
|
113
|
-
// is specified. The
|
|
113
|
+
// A Go embedded field is implicitly JSON embedded unless
|
|
114
|
+
// an explicit JSON name is specified. The embedded field must be a Go struct
|
|
114
115
|
// (that does not implement any JSON methods), [jsontext.Value],
|
|
115
116
|
// map[~string]T, or an unnamed pointer to such types. When marshaling,
|
|
116
|
-
//
|
|
117
|
-
//
|
|
118
|
-
// “
|
|
117
|
+
// embedded fields from a pointer type are omitted if it is nil.
|
|
118
|
+
// Embedded fields of type [jsontext.Value] and map[~string]T are called
|
|
119
|
+
// “embedded fallbacks” as they can represent all possible
|
|
119
120
|
// JSON object members not directly handled by the parent struct.
|
|
120
|
-
// Only one
|
|
121
|
+
// Only one embedded fallback field may be specified in a struct,
|
|
121
122
|
// while many non-fallback fields may be specified. This option
|
|
122
123
|
// must not be specified with any other option (including the JSON name).
|
|
123
124
|
//
|
|
124
|
-
//
|
|
125
|
-
// of the inlined fallback to indicate that this Go struct field
|
|
126
|
-
// contains any number of unknown JSON object members. The field type must
|
|
127
|
-
// be a [jsontext.Value], map[~string]T, or an unnamed pointer to such types.
|
|
128
|
-
// If [DiscardUnknownMembers] is specified when marshaling,
|
|
129
|
-
// the contents of this field are ignored.
|
|
130
|
-
// If [RejectUnknownMembers] is specified when unmarshaling,
|
|
131
|
-
// any unknown object members are rejected regardless of whether
|
|
132
|
-
// an inlined fallback with the "unknown" option exists. This option
|
|
133
|
-
// must not be specified with any other option (including the JSON name).
|
|
134
|
-
//
|
|
135
|
-
// - format: The "format" option specifies a format flag
|
|
136
|
-
// used to specialize the formatting of the field value.
|
|
137
|
-
// The option is a key-value pair specified as "format:value" where
|
|
138
|
-
// the value must be either a literal consisting of letters and numbers
|
|
139
|
-
// (e.g., "format:RFC3339") or a single-quoted string literal
|
|
140
|
-
// (e.g., "format:'2006-01-02'"). The interpretation of the format flag
|
|
141
|
-
// is determined by the struct field type.
|
|
142
|
-
//
|
|
143
|
-
// The "omitzero" and "omitempty" options are mostly semantically identical.
|
|
125
|
+
// The "omitzero" and "omitempty" options behave similarly.
|
|
144
126
|
// The former is defined in terms of the Go type system,
|
|
145
127
|
// while the latter in terms of the JSON type system.
|
|
146
128
|
// Consequently they behave differently in some circumstances.
|
|
@@ -149,14 +131,14 @@
|
|
|
149
131
|
// The "omitzero" option is useful for types with a well-defined zero value
|
|
150
132
|
// (e.g., [net/netip.Addr]) or have an IsZero method (e.g., [time.Time.IsZero]).
|
|
151
133
|
//
|
|
152
|
-
// Every Go struct corresponds to a list of JSON
|
|
134
|
+
// Every Go struct corresponds to a list of JSON-representable fields
|
|
153
135
|
// which is constructed by performing a breadth-first search over
|
|
154
136
|
// all struct fields (excluding unexported or ignored fields),
|
|
155
|
-
// where the search recursively descends into
|
|
156
|
-
// The set of non-
|
|
137
|
+
// where the search recursively descends into embedded structs.
|
|
138
|
+
// The set of non-embedded fields in a struct must have unique JSON names.
|
|
157
139
|
// If multiple fields all have the same JSON name, then the one
|
|
158
140
|
// at shallowest depth takes precedence and the other fields at deeper depths
|
|
159
|
-
// are excluded from the list of JSON
|
|
141
|
+
// are excluded from the list of JSON-representable fields.
|
|
160
142
|
// If multiple fields at the shallowest depth have the same JSON name,
|
|
161
143
|
// but exactly one is explicitly tagged with a JSON name,
|
|
162
144
|
// then that field takes precedence and all others are excluded from the list.
|
|
@@ -164,7 +146,9 @@
|
|
|
164
146
|
// with embedded struct types.
|
|
165
147
|
//
|
|
166
148
|
// Marshaling or unmarshaling a non-empty struct
|
|
167
|
-
// without any JSON
|
|
149
|
+
// without any JSON-representable fields results in a [SemanticError],
|
|
150
|
+
// unless the Go struct has a field with an explicit `json` tag,
|
|
151
|
+
// which signals that the type has a valid JSON representation (even if empty).
|
|
168
152
|
// Unexported fields must not have any `json` tags except for `json:"-"`.
|
|
169
153
|
//
|
|
170
154
|
// # Security Considerations
|
|
@@ -176,8 +160,8 @@
|
|
|
176
160
|
//
|
|
177
161
|
// [For example, suppose we have two micro-services.]
|
|
178
162
|
// The first service is responsible for authenticating a JSON request,
|
|
179
|
-
// while the second service is responsible for executing the request
|
|
180
|
-
//
|
|
163
|
+
// while the second service is responsible for executing the request,
|
|
164
|
+
// assuming that it was authenticated.
|
|
181
165
|
// If an attacker were able to maliciously craft a JSON request such that
|
|
182
166
|
// both services believe that the same request is from different users,
|
|
183
167
|
// it could bypass the authenticator with valid credentials for one user,
|
|
@@ -259,6 +243,7 @@
|
|
|
259
243
|
// The v2 API generally chooses more secure defaults than v1,
|
|
260
244
|
// but care should still be taken with large integers or unknown members.
|
|
261
245
|
//
|
|
246
|
+
// [Working with JSON]: https://go.dev/doc/tutorial/json
|
|
262
247
|
// [For example, suppose we have two micro-services.]: https://www.youtube.com/watch?v=avilmOcHKHE&t=1057s
|
|
263
248
|
package json
|
|
264
249
|
|
|
@@ -39,6 +39,10 @@ import (
|
|
|
39
39
|
// This error is only returned if [RejectUnknownMembers] is true.
|
|
40
40
|
var ErrUnknownName = errors.New("unknown object member name")
|
|
41
41
|
|
|
42
|
+
// errAmbiguousName indicates a JSON object member could be unmarshal
|
|
43
|
+
// into multiple candidate Go struct fields.
|
|
44
|
+
var errAmbiguousName = errors.New("ambiguous object member name")
|
|
45
|
+
|
|
42
46
|
const errorPrefix = "json: "
|
|
43
47
|
|
|
44
48
|
func isSemanticError(err error) bool {
|
|
@@ -51,7 +55,7 @@ func isSyntacticError(err error) bool {
|
|
|
51
55
|
return ok
|
|
52
56
|
}
|
|
53
57
|
|
|
54
|
-
// isFatalError reports whether this error must terminate
|
|
58
|
+
// isFatalError reports whether this error must terminate arshaling.
|
|
55
59
|
// All errors are considered fatal unless operating under
|
|
56
60
|
// [jsonflags.ReportErrorsWithLegacySemantics] in which case only
|
|
57
61
|
// syntactic errors and I/O errors are considered fatal.
|
|
@@ -61,7 +65,7 @@ func isFatalError(err error, flags jsonflags.Flags) bool {
|
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
// SemanticError describes an error determining the meaning
|
|
64
|
-
// of JSON data as Go data or vice
|
|
68
|
+
// of JSON data as Go data, or vice versa.
|
|
65
69
|
//
|
|
66
70
|
// If a [Marshaler], [MarshalerTo], [Unmarshaler], or [UnmarshalerFrom] method
|
|
67
71
|
// returns a SemanticError when called by the [json] package,
|
|
@@ -75,7 +79,7 @@ type SemanticError struct {
|
|
|
75
79
|
|
|
76
80
|
action string // either "marshal" or "unmarshal"
|
|
77
81
|
|
|
78
|
-
// ByteOffset indicates that an error occurred after this byte offset.
|
|
82
|
+
// ByteOffset indicates that an error occurred at or after this byte offset.
|
|
79
83
|
ByteOffset int64
|
|
80
84
|
// JSONPointer indicates that an error occurred within this JSON value
|
|
81
85
|
// as indicated using the JSON Pointer notation (see RFC 6901).
|
|
@@ -99,9 +103,9 @@ type coder interface {
|
|
|
99
103
|
Options() Options
|
|
100
104
|
}
|
|
101
105
|
|
|
102
|
-
// newInvalidFormatError
|
|
106
|
+
// newInvalidFormatError constructs a SemanticError because
|
|
103
107
|
// the current type t cannot handle the provided options format.
|
|
104
|
-
// This
|
|
108
|
+
// This function must be called before producing or consuming the next value.
|
|
105
109
|
//
|
|
106
110
|
// If [jsonflags.ReportErrorsWithLegacySemantics] is specified,
|
|
107
111
|
// then this automatically skips the next value when unmarshaling
|
|
@@ -159,13 +163,22 @@ func newUnmarshalErrorBeforeWithSkipping(d *jsontext.Decoder, t reflect.Type, er
|
|
|
159
163
|
// is positioned right after the previous token or value, which caused an error.
|
|
160
164
|
func newUnmarshalErrorAfter(d *jsontext.Decoder, t reflect.Type, err error) error {
|
|
161
165
|
tokOrVal := export.Decoder(d).PreviousTokenOrValue()
|
|
166
|
+
byteOffset := d.InputOffset() - int64(len(tokOrVal))
|
|
167
|
+
if export.Decoder(d).Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) {
|
|
168
|
+
// NOTE: In v1, the offset pointed to the end of the bad token or value.
|
|
169
|
+
if k := jsontext.Value(tokOrVal).Kind(); k == '[' || k == '{' {
|
|
170
|
+
byteOffset++ // add just the '[' or '{'
|
|
171
|
+
} else {
|
|
172
|
+
byteOffset += int64(len(tokOrVal))
|
|
173
|
+
}
|
|
174
|
+
}
|
|
162
175
|
return &SemanticError{action: "unmarshal", GoType: t, Err: toUnexpectedEOF(err),
|
|
163
|
-
ByteOffset:
|
|
176
|
+
ByteOffset: byteOffset,
|
|
164
177
|
JSONPointer: jsontext.Pointer(export.Decoder(d).AppendStackPointer(nil, -1)),
|
|
165
178
|
JSONKind: jsontext.Value(tokOrVal).Kind()}
|
|
166
179
|
}
|
|
167
180
|
|
|
168
|
-
//
|
|
181
|
+
// newUnmarshalErrorAfterWithValue wraps err in a SemanticError assuming that d
|
|
169
182
|
// is positioned right after the previous token or value, which caused an error.
|
|
170
183
|
// It also stores a copy of the last JSON value if it is a string or number.
|
|
171
184
|
func newUnmarshalErrorAfterWithValue(d *jsontext.Decoder, t reflect.Type, err error) error {
|
|
@@ -299,6 +312,13 @@ func collapseSemanticErrors(err error) error {
|
|
|
299
312
|
return err
|
|
300
313
|
}
|
|
301
314
|
|
|
315
|
+
func wrapErrUnsupported(err error, what string) error {
|
|
316
|
+
if errors.Is(err, errors.ErrUnsupported) {
|
|
317
|
+
return errors.New(what + " may not return errors.ErrUnsupported")
|
|
318
|
+
}
|
|
319
|
+
return err
|
|
320
|
+
}
|
|
321
|
+
|
|
302
322
|
// errorModalVerb is a modal verb like "cannot" or "unable to".
|
|
303
323
|
//
|
|
304
324
|
// Once per process, Hyrum-proof the error message by deliberately
|
|
@@ -380,9 +400,9 @@ func (e *SemanticError) Error() string {
|
|
|
380
400
|
}
|
|
381
401
|
|
|
382
402
|
// Special handling for unknown names.
|
|
383
|
-
if e.Err == ErrUnknownName {
|
|
403
|
+
if e.Err == ErrUnknownName || e.Err == errAmbiguousName {
|
|
384
404
|
sb.WriteString(": ")
|
|
385
|
-
sb.WriteString(
|
|
405
|
+
sb.WriteString(e.Err.Error())
|
|
386
406
|
sb.WriteString(" ")
|
|
387
407
|
sb.WriteString(strconv.Quote(e.JSONPointer.LastToken()))
|
|
388
408
|
if parent := e.JSONPointer.Parent(); parent != "" {
|
|
@@ -29,10 +29,12 @@ type isZeroer interface {
|
|
|
29
29
|
var isZeroerType = reflect.TypeFor[isZeroer]()
|
|
30
30
|
|
|
31
31
|
type structFields struct {
|
|
32
|
-
flattened
|
|
33
|
-
byActualName
|
|
34
|
-
byFoldedName
|
|
35
|
-
|
|
32
|
+
flattened []structField // listed in depth-first ordering
|
|
33
|
+
byActualName map[string]*structField
|
|
34
|
+
byFoldedName map[string][]*structField
|
|
35
|
+
embeddedFallback *structField
|
|
36
|
+
|
|
37
|
+
errUnsupportedFormat *SemanticError
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
// reindex recomputes index to avoid bounds check during runtime.
|
|
@@ -51,8 +53,8 @@ func (sf *structFields) reindex() {
|
|
|
51
53
|
for i := range sf.flattened {
|
|
52
54
|
reindex(&sf.flattened[i])
|
|
53
55
|
}
|
|
54
|
-
if sf.
|
|
55
|
-
reindex(sf.
|
|
56
|
+
if sf.embeddedFallback != nil {
|
|
57
|
+
reindex(sf.embeddedFallback)
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
|
|
@@ -80,25 +82,25 @@ func makeStructFields(root reflect.Type) (fs structFields, serr *SemanticError)
|
|
|
80
82
|
return cmp.Or(serr, &SemanticError{GoType: t, Err: fmt.Errorf(f, a...)})
|
|
81
83
|
}
|
|
82
84
|
|
|
83
|
-
// Setup a queue for a
|
|
85
|
+
// Setup a queue for a breadth-first search.
|
|
84
86
|
var queueIndex int
|
|
85
87
|
type queueEntry struct {
|
|
86
88
|
typ reflect.Type
|
|
87
89
|
index []int
|
|
88
|
-
visitChildren bool // whether to recursively visit
|
|
90
|
+
visitChildren bool // whether to recursively visit embedded field in this struct
|
|
89
91
|
}
|
|
90
92
|
queue := []queueEntry{{root, nil, true}}
|
|
91
93
|
seen := map[reflect.Type]bool{root: true}
|
|
92
94
|
|
|
93
95
|
// Perform a breadth-first search over all reachable fields.
|
|
94
96
|
// This ensures that len(f.index) will be monotonically increasing.
|
|
95
|
-
var allFields,
|
|
97
|
+
var allFields, embeddedFallbacks []structField
|
|
96
98
|
for queueIndex < len(queue) {
|
|
97
99
|
qe := queue[queueIndex]
|
|
98
100
|
queueIndex++
|
|
99
101
|
|
|
100
102
|
t := qe.typ
|
|
101
|
-
|
|
103
|
+
embeddedFallbackIndex := -1 // index of last embedded fallback field in current struct
|
|
102
104
|
namesIndex := make(map[string]int) // index of each field with a given JSON object name in current struct
|
|
103
105
|
var hasAnyJSONTag bool // whether any Go struct field has a `json` tag
|
|
104
106
|
var hasAnyJSONField bool // whether any JSON serializable fields exist in current struct
|
|
@@ -126,80 +128,73 @@ func makeStructFields(root reflect.Type) (fs structFields, serr *SemanticError)
|
|
|
126
128
|
if indirectType(f.typ).Kind() != reflect.Struct {
|
|
127
129
|
serr = orErrorf(serr, t, "embedded Go struct field %s of non-struct type must be explicitly given a JSON name", sf.Name)
|
|
128
130
|
} else {
|
|
129
|
-
f.
|
|
131
|
+
f.embed = true // implied by use of Go embedding without an explicit name
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
|
|
135
|
+
var handleEmbed, handleField func()
|
|
136
|
+
handleEmbed = func() {
|
|
137
|
+
// Handle an embedded field that serializes to/from
|
|
134
138
|
// zero or more JSON object members.
|
|
135
139
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
case fieldOptions{name: f.name, quotedName: f.quotedName, unknown: true}:
|
|
139
|
-
case fieldOptions{name: f.name, quotedName: f.quotedName, inline: true, unknown: true}:
|
|
140
|
-
serr = orErrorf(serr, t, "Go struct field %s cannot have both `inline` and `unknown` specified", sf.Name)
|
|
141
|
-
f.inline = false // let `unknown` take precedence
|
|
142
|
-
default:
|
|
143
|
-
serr = orErrorf(serr, t, "Go struct field %s cannot have any options other than `inline` or `unknown` specified", sf.Name)
|
|
140
|
+
if f.fieldOptions != (fieldOptions{name: f.name, quotedName: f.quotedName, embed: true}) {
|
|
141
|
+
serr = orErrorf(serr, t, "Go struct field %s cannot have any options other than `embed` specified", sf.Name)
|
|
144
142
|
if f.hasName {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
f.fieldOptions = fieldOptions{name: f.name, quotedName: f.quotedName, inline: f.inline, unknown: f.unknown}
|
|
148
|
-
if f.inline && f.unknown {
|
|
149
|
-
f.inline = false // let `unknown` take precedence
|
|
143
|
+
handleField()
|
|
144
|
+
return // invalid embedded field; treat as regular field
|
|
150
145
|
}
|
|
146
|
+
f.fieldOptions = fieldOptions{name: f.name, quotedName: f.quotedName, embed: f.embed}
|
|
151
147
|
}
|
|
152
148
|
|
|
153
149
|
// Reject any types with custom serialization otherwise
|
|
154
|
-
// it becomes impossible to know what sub-fields to
|
|
150
|
+
// it becomes impossible to know what sub-fields to embed.
|
|
155
151
|
tf := indirectType(f.typ)
|
|
156
152
|
if implementsAny(tf, allMethodTypes...) && tf != jsontextValueType {
|
|
157
|
-
serr = orErrorf(serr, t, "
|
|
153
|
+
serr = orErrorf(serr, t, "embedded Go struct field %s of type %s must not implement marshal or unmarshal methods", sf.Name, tf)
|
|
158
154
|
}
|
|
159
155
|
|
|
160
|
-
// Handle an
|
|
156
|
+
// Handle an embedded field that serializes to/from
|
|
161
157
|
// a finite number of JSON object members backed by a Go struct.
|
|
162
158
|
if tf.Kind() == reflect.Struct {
|
|
163
|
-
if f.unknown {
|
|
164
|
-
serr = orErrorf(serr, t, "inlined Go struct field %s of type %s with `unknown` tag must be a Go map of string key or a jsontext.Value", sf.Name, tf)
|
|
165
|
-
continue // invalid inlined field; treat as ignored
|
|
166
|
-
}
|
|
167
159
|
if qe.visitChildren {
|
|
168
160
|
queue = append(queue, queueEntry{tf, f.index, !seen[tf]})
|
|
169
161
|
}
|
|
170
162
|
seen[tf] = true
|
|
171
|
-
|
|
163
|
+
return
|
|
172
164
|
} else if !sf.IsExported() {
|
|
173
|
-
serr = orErrorf(serr, t, "
|
|
174
|
-
|
|
165
|
+
serr = orErrorf(serr, t, "embedded Go struct field %s is not exported", sf.Name)
|
|
166
|
+
return // invalid embedded field; treat as ignored
|
|
175
167
|
}
|
|
176
168
|
|
|
177
|
-
// Handle an
|
|
169
|
+
// Handle an embedded field that serializes to/from any number of
|
|
178
170
|
// JSON object members back by a Go map or jsontext.Value.
|
|
179
171
|
switch {
|
|
180
172
|
case tf == jsontextValueType:
|
|
181
|
-
f.fncs = nil // specially handled in
|
|
173
|
+
f.fncs = nil // specially handled in arshal_embedded.go
|
|
182
174
|
case tf.Kind() == reflect.Map && tf.Key().Kind() == reflect.String:
|
|
183
175
|
if implementsAny(tf.Key(), allMethodTypes...) {
|
|
184
|
-
serr = orErrorf(serr, t, "
|
|
185
|
-
|
|
176
|
+
serr = orErrorf(serr, t, "embedded map field %s of type %s must have a string key that does not implement marshal or unmarshal methods", sf.Name, tf)
|
|
177
|
+
handleField()
|
|
178
|
+
return // invalid embedded field; treat as regular field
|
|
186
179
|
}
|
|
187
180
|
f.fncs = lookupArshaler(tf.Elem())
|
|
188
181
|
default:
|
|
189
|
-
serr = orErrorf(serr, t, "
|
|
190
|
-
|
|
182
|
+
serr = orErrorf(serr, t, "embedded Go struct field %s of type %s must be a Go struct, Go map of string key, or jsontext.Value", sf.Name, tf)
|
|
183
|
+
handleField()
|
|
184
|
+
return // invalid embedded field; treat as regular field
|
|
191
185
|
}
|
|
192
186
|
|
|
193
|
-
// Reject multiple
|
|
194
|
-
if
|
|
195
|
-
serr = orErrorf(serr, t, "
|
|
196
|
-
// Still append f to
|
|
197
|
-
// check for a dominant
|
|
187
|
+
// Reject multiple embedded fallback fields within the same struct.
|
|
188
|
+
if embeddedFallbackIndex >= 0 {
|
|
189
|
+
serr = orErrorf(serr, t, "embedded Go struct fields %s and %s cannot both be a Go map or jsontext.Value", t.Field(embeddedFallbackIndex).Name, sf.Name)
|
|
190
|
+
// Still append f to embeddedFallbacks as there is still a
|
|
191
|
+
// check for a dominant embedded fallback before returning.
|
|
198
192
|
}
|
|
199
|
-
|
|
193
|
+
embeddedFallbackIndex = i
|
|
200
194
|
|
|
201
|
-
|
|
202
|
-
}
|
|
195
|
+
embeddedFallbacks = append(embeddedFallbacks, f)
|
|
196
|
+
}
|
|
197
|
+
handleField = func() {
|
|
203
198
|
// Handle normal Go struct field that serializes to/from
|
|
204
199
|
// a single JSON object member.
|
|
205
200
|
|
|
@@ -210,14 +205,14 @@ func makeStructFields(root reflect.Type) (fs structFields, serr *SemanticError)
|
|
|
210
205
|
tf := indirectType(f.typ)
|
|
211
206
|
if !(sf.Anonymous && tf.Kind() == reflect.Struct) {
|
|
212
207
|
serr = orErrorf(serr, t, "Go struct field %s is not exported", sf.Name)
|
|
213
|
-
|
|
208
|
+
return
|
|
214
209
|
}
|
|
215
210
|
// Unfortunately, methods on the unexported field
|
|
216
211
|
// still cannot be called.
|
|
217
212
|
if implementsAny(tf, allMethodTypes...) ||
|
|
218
213
|
(f.omitzero && implementsAny(tf, isZeroerType)) {
|
|
219
214
|
serr = orErrorf(serr, t, "Go struct field %s is not exported for method calls", sf.Name)
|
|
220
|
-
|
|
215
|
+
return
|
|
221
216
|
}
|
|
222
217
|
}
|
|
223
218
|
|
|
@@ -260,6 +255,15 @@ func makeStructFields(root reflect.Type) (fs structFields, serr *SemanticError)
|
|
|
260
255
|
f.id = len(allFields)
|
|
261
256
|
f.fncs = lookupArshaler(sf.Type)
|
|
262
257
|
allFields = append(allFields, f)
|
|
258
|
+
if f.format != "" && fs.errUnsupportedFormat == nil {
|
|
259
|
+
fs.errUnsupportedFormat = &SemanticError{GoType: t, Err: fmt.Errorf("Go struct field %s has unsupported `format` tag option", sf.Name)}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if f.embed {
|
|
264
|
+
handleEmbed()
|
|
265
|
+
} else {
|
|
266
|
+
handleField()
|
|
263
267
|
}
|
|
264
268
|
}
|
|
265
269
|
|
|
@@ -325,6 +329,8 @@ func makeStructFields(root reflect.Type) (fs structFields, serr *SemanticError)
|
|
|
325
329
|
flattened: flattened,
|
|
326
330
|
byActualName: make(map[string]*structField, len(flattened)),
|
|
327
331
|
byFoldedName: make(map[string][]*structField, len(flattened)),
|
|
332
|
+
|
|
333
|
+
errUnsupportedFormat: fs.errUnsupportedFormat,
|
|
328
334
|
}
|
|
329
335
|
for i, f := range fs.flattened {
|
|
330
336
|
foldedName := string(foldName([]byte(f.name)))
|
|
@@ -333,7 +339,7 @@ func makeStructFields(root reflect.Type) (fs structFields, serr *SemanticError)
|
|
|
333
339
|
}
|
|
334
340
|
for foldedName, fields := range fs.byFoldedName {
|
|
335
341
|
if len(fields) > 1 {
|
|
336
|
-
// The precedence order for conflicting
|
|
342
|
+
// The precedence order for conflicting case-insensitive names
|
|
337
343
|
// is by breadth-first order, rather than depth-first order.
|
|
338
344
|
slices.SortFunc(fields, func(x, y *structField) int {
|
|
339
345
|
return cmp.Compare(x.id, y.id)
|
|
@@ -341,8 +347,8 @@ func makeStructFields(root reflect.Type) (fs structFields, serr *SemanticError)
|
|
|
341
347
|
fs.byFoldedName[foldedName] = fields
|
|
342
348
|
}
|
|
343
349
|
}
|
|
344
|
-
if n := len(
|
|
345
|
-
fs.
|
|
350
|
+
if n := len(embeddedFallbacks); n == 1 || (n > 1 && len(embeddedFallbacks[0].index) != len(embeddedFallbacks[1].index)) {
|
|
351
|
+
fs.embeddedFallback = &embeddedFallbacks[0] // dominant embedded fallback field
|
|
346
352
|
}
|
|
347
353
|
fs.reindex()
|
|
348
354
|
return fs, serr
|
|
@@ -391,8 +397,7 @@ type fieldOptions struct {
|
|
|
391
397
|
hasName bool
|
|
392
398
|
nameNeedEscape bool
|
|
393
399
|
casing int8 // either 0, caseIgnore, or caseStrict
|
|
394
|
-
|
|
395
|
-
unknown bool
|
|
400
|
+
embed bool
|
|
396
401
|
omitzero bool
|
|
397
402
|
omitempty bool
|
|
398
403
|
string bool
|
|
@@ -404,7 +409,6 @@ type fieldOptions struct {
|
|
|
404
409
|
// the JSON member name and other features.
|
|
405
410
|
func parseFieldOptions(sf reflect.StructField) (out fieldOptions, ignored bool, err error) {
|
|
406
411
|
tag, hasTag := sf.Tag.Lookup("json")
|
|
407
|
-
tagOrig := tag
|
|
408
412
|
|
|
409
413
|
// Check whether this field is explicitly ignored.
|
|
410
414
|
if tag == "-" {
|
|
@@ -428,10 +432,7 @@ func parseFieldOptions(sf reflect.StructField) (out fieldOptions, ignored bool,
|
|
|
428
432
|
return fieldOptions{}, true, err
|
|
429
433
|
}
|
|
430
434
|
|
|
431
|
-
// Determine the JSON member name for this Go field.
|
|
432
|
-
// may be provided as either an identifier or a single-quoted string.
|
|
433
|
-
// The single-quoted string allows arbitrary characters in the name.
|
|
434
|
-
// See https://go.dev/issue/2718 and https://go.dev/issue/3546.
|
|
435
|
+
// Determine the JSON member name for this Go field.
|
|
435
436
|
out.name = sf.Name // always starts with an uppercase character
|
|
436
437
|
if len(tag) > 0 && !strings.HasPrefix(tag, ",") {
|
|
437
438
|
// For better compatibility with v1, accept almost any unescaped name.
|
|
@@ -445,7 +446,7 @@ func parseFieldOptions(sf reflect.StructField) (out fieldOptions, ignored bool,
|
|
|
445
446
|
// In either case, call consumeTagOption to handle it further.
|
|
446
447
|
var err2 error
|
|
447
448
|
if !strings.HasPrefix(tag[n:], ",") && len(name) != len(tag) {
|
|
448
|
-
name, n, err2 = consumeTagOption(tag)
|
|
449
|
+
name, n, err2 = consumeTagOption(tag, false)
|
|
449
450
|
if err2 != nil {
|
|
450
451
|
err = cmp.Or(err, fmt.Errorf("Go struct field %s has malformed `json` tag: %v", sf.Name, err2))
|
|
451
452
|
}
|
|
@@ -454,22 +455,15 @@ func parseFieldOptions(sf reflect.StructField) (out fieldOptions, ignored bool,
|
|
|
454
455
|
err = cmp.Or(err, fmt.Errorf("Go struct field %s has JSON object name %q with invalid UTF-8", sf.Name, name))
|
|
455
456
|
name = string([]rune(name)) // replace invalid UTF-8 with utf8.RuneError
|
|
456
457
|
}
|
|
457
|
-
if name == "-" && tag[0] == '-' {
|
|
458
|
-
defer func() { // defer to let other errors take precedence
|
|
459
|
-
err = cmp.Or(err, fmt.Errorf("Go struct field %s has JSON object name %q; either "+
|
|
460
|
-
"use `json:\"-\"` to ignore the field or "+
|
|
461
|
-
"use `json:\"'-'%s` to specify %q as the name", sf.Name, out.name, strings.TrimPrefix(strconv.Quote(tagOrig), `"-`), name))
|
|
462
|
-
}()
|
|
463
|
-
}
|
|
464
458
|
if err2 == nil {
|
|
465
459
|
out.hasName = true
|
|
466
460
|
out.name = name
|
|
467
461
|
}
|
|
468
462
|
tag = tag[n:]
|
|
469
463
|
}
|
|
470
|
-
b, _ := jsonwire.AppendQuote(nil, out.name, &jsonflags.Flags{})
|
|
464
|
+
b, _ := jsonwire.AppendQuote(nil, []byte(out.name), &jsonflags.Flags{})
|
|
471
465
|
out.quotedName = string(b)
|
|
472
|
-
out.nameNeedEscape = jsonwire.NeedEscape(out.name)
|
|
466
|
+
out.nameNeedEscape = jsonwire.NeedEscape([]byte(out.name))
|
|
473
467
|
|
|
474
468
|
// Handle any additional tag options (if any).
|
|
475
469
|
var wasFormat bool
|
|
@@ -487,7 +481,7 @@ func parseFieldOptions(sf reflect.StructField) (out fieldOptions, ignored bool,
|
|
|
487
481
|
}
|
|
488
482
|
|
|
489
483
|
// Consume and process the tag option.
|
|
490
|
-
opt, n, err2 := consumeTagOption(tag)
|
|
484
|
+
opt, n, err2 := consumeTagOption(tag, false)
|
|
491
485
|
if err2 != nil {
|
|
492
486
|
err = cmp.Or(err, fmt.Errorf("Go struct field %s has malformed `json` tag: %v", sf.Name, err2))
|
|
493
487
|
}
|
|
@@ -506,7 +500,7 @@ func parseFieldOptions(sf reflect.StructField) (out fieldOptions, ignored bool,
|
|
|
506
500
|
break
|
|
507
501
|
}
|
|
508
502
|
tag = tag[len(":"):]
|
|
509
|
-
opt, n, err2 := consumeTagOption(tag)
|
|
503
|
+
opt, n, err2 := consumeTagOption(tag, false)
|
|
510
504
|
if err2 != nil {
|
|
511
505
|
err = cmp.Or(err, fmt.Errorf("Go struct field %s has malformed value for `case` tag option: %v", sf.Name, err2))
|
|
512
506
|
break
|
|
@@ -524,10 +518,8 @@ func parseFieldOptions(sf reflect.StructField) (out fieldOptions, ignored bool,
|
|
|
524
518
|
default:
|
|
525
519
|
err = cmp.Or(err, fmt.Errorf("Go struct field %s has unknown `case:%s` tag value", sf.Name, rawOpt))
|
|
526
520
|
}
|
|
527
|
-
case "
|
|
528
|
-
out.
|
|
529
|
-
case "unknown":
|
|
530
|
-
out.unknown = true
|
|
521
|
+
case "embed":
|
|
522
|
+
out.embed = true
|
|
531
523
|
case "omitzero":
|
|
532
524
|
out.omitzero = true
|
|
533
525
|
case "omitempty":
|
|
@@ -540,10 +532,13 @@ func parseFieldOptions(sf reflect.StructField) (out fieldOptions, ignored bool,
|
|
|
540
532
|
break
|
|
541
533
|
}
|
|
542
534
|
tag = tag[len(":"):]
|
|
543
|
-
opt, n, err2 := consumeTagOption(tag)
|
|
535
|
+
opt, n, err2 := consumeTagOption(tag, true)
|
|
544
536
|
if err2 != nil {
|
|
545
537
|
err = cmp.Or(err, fmt.Errorf("Go struct field %s has malformed value for `format` tag option: %v", sf.Name, err2))
|
|
546
538
|
break
|
|
539
|
+
} else if opt == "" {
|
|
540
|
+
err = cmp.Or(err, fmt.Errorf("Go struct field %s cannot have empty value for `format` tag option", sf.Name))
|
|
541
|
+
break
|
|
547
542
|
}
|
|
548
543
|
tag = tag[n:]
|
|
549
544
|
out.format = opt
|
|
@@ -553,7 +548,7 @@ func parseFieldOptions(sf reflect.StructField) (out fieldOptions, ignored bool,
|
|
|
553
548
|
// This catches invalid mutants such as "omitEmpty" or "omit_empty".
|
|
554
549
|
normOpt := strings.ReplaceAll(strings.ToLower(opt), "_", "")
|
|
555
550
|
switch normOpt {
|
|
556
|
-
case "case", "
|
|
551
|
+
case "case", "embed", "omitzero", "omitempty", "string", "format":
|
|
557
552
|
err = cmp.Or(err, fmt.Errorf("Go struct field %s has invalid appearance of `%s` tag option; specify `%s` instead", sf.Name, opt, normOpt))
|
|
558
553
|
}
|
|
559
554
|
|
|
@@ -578,7 +573,7 @@ func parseFieldOptions(sf reflect.StructField) (out fieldOptions, ignored bool,
|
|
|
578
573
|
// which is either a Go identifier or a single-quoted string.
|
|
579
574
|
// If the next option is invalid, it returns all of in until the next comma,
|
|
580
575
|
// and reports an error.
|
|
581
|
-
func consumeTagOption(in string) (string, int, error) {
|
|
576
|
+
func consumeTagOption(in string, allowQuoted bool) (string, int, error) {
|
|
582
577
|
// For legacy compatibility with v1, assume options are comma-separated.
|
|
583
578
|
i := strings.IndexByte(in, ',')
|
|
584
579
|
if i < 0 {
|
|
@@ -592,6 +587,10 @@ func consumeTagOption(in string) (string, int, error) {
|
|
|
592
587
|
return in[:n], n, nil
|
|
593
588
|
// Option as a single-quoted string.
|
|
594
589
|
case r == '\'':
|
|
590
|
+
if !allowQuoted {
|
|
591
|
+
return in[:i], i, fmt.Errorf("invalid character %q at start of option (expecting Unicode letter)", r)
|
|
592
|
+
}
|
|
593
|
+
|
|
595
594
|
// The grammar is nearly identical to a double-quoted Go string literal,
|
|
596
595
|
// but uses single quotes as the terminators. The reason for a custom
|
|
597
596
|
// grammar is because both backtick and double quotes cannot be used
|
|
@@ -633,6 +632,9 @@ func consumeTagOption(in string) (string, int, error) {
|
|
|
633
632
|
case len(in) == 0:
|
|
634
633
|
return in[:i], i, io.ErrUnexpectedEOF
|
|
635
634
|
default:
|
|
635
|
+
if !allowQuoted {
|
|
636
|
+
return in[:i], i, fmt.Errorf("invalid character %q at start of option (expecting Unicode letter)", r)
|
|
637
|
+
}
|
|
636
638
|
return in[:i], i, fmt.Errorf("invalid character %q at start of option (expecting Unicode letter or single quote)", r)
|
|
637
639
|
}
|
|
638
640
|
}
|