From 2a263380091311c9987fbabfb7ccb2f288e58064 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Thu, 3 Oct 2019 23:20:12 -0400 Subject: Moving to go modules Signed-off-by: Dave Henderson --- vendor/github.com/Masterminds/goutils/.travis.yml | 18 + vendor/github.com/Masterminds/goutils/CHANGELOG.md | 8 + vendor/github.com/Masterminds/goutils/README.md | 70 + vendor/github.com/Masterminds/goutils/appveyor.yml | 21 + vendor/github.com/Shopify/ejson/.gitignore | 10 + vendor/github.com/Shopify/ejson/.travis.yml | 11 + vendor/github.com/Shopify/ejson/CHANGELOG.md | 4 + vendor/github.com/Shopify/ejson/Gemfile | 4 + vendor/github.com/Shopify/ejson/Gemfile.lock | 54 + vendor/github.com/Shopify/ejson/Gopkg.lock | 47 + vendor/github.com/Shopify/ejson/Gopkg.toml | 34 + vendor/github.com/Shopify/ejson/Makefile | 87 + vendor/github.com/Shopify/ejson/README.md | 145 + vendor/github.com/Shopify/ejson/VERSION | 1 + vendor/github.com/Shopify/ejson/dev.yml | 16 + vendor/github.com/armon/go-metrics/.gitignore | 24 + vendor/github.com/armon/go-metrics/.travis.yml | 13 + vendor/github.com/armon/go-metrics/README.md | 91 + vendor/github.com/armon/go-metrics/go.mod | 16 + vendor/github.com/armon/go-metrics/go.sum | 46 + .../github.com/aws/aws-sdk-go/aws/awserr/types.go | 2 +- .../aws/aws-sdk-go/aws/awsutil/path_value.go | 11 +- .../github.com/aws/aws-sdk-go/aws/client/client.go | 2 +- .../aws/aws-sdk-go/aws/client/default_retryer.go | 151 +- .../github.com/aws/aws-sdk-go/aws/client/logger.go | 12 +- .../aws/aws-sdk-go/aws/client/no_op_retryer.go | 28 + vendor/github.com/aws/aws-sdk-go/aws/config.go | 4 +- .../github.com/aws/aws-sdk-go/aws/convert_types.go | 531 + .../aws/aws-sdk-go/aws/corehandlers/handlers.go | 60 +- .../aws/aws-sdk-go/aws/credentials/credentials.go | 9 +- .../aws/credentials/endpointcreds/provider.go | 4 +- .../aws/aws-sdk-go/aws/credentials/example.ini | 12 + .../credentials/stscreds/assume_role_provider.go | 3 +- .../credentials/stscreds/web_identity_provider.go | 100 + vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go | 65 +- vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go | 34 +- .../aws/aws-sdk-go/aws/csm/metric_chan.go | 11 +- .../github.com/aws/aws-sdk-go/aws/csm/reporter.go | 27 +- .../aws/aws-sdk-go/aws/ec2metadata/api.go | 29 +- .../aws/aws-sdk-go/aws/ec2metadata/service.go | 4 +- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 1341 +- .../aws/aws-sdk-go/aws/endpoints/endpoints.go | 7 +- .../aws/aws-sdk-go/aws/endpoints/v3model.go | 5 +- .../aws/request/connection_reset_error.go | 17 +- .../aws/request/connection_reset_error_other.go | 11 - .../aws/aws-sdk-go/aws/request/handlers.go | 49 +- .../aws/aws-sdk-go/aws/request/offset_reader.go | 15 +- .../aws/aws-sdk-go/aws/request/request.go | 139 +- .../aws/aws-sdk-go/aws/request/request_1_8.go | 5 +- .../aws-sdk-go/aws/request/request_pagination.go | 2 +- .../aws/aws-sdk-go/aws/request/retryer.go | 165 +- .../aws/aws-sdk-go/aws/session/credentials.go | 259 + .../github.com/aws/aws-sdk-go/aws/session/doc.go | 208 +- .../aws/aws-sdk-go/aws/session/env_config.go | 63 +- .../aws/aws-sdk-go/aws/session/session.go | 287 +- .../aws/aws-sdk-go/aws/session/shared_config.go | 366 +- .../github.com/aws/aws-sdk-go/aws/signer/v4/v4.go | 20 +- vendor/github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/internal/ini/ini_parser.go | 11 +- .../aws/aws-sdk-go/internal/ini/skipper.go | 6 +- .../aws/aws-sdk-go/internal/sdkio/byte.go | 12 + .../aws/aws-sdk-go/internal/sdkmath/floor.go | 15 + .../aws/aws-sdk-go/internal/sdkmath/floor_go1.9.go | 56 + .../aws/aws-sdk-go/internal/sdkrand/read.go | 11 + .../aws/aws-sdk-go/internal/sdkrand/read_1_5.go | 24 + .../aws-sdk-go/private/protocol/rest/unmarshal.go | 24 +- .../aws/aws-sdk-go/private/protocol/timestamp.go | 20 +- .../private/protocol/xml/xmlutil/sort.go | 32 + .../private/protocol/xml/xmlutil/xml_to_struct.go | 13 +- .../github.com/aws/aws-sdk-go/service/ec2/api.go | 7424 ++- .../aws/aws-sdk-go/service/ec2/customizations.go | 67 +- .../github.com/aws/aws-sdk-go/service/ec2/doc.go | 17 +- .../aws/aws-sdk-go/service/secretsmanager/api.go | 18 +- .../github.com/aws/aws-sdk-go/service/ssm/api.go | 2380 +- .../aws/aws-sdk-go/service/ssm/errors.go | 37 +- .../github.com/aws/aws-sdk-go/service/sts/api.go | 184 +- .../aws/aws-sdk-go/service/sts/customizations.go | 11 + .../aws-sdk-go/service/sts/stsiface/interface.go | 96 + vendor/github.com/boltdb/bolt/.gitignore | 4 + vendor/github.com/boltdb/bolt/Makefile | 18 + vendor/github.com/boltdb/bolt/README.md | 916 + vendor/github.com/boltdb/bolt/appveyor.yml | 18 + vendor/github.com/docker/libkv/.travis.yml | 31 + vendor/github.com/docker/libkv/MAINTAINERS | 46 + vendor/github.com/docker/libkv/README.md | 107 + vendor/github.com/dustin/gojson/.gitignore | 2 + vendor/github.com/fullsailor/pkcs7/.gitignore | 24 + vendor/github.com/fullsailor/pkcs7/.travis.yml | 7 + vendor/github.com/fullsailor/pkcs7/README.md | 8 + vendor/github.com/golang/snappy/.gitignore | 16 + vendor/github.com/golang/snappy/README | 107 + vendor/github.com/golang/snappy/go.mod | 1 + vendor/github.com/google/go-cmp/cmp/compare.go | 557 +- .../github.com/google/go-cmp/cmp/export_panic.go | 15 + .../github.com/google/go-cmp/cmp/export_unsafe.go | 23 + .../go-cmp/cmp/internal/diff/debug_disable.go | 2 +- .../go-cmp/cmp/internal/diff/debug_enable.go | 4 +- .../google/go-cmp/cmp/internal/diff/diff.go | 31 +- .../google/go-cmp/cmp/internal/flags/flags.go | 9 + .../go-cmp/cmp/internal/flags/toolchain_legacy.go | 10 + .../go-cmp/cmp/internal/flags/toolchain_recent.go | 10 + .../google/go-cmp/cmp/internal/function/func.go | 64 +- .../google/go-cmp/cmp/internal/value/format.go | 277 - .../go-cmp/cmp/internal/value/pointer_purego.go | 23 + .../go-cmp/cmp/internal/value/pointer_unsafe.go | 26 + .../google/go-cmp/cmp/internal/value/sort.go | 11 +- .../google/go-cmp/cmp/internal/value/zero.go | 48 + vendor/github.com/google/go-cmp/cmp/options.go | 255 +- vendor/github.com/google/go-cmp/cmp/path.go | 339 +- vendor/github.com/google/go-cmp/cmp/report.go | 51 + .../github.com/google/go-cmp/cmp/report_compare.go | 296 + .../github.com/google/go-cmp/cmp/report_reflect.go | 278 + .../github.com/google/go-cmp/cmp/report_slices.go | 333 + vendor/github.com/google/go-cmp/cmp/report_text.go | 387 + .../github.com/google/go-cmp/cmp/report_value.go | 121 + vendor/github.com/google/go-cmp/cmp/reporter.go | 53 - .../github.com/google/go-cmp/cmp/unsafe_panic.go | 15 - .../github.com/google/go-cmp/cmp/unsafe_reflect.go | 23 - vendor/github.com/google/uuid/.travis.yml | 9 + vendor/github.com/google/uuid/CONTRIBUTING.md | 10 + vendor/github.com/google/uuid/README.md | 19 + vendor/github.com/google/uuid/go.mod | 1 + vendor/github.com/gosimple/slug/.gitignore | 2 + vendor/github.com/gosimple/slug/.travis.yml | 20 + vendor/github.com/gosimple/slug/README.md | 62 + vendor/github.com/gosimple/slug/doc.go | 14 +- .../gosimple/slug/languages_substitution.go | 18 +- vendor/github.com/gosimple/slug/slug.go | 31 +- .../gotestyourself/gotestyourself/LICENSE | 202 - .../gotestyourself/gotestyourself/assert/assert.go | 301 - .../gotestyourself/assert/cmp/compare.go | 312 - .../gotestyourself/assert/cmp/result.go | 94 - .../gotestyourself/gotestyourself/assert/result.go | 107 - .../gotestyourself/gotestyourself/fs/file.go | 106 - .../gotestyourself/gotestyourself/fs/manifest.go | 129 - .../gotestyourself/fs/manifest_unix.go | 30 - .../gotestyourself/fs/manifest_windows.go | 22 - .../gotestyourself/gotestyourself/fs/ops.go | 237 - .../gotestyourself/gotestyourself/fs/path.go | 139 - .../gotestyourself/gotestyourself/fs/report.go | 215 - .../gotestyourself/gotestyourself/icmd/command.go | 284 - .../gotestyourself/gotestyourself/icmd/exitcode.go | 32 - .../gotestyourself/gotestyourself/icmd/ops.go | 4 - .../gotestyourself/internal/difflib/LICENSE | 27 - .../gotestyourself/internal/difflib/difflib.go | 420 - .../gotestyourself/internal/format/diff.go | 161 - .../gotestyourself/internal/format/format.go | 27 - .../gotestyourself/internal/source/source.go | 163 - .../gotestyourself/x/subtest/context.go | 81 - vendor/github.com/hairyhenderson/toml/.gitignore | 5 + vendor/github.com/hairyhenderson/toml/.travis.yml | 15 + vendor/github.com/hairyhenderson/toml/COMPATIBLE | 3 + vendor/github.com/hairyhenderson/toml/Makefile | 19 + vendor/github.com/hairyhenderson/toml/README.md | 218 + .../toml/cmd/toml-test-decoder/COPYING | 14 - .../toml/cmd/toml-test-encoder/COPYING | 14 - .../hairyhenderson/toml/cmd/tomlv/COPYING | 14 - vendor/github.com/hairyhenderson/toml/session.vim | 1 + vendor/github.com/hashicorp/consul/LICENSE | 354 - vendor/github.com/hashicorp/consul/NOTICE.md | 3 - vendor/github.com/hashicorp/consul/api/LICENSE | 354 + vendor/github.com/hashicorp/consul/api/README.md | 67 + vendor/github.com/hashicorp/consul/api/agent.go | 107 +- vendor/github.com/hashicorp/consul/api/api.go | 13 +- vendor/github.com/hashicorp/consul/api/catalog.go | 30 +- .../hashicorp/consul/api/config_entry.go | 92 +- .../consul/api/config_entry_discoverychain.go | 200 + .../hashicorp/consul/api/connect_intention.go | 7 + .../hashicorp/consul/api/discovery_chain.go | 230 + vendor/github.com/hashicorp/consul/api/go.mod | 16 + vendor/github.com/hashicorp/consul/api/go.sum | 78 + .../hashicorp/consul/api/operator_license.go | 111 + .../consul/ui-v2/app/styles/components/notice.scss | 10 - .../dom/event-target/event-target-shim/LICENSE | 22 - .../consul/ui-v2/lib/block-slots/LICENSE.md | 21 - .../github.com/hashicorp/consul/website/LICENSE.md | 10 - .../website/source/api/operator/license.html.md | 145 - .../source/docs/commands/license.html.markdown.erb | 109 - vendor/github.com/hashicorp/errwrap/README.md | 89 + vendor/github.com/hashicorp/errwrap/go.mod | 1 + vendor/github.com/hashicorp/go-cleanhttp/README.md | 30 + vendor/github.com/hashicorp/go-cleanhttp/go.mod | 1 + vendor/github.com/hashicorp/go-hclog/.gitignore | 1 + vendor/github.com/hashicorp/go-hclog/LICENSE | 21 + vendor/github.com/hashicorp/go-hclog/README.md | 148 + vendor/github.com/hashicorp/go-hclog/context.go | 38 + vendor/github.com/hashicorp/go-hclog/global.go | 48 + vendor/github.com/hashicorp/go-hclog/go.mod | 7 + vendor/github.com/hashicorp/go-hclog/go.sum | 6 + vendor/github.com/hashicorp/go-hclog/intlogger.go | 527 + vendor/github.com/hashicorp/go-hclog/logger.go | 176 + vendor/github.com/hashicorp/go-hclog/nulllogger.go | 52 + vendor/github.com/hashicorp/go-hclog/stacktrace.go | 109 + vendor/github.com/hashicorp/go-hclog/stdlog.go | 83 + vendor/github.com/hashicorp/go-hclog/writer.go | 74 + .../hashicorp/go-immutable-radix/.gitignore | 24 + .../hashicorp/go-immutable-radix/.travis.yml | 3 + .../hashicorp/go-immutable-radix/CHANGELOG.md | 9 + .../hashicorp/go-immutable-radix/README.md | 66 + .../github.com/hashicorp/go-immutable-radix/go.mod | 6 + .../github.com/hashicorp/go-immutable-radix/go.sum | 4 + .../github.com/hashicorp/go-multierror/.travis.yml | 12 + vendor/github.com/hashicorp/go-multierror/Makefile | 31 + .../github.com/hashicorp/go-multierror/README.md | 97 + vendor/github.com/hashicorp/go-multierror/go.mod | 3 + vendor/github.com/hashicorp/go-multierror/go.sum | 4 + .../hashicorp/go-retryablehttp/.gitignore | 4 + .../hashicorp/go-retryablehttp/.travis.yml | 12 + .../github.com/hashicorp/go-retryablehttp/Makefile | 11 + .../hashicorp/go-retryablehttp/README.md | 46 + .../hashicorp/go-retryablehttp/client.go | 186 +- .../github.com/hashicorp/go-retryablehttp/go.mod | 6 + .../github.com/hashicorp/go-retryablehttp/go.sum | 10 + .../github.com/hashicorp/go-rootcerts/.travis.yml | 12 + vendor/github.com/hashicorp/go-rootcerts/Makefile | 8 + vendor/github.com/hashicorp/go-rootcerts/README.md | 43 + vendor/github.com/hashicorp/go-rootcerts/go.mod | 5 + vendor/github.com/hashicorp/go-rootcerts/go.sum | 2 + .../capath-with-symlinks/securetrust.pem | 1 - .../test-fixtures/capath-with-symlinks/thawte.pem | 1 - vendor/github.com/hashicorp/go-sockaddr/.gitignore | 26 + .../github.com/hashicorp/go-sockaddr/GNUmakefile | 65 + vendor/github.com/hashicorp/go-sockaddr/README.md | 118 + vendor/github.com/hashicorp/go-sockaddr/go.mod | 8 + vendor/github.com/hashicorp/go-sockaddr/go.sum | 24 + .../hashicorp/go-sockaddr/template/GNUmakefile | 2 + .../hashicorp/go-sockaddr/template/README.md | 6 + .../hashicorp/golang-lru/simplelru/lru.go | 16 + .../golang-lru/simplelru/lru_interface.go | 7 +- vendor/github.com/hashicorp/hcl/.gitignore | 9 + vendor/github.com/hashicorp/hcl/.travis.yml | 13 + vendor/github.com/hashicorp/hcl/Makefile | 18 + vendor/github.com/hashicorp/hcl/README.md | 125 + vendor/github.com/hashicorp/hcl/appveyor.yml | 19 + vendor/github.com/hashicorp/hcl/go.mod | 3 + vendor/github.com/hashicorp/hcl/go.sum | 2 + .../hashicorp/serf/ops-misc/debian/copyright | 2 - .../github.com/hashicorp/serf/website/LICENSE.md | 10 - .../hashicorp/serf/website/source/LICENSE | 10 - vendor/github.com/hashicorp/vault/LICENSE | 363 - vendor/github.com/hashicorp/vault/api/LICENSE | 363 + .../github.com/hashicorp/vault/api/auth_token.go | 1 + vendor/github.com/hashicorp/vault/api/client.go | 17 +- vendor/github.com/hashicorp/vault/api/go.mod | 19 + vendor/github.com/hashicorp/vault/api/go.sum | 118 + vendor/github.com/hashicorp/vault/api/help.go | 5 +- vendor/github.com/hashicorp/vault/api/logical.go | 20 +- .../hashicorp/vault/api/plugin_helpers.go | 186 + vendor/github.com/hashicorp/vault/api/request.go | 2 +- vendor/github.com/hashicorp/vault/api/response.go | 83 +- vendor/github.com/hashicorp/vault/api/secret.go | 5 +- vendor/github.com/hashicorp/vault/api/ssh_agent.go | 2 +- .../github.com/hashicorp/vault/api/sys_mounts.go | 1 + .../github.com/hashicorp/vault/api/sys_plugins.go | 2 +- vendor/github.com/hashicorp/vault/api/sys_raft.go | 130 + vendor/github.com/hashicorp/vault/api/sys_rekey.go | 4 +- .../vault/helper/compressutil/compress.go | 207 - .../hashicorp/vault/helper/consts/agent.go | 5 - .../hashicorp/vault/helper/consts/consts.go | 14 - .../hashicorp/vault/helper/consts/error.go | 16 - .../hashicorp/vault/helper/consts/plugin_types.go | 59 - .../hashicorp/vault/helper/consts/replication.go | 150 - .../hashicorp/vault/helper/hclutil/hcl.go | 36 - .../hashicorp/vault/helper/jsonutil/json.go | 100 - .../hashicorp/vault/helper/parseutil/parseutil.go | 167 - .../hashicorp/vault/helper/strutil/strutil.go | 425 - vendor/github.com/hashicorp/vault/sdk/LICENSE | 363 + .../vault/sdk/helper/compressutil/compress.go | 207 + .../hashicorp/vault/sdk/helper/consts/agent.go | 5 + .../hashicorp/vault/sdk/helper/consts/consts.go | 28 + .../hashicorp/vault/sdk/helper/consts/error.go | 21 + .../vault/sdk/helper/consts/plugin_types.go | 59 + .../vault/sdk/helper/consts/replication.go | 150 + .../hashicorp/vault/sdk/helper/hclutil/hcl.go | 36 + .../hashicorp/vault/sdk/helper/jsonutil/json.go | 100 + .../vault/sdk/helper/parseutil/parseutil.go | 174 + .../hashicorp/vault/sdk/helper/strutil/strutil.go | 447 + .../hashicorp/vault/ui/app/adapters/license.js | 36 - .../vault/ui/app/components/license-info.js | 39 - .../ui/app/controllers/vault/cluster/license.js | 15 - .../hashicorp/vault/ui/app/models/license.js | 30 - .../vault/ui/app/routes/vault/cluster/license.js | 22 - .../ui/app/templates/components/license-info.hbs | 82 - .../ui/app/templates/vault/cluster/license.hbs | 9 - .../integration/components/license-info-test.js | 141 - .../ui/tests/pages/components/license-info.js | 18 - .../github.com/hashicorp/vault/website/LICENSE.md | 10 - .../website/source/api/system/license.html.md | 88 - .../github.com/inconshreveable/mousetrap/README.md | 23 + vendor/github.com/jmespath/go-jmespath/.gitignore | 4 + vendor/github.com/jmespath/go-jmespath/.travis.yml | 9 + vendor/github.com/jmespath/go-jmespath/Makefile | 44 + vendor/github.com/jmespath/go-jmespath/README.md | 7 + vendor/github.com/joho/godotenv/.gitignore | 1 + vendor/github.com/joho/godotenv/.travis.yml | 8 + vendor/github.com/joho/godotenv/README.md | 163 + vendor/github.com/kr/pretty/License | 21 - vendor/github.com/kr/pretty/diff.go | 265 - vendor/github.com/kr/pretty/formatter.go | 328 - vendor/github.com/kr/pretty/pretty.go | 108 - vendor/github.com/kr/pretty/zero.go | 41 - vendor/github.com/kr/text/License | 19 - vendor/github.com/kr/text/doc.go | 3 - vendor/github.com/kr/text/indent.go | 74 - vendor/github.com/kr/text/wrap.go | 86 - vendor/github.com/mitchellh/go-homedir/README.md | 14 + vendor/github.com/mitchellh/go-homedir/go.mod | 1 + .../github.com/mitchellh/mapstructure/.travis.yml | 8 + .../github.com/mitchellh/mapstructure/CHANGELOG.md | 21 + vendor/github.com/mitchellh/mapstructure/README.md | 46 + vendor/github.com/mitchellh/mapstructure/go.mod | 1 + vendor/github.com/pierrec/lz4/.gitignore | 34 + vendor/github.com/pierrec/lz4/.travis.yml | 24 + vendor/github.com/pierrec/lz4/README.md | 106 + vendor/github.com/pierrec/lz4/block.go | 184 +- vendor/github.com/pierrec/lz4/decode_other.go | 19 +- vendor/github.com/pierrec/lz4/errors.go | 30 + .../pierrec/lz4/internal/xxh32/xxh32zero.go | 89 +- vendor/github.com/pierrec/lz4/lz4.go | 28 +- vendor/github.com/pierrec/lz4/reader.go | 30 +- vendor/github.com/pierrec/lz4/writer.go | 43 +- vendor/github.com/pkg/errors/.gitignore | 24 + vendor/github.com/pkg/errors/.travis.yml | 15 + vendor/github.com/pkg/errors/README.md | 52 + vendor/github.com/pkg/errors/appveyor.yml | 32 + vendor/github.com/rainycape/unidecode/.gitignore | 23 + vendor/github.com/rainycape/unidecode/README.md | 6 + vendor/github.com/rainycape/unidecode/table.txt | 46731 +++++++++++++++++++ vendor/github.com/ryanuber/go-glob/.travis.yml | 5 + vendor/github.com/ryanuber/go-glob/README.md | 29 + vendor/github.com/ryanuber/go-glob/go.mod | 1 + vendor/github.com/spf13/afero/.travis.yml | 21 + vendor/github.com/spf13/afero/README.md | 452 + vendor/github.com/spf13/afero/appveyor.yml | 15 + vendor/github.com/spf13/afero/go.mod | 3 + vendor/github.com/spf13/afero/go.sum | 2 + vendor/github.com/spf13/cobra/.gitignore | 38 + vendor/github.com/spf13/cobra/.mailmap | 3 + vendor/github.com/spf13/cobra/.travis.yml | 31 + vendor/github.com/spf13/cobra/README.md | 741 + vendor/github.com/spf13/cobra/bash_completions.go | 48 - vendor/github.com/spf13/cobra/bash_completions.md | 256 + .../spf13/cobra/cobra/cmd/testdata/LICENSE.golden | 202 - vendor/github.com/spf13/cobra/command.go | 97 +- vendor/github.com/spf13/cobra/go.mod | 13 + vendor/github.com/spf13/cobra/go.sum | 51 + .../spf13/cobra/powershell_completions.go | 100 + .../spf13/cobra/powershell_completions.md | 14 + vendor/github.com/spf13/cobra/shell_completions.go | 85 + vendor/github.com/spf13/cobra/zsh_completions.go | 358 +- vendor/github.com/spf13/cobra/zsh_completions.md | 39 + vendor/github.com/spf13/pflag/.gitignore | 2 + vendor/github.com/spf13/pflag/.travis.yml | 22 + vendor/github.com/spf13/pflag/README.md | 296 + vendor/github.com/spf13/pflag/bool_slice.go | 38 + vendor/github.com/spf13/pflag/count.go | 4 +- vendor/github.com/spf13/pflag/duration_slice.go | 38 + vendor/github.com/spf13/pflag/flag.go | 16 +- vendor/github.com/spf13/pflag/float32_slice.go | 174 + vendor/github.com/spf13/pflag/float64_slice.go | 166 + vendor/github.com/spf13/pflag/go.mod | 3 + vendor/github.com/spf13/pflag/go.sum | 0 vendor/github.com/spf13/pflag/int32_slice.go | 174 + vendor/github.com/spf13/pflag/int64_slice.go | 166 + vendor/github.com/spf13/pflag/int_slice.go | 30 + vendor/github.com/spf13/pflag/ip_slice.go | 40 +- vendor/github.com/spf13/pflag/string_array.go | 26 + vendor/github.com/spf13/pflag/string_slice.go | 22 +- vendor/github.com/spf13/pflag/string_to_int64.go | 149 + vendor/github.com/spf13/pflag/uint_slice.go | 42 + .../testify/assert/assertion_format.go.tmpl | 5 + .../testify/assert/assertion_forward.go.tmpl | 5 + vendor/github.com/ugorji/go/LICENSE | 22 - vendor/github.com/ugorji/go/codec/0doc.go | 227 - vendor/github.com/ugorji/go/codec/LICENSE | 22 + vendor/github.com/ugorji/go/codec/binc.go | 530 +- vendor/github.com/ugorji/go/codec/build.sh | 272 + vendor/github.com/ugorji/go/codec/cbor.go | 681 +- vendor/github.com/ugorji/go/codec/decode.go | 2671 +- vendor/github.com/ugorji/go/codec/doc.go | 226 + vendor/github.com/ugorji/go/codec/encode.go | 1545 +- .../ugorji/go/codec/fast-path.generated.go | 37172 +++------------ .../github.com/ugorji/go/codec/fast-path.go.tmpl | 503 + vendor/github.com/ugorji/go/codec/fast-path.not.go | 6 - vendor/github.com/ugorji/go/codec/float.go | 313 + .../ugorji/go/codec/gen-dec-array.go.tmpl | 90 + .../github.com/ugorji/go/codec/gen-dec-map.go.tmpl | 53 + .../ugorji/go/codec/gen-enc-chan.go.tmpl | 27 + .../ugorji/go/codec/gen-helper.generated.go | 186 +- .../github.com/ugorji/go/codec/gen-helper.go.tmpl | 241 + vendor/github.com/ugorji/go/codec/gen.generated.go | 93 +- vendor/github.com/ugorji/go/codec/gen.go | 850 +- vendor/github.com/ugorji/go/codec/go.mod | 5 + .../ugorji/go/codec/goversion_fmt_time_gte_go15.go | 12 + .../ugorji/go/codec/goversion_fmt_time_lt_go15.go | 15 + .../go/codec/goversion_maprange_gte_go112.go | 44 + .../ugorji/go/codec/goversion_maprange_lt_go112.go | 47 + vendor/github.com/ugorji/go/codec/helper.go | 1295 +- vendor/github.com/ugorji/go/codec/helper.s | 0 .../github.com/ugorji/go/codec/helper_internal.go | 3 + .../ugorji/go/codec/helper_not_unsafe.go | 312 +- vendor/github.com/ugorji/go/codec/helper_unsafe.go | 848 +- vendor/github.com/ugorji/go/codec/json.go | 1379 +- .../ugorji/go/codec/mammoth-test.go.tmpl | 162 + .../ugorji/go/codec/mammoth2-test.go.tmpl | 94 + vendor/github.com/ugorji/go/codec/msgpack.go | 494 +- vendor/github.com/ugorji/go/codec/prebuild.go | 136 + vendor/github.com/ugorji/go/codec/reader.go | 1017 + vendor/github.com/ugorji/go/codec/register_ext.go | 38 + vendor/github.com/ugorji/go/codec/rpc.go | 3 - vendor/github.com/ugorji/go/codec/simple.go | 363 +- .../ugorji/go/codec/sort-slice.generated.go | 266 + .../github.com/ugorji/go/codec/sort-slice.go.tmpl | 64 + .../ugorji/go/codec/test-cbor-goldens.json | 639 + vendor/github.com/ugorji/go/codec/test.py | 126 + vendor/github.com/ugorji/go/codec/writer.go | 267 + vendor/github.com/ugorji/go/codec/xml.go | 508 - vendor/github.com/zealic/xignore/.travis.yml | 9 + vendor/github.com/zealic/xignore/Makefile | 5 + vendor/github.com/zealic/xignore/README.md | 48 + vendor/github.com/zealic/xignore/go.mod | 6 + vendor/github.com/zealic/xignore/go.sum | 11 + 422 files changed, 91375 insertions(+), 47803 deletions(-) create mode 100644 vendor/github.com/Masterminds/goutils/.travis.yml create mode 100644 vendor/github.com/Masterminds/goutils/CHANGELOG.md create mode 100644 vendor/github.com/Masterminds/goutils/README.md create mode 100644 vendor/github.com/Masterminds/goutils/appveyor.yml create mode 100644 vendor/github.com/Shopify/ejson/.gitignore create mode 100644 vendor/github.com/Shopify/ejson/.travis.yml create mode 100644 vendor/github.com/Shopify/ejson/CHANGELOG.md create mode 100644 vendor/github.com/Shopify/ejson/Gemfile create mode 100644 vendor/github.com/Shopify/ejson/Gemfile.lock create mode 100644 vendor/github.com/Shopify/ejson/Gopkg.lock create mode 100644 vendor/github.com/Shopify/ejson/Gopkg.toml create mode 100644 vendor/github.com/Shopify/ejson/Makefile create mode 100644 vendor/github.com/Shopify/ejson/README.md create mode 100644 vendor/github.com/Shopify/ejson/VERSION create mode 100644 vendor/github.com/Shopify/ejson/dev.yml create mode 100644 vendor/github.com/armon/go-metrics/.gitignore create mode 100644 vendor/github.com/armon/go-metrics/.travis.yml create mode 100644 vendor/github.com/armon/go-metrics/README.md create mode 100644 vendor/github.com/armon/go-metrics/go.mod create mode 100644 vendor/github.com/armon/go-metrics/go.sum create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/client/no_op_retryer.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor_go1.9.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go create mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/sort.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go create mode 100644 vendor/github.com/boltdb/bolt/.gitignore create mode 100644 vendor/github.com/boltdb/bolt/Makefile create mode 100644 vendor/github.com/boltdb/bolt/README.md create mode 100644 vendor/github.com/boltdb/bolt/appveyor.yml create mode 100644 vendor/github.com/docker/libkv/.travis.yml create mode 100644 vendor/github.com/docker/libkv/MAINTAINERS create mode 100644 vendor/github.com/docker/libkv/README.md create mode 100644 vendor/github.com/dustin/gojson/.gitignore create mode 100644 vendor/github.com/fullsailor/pkcs7/.gitignore create mode 100644 vendor/github.com/fullsailor/pkcs7/.travis.yml create mode 100644 vendor/github.com/fullsailor/pkcs7/README.md create mode 100644 vendor/github.com/golang/snappy/.gitignore create mode 100644 vendor/github.com/golang/snappy/README create mode 100644 vendor/github.com/golang/snappy/go.mod create mode 100644 vendor/github.com/google/go-cmp/cmp/export_panic.go create mode 100644 vendor/github.com/google/go-cmp/cmp/export_unsafe.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go delete mode 100644 vendor/github.com/google/go-cmp/cmp/internal/value/format.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/value/zero.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report_compare.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report_reflect.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report_slices.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report_text.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report_value.go delete mode 100644 vendor/github.com/google/go-cmp/cmp/reporter.go delete mode 100644 vendor/github.com/google/go-cmp/cmp/unsafe_panic.go delete mode 100644 vendor/github.com/google/go-cmp/cmp/unsafe_reflect.go create mode 100644 vendor/github.com/google/uuid/.travis.yml create mode 100644 vendor/github.com/google/uuid/CONTRIBUTING.md create mode 100644 vendor/github.com/google/uuid/README.md create mode 100644 vendor/github.com/google/uuid/go.mod create mode 100644 vendor/github.com/gosimple/slug/.gitignore create mode 100644 vendor/github.com/gosimple/slug/.travis.yml create mode 100644 vendor/github.com/gosimple/slug/README.md delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/LICENSE delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/assert/assert.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/assert/cmp/compare.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/assert/cmp/result.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/assert/result.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/fs/file.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/fs/manifest.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/fs/manifest_unix.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/fs/manifest_windows.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/fs/ops.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/fs/path.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/fs/report.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/icmd/command.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/icmd/exitcode.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/icmd/ops.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/internal/difflib/LICENSE delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/internal/difflib/difflib.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/internal/format/diff.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/internal/format/format.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/internal/source/source.go delete mode 100644 vendor/github.com/gotestyourself/gotestyourself/x/subtest/context.go create mode 100644 vendor/github.com/hairyhenderson/toml/.gitignore create mode 100644 vendor/github.com/hairyhenderson/toml/.travis.yml create mode 100644 vendor/github.com/hairyhenderson/toml/COMPATIBLE create mode 100644 vendor/github.com/hairyhenderson/toml/Makefile create mode 100644 vendor/github.com/hairyhenderson/toml/README.md delete mode 100644 vendor/github.com/hairyhenderson/toml/cmd/toml-test-decoder/COPYING delete mode 100644 vendor/github.com/hairyhenderson/toml/cmd/toml-test-encoder/COPYING delete mode 100644 vendor/github.com/hairyhenderson/toml/cmd/tomlv/COPYING create mode 100644 vendor/github.com/hairyhenderson/toml/session.vim delete mode 100644 vendor/github.com/hashicorp/consul/LICENSE delete mode 100644 vendor/github.com/hashicorp/consul/NOTICE.md create mode 100644 vendor/github.com/hashicorp/consul/api/LICENSE create mode 100644 vendor/github.com/hashicorp/consul/api/README.md create mode 100644 vendor/github.com/hashicorp/consul/api/config_entry_discoverychain.go create mode 100644 vendor/github.com/hashicorp/consul/api/discovery_chain.go create mode 100644 vendor/github.com/hashicorp/consul/api/go.mod create mode 100644 vendor/github.com/hashicorp/consul/api/go.sum create mode 100644 vendor/github.com/hashicorp/consul/api/operator_license.go delete mode 100644 vendor/github.com/hashicorp/consul/ui-v2/app/styles/components/notice.scss delete mode 100644 vendor/github.com/hashicorp/consul/ui-v2/app/utils/dom/event-target/event-target-shim/LICENSE delete mode 100644 vendor/github.com/hashicorp/consul/ui-v2/lib/block-slots/LICENSE.md delete mode 100644 vendor/github.com/hashicorp/consul/website/LICENSE.md delete mode 100644 vendor/github.com/hashicorp/consul/website/source/api/operator/license.html.md delete mode 100644 vendor/github.com/hashicorp/consul/website/source/docs/commands/license.html.markdown.erb create mode 100644 vendor/github.com/hashicorp/errwrap/README.md create mode 100644 vendor/github.com/hashicorp/errwrap/go.mod create mode 100644 vendor/github.com/hashicorp/go-cleanhttp/README.md create mode 100644 vendor/github.com/hashicorp/go-cleanhttp/go.mod create mode 100644 vendor/github.com/hashicorp/go-hclog/.gitignore create mode 100644 vendor/github.com/hashicorp/go-hclog/LICENSE create mode 100644 vendor/github.com/hashicorp/go-hclog/README.md create mode 100644 vendor/github.com/hashicorp/go-hclog/context.go create mode 100644 vendor/github.com/hashicorp/go-hclog/global.go create mode 100644 vendor/github.com/hashicorp/go-hclog/go.mod create mode 100644 vendor/github.com/hashicorp/go-hclog/go.sum create mode 100644 vendor/github.com/hashicorp/go-hclog/intlogger.go create mode 100644 vendor/github.com/hashicorp/go-hclog/logger.go create mode 100644 vendor/github.com/hashicorp/go-hclog/nulllogger.go create mode 100644 vendor/github.com/hashicorp/go-hclog/stacktrace.go create mode 100644 vendor/github.com/hashicorp/go-hclog/stdlog.go create mode 100644 vendor/github.com/hashicorp/go-hclog/writer.go create mode 100644 vendor/github.com/hashicorp/go-immutable-radix/.gitignore create mode 100644 vendor/github.com/hashicorp/go-immutable-radix/.travis.yml create mode 100644 vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md create mode 100644 vendor/github.com/hashicorp/go-immutable-radix/README.md create mode 100644 vendor/github.com/hashicorp/go-immutable-radix/go.mod create mode 100644 vendor/github.com/hashicorp/go-immutable-radix/go.sum create mode 100644 vendor/github.com/hashicorp/go-multierror/.travis.yml create mode 100644 vendor/github.com/hashicorp/go-multierror/Makefile create mode 100644 vendor/github.com/hashicorp/go-multierror/README.md create mode 100644 vendor/github.com/hashicorp/go-multierror/go.mod create mode 100644 vendor/github.com/hashicorp/go-multierror/go.sum create mode 100644 vendor/github.com/hashicorp/go-retryablehttp/.gitignore create mode 100644 vendor/github.com/hashicorp/go-retryablehttp/.travis.yml create mode 100644 vendor/github.com/hashicorp/go-retryablehttp/Makefile create mode 100644 vendor/github.com/hashicorp/go-retryablehttp/README.md create mode 100644 vendor/github.com/hashicorp/go-retryablehttp/go.mod create mode 100644 vendor/github.com/hashicorp/go-retryablehttp/go.sum create mode 100644 vendor/github.com/hashicorp/go-rootcerts/.travis.yml create mode 100644 vendor/github.com/hashicorp/go-rootcerts/Makefile create mode 100644 vendor/github.com/hashicorp/go-rootcerts/README.md create mode 100644 vendor/github.com/hashicorp/go-rootcerts/go.mod create mode 100644 vendor/github.com/hashicorp/go-rootcerts/go.sum delete mode 120000 vendor/github.com/hashicorp/go-rootcerts/test-fixtures/capath-with-symlinks/securetrust.pem delete mode 120000 vendor/github.com/hashicorp/go-rootcerts/test-fixtures/capath-with-symlinks/thawte.pem create mode 100644 vendor/github.com/hashicorp/go-sockaddr/.gitignore create mode 100644 vendor/github.com/hashicorp/go-sockaddr/GNUmakefile create mode 100644 vendor/github.com/hashicorp/go-sockaddr/README.md create mode 100644 vendor/github.com/hashicorp/go-sockaddr/go.mod create mode 100644 vendor/github.com/hashicorp/go-sockaddr/go.sum create mode 100644 vendor/github.com/hashicorp/go-sockaddr/template/GNUmakefile create mode 100644 vendor/github.com/hashicorp/go-sockaddr/template/README.md create mode 100644 vendor/github.com/hashicorp/hcl/.gitignore create mode 100644 vendor/github.com/hashicorp/hcl/.travis.yml create mode 100644 vendor/github.com/hashicorp/hcl/Makefile create mode 100644 vendor/github.com/hashicorp/hcl/README.md create mode 100644 vendor/github.com/hashicorp/hcl/appveyor.yml create mode 100644 vendor/github.com/hashicorp/hcl/go.mod create mode 100644 vendor/github.com/hashicorp/hcl/go.sum delete mode 100644 vendor/github.com/hashicorp/serf/ops-misc/debian/copyright delete mode 100644 vendor/github.com/hashicorp/serf/website/LICENSE.md delete mode 100644 vendor/github.com/hashicorp/serf/website/source/LICENSE delete mode 100644 vendor/github.com/hashicorp/vault/LICENSE create mode 100644 vendor/github.com/hashicorp/vault/api/LICENSE create mode 100644 vendor/github.com/hashicorp/vault/api/go.mod create mode 100644 vendor/github.com/hashicorp/vault/api/go.sum create mode 100644 vendor/github.com/hashicorp/vault/api/plugin_helpers.go create mode 100644 vendor/github.com/hashicorp/vault/api/sys_raft.go delete mode 100644 vendor/github.com/hashicorp/vault/helper/compressutil/compress.go delete mode 100644 vendor/github.com/hashicorp/vault/helper/consts/agent.go delete mode 100644 vendor/github.com/hashicorp/vault/helper/consts/consts.go delete mode 100644 vendor/github.com/hashicorp/vault/helper/consts/error.go delete mode 100644 vendor/github.com/hashicorp/vault/helper/consts/plugin_types.go delete mode 100644 vendor/github.com/hashicorp/vault/helper/consts/replication.go delete mode 100644 vendor/github.com/hashicorp/vault/helper/hclutil/hcl.go delete mode 100644 vendor/github.com/hashicorp/vault/helper/jsonutil/json.go delete mode 100644 vendor/github.com/hashicorp/vault/helper/parseutil/parseutil.go delete mode 100644 vendor/github.com/hashicorp/vault/helper/strutil/strutil.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/LICENSE create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/compressutil/compress.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/consts/agent.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/consts/consts.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/consts/error.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/consts/plugin_types.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/consts/replication.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/hclutil/hcl.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/jsonutil/json.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/parseutil/parseutil.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/strutil/strutil.go delete mode 100644 vendor/github.com/hashicorp/vault/ui/app/adapters/license.js delete mode 100644 vendor/github.com/hashicorp/vault/ui/app/components/license-info.js delete mode 100644 vendor/github.com/hashicorp/vault/ui/app/controllers/vault/cluster/license.js delete mode 100644 vendor/github.com/hashicorp/vault/ui/app/models/license.js delete mode 100644 vendor/github.com/hashicorp/vault/ui/app/routes/vault/cluster/license.js delete mode 100644 vendor/github.com/hashicorp/vault/ui/app/templates/components/license-info.hbs delete mode 100644 vendor/github.com/hashicorp/vault/ui/app/templates/vault/cluster/license.hbs delete mode 100644 vendor/github.com/hashicorp/vault/ui/tests/integration/components/license-info-test.js delete mode 100644 vendor/github.com/hashicorp/vault/ui/tests/pages/components/license-info.js delete mode 100644 vendor/github.com/hashicorp/vault/website/LICENSE.md delete mode 100644 vendor/github.com/hashicorp/vault/website/source/api/system/license.html.md create mode 100644 vendor/github.com/inconshreveable/mousetrap/README.md create mode 100644 vendor/github.com/jmespath/go-jmespath/.gitignore create mode 100644 vendor/github.com/jmespath/go-jmespath/.travis.yml create mode 100644 vendor/github.com/jmespath/go-jmespath/Makefile create mode 100644 vendor/github.com/jmespath/go-jmespath/README.md create mode 100644 vendor/github.com/joho/godotenv/.gitignore create mode 100644 vendor/github.com/joho/godotenv/.travis.yml create mode 100644 vendor/github.com/joho/godotenv/README.md delete mode 100644 vendor/github.com/kr/pretty/License delete mode 100644 vendor/github.com/kr/pretty/diff.go delete mode 100644 vendor/github.com/kr/pretty/formatter.go delete mode 100644 vendor/github.com/kr/pretty/pretty.go delete mode 100644 vendor/github.com/kr/pretty/zero.go delete mode 100644 vendor/github.com/kr/text/License delete mode 100644 vendor/github.com/kr/text/doc.go delete mode 100644 vendor/github.com/kr/text/indent.go delete mode 100644 vendor/github.com/kr/text/wrap.go create mode 100644 vendor/github.com/mitchellh/go-homedir/README.md create mode 100644 vendor/github.com/mitchellh/go-homedir/go.mod create mode 100644 vendor/github.com/mitchellh/mapstructure/.travis.yml create mode 100644 vendor/github.com/mitchellh/mapstructure/CHANGELOG.md create mode 100644 vendor/github.com/mitchellh/mapstructure/README.md create mode 100644 vendor/github.com/mitchellh/mapstructure/go.mod create mode 100644 vendor/github.com/pierrec/lz4/.gitignore create mode 100644 vendor/github.com/pierrec/lz4/.travis.yml create mode 100644 vendor/github.com/pierrec/lz4/README.md create mode 100644 vendor/github.com/pierrec/lz4/errors.go create mode 100644 vendor/github.com/pkg/errors/.gitignore create mode 100644 vendor/github.com/pkg/errors/.travis.yml create mode 100644 vendor/github.com/pkg/errors/README.md create mode 100644 vendor/github.com/pkg/errors/appveyor.yml create mode 100644 vendor/github.com/rainycape/unidecode/.gitignore create mode 100644 vendor/github.com/rainycape/unidecode/README.md create mode 100644 vendor/github.com/rainycape/unidecode/table.txt create mode 100644 vendor/github.com/ryanuber/go-glob/.travis.yml create mode 100644 vendor/github.com/ryanuber/go-glob/README.md create mode 100644 vendor/github.com/ryanuber/go-glob/go.mod create mode 100644 vendor/github.com/spf13/afero/.travis.yml create mode 100644 vendor/github.com/spf13/afero/README.md create mode 100644 vendor/github.com/spf13/afero/appveyor.yml create mode 100644 vendor/github.com/spf13/afero/go.mod create mode 100644 vendor/github.com/spf13/afero/go.sum create mode 100644 vendor/github.com/spf13/cobra/.gitignore create mode 100644 vendor/github.com/spf13/cobra/.mailmap create mode 100644 vendor/github.com/spf13/cobra/.travis.yml create mode 100644 vendor/github.com/spf13/cobra/README.md create mode 100644 vendor/github.com/spf13/cobra/bash_completions.md delete mode 100644 vendor/github.com/spf13/cobra/cobra/cmd/testdata/LICENSE.golden create mode 100644 vendor/github.com/spf13/cobra/go.mod create mode 100644 vendor/github.com/spf13/cobra/go.sum create mode 100644 vendor/github.com/spf13/cobra/powershell_completions.go create mode 100644 vendor/github.com/spf13/cobra/powershell_completions.md create mode 100644 vendor/github.com/spf13/cobra/shell_completions.go create mode 100644 vendor/github.com/spf13/cobra/zsh_completions.md create mode 100644 vendor/github.com/spf13/pflag/.gitignore create mode 100644 vendor/github.com/spf13/pflag/.travis.yml create mode 100644 vendor/github.com/spf13/pflag/README.md create mode 100644 vendor/github.com/spf13/pflag/float32_slice.go create mode 100644 vendor/github.com/spf13/pflag/float64_slice.go create mode 100644 vendor/github.com/spf13/pflag/go.mod create mode 100644 vendor/github.com/spf13/pflag/go.sum create mode 100644 vendor/github.com/spf13/pflag/int32_slice.go create mode 100644 vendor/github.com/spf13/pflag/int64_slice.go create mode 100644 vendor/github.com/spf13/pflag/string_to_int64.go create mode 100644 vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl create mode 100644 vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl delete mode 100644 vendor/github.com/ugorji/go/LICENSE delete mode 100644 vendor/github.com/ugorji/go/codec/0doc.go create mode 100644 vendor/github.com/ugorji/go/codec/LICENSE create mode 100644 vendor/github.com/ugorji/go/codec/build.sh create mode 100644 vendor/github.com/ugorji/go/codec/doc.go create mode 100644 vendor/github.com/ugorji/go/codec/fast-path.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/float.go create mode 100644 vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/gen-enc-chan.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/go.mod create mode 100644 vendor/github.com/ugorji/go/codec/goversion_fmt_time_gte_go15.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_fmt_time_lt_go15.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_maprange_gte_go112.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_maprange_lt_go112.go create mode 100644 vendor/github.com/ugorji/go/codec/helper.s create mode 100644 vendor/github.com/ugorji/go/codec/mammoth-test.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/mammoth2-test.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/prebuild.go create mode 100644 vendor/github.com/ugorji/go/codec/reader.go create mode 100644 vendor/github.com/ugorji/go/codec/register_ext.go create mode 100644 vendor/github.com/ugorji/go/codec/sort-slice.generated.go create mode 100644 vendor/github.com/ugorji/go/codec/sort-slice.go.tmpl create mode 100644 vendor/github.com/ugorji/go/codec/test-cbor-goldens.json create mode 100644 vendor/github.com/ugorji/go/codec/test.py create mode 100644 vendor/github.com/ugorji/go/codec/writer.go delete mode 100644 vendor/github.com/ugorji/go/codec/xml.go create mode 100644 vendor/github.com/zealic/xignore/.travis.yml create mode 100644 vendor/github.com/zealic/xignore/Makefile create mode 100644 vendor/github.com/zealic/xignore/README.md create mode 100644 vendor/github.com/zealic/xignore/go.mod create mode 100644 vendor/github.com/zealic/xignore/go.sum (limited to 'vendor/github.com') diff --git a/vendor/github.com/Masterminds/goutils/.travis.yml b/vendor/github.com/Masterminds/goutils/.travis.yml new file mode 100644 index 00000000..4025e01e --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/.travis.yml @@ -0,0 +1,18 @@ +language: go + +go: + - 1.6 + - 1.7 + - 1.8 + - tip + +script: + - go test -v + +notifications: + webhooks: + urls: + - https://webhooks.gitter.im/e/06e3328629952dabe3e0 + on_success: change # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: never # options: [always|never|change] default: always diff --git a/vendor/github.com/Masterminds/goutils/CHANGELOG.md b/vendor/github.com/Masterminds/goutils/CHANGELOG.md new file mode 100644 index 00000000..d700ec47 --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/CHANGELOG.md @@ -0,0 +1,8 @@ +# 1.0.1 (2017-05-31) + +## Fixed +- #21: Fix generation of alphanumeric strings (thanks @dbarranco) + +# 1.0.0 (2014-04-30) + +- Initial release. diff --git a/vendor/github.com/Masterminds/goutils/README.md b/vendor/github.com/Masterminds/goutils/README.md new file mode 100644 index 00000000..163ffe72 --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/README.md @@ -0,0 +1,70 @@ +GoUtils +=========== +[![Stability: Maintenance](https://masterminds.github.io/stability/maintenance.svg)](https://masterminds.github.io/stability/maintenance.html) +[![GoDoc](https://godoc.org/github.com/Masterminds/goutils?status.png)](https://godoc.org/github.com/Masterminds/goutils) [![Build Status](https://travis-ci.org/Masterminds/goutils.svg?branch=master)](https://travis-ci.org/Masterminds/goutils) [![Build status](https://ci.appveyor.com/api/projects/status/sc2b1ew0m7f0aiju?svg=true)](https://ci.appveyor.com/project/mattfarina/goutils) + + +GoUtils provides users with utility functions to manipulate strings in various ways. It is a Go implementation of some +string manipulation libraries of Java Apache Commons. GoUtils includes the following Java Apache Commons classes: +* WordUtils +* RandomStringUtils +* StringUtils (partial implementation) + +## Installation +If you have Go set up on your system, from the GOPATH directory within the command line/terminal, enter this: + + go get github.com/Masterminds/goutils + +If you do not have Go set up on your system, please follow the [Go installation directions from the documenation](http://golang.org/doc/install), and then follow the instructions above to install GoUtils. + + +## Documentation +GoUtils doc is available here: [![GoDoc](https://godoc.org/github.com/Masterminds/goutils?status.png)](https://godoc.org/github.com/Masterminds/goutils) + + +## Usage +The code snippets below show examples of how to use GoUtils. Some functions return errors while others do not. The first instance below, which does not return an error, is the `Initials` function (located within the `wordutils.go` file). + + package main + + import ( + "fmt" + "github.com/Masterminds/goutils" + ) + + func main() { + + // EXAMPLE 1: A goutils function which returns no errors + fmt.Println (goutils.Initials("John Doe Foo")) // Prints out "JDF" + + } +Some functions return errors mainly due to illegal arguements used as parameters. The code example below illustrates how to deal with function that returns an error. In this instance, the function is the `Random` function (located within the `randomstringutils.go` file). + + package main + + import ( + "fmt" + "github.com/Masterminds/goutils" + ) + + func main() { + + // EXAMPLE 2: A goutils function which returns an error + rand1, err1 := goutils.Random (-1, 0, 0, true, true) + + if err1 != nil { + fmt.Println(err1) // Prints out error message because -1 was entered as the first parameter in goutils.Random(...) + } else { + fmt.Println(rand1) + } + + } + +## License +GoUtils is licensed under the Apache License, Version 2.0. Please check the LICENSE.txt file or visit http://www.apache.org/licenses/LICENSE-2.0 for a copy of the license. + +## Issue Reporting +Make suggestions or report issues using the Git issue tracker: https://github.com/Masterminds/goutils/issues + +## Website +* [GoUtils webpage](http://Masterminds.github.io/goutils/) diff --git a/vendor/github.com/Masterminds/goutils/appveyor.yml b/vendor/github.com/Masterminds/goutils/appveyor.yml new file mode 100644 index 00000000..657564a8 --- /dev/null +++ b/vendor/github.com/Masterminds/goutils/appveyor.yml @@ -0,0 +1,21 @@ +version: build-{build}.{branch} + +clone_folder: C:\gopath\src\github.com\Masterminds\goutils +shallow_clone: true + +environment: + GOPATH: C:\gopath + +platform: + - x64 + +build: off + +install: + - go version + - go env + +test_script: + - go test -v + +deploy: off diff --git a/vendor/github.com/Shopify/ejson/.gitignore b/vendor/github.com/Shopify/ejson/.gitignore new file mode 100644 index 00000000..85436574 --- /dev/null +++ b/vendor/github.com/Shopify/ejson/.gitignore @@ -0,0 +1,10 @@ +/ejson +/tags +/build/ +/pkg/ +/rubygem/pkg/ +/rubygem/build/ +/rubygem/man/ +/rubygem/LICENSE.txt +/rubygem/lib/ejson/version.rb +.bundle diff --git a/vendor/github.com/Shopify/ejson/.travis.yml b/vendor/github.com/Shopify/ejson/.travis.yml new file mode 100644 index 00000000..186cd237 --- /dev/null +++ b/vendor/github.com/Shopify/ejson/.travis.yml @@ -0,0 +1,11 @@ +language: go + +go: + - 1.10.x + - 1.11.x + +script: + - go test -race -coverprofile=coverage.txt -covermode=atomic + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/Shopify/ejson/CHANGELOG.md b/vendor/github.com/Shopify/ejson/CHANGELOG.md new file mode 100644 index 00000000..0077bc70 --- /dev/null +++ b/vendor/github.com/Shopify/ejson/CHANGELOG.md @@ -0,0 +1,4 @@ +# 1.1.0 + +* Add `--key-from-stdin` flag, where a private key, assumed to match the file's public key, is read + directly from stdin instead of looking up a match in the keydir. diff --git a/vendor/github.com/Shopify/ejson/Gemfile b/vendor/github.com/Shopify/ejson/Gemfile new file mode 100644 index 00000000..f860fe50 --- /dev/null +++ b/vendor/github.com/Shopify/ejson/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +gem 'fpm' +gem 'ronn' diff --git a/vendor/github.com/Shopify/ejson/Gemfile.lock b/vendor/github.com/Shopify/ejson/Gemfile.lock new file mode 100644 index 00000000..b5556285 --- /dev/null +++ b/vendor/github.com/Shopify/ejson/Gemfile.lock @@ -0,0 +1,54 @@ +GEM + remote: https://rubygems.org/ + specs: + arr-pm (0.0.10) + cabin (> 0) + backports (3.8.0) + cabin (0.9.0) + childprocess (0.7.1) + ffi (~> 1.0, >= 1.0.11) + clamp (1.0.1) + dotenv (2.2.1) + ffi (1.9.18) + fpm (1.9.2) + arr-pm (~> 0.0.10) + backports (>= 2.6.2) + cabin (>= 0.6.0) + childprocess + clamp (~> 1.0.0) + ffi + json (>= 1.7.7, < 2.0) + pleaserun (~> 0.0.29) + ruby-xz + stud + hpricot (0.8.6) + insist (1.0.0) + io-like (0.3.0) + json (1.8.6) + mustache (0.99.8) + pleaserun (0.0.30) + cabin (> 0) + clamp + dotenv + insist + mustache (= 0.99.8) + stud + rdiscount (2.2.0.1) + ronn (0.7.3) + hpricot (>= 0.8.2) + mustache (>= 0.7.0) + rdiscount (>= 1.5.8) + ruby-xz (0.2.3) + ffi (~> 1.9) + io-like (~> 0.3) + stud (0.0.23) + +PLATFORMS + ruby + +DEPENDENCIES + fpm + ronn + +BUNDLED WITH + 1.16.6 diff --git a/vendor/github.com/Shopify/ejson/Gopkg.lock b/vendor/github.com/Shopify/ejson/Gopkg.lock new file mode 100644 index 00000000..4ca51259 --- /dev/null +++ b/vendor/github.com/Shopify/ejson/Gopkg.lock @@ -0,0 +1,47 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/codegangsta/cli" + packages = ["."] + revision = "9908e96513e5a94de37004098a3974a567f18111" + +[[projects]] + name = "github.com/dustin/gojson" + packages = ["."] + revision = "057ac0edc14e44d03df3bb03449e666ff50884c1" + +[[projects]] + name = "github.com/smartystreets/goconvey" + packages = [ + "convey", + "convey/assertions", + "convey/assertions/oglematchers", + "convey/gotest", + "convey/reporting" + ] + revision = "90f2eae17a8bdcbe3f6f654fc76af7f39e97d7b9" + +[[projects]] + name = "github.com/urfave/cli" + packages = ["."] + revision = "cfb38830724cc34fedffe9a2a29fb54fa9169cd1" + version = "v1.20.0" + +[[projects]] + name = "golang.org/x/crypto" + packages = [ + "curve25519", + "nacl/box", + "nacl/secretbox", + "poly1305", + "salsa20/salsa" + ] + revision = "ca7e7f10cb9fd9c1a6ff7f60436c086d73714180" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "6fc4cc71e752df858dcb46d81802024e8077d9c8d9b51c4c252d1aa00bc3ad49" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/vendor/github.com/Shopify/ejson/Gopkg.toml b/vendor/github.com/Shopify/ejson/Gopkg.toml new file mode 100644 index 00000000..34c2c900 --- /dev/null +++ b/vendor/github.com/Shopify/ejson/Gopkg.toml @@ -0,0 +1,34 @@ +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" +# +# [prune] +# non-go = false +# go-tests = true +# unused-packages = true + + +[[constraint]] + name = "github.com/urfave/cli" + version = "1.20.0" + +[prune] + go-tests = true + unused-packages = true diff --git a/vendor/github.com/Shopify/ejson/Makefile b/vendor/github.com/Shopify/ejson/Makefile new file mode 100644 index 00000000..90a9ad60 --- /dev/null +++ b/vendor/github.com/Shopify/ejson/Makefile @@ -0,0 +1,87 @@ +NAME=ejson +RUBY_MODULE=EJSON +PACKAGE=github.com/Shopify/ejson +VERSION=$(shell cat VERSION) +GEM=pkg/$(NAME)-$(VERSION).gem +DEB=pkg/$(NAME)_$(VERSION)_amd64.deb + +GOFILES=$(shell find . -type f -name '*.go') +MANFILES=$(shell find man -name '*.ronn' -exec echo build/{} \; | sed 's/\.ronn/\.gz/') + +GODEP_PATH=$(shell pwd)/Godeps/_workspace + +BUNDLE_EXEC=bundle exec + +.PHONY: default all binaries gem man clean dev_bootstrap + +default: all +all: gem deb +binaries: build/bin/linux-amd64 build/bin/darwin-amd64 +gem: $(GEM) +deb: $(DEB) +man: $(MANFILES) + +build/man/%.gz: man/%.ronn + mkdir -p "$(@D)" + set -euo pipefail ; $(BUNDLE_EXEC) ronn -r --pipe "$<" | gzip > "$@" || (rm -f "$<" ; false) + +build/bin/linux-amd64: $(GOFILES) cmd/$(NAME)/version.go + GOOS=linux GOARCH=amd64 go build -o "$@" "$(PACKAGE)/cmd/$(NAME)" +build/bin/darwin-amd64: $(GOFILES) cmd/$(NAME)/version.go + GOOS=darwin GOARCH=amd64 go build -o "$@" "$(PACKAGE)/cmd/$(NAME)" + +$(GEM): rubygem/$(NAME)-$(VERSION).gem + mkdir -p $(@D) + mv "$<" "$@" + +rubygem/$(NAME)-$(VERSION).gem: \ + rubygem/lib/$(NAME)/version.rb \ + rubygem/build/linux-amd64/ejson \ + rubygem/LICENSE.txt \ + rubygem/build/darwin-amd64/ejson \ + rubygem/man + cd rubygem && gem build ejson.gemspec + +rubygem/LICENSE.txt: LICENSE.txt + cp "$<" "$@" + +rubygem/man: man + cp -a build/man $@ + +rubygem/build/darwin-amd64/ejson: build/bin/darwin-amd64 + mkdir -p $(@D) + cp -a "$<" "$@" + +rubygem/build/linux-amd64/ejson: build/bin/linux-amd64 + mkdir -p $(@D) + cp -a "$<" "$@" + +cmd/$(NAME)/version.go: VERSION + echo 'package main\n\nconst VERSION string = "$(VERSION)"' > $@ + +rubygem/lib/$(NAME)/version.rb: VERSION + mkdir -p $(@D) + echo 'module $(RUBY_MODULE)\n VERSION = "$(VERSION)"\nend' > $@ + +$(DEB): build/bin/linux-amd64 man + mkdir -p $(@D) + rm -f "$@" + $(BUNDLE_EXEC) fpm \ + -t deb \ + -s dir \ + --name="$(NAME)" \ + --version="$(VERSION)" \ + --package="$@" \ + --license=MIT \ + --category=admin \ + --no-depends \ + --no-auto-depends \ + --architecture=amd64 \ + --maintainer="Shopify " \ + --description="utility for managing a collection of secrets in source control. Secrets are encrypted using public key, elliptic curve cryptography." \ + --url="https://github.com/Shopify/ejson" \ + ./build/man/=/usr/share/man/ \ + ./$<=/usr/bin/$(NAME) + +clean: + rm -rf build pkg rubygem/{LICENSE.txt,lib/ejson/version.rb,build,*.gem} diff --git a/vendor/github.com/Shopify/ejson/README.md b/vendor/github.com/Shopify/ejson/README.md new file mode 100644 index 00000000..b1d714b1 --- /dev/null +++ b/vendor/github.com/Shopify/ejson/README.md @@ -0,0 +1,145 @@ +# ejson + +`ejson` is a utility for managing a collection of secrets in source control. The +secrets are encrypted using [public +key](http://en.wikipedia.org/wiki/Public-key_cryptography), [elliptic +curve](http://en.wikipedia.org/wiki/Elliptic_curve_cryptography) cryptography +([NaCl](http://nacl.cr.yp.to/) [Box](http://nacl.cr.yp.to/box.html): +[Curve25519](http://en.wikipedia.org/wiki/Curve25519) + +[Salsa20](http://en.wikipedia.org/wiki/Salsa20) + +[Poly1305-AES](http://en.wikipedia.org/wiki/Poly1305-AES)). Secrets are +collected in a JSON file, in which all the string values are encrypted. Public +keys are embedded in the file, and the decrypter looks up the corresponding +private key from its local filesystem. + +![demo](http://burkelibbey.s3.amazonaws.com/ejson-demo.gif) + +The main benefits provided by `ejson` are: + +* Secrets can be safely stored in a git repo. +* Changes to secrets are auditable on a line-by-line basis with `git blame`. +* Anyone with git commit access has access to write new secrets. +* Decryption access can easily be locked down to production servers only. +* Secrets change synchronously with application source (as opposed to secrets + provisioned by Configuration Management). +* Simple, well-tested, easily-auditable source. + +See [the manpages](https://shopify.github.io/ejson) for more technical documentation. + +See [ejson2env](https://github.com/Shopify/ejson2env) for a useful tool to help with exporting +a portion of secrets as environment variables for environments/tools that require this pattern. + +## Installation + +You can download the `.deb` package from [Github Releases](https://github.com/Shopify/ejson/releases). + +On development machines (64-bit linux or OS X), the recommended installation +method is via rubygems: + +``` +gem install ejson +``` + +## Workflow + +### 1: Create the Keydir + +By default, EJSON looks for keys in `/opt/ejson/keys`. You can change this by +setting `EJSON_KEYDIR` or passing the `-keydir` option. + +``` +$ mkdir -p /opt/ejson/keys +``` + +### 2: Generate a keypair + +When called with `-w`, `ejson keygen` will write the keypair into the `keydir` +and print the public key. Without `-w`, it will print both keys to stdout. This +is useful if you have to distribute the key to multiple servers via +configuration management, etc. + +``` +$ ejson keygen +Public Key: +63ccf05a9492e68e12eeb1c705888aebdcc0080af7e594fc402beb24cce9d14f +Private Key: +75b80b4a693156eb435f4ed2fe397e583f461f09fd99ec2bd1bdef0a56cf6e64 +``` + +``` +$ ./ejson keygen -w +53393332c6c7c474af603c078f5696c8fe16677a09a711bba299a6c1c1676a59 +$ cat /opt/ejson/keys/5339* +888a4291bef9135729357b8c70e5a62b0bbe104a679d829cdbe56d46a4481aaf +``` + +### 3: Create an `ejson` file + +The format is described in more detail [later on](#format). For now, create a +file that looks something like this. Fill in the `` with whatever you got +back in step 2. + +Create this file as `test.ejson`: + +```json +{ + "_public_key": "", + "database_password": "1234password" +} +``` + +### 4: Encrypt the file + +Running `ejson encrypt test.ejson` will encrypt any new plaintext keys in the +file, and leave any existing encrypted keys untouched: + +```json +{ + "_public_key": "63ccf05a9492e68e12eeb1c705888aebdcc0080af7e594fc402beb24cce9d14f", + "database_password": "EJ[1:WGj2t4znULHT1IRveMEdvvNXqZzNBNMsJ5iZVy6Dvxs=:kA6ekF8ViYR5ZLeSmMXWsdLfWr7wn9qS:fcHQtdt6nqcNOXa97/M278RX6w==]" +} +``` + +Try adding another plaintext secret to the file and run `ejson encrypt +test.ejson` again. The `database_password` field will not be changed, but the +new secret will be encrypted. + +### 5: Decrypt the file + +To decrypt the file, you must have a file present in the `keydir` whose name is +the 64-byte hex-encoded public key exactly as embedded in the `ejson` document. +The contents of that file must be the similarly-encoded private key. If you used +`ejson keygen -w`, you've already got this covered. + +Unlike `ejson encrypt`, which overwrites the specified files, `ejson decrypt` +only takes one file parameter, and prints the output to `stdout`: + +``` +$ ejson decrypt foo.ejson +{ + "_public_key": "63ccf05a9492e68e12eeb1c705888aebdcc0080af7e594fc402beb24cce9d14f", + "database_password": "1234password" +} +``` + +## Format + +The `ejson` document format is simple, but there are a few points to be aware +of: + +1. It's just JSON. +2. There *must* be a key at the top level named `_public_key`, whose value is a + 32-byte hex-encoded (i.e. 64 ASCII byte) public key as generated by `ejson + keygen`. +3. Any string literal that isn't an object key will be encrypted by default (ie. + in `{"a": "b"}`, `"b"` will be encrypted, but `"a"` will not. +4. Numbers, booleans, and nulls aren't encrypted. +5. If a key begins with an underscore, its corresponding value will not be + encrypted. This is used to prevent the `_public_key` field from being + encrypted, and is useful for implementing metadata schemes. +6. Underscores do not propagate downward. For example, in `{"_a": {"b": "c"}}`, + `"c"` will be encrypted. + +## See also + +* If you use Capistrano for deployment you can use [capistrano-ejson](https://github.com/Shopify/capistrano-ejson) to automatically decrypt the secrets on deploy. diff --git a/vendor/github.com/Shopify/ejson/VERSION b/vendor/github.com/Shopify/ejson/VERSION new file mode 100644 index 00000000..6085e946 --- /dev/null +++ b/vendor/github.com/Shopify/ejson/VERSION @@ -0,0 +1 @@ +1.2.1 diff --git a/vendor/github.com/Shopify/ejson/dev.yml b/vendor/github.com/Shopify/ejson/dev.yml new file mode 100644 index 00000000..ca552fc6 --- /dev/null +++ b/vendor/github.com/Shopify/ejson/dev.yml @@ -0,0 +1,16 @@ +name: ejson + +up: + - homebrew: + - glide + - ruby: 2.3.3 + - go: 1.8.3 + - bundler + - custom: + name: Install vendored dependencies + met?: test -e vendor + meet: glide install + +commands: + build: make + test: go test $(glide nv) diff --git a/vendor/github.com/armon/go-metrics/.gitignore b/vendor/github.com/armon/go-metrics/.gitignore new file mode 100644 index 00000000..8c03ec11 --- /dev/null +++ b/vendor/github.com/armon/go-metrics/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe + +/metrics.out diff --git a/vendor/github.com/armon/go-metrics/.travis.yml b/vendor/github.com/armon/go-metrics/.travis.yml new file mode 100644 index 00000000..87d230c8 --- /dev/null +++ b/vendor/github.com/armon/go-metrics/.travis.yml @@ -0,0 +1,13 @@ +language: go + +go: + - "1.x" + +env: + - GO111MODULE=on + +install: + - go get ./... + +script: + - go test ./... diff --git a/vendor/github.com/armon/go-metrics/README.md b/vendor/github.com/armon/go-metrics/README.md new file mode 100644 index 00000000..aa73348c --- /dev/null +++ b/vendor/github.com/armon/go-metrics/README.md @@ -0,0 +1,91 @@ +go-metrics +========== + +This library provides a `metrics` package which can be used to instrument code, +expose application metrics, and profile runtime performance in a flexible manner. + +Current API: [![GoDoc](https://godoc.org/github.com/armon/go-metrics?status.svg)](https://godoc.org/github.com/armon/go-metrics) + +Sinks +----- + +The `metrics` package makes use of a `MetricSink` interface to support delivery +to any type of backend. Currently the following sinks are provided: + +* StatsiteSink : Sinks to a [statsite](https://github.com/armon/statsite/) instance (TCP) +* StatsdSink: Sinks to a [StatsD](https://github.com/etsy/statsd/) / statsite instance (UDP) +* PrometheusSink: Sinks to a [Prometheus](http://prometheus.io/) metrics endpoint (exposed via HTTP for scrapes) +* InmemSink : Provides in-memory aggregation, can be used to export stats +* FanoutSink : Sinks to multiple sinks. Enables writing to multiple statsite instances for example. +* BlackholeSink : Sinks to nowhere + +In addition to the sinks, the `InmemSignal` can be used to catch a signal, +and dump a formatted output of recent metrics. For example, when a process gets +a SIGUSR1, it can dump to stderr recent performance metrics for debugging. + +Labels +------ + +Most metrics do have an equivalent ending with `WithLabels`, such methods +allow to push metrics with labels and use some features of underlying Sinks +(ex: translated into Prometheus labels). + +Since some of these labels may increase greatly cardinality of metrics, the +library allow to filter labels using a blacklist/whitelist filtering system +which is global to all metrics. + +* If `Config.AllowedLabels` is not nil, then only labels specified in this value will be sent to underlying Sink, otherwise, all labels are sent by default. +* If `Config.BlockedLabels` is not nil, any label specified in this value will not be sent to underlying Sinks. + +By default, both `Config.AllowedLabels` and `Config.BlockedLabels` are nil, meaning that +no tags are filetered at all, but it allow to a user to globally block some tags with high +cardinality at application level. + +Examples +-------- + +Here is an example of using the package: + +```go +func SlowMethod() { + // Profiling the runtime of a method + defer metrics.MeasureSince([]string{"SlowMethod"}, time.Now()) +} + +// Configure a statsite sink as the global metrics sink +sink, _ := metrics.NewStatsiteSink("statsite:8125") +metrics.NewGlobal(metrics.DefaultConfig("service-name"), sink) + +// Emit a Key/Value pair +metrics.EmitKey([]string{"questions", "meaning of life"}, 42) +``` + +Here is an example of setting up a signal handler: + +```go +// Setup the inmem sink and signal handler +inm := metrics.NewInmemSink(10*time.Second, time.Minute) +sig := metrics.DefaultInmemSignal(inm) +metrics.NewGlobal(metrics.DefaultConfig("service-name"), inm) + +// Run some code +inm.SetGauge([]string{"foo"}, 42) +inm.EmitKey([]string{"bar"}, 30) + +inm.IncrCounter([]string{"baz"}, 42) +inm.IncrCounter([]string{"baz"}, 1) +inm.IncrCounter([]string{"baz"}, 80) + +inm.AddSample([]string{"method", "wow"}, 42) +inm.AddSample([]string{"method", "wow"}, 100) +inm.AddSample([]string{"method", "wow"}, 22) + +.... +``` + +When a signal comes in, output like the following will be dumped to stderr: + + [2014-01-28 14:57:33.04 -0800 PST][G] 'foo': 42.000 + [2014-01-28 14:57:33.04 -0800 PST][P] 'bar': 30.000 + [2014-01-28 14:57:33.04 -0800 PST][C] 'baz': Count: 3 Min: 1.000 Mean: 41.000 Max: 80.000 Stddev: 39.509 + [2014-01-28 14:57:33.04 -0800 PST][S] 'method.wow': Count: 3 Min: 22.000 Mean: 54.667 Max: 100.000 Stddev: 40.513 \ No newline at end of file diff --git a/vendor/github.com/armon/go-metrics/go.mod b/vendor/github.com/armon/go-metrics/go.mod new file mode 100644 index 00000000..88e1e98f --- /dev/null +++ b/vendor/github.com/armon/go-metrics/go.mod @@ -0,0 +1,16 @@ +module github.com/armon/go-metrics + +go 1.12 + +require ( + github.com/DataDog/datadog-go v2.2.0+incompatible + github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible + github.com/circonus-labs/circonusllhist v0.1.3 // indirect + github.com/hashicorp/go-immutable-radix v1.0.0 + github.com/hashicorp/go-retryablehttp v0.5.3 // indirect + github.com/pascaldekloe/goe v0.1.0 + github.com/pkg/errors v0.8.1 // indirect + github.com/prometheus/client_golang v0.9.2 + github.com/stretchr/testify v1.3.0 // indirect + github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 // indirect +) diff --git a/vendor/github.com/armon/go-metrics/go.sum b/vendor/github.com/armon/go-metrics/go.sum new file mode 100644 index 00000000..5ffd8329 --- /dev/null +++ b/vendor/github.com/armon/go-metrics/go.sum @@ -0,0 +1,46 @@ +github.com/DataDog/datadog-go v2.2.0+incompatible h1:V5BKkxACZLjzHjSgBbr2gvLA2Ae49yhc6CSY7MLy5k4= +github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-retryablehttp v0.5.3 h1:QlWt0KvWT0lq8MFppF9tsJGF+ynG7ztc2KIPhzRGk7s= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740= +github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 h1:PnBWHBf+6L0jOqq0gIVUe6Yk0/QMZ640k6NvkxcBf+8= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a h1:9a8MnZMP0X2nLJdBg+pBmGgkJlSaKC2KaQmTCk1XDtE= +github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go b/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go index a2c5817c..9cf7eaf4 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go @@ -208,7 +208,7 @@ func (e errorList) Error() string { // How do we want to handle the array size being zero if size := len(e); size > 0 { for i := 0; i < size; i++ { - msg += fmt.Sprintf("%s", e[i].Error()) + msg += e[i].Error() // We check the next index to see if it is within the slice. // If it is, then we append a newline. We do this, because unit tests // could be broken with the additional '\n' diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go index 11c52c38..285e54d6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go @@ -185,13 +185,12 @@ func ValuesAtPath(i interface{}, path string) ([]interface{}, error) { // SetValueAtPath sets a value at the case insensitive lexical path inside // of a structure. func SetValueAtPath(i interface{}, path string, v interface{}) { - if rvals := rValuesAtPath(i, path, true, false, v == nil); rvals != nil { - for _, rval := range rvals { - if rval.Kind() == reflect.Ptr && rval.IsNil() { - continue - } - setValue(rval, v) + rvals := rValuesAtPath(i, path, true, false, v == nil) + for _, rval := range rvals { + if rval.Kind() == reflect.Ptr && rval.IsNil() { + continue } + setValue(rval, v) } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go index 70960538..c022407f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go @@ -64,7 +64,7 @@ func New(cfg aws.Config, info metadata.ClientInfo, handlers request.Handlers, op default: maxRetries := aws.IntValue(cfg.MaxRetries) if cfg.MaxRetries == nil || maxRetries == aws.UseServiceDefaultRetries { - maxRetries = 3 + maxRetries = DefaultRetryerMaxNumRetries } svc.Retryer = DefaultRetryer{NumMaxRetries: maxRetries} } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go index a397b0d0..0fda4251 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go @@ -1,6 +1,7 @@ package client import ( + "math" "strconv" "time" @@ -9,82 +10,142 @@ import ( ) // DefaultRetryer implements basic retry logic using exponential backoff for -// most services. If you want to implement custom retry logic, implement the -// request.Retryer interface or create a structure type that composes this -// struct and override the specific methods. For example, to override only -// the MaxRetries method: +// most services. If you want to implement custom retry logic, you can implement the +// request.Retryer interface. // -// type retryer struct { -// client.DefaultRetryer -// } -// -// // This implementation always has 100 max retries -// func (d retryer) MaxRetries() int { return 100 } type DefaultRetryer struct { - NumMaxRetries int + // Num max Retries is the number of max retries that will be performed. + // By default, this is zero. + NumMaxRetries int + + // MinRetryDelay is the minimum retry delay after which retry will be performed. + // If not set, the value is 0ns. + MinRetryDelay time.Duration + + // MinThrottleRetryDelay is the minimum retry delay when throttled. + // If not set, the value is 0ns. + MinThrottleDelay time.Duration + + // MaxRetryDelay is the maximum retry delay before which retry must be performed. + // If not set, the value is 0ns. + MaxRetryDelay time.Duration + + // MaxThrottleDelay is the maximum retry delay when throttled. + // If not set, the value is 0ns. + MaxThrottleDelay time.Duration } +const ( + // DefaultRetryerMaxNumRetries sets maximum number of retries + DefaultRetryerMaxNumRetries = 3 + + // DefaultRetryerMinRetryDelay sets minimum retry delay + DefaultRetryerMinRetryDelay = 30 * time.Millisecond + + // DefaultRetryerMinThrottleDelay sets minimum delay when throttled + DefaultRetryerMinThrottleDelay = 500 * time.Millisecond + + // DefaultRetryerMaxRetryDelay sets maximum retry delay + DefaultRetryerMaxRetryDelay = 300 * time.Second + + // DefaultRetryerMaxThrottleDelay sets maximum delay when throttled + DefaultRetryerMaxThrottleDelay = 300 * time.Second +) + // MaxRetries returns the number of maximum returns the service will use to make // an individual API request. func (d DefaultRetryer) MaxRetries() int { return d.NumMaxRetries } +// setRetryerDefaults sets the default values of the retryer if not set +func (d *DefaultRetryer) setRetryerDefaults() { + if d.MinRetryDelay == 0 { + d.MinRetryDelay = DefaultRetryerMinRetryDelay + } + if d.MaxRetryDelay == 0 { + d.MaxRetryDelay = DefaultRetryerMaxRetryDelay + } + if d.MinThrottleDelay == 0 { + d.MinThrottleDelay = DefaultRetryerMinThrottleDelay + } + if d.MaxThrottleDelay == 0 { + d.MaxThrottleDelay = DefaultRetryerMaxThrottleDelay + } +} + // RetryRules returns the delay duration before retrying this request again func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration { - // Set the upper limit of delay in retrying at ~five minutes - minTime := 30 - throttle := d.shouldThrottle(r) - if throttle { - if delay, ok := getRetryDelay(r); ok { - return delay - } - minTime = 500 + // if number of max retries is zero, no retries will be performed. + if d.NumMaxRetries == 0 { + return 0 + } + + // Sets default value for retryer members + d.setRetryerDefaults() + + // minDelay is the minimum retryer delay + minDelay := d.MinRetryDelay + + var initialDelay time.Duration + + isThrottle := r.IsErrorThrottle() + if isThrottle { + if delay, ok := getRetryAfterDelay(r); ok { + initialDelay = delay + } + minDelay = d.MinThrottleDelay } retryCount := r.RetryCount - if throttle && retryCount > 8 { - retryCount = 8 - } else if retryCount > 13 { - retryCount = 13 + + // maxDelay the maximum retryer delay + maxDelay := d.MaxRetryDelay + + if isThrottle { + maxDelay = d.MaxThrottleDelay + } + + var delay time.Duration + + // Logic to cap the retry count based on the minDelay provided + actualRetryCount := int(math.Log2(float64(minDelay))) + 1 + if actualRetryCount < 63-retryCount { + delay = time.Duration(1< maxDelay { + delay = getJitterDelay(maxDelay / 2) + } + } else { + delay = getJitterDelay(maxDelay / 2) } + return delay + initialDelay +} - delay := (1 << uint(retryCount)) * (sdkrand.SeededRand.Intn(minTime) + minTime) - return time.Duration(delay) * time.Millisecond +// getJitterDelay returns a jittered delay for retry +func getJitterDelay(duration time.Duration) time.Duration { + return time.Duration(sdkrand.SeededRand.Int63n(int64(duration)) + int64(duration)) } // ShouldRetry returns true if the request should be retried. func (d DefaultRetryer) ShouldRetry(r *request.Request) bool { + + // ShouldRetry returns false if number of max retries is 0. + if d.NumMaxRetries == 0 { + return false + } + // If one of the other handlers already set the retry state // we don't want to override it based on the service's state if r.Retryable != nil { return *r.Retryable } - - if r.HTTPResponse.StatusCode >= 500 && r.HTTPResponse.StatusCode != 501 { - return true - } - return r.IsErrorRetryable() || d.shouldThrottle(r) -} - -// ShouldThrottle returns true if the request should be throttled. -func (d DefaultRetryer) shouldThrottle(r *request.Request) bool { - switch r.HTTPResponse.StatusCode { - case 429: - case 502: - case 503: - case 504: - default: - return r.IsErrorThrottle() - } - - return true + return r.IsErrorRetryable() || r.IsErrorThrottle() } // This will look in the Retry-After header, RFC 7231, for how long // it will wait before attempting another request -func getRetryDelay(r *request.Request) (time.Duration, bool) { +func getRetryAfterDelay(r *request.Request) (time.Duration, bool) { if !canUseRetryAfterHeader(r) { return 0, false } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go index 7b5e1276..8958c32d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go @@ -67,10 +67,14 @@ func logRequest(r *request.Request) { if !bodySeekable { r.SetReaderBody(aws.ReadSeekCloser(r.HTTPRequest.Body)) } - // Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's - // Body as a NoOpCloser and will not be reset after read by the HTTP - // client reader. - r.ResetBody() + // Reset the request body because dumpRequest will re-wrap the + // r.HTTPRequest's Body as a NoOpCloser and will not be reset after + // read by the HTTP client reader. + if err := r.Error; err != nil { + r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, + r.ClientInfo.ServiceName, r.Operation.Name, err)) + return + } } r.Config.Logger.Log(fmt.Sprintf(logReqMsg, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/no_op_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/no_op_retryer.go new file mode 100644 index 00000000..881d575f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/no_op_retryer.go @@ -0,0 +1,28 @@ +package client + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws/request" +) + +// NoOpRetryer provides a retryer that performs no retries. +// It should be used when we do not want retries to be performed. +type NoOpRetryer struct{} + +// MaxRetries returns the number of maximum returns the service will use to make +// an individual API; For NoOpRetryer the MaxRetries will always be zero. +func (d NoOpRetryer) MaxRetries() int { + return 0 +} + +// ShouldRetry will always return false for NoOpRetryer, as it should never retry. +func (d NoOpRetryer) ShouldRetry(_ *request.Request) bool { + return false +} + +// RetryRules returns the delay duration before retrying this request again; +// since NoOpRetryer does not retry, RetryRules always returns 0. +func (d NoOpRetryer) RetryRules(_ *request.Request) time.Duration { + return 0 +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go index 10634d17..fd1e240f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go @@ -20,7 +20,7 @@ type RequestRetryer interface{} // A Config provides service configuration for service clients. By default, // all clients will use the defaults.DefaultConfig structure. // -// // Create Session with MaxRetry configuration to be shared by multiple +// // Create Session with MaxRetries configuration to be shared by multiple // // service clients. // sess := session.Must(session.NewSession(&aws.Config{ // MaxRetries: aws.Int(3), @@ -251,7 +251,7 @@ type Config struct { // NewConfig returns a new Config pointer that can be chained with builder // methods to set multiple configuration values inline without using pointers. // -// // Create Session with MaxRetry configuration to be shared by multiple +// // Create Session with MaxRetries configuration to be shared by multiple // // service clients. // sess := session.Must(session.NewSession(aws.NewConfig(). // WithMaxRetries(3), diff --git a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go index ff5d58e0..4e076c18 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go @@ -179,6 +179,242 @@ func IntValueMap(src map[string]*int) map[string]int { return dst } +// Uint returns a pointer to the uint value passed in. +func Uint(v uint) *uint { + return &v +} + +// UintValue returns the value of the uint pointer passed in or +// 0 if the pointer is nil. +func UintValue(v *uint) uint { + if v != nil { + return *v + } + return 0 +} + +// UintSlice converts a slice of uint values uinto a slice of +// uint pointers +func UintSlice(src []uint) []*uint { + dst := make([]*uint, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// UintValueSlice converts a slice of uint pointers uinto a slice of +// uint values +func UintValueSlice(src []*uint) []uint { + dst := make([]uint, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// UintMap converts a string map of uint values uinto a string +// map of uint pointers +func UintMap(src map[string]uint) map[string]*uint { + dst := make(map[string]*uint) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// UintValueMap converts a string map of uint pointers uinto a string +// map of uint values +func UintValueMap(src map[string]*uint) map[string]uint { + dst := make(map[string]uint) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Int8 returns a pointer to the int8 value passed in. +func Int8(v int8) *int8 { + return &v +} + +// Int8Value returns the value of the int8 pointer passed in or +// 0 if the pointer is nil. +func Int8Value(v *int8) int8 { + if v != nil { + return *v + } + return 0 +} + +// Int8Slice converts a slice of int8 values into a slice of +// int8 pointers +func Int8Slice(src []int8) []*int8 { + dst := make([]*int8, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Int8ValueSlice converts a slice of int8 pointers into a slice of +// int8 values +func Int8ValueSlice(src []*int8) []int8 { + dst := make([]int8, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Int8Map converts a string map of int8 values into a string +// map of int8 pointers +func Int8Map(src map[string]int8) map[string]*int8 { + dst := make(map[string]*int8) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Int8ValueMap converts a string map of int8 pointers into a string +// map of int8 values +func Int8ValueMap(src map[string]*int8) map[string]int8 { + dst := make(map[string]int8) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Int16 returns a pointer to the int16 value passed in. +func Int16(v int16) *int16 { + return &v +} + +// Int16Value returns the value of the int16 pointer passed in or +// 0 if the pointer is nil. +func Int16Value(v *int16) int16 { + if v != nil { + return *v + } + return 0 +} + +// Int16Slice converts a slice of int16 values into a slice of +// int16 pointers +func Int16Slice(src []int16) []*int16 { + dst := make([]*int16, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Int16ValueSlice converts a slice of int16 pointers into a slice of +// int16 values +func Int16ValueSlice(src []*int16) []int16 { + dst := make([]int16, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Int16Map converts a string map of int16 values into a string +// map of int16 pointers +func Int16Map(src map[string]int16) map[string]*int16 { + dst := make(map[string]*int16) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Int16ValueMap converts a string map of int16 pointers into a string +// map of int16 values +func Int16ValueMap(src map[string]*int16) map[string]int16 { + dst := make(map[string]int16) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Int32 returns a pointer to the int32 value passed in. +func Int32(v int32) *int32 { + return &v +} + +// Int32Value returns the value of the int32 pointer passed in or +// 0 if the pointer is nil. +func Int32Value(v *int32) int32 { + if v != nil { + return *v + } + return 0 +} + +// Int32Slice converts a slice of int32 values into a slice of +// int32 pointers +func Int32Slice(src []int32) []*int32 { + dst := make([]*int32, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Int32ValueSlice converts a slice of int32 pointers into a slice of +// int32 values +func Int32ValueSlice(src []*int32) []int32 { + dst := make([]int32, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Int32Map converts a string map of int32 values into a string +// map of int32 pointers +func Int32Map(src map[string]int32) map[string]*int32 { + dst := make(map[string]*int32) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Int32ValueMap converts a string map of int32 pointers into a string +// map of int32 values +func Int32ValueMap(src map[string]*int32) map[string]int32 { + dst := make(map[string]int32) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + // Int64 returns a pointer to the int64 value passed in. func Int64(v int64) *int64 { return &v @@ -238,6 +474,301 @@ func Int64ValueMap(src map[string]*int64) map[string]int64 { return dst } +// Uint8 returns a pointer to the uint8 value passed in. +func Uint8(v uint8) *uint8 { + return &v +} + +// Uint8Value returns the value of the uint8 pointer passed in or +// 0 if the pointer is nil. +func Uint8Value(v *uint8) uint8 { + if v != nil { + return *v + } + return 0 +} + +// Uint8Slice converts a slice of uint8 values into a slice of +// uint8 pointers +func Uint8Slice(src []uint8) []*uint8 { + dst := make([]*uint8, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Uint8ValueSlice converts a slice of uint8 pointers into a slice of +// uint8 values +func Uint8ValueSlice(src []*uint8) []uint8 { + dst := make([]uint8, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Uint8Map converts a string map of uint8 values into a string +// map of uint8 pointers +func Uint8Map(src map[string]uint8) map[string]*uint8 { + dst := make(map[string]*uint8) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Uint8ValueMap converts a string map of uint8 pointers into a string +// map of uint8 values +func Uint8ValueMap(src map[string]*uint8) map[string]uint8 { + dst := make(map[string]uint8) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Uint16 returns a pointer to the uint16 value passed in. +func Uint16(v uint16) *uint16 { + return &v +} + +// Uint16Value returns the value of the uint16 pointer passed in or +// 0 if the pointer is nil. +func Uint16Value(v *uint16) uint16 { + if v != nil { + return *v + } + return 0 +} + +// Uint16Slice converts a slice of uint16 values into a slice of +// uint16 pointers +func Uint16Slice(src []uint16) []*uint16 { + dst := make([]*uint16, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Uint16ValueSlice converts a slice of uint16 pointers into a slice of +// uint16 values +func Uint16ValueSlice(src []*uint16) []uint16 { + dst := make([]uint16, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Uint16Map converts a string map of uint16 values into a string +// map of uint16 pointers +func Uint16Map(src map[string]uint16) map[string]*uint16 { + dst := make(map[string]*uint16) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Uint16ValueMap converts a string map of uint16 pointers into a string +// map of uint16 values +func Uint16ValueMap(src map[string]*uint16) map[string]uint16 { + dst := make(map[string]uint16) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Uint32 returns a pointer to the uint32 value passed in. +func Uint32(v uint32) *uint32 { + return &v +} + +// Uint32Value returns the value of the uint32 pointer passed in or +// 0 if the pointer is nil. +func Uint32Value(v *uint32) uint32 { + if v != nil { + return *v + } + return 0 +} + +// Uint32Slice converts a slice of uint32 values into a slice of +// uint32 pointers +func Uint32Slice(src []uint32) []*uint32 { + dst := make([]*uint32, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Uint32ValueSlice converts a slice of uint32 pointers into a slice of +// uint32 values +func Uint32ValueSlice(src []*uint32) []uint32 { + dst := make([]uint32, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Uint32Map converts a string map of uint32 values into a string +// map of uint32 pointers +func Uint32Map(src map[string]uint32) map[string]*uint32 { + dst := make(map[string]*uint32) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Uint32ValueMap converts a string map of uint32 pointers into a string +// map of uint32 values +func Uint32ValueMap(src map[string]*uint32) map[string]uint32 { + dst := make(map[string]uint32) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Uint64 returns a pointer to the uint64 value passed in. +func Uint64(v uint64) *uint64 { + return &v +} + +// Uint64Value returns the value of the uint64 pointer passed in or +// 0 if the pointer is nil. +func Uint64Value(v *uint64) uint64 { + if v != nil { + return *v + } + return 0 +} + +// Uint64Slice converts a slice of uint64 values into a slice of +// uint64 pointers +func Uint64Slice(src []uint64) []*uint64 { + dst := make([]*uint64, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Uint64ValueSlice converts a slice of uint64 pointers into a slice of +// uint64 values +func Uint64ValueSlice(src []*uint64) []uint64 { + dst := make([]uint64, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Uint64Map converts a string map of uint64 values into a string +// map of uint64 pointers +func Uint64Map(src map[string]uint64) map[string]*uint64 { + dst := make(map[string]*uint64) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Uint64ValueMap converts a string map of uint64 pointers into a string +// map of uint64 values +func Uint64ValueMap(src map[string]*uint64) map[string]uint64 { + dst := make(map[string]uint64) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Float32 returns a pointer to the float32 value passed in. +func Float32(v float32) *float32 { + return &v +} + +// Float32Value returns the value of the float32 pointer passed in or +// 0 if the pointer is nil. +func Float32Value(v *float32) float32 { + if v != nil { + return *v + } + return 0 +} + +// Float32Slice converts a slice of float32 values into a slice of +// float32 pointers +func Float32Slice(src []float32) []*float32 { + dst := make([]*float32, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Float32ValueSlice converts a slice of float32 pointers into a slice of +// float32 values +func Float32ValueSlice(src []*float32) []float32 { + dst := make([]float32, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Float32Map converts a string map of float32 values into a string +// map of float32 pointers +func Float32Map(src map[string]float32) map[string]*float32 { + dst := make(map[string]*float32) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Float32ValueMap converts a string map of float32 pointers into a string +// map of float32 values +func Float32ValueMap(src map[string]*float32) map[string]float32 { + dst := make(map[string]float32) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + // Float64 returns a pointer to the float64 value passed in. func Float64(v float64) *float64 { return &v diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go index f8853d78..0c60e612 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go @@ -159,9 +159,9 @@ func handleSendError(r *request.Request, err error) { Body: ioutil.NopCloser(bytes.NewReader([]byte{})), } } - // Catch all other request errors. + // Catch all request errors, and let the default retrier determine + // if the error is retryable. r.Error = awserr.New("RequestError", "send request failed", err) - r.Retryable = aws.Bool(true) // network errors are retryable // Override the error with a context canceled error, if that was canceled. ctx := r.Context() @@ -184,37 +184,39 @@ var ValidateResponseHandler = request.NamedHandler{Name: "core.ValidateResponseH // AfterRetryHandler performs final checks to determine if the request should // be retried and how long to delay. -var AfterRetryHandler = request.NamedHandler{Name: "core.AfterRetryHandler", Fn: func(r *request.Request) { - // If one of the other handlers already set the retry state - // we don't want to override it based on the service's state - if r.Retryable == nil || aws.BoolValue(r.Config.EnforceShouldRetryCheck) { - r.Retryable = aws.Bool(r.ShouldRetry(r)) - } +var AfterRetryHandler = request.NamedHandler{ + Name: "core.AfterRetryHandler", + Fn: func(r *request.Request) { + // If one of the other handlers already set the retry state + // we don't want to override it based on the service's state + if r.Retryable == nil || aws.BoolValue(r.Config.EnforceShouldRetryCheck) { + r.Retryable = aws.Bool(r.ShouldRetry(r)) + } - if r.WillRetry() { - r.RetryDelay = r.RetryRules(r) + if r.WillRetry() { + r.RetryDelay = r.RetryRules(r) - if sleepFn := r.Config.SleepDelay; sleepFn != nil { - // Support SleepDelay for backwards compatibility and testing - sleepFn(r.RetryDelay) - } else if err := aws.SleepWithContext(r.Context(), r.RetryDelay); err != nil { - r.Error = awserr.New(request.CanceledErrorCode, - "request context canceled", err) - r.Retryable = aws.Bool(false) - return - } + if sleepFn := r.Config.SleepDelay; sleepFn != nil { + // Support SleepDelay for backwards compatibility and testing + sleepFn(r.RetryDelay) + } else if err := aws.SleepWithContext(r.Context(), r.RetryDelay); err != nil { + r.Error = awserr.New(request.CanceledErrorCode, + "request context canceled", err) + r.Retryable = aws.Bool(false) + return + } - // when the expired token exception occurs the credentials - // need to be expired locally so that the next request to - // get credentials will trigger a credentials refresh. - if r.IsErrorExpired() { - r.Config.Credentials.Expire() - } + // when the expired token exception occurs the credentials + // need to be expired locally so that the next request to + // get credentials will trigger a credentials refresh. + if r.IsErrorExpired() { + r.Config.Credentials.Expire() + } - r.RetryCount++ - r.Error = nil - } -}} + r.RetryCount++ + r.Error = nil + } + }} // ValidateEndpointHandler is a request handler to validate a request had the // appropriate Region and Endpoint set. Will set r.Error if the endpoint or diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go index 894bbc7f..4af59215 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go @@ -50,9 +50,10 @@ package credentials import ( "fmt" - "github.com/aws/aws-sdk-go/aws/awserr" "sync" "time" + + "github.com/aws/aws-sdk-go/aws/awserr" ) // AnonymousCredentials is an empty Credential object that can be used as @@ -83,6 +84,12 @@ type Value struct { ProviderName string } +// HasKeys returns if the credentials Value has both AccessKeyID and +// SecretAccessKey value set. +func (v Value) HasKeys() bool { + return len(v.AccessKeyID) != 0 && len(v.SecretAccessKey) != 0 +} + // A Provider is the interface for any component which will provide credentials // Value. A provider is required to manage its own Expired state, and what to // be expired means. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go index c2b2c5d6..1a7af53a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go @@ -98,8 +98,8 @@ func NewProviderClient(cfg aws.Config, handlers request.Handlers, endpoint strin return p } -// NewCredentialsClient returns a Credentials wrapper for retrieving credentials -// from an arbitrary endpoint concurrently. The client will request the +// NewCredentialsClient returns a pointer to a new Credentials object +// wrapping the endpoint credentials Provider. func NewCredentialsClient(cfg aws.Config, handlers request.Handlers, endpoint string, options ...func(*Provider)) *credentials.Credentials { return credentials.NewCredentials(NewProviderClient(cfg, handlers, endpoint, options...)) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini b/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini new file mode 100644 index 00000000..7fc91d9d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini @@ -0,0 +1,12 @@ +[default] +aws_access_key_id = accessKey +aws_secret_access_key = secret +aws_session_token = token + +[no_token] +aws_access_key_id = accessKey +aws_secret_access_key = secret + +[with_colon] +aws_access_key_id: accessKey +aws_secret_access_key: secret diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go index b6dbfd24..2e528d13 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go @@ -200,7 +200,7 @@ type AssumeRoleProvider struct { // by a random percentage between 0 and MaxJitterFraction. MaxJitterFrac must // have a value between 0 and 1. Any other value may lead to expected behavior. // With a MaxJitterFrac value of 0, default) will no jitter will be used. - // + // // For example, with a Duration of 30m and a MaxJitterFrac of 0.1, the // AssumeRole call will be made with an arbitrary Duration between 27m and // 30m. @@ -258,7 +258,6 @@ func NewCredentialsWithClient(svc AssumeRoler, roleARN string, options ...func(* // Retrieve generates a new set of temporary credentials using STS. func (p *AssumeRoleProvider) Retrieve() (credentials.Value, error) { - // Apply defaults where parameters are not set. if p.RoleSessionName == "" { // Try to work out a role name that will hopefully end up unique. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go new file mode 100644 index 00000000..b20b6339 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go @@ -0,0 +1,100 @@ +package stscreds + +import ( + "fmt" + "io/ioutil" + "strconv" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/service/sts" + "github.com/aws/aws-sdk-go/service/sts/stsiface" +) + +const ( + // ErrCodeWebIdentity will be used as an error code when constructing + // a new error to be returned during session creation or retrieval. + ErrCodeWebIdentity = "WebIdentityErr" + + // WebIdentityProviderName is the web identity provider name + WebIdentityProviderName = "WebIdentityCredentials" +) + +// now is used to return a time.Time object representing +// the current time. This can be used to easily test and +// compare test values. +var now = time.Now + +// WebIdentityRoleProvider is used to retrieve credentials using +// an OIDC token. +type WebIdentityRoleProvider struct { + credentials.Expiry + + client stsiface.STSAPI + ExpiryWindow time.Duration + + tokenFilePath string + roleARN string + roleSessionName string +} + +// NewWebIdentityCredentials will return a new set of credentials with a given +// configuration, role arn, and token file path. +func NewWebIdentityCredentials(c client.ConfigProvider, roleARN, roleSessionName, path string) *credentials.Credentials { + svc := sts.New(c) + p := NewWebIdentityRoleProvider(svc, roleARN, roleSessionName, path) + return credentials.NewCredentials(p) +} + +// NewWebIdentityRoleProvider will return a new WebIdentityRoleProvider with the +// provided stsiface.STSAPI +func NewWebIdentityRoleProvider(svc stsiface.STSAPI, roleARN, roleSessionName, path string) *WebIdentityRoleProvider { + return &WebIdentityRoleProvider{ + client: svc, + tokenFilePath: path, + roleARN: roleARN, + roleSessionName: roleSessionName, + } +} + +// Retrieve will attempt to assume a role from a token which is located at +// 'WebIdentityTokenFilePath' specified destination and if that is empty an +// error will be returned. +func (p *WebIdentityRoleProvider) Retrieve() (credentials.Value, error) { + b, err := ioutil.ReadFile(p.tokenFilePath) + if err != nil { + errMsg := fmt.Sprintf("unable to read file at %s", p.tokenFilePath) + return credentials.Value{}, awserr.New(ErrCodeWebIdentity, errMsg, err) + } + + sessionName := p.roleSessionName + if len(sessionName) == 0 { + // session name is used to uniquely identify a session. This simply + // uses unix time in nanoseconds to uniquely identify sessions. + sessionName = strconv.FormatInt(now().UnixNano(), 10) + } + req, resp := p.client.AssumeRoleWithWebIdentityRequest(&sts.AssumeRoleWithWebIdentityInput{ + RoleArn: &p.roleARN, + RoleSessionName: &sessionName, + WebIdentityToken: aws.String(string(b)), + }) + // InvalidIdentityToken error is a temporary error that can occur + // when assuming an Role with a JWT web identity token. + req.RetryErrorCodes = append(req.RetryErrorCodes, sts.ErrCodeInvalidIdentityTokenException) + if err := req.Send(); err != nil { + return credentials.Value{}, awserr.New(ErrCodeWebIdentity, "failed to retrieve credentials", err) + } + + p.SetExpiration(aws.TimeValue(resp.Credentials.Expiration), p.ExpiryWindow) + + value := credentials.Value{ + AccessKeyID: aws.StringValue(resp.Credentials.AccessKeyId), + SecretAccessKey: aws.StringValue(resp.Credentials.SecretAccessKey), + SessionToken: aws.StringValue(resp.Credentials.SessionToken), + ProviderName: WebIdentityProviderName, + } + return value, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go index 152d785b..25a66d1d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go @@ -1,30 +1,61 @@ -// Package csm provides Client Side Monitoring (CSM) which enables sending metrics -// via UDP connection. Using the Start function will enable the reporting of -// metrics on a given port. If Start is called, with different parameters, again, -// a panic will occur. +// Package csm provides the Client Side Monitoring (CSM) client which enables +// sending metrics via UDP connection to the CSM agent. This package provides +// control options, and configuration for the CSM client. The client can be +// controlled manually, or automatically via the SDK's Session configuration. // -// Pause can be called to pause any metrics publishing on a given port. Sessions -// that have had their handlers modified via InjectHandlers may still be used. -// However, the handlers will act as a no-op meaning no metrics will be published. +// Enabling CSM client via SDK's Session configuration +// +// The CSM client can be enabled automatically via SDK's Session configuration. +// The SDK's session configuration enables the CSM client if the AWS_CSM_PORT +// environment variable is set to a non-empty value. +// +// The configuration options for the CSM client via the SDK's session +// configuration are: +// +// * AWS_CSM_PORT= +// The port number the CSM agent will receive metrics on. +// +// * AWS_CSM_HOST= +// The hostname, or IP address the CSM agent will receive metrics on. +// Without port number. +// +// Manually enabling the CSM client +// +// The CSM client can be started, paused, and resumed manually. The Start +// function will enable the CSM client to publish metrics to the CSM agent. It +// is safe to call Start concurrently, but if Start is called additional times +// with different ClientID or address it will panic. // -// Example: // r, err := csm.Start("clientID", ":31000") // if err != nil { // panic(fmt.Errorf("failed starting CSM: %v", err)) // } // +// When controlling the CSM client manually, you must also inject its request +// handlers into the SDK's Session configuration for the SDK's API clients to +// publish metrics. +// // sess, err := session.NewSession(&aws.Config{}) // if err != nil { // panic(fmt.Errorf("failed loading session: %v", err)) // } // +// // Add CSM client's metric publishing request handlers to the SDK's +// // Session Configuration. // r.InjectHandlers(&sess.Handlers) // -// client := s3.New(sess) -// resp, err := client.GetObject(&s3.GetObjectInput{ -// Bucket: aws.String("bucket"), -// Key: aws.String("key"), -// }) +// Controlling CSM client +// +// Once the CSM client has been enabled the Get function will return a Reporter +// value that you can use to pause and resume the metrics published to the CSM +// agent. If Get function is called before the reporter is enabled with the +// Start function or via SDK's Session configuration nil will be returned. +// +// The Pause method can be called to stop the CSM client publishing metrics to +// the CSM agent. The Continue method will resume metric publishing. +// +// // Get the CSM client Reporter. +// r := csm.Get() // // // Will pause monitoring // r.Pause() @@ -35,12 +66,4 @@ // // // Resume monitoring // r.Continue() -// -// Start returns a Reporter that is used to enable or disable monitoring. If -// access to the Reporter is required later, calling Get will return the Reporter -// singleton. -// -// Example: -// r := csm.Get() -// r.Continue() package csm diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go index 2f0c6eac..4b19e280 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go @@ -2,6 +2,7 @@ package csm import ( "fmt" + "strings" "sync" ) @@ -9,19 +10,40 @@ var ( lock sync.Mutex ) -// Client side metric handler names const ( - APICallMetricHandlerName = "awscsm.SendAPICallMetric" - APICallAttemptMetricHandlerName = "awscsm.SendAPICallAttemptMetric" + // DefaultPort is used when no port is specified. + DefaultPort = "31000" + + // DefaultHost is the host that will be used when none is specified. + DefaultHost = "127.0.0.1" ) -// Start will start the a long running go routine to capture +// AddressWithDefaults returns a CSM address built from the host and port +// values. If the host or port is not set, default values will be used +// instead. If host is "localhost" it will be replaced with "127.0.0.1". +func AddressWithDefaults(host, port string) string { + if len(host) == 0 || strings.EqualFold(host, "localhost") { + host = DefaultHost + } + + if len(port) == 0 { + port = DefaultPort + } + + // Only IP6 host can contain a colon + if strings.Contains(host, ":") { + return "[" + host + "]:" + port + } + + return host + ":" + port +} + +// Start will start a long running go routine to capture // client side metrics. Calling start multiple time will only // start the metric listener once and will panic if a different // client ID or port is passed in. // -// Example: -// r, err := csm.Start("clientID", "127.0.0.1:8094") +// r, err := csm.Start("clientID", "127.0.0.1:31000") // if err != nil { // panic(fmt.Errorf("expected no error, but received %v", err)) // } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go index 514fc373..82a3e345 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go @@ -16,25 +16,26 @@ var ( type metricChan struct { ch chan metric - paused int64 + paused *int64 } func newMetricChan(size int) metricChan { return metricChan{ - ch: make(chan metric, size), + ch: make(chan metric, size), + paused: new(int64), } } func (ch *metricChan) Pause() { - atomic.StoreInt64(&ch.paused, pausedEnum) + atomic.StoreInt64(ch.paused, pausedEnum) } func (ch *metricChan) Continue() { - atomic.StoreInt64(&ch.paused, runningEnum) + atomic.StoreInt64(ch.paused, runningEnum) } func (ch *metricChan) IsPaused() bool { - v := atomic.LoadInt64(&ch.paused) + v := atomic.LoadInt64(ch.paused) return v == pausedEnum } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go index d9aa5b06..c7008d8c 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go @@ -10,11 +10,6 @@ import ( "github.com/aws/aws-sdk-go/aws/request" ) -const ( - // DefaultPort is used when no port is specified - DefaultPort = "31000" -) - // Reporter will gather metrics of API requests made and // send those metrics to the CSM endpoint. type Reporter struct { @@ -123,7 +118,7 @@ func (rep *Reporter) sendAPICallMetric(r *request.Request) { Type: aws.String("ApiCall"), AttemptCount: aws.Int(r.RetryCount + 1), Region: r.Config.Region, - Latency: aws.Int(int(time.Now().Sub(r.Time) / time.Millisecond)), + Latency: aws.Int(int(time.Since(r.Time) / time.Millisecond)), XAmzRequestID: aws.String(r.RequestID), MaxRetriesExceeded: aws.Int(boolIntValue(r.RetryCount >= r.MaxRetries())), } @@ -190,8 +185,9 @@ func (rep *Reporter) start() { } } -// Pause will pause the metric channel preventing any new metrics from -// being added. +// Pause will pause the metric channel preventing any new metrics from being +// added. It is safe to call concurrently with other calls to Pause, but if +// called concurently with Continue can lead to unexpected state. func (rep *Reporter) Pause() { lock.Lock() defer lock.Unlock() @@ -203,8 +199,9 @@ func (rep *Reporter) Pause() { rep.close() } -// Continue will reopen the metric channel and allow for monitoring -// to be resumed. +// Continue will reopen the metric channel and allow for monitoring to be +// resumed. It is safe to call concurrently with other calls to Continue, but +// if called concurently with Pause can lead to unexpected state. func (rep *Reporter) Continue() { lock.Lock() defer lock.Unlock() @@ -219,10 +216,18 @@ func (rep *Reporter) Continue() { rep.metricsCh.Continue() } +// Client side metric handler names +const ( + APICallMetricHandlerName = "awscsm.SendAPICallMetric" + APICallAttemptMetricHandlerName = "awscsm.SendAPICallAttemptMetric" +) + // InjectHandlers will will enable client side metrics and inject the proper // handlers to handle how metrics are sent. // -// Example: +// InjectHandlers is NOT safe to call concurrently. Calling InjectHandlers +// multiple times may lead to unexpected behavior, (e.g. duplicate metrics). +// // // Start must be called in order to inject the correct handlers // r, err := csm.Start("clientID", "127.0.0.1:8094") // if err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go index 2c8d5f56..d126764c 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go @@ -152,18 +152,19 @@ type EC2IAMInfo struct { // An EC2InstanceIdentityDocument provides the shape for unmarshaling // an instance identity document type EC2InstanceIdentityDocument struct { - DevpayProductCodes []string `json:"devpayProductCodes"` - AvailabilityZone string `json:"availabilityZone"` - PrivateIP string `json:"privateIp"` - Version string `json:"version"` - Region string `json:"region"` - InstanceID string `json:"instanceId"` - BillingProducts []string `json:"billingProducts"` - InstanceType string `json:"instanceType"` - AccountID string `json:"accountId"` - PendingTime time.Time `json:"pendingTime"` - ImageID string `json:"imageId"` - KernelID string `json:"kernelId"` - RamdiskID string `json:"ramdiskId"` - Architecture string `json:"architecture"` + DevpayProductCodes []string `json:"devpayProductCodes"` + MarketplaceProductCodes []string `json:"marketplaceProductCodes"` + AvailabilityZone string `json:"availabilityZone"` + PrivateIP string `json:"privateIp"` + Version string `json:"version"` + Region string `json:"region"` + InstanceID string `json:"instanceId"` + BillingProducts []string `json:"billingProducts"` + InstanceType string `json:"instanceType"` + AccountID string `json:"accountId"` + PendingTime time.Time `json:"pendingTime"` + ImageID string `json:"imageId"` + KernelID string `json:"kernelId"` + RamdiskID string `json:"ramdiskId"` + Architecture string `json:"architecture"` } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go index f0c1d31e..4c5636e3 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go @@ -123,7 +123,7 @@ func unmarshalHandler(r *request.Request) { defer r.HTTPResponse.Body.Close() b := &bytes.Buffer{} if _, err := io.Copy(b, r.HTTPResponse.Body); err != nil { - r.Error = awserr.New(request.ErrCodeSerialization, "unable to unmarshal EC2 metadata respose", err) + r.Error = awserr.New(request.ErrCodeSerialization, "unable to unmarshal EC2 metadata response", err) return } @@ -136,7 +136,7 @@ func unmarshalError(r *request.Request) { defer r.HTTPResponse.Body.Close() b := &bytes.Buffer{} if _, err := io.Copy(b, r.HTTPResponse.Body); err != nil { - r.Error = awserr.New(request.ErrCodeSerialization, "unable to unmarshal EC2 metadata error respose", err) + r.Error = awserr.New(request.ErrCodeSerialization, "unable to unmarshal EC2 metadata error response", err) return } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index e315e7bd..452cefda 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -11,6 +11,8 @@ const ( AwsPartitionID = "aws" // AWS Standard partition. AwsCnPartitionID = "aws-cn" // AWS China partition. AwsUsGovPartitionID = "aws-us-gov" // AWS GovCloud (US) partition. + AwsIsoPartitionID = "aws-iso" // AWS ISO (US) partition. + AwsIsoBPartitionID = "aws-iso-b" // AWS ISOB (US) partition. ) // AWS Standard partition's regions. @@ -27,6 +29,7 @@ const ( EuWest1RegionID = "eu-west-1" // EU (Ireland). EuWest2RegionID = "eu-west-2" // EU (London). EuWest3RegionID = "eu-west-3" // EU (Paris). + MeSouth1RegionID = "me-south-1" // Middle East (Bahrain). SaEast1RegionID = "sa-east-1" // South America (Sao Paulo). UsEast1RegionID = "us-east-1" // US East (N. Virginia). UsEast2RegionID = "us-east-2" // US East (Ohio). @@ -46,8 +49,18 @@ const ( UsGovWest1RegionID = "us-gov-west-1" // AWS GovCloud (US). ) +// AWS ISO (US) partition's regions. +const ( + UsIsoEast1RegionID = "us-iso-east-1" // US ISO East. +) + +// AWS ISOB (US) partition's regions. +const ( + UsIsobEast1RegionID = "us-isob-east-1" // US ISOB East (Ohio). +) + // DefaultResolver returns an Endpoint resolver that will be able -// to resolve endpoints for: AWS Standard, AWS China, and AWS GovCloud (US). +// to resolve endpoints for: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), and AWS ISOB (US). // // Use DefaultPartitions() to get the list of the default partitions. func DefaultResolver() Resolver { @@ -55,7 +68,7 @@ func DefaultResolver() Resolver { } // DefaultPartitions returns a list of the partitions the SDK is bundled -// with. The available partitions are: AWS Standard, AWS China, and AWS GovCloud (US). +// with. The available partitions are: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), and AWS ISOB (US). // // partitions := endpoints.DefaultPartitions // for _, p := range partitions { @@ -69,6 +82,8 @@ var defaultPartitions = partitions{ awsPartition, awscnPartition, awsusgovPartition, + awsisoPartition, + awsisobPartition, } // AwsPartition returns the Resolver for AWS Standard. @@ -82,7 +97,7 @@ var awsPartition = partition{ DNSSuffix: "amazonaws.com", RegionRegex: regionRegex{ Regexp: func() *regexp.Regexp { - reg, _ := regexp.Compile("^(us|eu|ap|sa|ca)\\-\\w+\\-\\d+$") + reg, _ := regexp.Compile("^(us|eu|ap|sa|ca|me)\\-\\w+\\-\\d+$") return reg }(), }, @@ -128,6 +143,9 @@ var awsPartition = partition{ "eu-west-3": region{ Description: "EU (Paris)", }, + "me-south-1": region{ + Description: "Middle East (Bahrain)", + }, "sa-east-1": region{ Description: "South America (Sao Paulo)", }, @@ -166,6 +184,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -178,6 +197,7 @@ var awsPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -270,6 +290,12 @@ var awsPartition = partition{ Region: "eu-west-3", }, }, + "me-south-1": endpoint{ + Hostname: "api.ecr.me-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "me-south-1", + }, + }, "sa-east-1": endpoint{ Hostname: "api.ecr.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ @@ -308,6 +334,7 @@ var awsPartition = partition{ "ap-northeast-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, @@ -327,6 +354,7 @@ var awsPartition = partition{ "api.sagemaker": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -334,8 +362,11 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-1-fips": endpoint{ Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com", @@ -381,6 +412,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -409,6 +441,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -471,6 +504,7 @@ var awsPartition = partition{ "athena": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -478,6 +512,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "us-east-1": endpoint{}, @@ -502,6 +537,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -533,9 +569,27 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "backup": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "batch": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -547,6 +601,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -638,6 +693,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -693,6 +749,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -729,6 +786,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -739,6 +797,7 @@ var awsPartition = partition{ "codebuild": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -750,6 +809,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-1-fips": endpoint{ @@ -791,6 +851,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -822,6 +883,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-1-fips": endpoint{ @@ -863,6 +925,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -983,6 +1046,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -990,6 +1054,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "connect": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "cur": service{ Endpoints: endpoints{ @@ -1028,10 +1102,35 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "datasync-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "datasync-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "datasync-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "datasync-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "dax": service{ @@ -1059,6 +1158,7 @@ var awsPartition = partition{ "directconnect": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -1070,6 +1170,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1098,6 +1199,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1120,6 +1222,12 @@ var awsPartition = partition{ Region: "ap-northeast-2", }, }, + "ap-southeast-2": endpoint{ + Hostname: "rds.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, "eu-central-1": endpoint{ Hostname: "rds.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ @@ -1132,6 +1240,12 @@ var awsPartition = partition{ Region: "eu-west-1", }, }, + "eu-west-2": endpoint{ + Hostname: "rds.eu-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-2", + }, + }, "us-east-1": endpoint{ Hostname: "rds.us-east-1.amazonaws.com", CredentialScope: credentialScope{ @@ -1162,6 +1276,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "sa-east-1": endpoint{}, @@ -1183,11 +1298,17 @@ var awsPartition = partition{ "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, - "eu-central-1": endpoint{}, - "eu-north-1": endpoint{}, - "eu-west-1": endpoint{}, - "eu-west-2": endpoint{}, - "eu-west-3": endpoint{}, + "ca-central-1-fips": endpoint{ + Hostname: "dynamodb-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "local": endpoint{ Hostname: "localhost:8000", Protocols: []string{"http"}, @@ -1195,11 +1316,36 @@ var awsPartition = partition{ Region: "us-east-1", }, }, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "dynamodb-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "dynamodb-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "dynamodb-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "dynamodb-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "ec2": service{ @@ -1219,6 +1365,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1252,6 +1399,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1280,11 +1428,12 @@ var awsPartition = partition{ Region: "us-west-1", }, }, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "elasticbeanstalk": service{ @@ -1302,6 +1451,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1314,12 +1464,14 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -1343,6 +1495,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1370,6 +1523,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{ SSLCommonName: "{service}.{region}.{dnsSuffix}", @@ -1434,11 +1588,12 @@ var awsPartition = partition{ Region: "us-west-1", }, }, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "events": service{ @@ -1456,6 +1611,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1466,6 +1622,7 @@ var awsPartition = partition{ "firehose": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -1506,10 +1663,15 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1549,6 +1711,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1559,6 +1722,7 @@ var awsPartition = partition{ "glue": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -1566,9 +1730,12 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -1582,10 +1749,15 @@ var awsPartition = partition{ }, Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1602,6 +1774,7 @@ var awsPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -1613,11 +1786,36 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "guardduty-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "guardduty-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "guardduty-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "guardduty-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "health": service{ @@ -1662,7 +1860,9 @@ var awsPartition = partition{ "ap-south-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -1676,16 +1876,23 @@ var awsPartition = partition{ }, }, Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1700,6 +1907,65 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "iotevents": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "ioteventsdata": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{ + Hostname: "data.iotevents.ap-northeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-1", + }, + }, + "ap-southeast-2": endpoint{ + Hostname: "data.iotevents.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, + "eu-central-1": endpoint{ + Hostname: "data.iotevents.eu-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-central-1", + }, + }, + "eu-west-1": endpoint{ + Hostname: "data.iotevents.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "us-east-1": endpoint{ + Hostname: "data.iotevents.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{ + Hostname: "data.iotevents.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-2": endpoint{ + Hostname: "data.iotevents.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + }, + }, "iotthingsgraph": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -1718,9 +1984,15 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, @@ -1741,6 +2013,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1753,11 +2026,14 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, @@ -1777,12 +2053,6 @@ var awsPartition = partition{ "kms": service{ Endpoints: endpoints{ - "ProdFips": endpoint{ - Hostname: "kms-fips.ca-central-1.amazonaws.com", - CredentialScope: credentialScope{ - Region: "ca-central-1", - }, - }, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1795,6 +2065,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1802,21 +2073,32 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, - "lambda": service{ + "lakeformation": service{ Endpoints: endpoints{ - "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, - "ap-northeast-2": endpoint{}, - "ap-south-1": endpoint{}, - "ap-southeast-1": endpoint{}, - "ap-southeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "lambda": service{ + + Endpoints: endpoints{ + "ap-east-1": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1827,6 +2109,7 @@ var awsPartition = partition{ "license-manager": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -1838,6 +2121,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1878,6 +2162,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1907,6 +2192,7 @@ var awsPartition = partition{ "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -1946,6 +2232,7 @@ var awsPartition = partition{ "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, @@ -1962,6 +2249,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, @@ -2001,6 +2289,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -2049,6 +2338,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -2061,11 +2351,14 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -2121,6 +2414,12 @@ var awsPartition = partition{ Region: "eu-central-1", }, }, + "eu-north-1": endpoint{ + Hostname: "rds.eu-north-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-north-1", + }, + }, "eu-west-1": endpoint{ Hostname: "rds.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ @@ -2248,6 +2547,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "qldb": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "ram": service{ Endpoints: endpoints{ @@ -2258,6 +2567,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -2282,6 +2592,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{ SSLCommonName: "{service}.{dnsSuffix}", @@ -2306,6 +2617,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -2319,10 +2631,14 @@ var awsPartition = partition{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -2341,19 +2657,47 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "resource-groups-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "resource-groups-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "resource-groups-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "resource-groups-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "robomaker": service{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -2412,6 +2756,7 @@ var awsPartition = partition{ "runtime.sagemaker": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -2419,12 +2764,39 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "runtime-fips.sagemaker.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "runtime-fips.sagemaker.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "runtime-fips.sagemaker.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "runtime-fips.sagemaker.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "s3": service{ @@ -2460,8 +2832,9 @@ var awsPartition = partition{ Hostname: "s3.eu-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, - "eu-west-2": endpoint{}, - "eu-west-3": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "s3-external-1": endpoint{ Hostname: "s3-external-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, @@ -2705,6 +3078,7 @@ var awsPartition = partition{ "securityhub": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -2712,6 +3086,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -2825,6 +3200,7 @@ var awsPartition = partition{ "servicediscovery": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -2832,9 +3208,11 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -2842,6 +3220,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "session.qldb": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "shield": service{ IsRegionalized: boxedFalse, Defaults: endpoint{ @@ -2855,6 +3243,7 @@ var awsPartition = partition{ "sms": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -2866,6 +3255,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -2877,6 +3267,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2909,6 +3300,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -2958,7 +3350,8 @@ var awsPartition = partition{ Region: "us-west-2", }, }, - "sa-east-1": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{ SSLCommonName: "queue.{dnsSuffix}", }, @@ -2982,6 +3375,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -3004,6 +3398,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -3014,6 +3409,7 @@ var awsPartition = partition{ "storagegateway": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -3025,6 +3421,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -3046,11 +3443,17 @@ var awsPartition = partition{ "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, - "eu-central-1": endpoint{}, - "eu-north-1": endpoint{}, - "eu-west-1": endpoint{}, - "eu-west-2": endpoint{}, - "eu-west-3": endpoint{}, + "ca-central-1-fips": endpoint{ + Hostname: "dynamodb-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "local": endpoint{ Hostname: "localhost:8000", Protocols: []string{"http"}, @@ -3058,11 +3461,36 @@ var awsPartition = partition{ Region: "us-east-1", }, }, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "dynamodb-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "dynamodb-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "dynamodb-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "dynamodb-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "sts": service{ @@ -3097,8 +3525,14 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, + "me-south-1": endpoint{ + Hostname: "sts.me-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "me-south-1", + }, + }, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, "us-east-1-fips": endpoint{ Hostname: "sts-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ @@ -3129,9 +3563,15 @@ var awsPartition = partition{ }, }, "support": service{ + PartitionEndpoint: "aws-global", Endpoints: endpoints{ - "us-east-1": endpoint{}, + "aws-global": endpoint{ + Hostname: "support.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, }, }, "swf": service{ @@ -3149,6 +3589,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -3171,6 +3612,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -3188,9 +3630,11 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -3250,12 +3694,16 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -3302,6 +3750,7 @@ var awsPartition = partition{ "xray": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -3313,6 +3762,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -3578,6 +4028,15 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "greengrass": service{ + IsRegionalized: boxedTrue, + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + }, + }, "iam": service{ PartitionEndpoint: "aws-cn-global", IsRegionalized: boxedFalse, @@ -3598,7 +4057,8 @@ var awscnPartition = partition{ }, }, Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "kinesis": service{ @@ -3608,6 +4068,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "kms": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "lambda": service{ Endpoints: endpoints{ @@ -3615,6 +4082,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "license-manager": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "logs": service{ Endpoints: endpoints{ @@ -3765,6 +4239,18 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "support": service{ + PartitionEndpoint: "aws-cn-global", + + Endpoints: endpoints{ + "aws-cn-global": endpoint{ + Hostname: "support.cn-north-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "cn-north-1", + }, + }, + }, + }, "swf": service{ Endpoints: endpoints{ @@ -3922,9 +4408,17 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "codebuild": service{ + + Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, "codecommit": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -3962,6 +4456,18 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "datasync": service{ + + Endpoints: endpoints{ + "fips-us-gov-west-1": endpoint{ + Hostname: "datasync-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-west-1": endpoint{}, + }, + }, "directconnect": service{ Endpoints: endpoints{ @@ -3987,6 +4493,12 @@ var awsusgovPartition = partition{ Endpoints: endpoints{ "us-gov-east-1": endpoint{}, + "us-gov-east-1-fips": endpoint{ + Hostname: "dynamodb.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, "us-gov-west-1": endpoint{}, "us-gov-west-1-fips": endpoint{ Hostname: "dynamodb.us-gov-west-1.amazonaws.com", @@ -4088,6 +4600,7 @@ var awsusgovPartition = partition{ "firehose": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -4102,6 +4615,16 @@ var awsusgovPartition = partition{ }, "glue": service{ + Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, + "greengrass": service{ + IsRegionalized: boxedTrue, + Defaults: endpoint{ + Protocols: []string{"https"}, + }, Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, @@ -4115,6 +4638,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "health": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "iam": service{ PartitionEndpoint: "aws-us-gov-global", IsRegionalized: boxedFalse, @@ -4199,6 +4728,7 @@ var awsusgovPartition = partition{ }, }, Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -4209,6 +4739,23 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "neptune": service{ + + Endpoints: endpoints{ + "us-gov-east-1": endpoint{ + Hostname: "rds.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "rds.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + }, + }, "organizations": service{ PartitionEndpoint: "aws-us-gov-global", IsRegionalized: boxedFalse, @@ -4228,6 +4775,13 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "ram": service{ + + Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, "rds": service{ Endpoints: endpoints{ @@ -4248,6 +4802,19 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "route53": service{ + PartitionEndpoint: "aws-us-gov-global", + IsRegionalized: boxedFalse, + + Endpoints: endpoints{ + "aws-us-gov-global": endpoint{ + Hostname: "route53.us-gov.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + }, + }, "runtime.sagemaker": service{ Endpoints: endpoints{ @@ -4311,6 +4878,43 @@ var awsusgovPartition = partition{ }, }, }, + "secretsmanager": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "secretsmanager-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + }, + }, + "serverlessrepo": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "us-gov-east-1": endpoint{ + Protocols: []string{"https"}, + }, + "us-gov-west-1": endpoint{ + Protocols: []string{"https"}, + }, + }, + }, + "servicecatalog": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + }, + }, "sms": service{ Endpoints: endpoints{ @@ -4372,6 +4976,12 @@ var awsusgovPartition = partition{ }, Endpoints: endpoints{ "us-gov-east-1": endpoint{}, + "us-gov-east-1-fips": endpoint{ + Hostname: "dynamodb.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, "us-gov-west-1": endpoint{}, "us-gov-west-1-fips": endpoint{ Hostname: "dynamodb.us-gov-west-1.amazonaws.com", @@ -4430,3 +5040,612 @@ var awsusgovPartition = partition{ }, }, } + +// AwsIsoPartition returns the Resolver for AWS ISO (US). +func AwsIsoPartition() Partition { + return awsisoPartition.Partition() +} + +var awsisoPartition = partition{ + ID: "aws-iso", + Name: "AWS ISO (US)", + DNSSuffix: "c2s.ic.gov", + RegionRegex: regionRegex{ + Regexp: func() *regexp.Regexp { + reg, _ := regexp.Compile("^us\\-iso\\-\\w+\\-\\d+$") + return reg + }(), + }, + Defaults: endpoint{ + Hostname: "{service}.{region}.{dnsSuffix}", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + Regions: regions{ + "us-iso-east-1": region{ + Description: "US ISO East", + }, + }, + Services: services{ + "api.ecr": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{ + Hostname: "api.ecr.us-iso-east-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-east-1", + }, + }, + }, + }, + "application-autoscaling": service{ + Defaults: endpoint{ + Hostname: "autoscaling.{region}.amazonaws.com", + Protocols: []string{"http", "https"}, + CredentialScope: credentialScope{ + Service: "application-autoscaling", + }, + }, + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "autoscaling": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{ + Protocols: []string{"http", "https"}, + }, + }, + }, + "cloudformation": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "cloudtrail": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "codedeploy": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "config": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "datapipeline": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "directconnect": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "dms": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "ds": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "dynamodb": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{ + Protocols: []string{"http", "https"}, + }, + }, + }, + "ec2": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "ec2metadata": service{ + PartitionEndpoint: "aws-global", + IsRegionalized: boxedFalse, + + Endpoints: endpoints{ + "aws-global": endpoint{ + Hostname: "169.254.169.254/latest", + Protocols: []string{"http"}, + }, + }, + }, + "ecs": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "elasticache": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "elasticloadbalancing": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{ + Protocols: []string{"http", "https"}, + }, + }, + }, + "elasticmapreduce": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{ + Protocols: []string{"https"}, + }, + }, + }, + "events": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "glacier": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{ + Protocols: []string{"http", "https"}, + }, + }, + }, + "health": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "iam": service{ + PartitionEndpoint: "aws-iso-global", + IsRegionalized: boxedFalse, + + Endpoints: endpoints{ + "aws-iso-global": endpoint{ + Hostname: "iam.us-iso-east-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-east-1", + }, + }, + }, + }, + "kinesis": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "kms": service{ + + Endpoints: endpoints{ + "ProdFips": endpoint{ + Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-east-1", + }, + }, + "us-iso-east-1": endpoint{}, + }, + }, + "lambda": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "logs": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "monitoring": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "rds": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "redshift": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "route53": service{ + PartitionEndpoint: "aws-iso-global", + IsRegionalized: boxedFalse, + + Endpoints: endpoints{ + "aws-iso-global": endpoint{ + Hostname: "route53.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-east-1", + }, + }, + }, + }, + "s3": service{ + Defaults: endpoint{ + SignatureVersions: []string{"s3v4"}, + }, + Endpoints: endpoints{ + "us-iso-east-1": endpoint{ + Protocols: []string{"http", "https"}, + SignatureVersions: []string{"s3v4"}, + }, + }, + }, + "snowball": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "sns": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{ + Protocols: []string{"http", "https"}, + }, + }, + }, + "sqs": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{ + Protocols: []string{"http", "https"}, + }, + }, + }, + "states": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "streams.dynamodb": service{ + Defaults: endpoint{ + Protocols: []string{"http", "https"}, + CredentialScope: credentialScope{ + Service: "dynamodb", + }, + }, + Endpoints: endpoints{ + "us-iso-east-1": endpoint{ + Protocols: []string{"http", "https"}, + }, + }, + }, + "sts": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "support": service{ + PartitionEndpoint: "aws-iso-global", + + Endpoints: endpoints{ + "aws-iso-global": endpoint{ + Hostname: "support.us-iso-east-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-east-1", + }, + }, + }, + }, + "swf": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "workspaces": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + }, +} + +// AwsIsoBPartition returns the Resolver for AWS ISOB (US). +func AwsIsoBPartition() Partition { + return awsisobPartition.Partition() +} + +var awsisobPartition = partition{ + ID: "aws-iso-b", + Name: "AWS ISOB (US)", + DNSSuffix: "sc2s.sgov.gov", + RegionRegex: regionRegex{ + Regexp: func() *regexp.Regexp { + reg, _ := regexp.Compile("^us\\-isob\\-\\w+\\-\\d+$") + return reg + }(), + }, + Defaults: endpoint{ + Hostname: "{service}.{region}.{dnsSuffix}", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + Regions: regions{ + "us-isob-east-1": region{ + Description: "US ISOB East (Ohio)", + }, + }, + Services: services{ + "application-autoscaling": service{ + Defaults: endpoint{ + Hostname: "autoscaling.{region}.amazonaws.com", + Protocols: []string{"http", "https"}, + CredentialScope: credentialScope{ + Service: "application-autoscaling", + }, + }, + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "autoscaling": service{ + Defaults: endpoint{ + Protocols: []string{"http", "https"}, + }, + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "cloudformation": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "cloudtrail": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "config": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "directconnect": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "dms": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "dynamodb": service{ + Defaults: endpoint{ + Protocols: []string{"http", "https"}, + }, + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "ec2": service{ + Defaults: endpoint{ + Protocols: []string{"http", "https"}, + }, + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "ec2metadata": service{ + PartitionEndpoint: "aws-global", + IsRegionalized: boxedFalse, + + Endpoints: endpoints{ + "aws-global": endpoint{ + Hostname: "169.254.169.254/latest", + Protocols: []string{"http"}, + }, + }, + }, + "elasticache": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "elasticloadbalancing": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{ + Protocols: []string{"https"}, + }, + }, + }, + "elasticmapreduce": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "events": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "glacier": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "health": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "iam": service{ + PartitionEndpoint: "aws-iso-b-global", + IsRegionalized: boxedFalse, + + Endpoints: endpoints{ + "aws-iso-b-global": endpoint{ + Hostname: "iam.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: credentialScope{ + Region: "us-isob-east-1", + }, + }, + }, + }, + "kinesis": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "kms": service{ + + Endpoints: endpoints{ + "ProdFips": endpoint{ + Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: credentialScope{ + Region: "us-isob-east-1", + }, + }, + "us-isob-east-1": endpoint{}, + }, + }, + "logs": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "monitoring": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "rds": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "redshift": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "s3": service{ + Defaults: endpoint{ + Protocols: []string{"http", "https"}, + SignatureVersions: []string{"s3v4"}, + }, + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "snowball": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "sns": service{ + Defaults: endpoint{ + Protocols: []string{"http", "https"}, + }, + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "sqs": service{ + Defaults: endpoint{ + SSLCommonName: "{region}.queue.{dnsSuffix}", + Protocols: []string{"http", "https"}, + }, + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "states": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "streams.dynamodb": service{ + Defaults: endpoint{ + Protocols: []string{"http", "https"}, + CredentialScope: credentialScope{ + Service: "dynamodb", + }, + }, + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "sts": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + "support": service{ + PartitionEndpoint: "aws-iso-b-global", + + Endpoints: endpoints{ + "aws-iso-b-global": endpoint{ + Hostname: "support.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: credentialScope{ + Region: "us-isob-east-1", + }, + }, + }, + }, + "swf": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go index f82babf6..9c936be6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go @@ -170,10 +170,13 @@ func PartitionForRegion(ps []Partition, regionID string) (Partition, bool) { // A Partition provides the ability to enumerate the partition's regions // and services. type Partition struct { - id string - p *partition + id, dnsSuffix string + p *partition } +// DNSSuffix returns the base domain name of the partition. +func (p Partition) DNSSuffix() string { return p.dnsSuffix } + // ID returns the identifier of the partition. func (p Partition) ID() string { return p.id } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go index ff6f76db..523ad79a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go @@ -54,8 +54,9 @@ type partition struct { func (p partition) Partition() Partition { return Partition{ - id: p.ID, - p: &p, + dnsSuffix: p.DNSSuffix, + id: p.ID, + p: &p, } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go index 271da432..d9b37f4d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go @@ -1,18 +1,17 @@ -// +build !appengine,!plan9 - package request import ( - "net" - "os" - "syscall" + "strings" ) func isErrConnectionReset(err error) bool { - if opErr, ok := err.(*net.OpError); ok { - if sysErr, ok := opErr.Err.(*os.SyscallError); ok { - return sysErr.Err == syscall.ECONNRESET - } + if strings.Contains(err.Error(), "read: connection reset") { + return false + } + + if strings.Contains(err.Error(), "connection reset") || + strings.Contains(err.Error(), "broken pipe") { + return true } return false diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go deleted file mode 100644 index daf9eca4..00000000 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build appengine plan9 - -package request - -import ( - "strings" -) - -func isErrConnectionReset(err error) bool { - return strings.Contains(err.Error(), "connection reset") -} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go index 8ef8548a..185b0731 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go @@ -23,7 +23,7 @@ type Handlers struct { Complete HandlerList } -// Copy returns of this handler's lists. +// Copy returns a copy of this handler's lists. func (h *Handlers) Copy() Handlers { return Handlers{ Validate: h.Validate.copy(), @@ -42,7 +42,7 @@ func (h *Handlers) Copy() Handlers { } } -// Clear removes callback functions for all handlers +// Clear removes callback functions for all handlers. func (h *Handlers) Clear() { h.Validate.Clear() h.Build.Clear() @@ -59,6 +59,51 @@ func (h *Handlers) Clear() { h.Complete.Clear() } +// IsEmpty returns if there are no handlers in any of the handlerlists. +func (h *Handlers) IsEmpty() bool { + if h.Validate.Len() != 0 { + return false + } + if h.Build.Len() != 0 { + return false + } + if h.Send.Len() != 0 { + return false + } + if h.Sign.Len() != 0 { + return false + } + if h.Unmarshal.Len() != 0 { + return false + } + if h.UnmarshalStream.Len() != 0 { + return false + } + if h.UnmarshalMeta.Len() != 0 { + return false + } + if h.UnmarshalError.Len() != 0 { + return false + } + if h.ValidateResponse.Len() != 0 { + return false + } + if h.Retry.Len() != 0 { + return false + } + if h.AfterRetry.Len() != 0 { + return false + } + if h.CompleteAttempt.Len() != 0 { + return false + } + if h.Complete.Len() != 0 { + return false + } + + return true +} + // A HandlerListRunItem represents an entry in the HandlerList which // is being run. type HandlerListRunItem struct { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go index b0c2ef4f..9370fa50 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go @@ -15,12 +15,15 @@ type offsetReader struct { closed bool } -func newOffsetReader(buf io.ReadSeeker, offset int64) *offsetReader { +func newOffsetReader(buf io.ReadSeeker, offset int64) (*offsetReader, error) { reader := &offsetReader{} - buf.Seek(offset, sdkio.SeekStart) + _, err := buf.Seek(offset, sdkio.SeekStart) + if err != nil { + return nil, err + } reader.buf = buf - return reader + return reader, nil } // Close will close the instance of the offset reader's access to @@ -54,7 +57,9 @@ func (o *offsetReader) Seek(offset int64, whence int) (int64, error) { // CloseAndCopy will return a new offsetReader with a copy of the old buffer // and close the old buffer. -func (o *offsetReader) CloseAndCopy(offset int64) *offsetReader { - o.Close() +func (o *offsetReader) CloseAndCopy(offset int64) (*offsetReader, error) { + if err := o.Close(); err != nil { + return nil, err + } return newOffsetReader(o.buf, offset) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go index 19da3fcd..8e332cce 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go @@ -64,6 +64,15 @@ type Request struct { LastSignedAt time.Time DisableFollowRedirects bool + // Additional API error codes that should be retried. IsErrorRetryable + // will consider these codes in addition to its built in cases. + RetryErrorCodes []string + + // Additional API error codes that should be retried with throttle backoff + // delay. IsErrorThrottle will consider these codes in addition to its + // built in cases. + ThrottleErrorCodes []string + // A value greater than 0 instructs the request to be signed as Presigned URL // You should not set this field directly. Instead use Request's // Presign or PresignRequest methods. @@ -231,6 +240,10 @@ func (r *Request) WillRetry() bool { return r.Error != nil && aws.BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries() } +func fmtAttemptCount(retryCount, maxRetries int) string { + return fmt.Sprintf("attempt %v/%v", retryCount, maxRetries) +} + // ParamsFilled returns if the request's parameters have been populated // and the parameters are valid. False is returned if no parameters are // provided or invalid. @@ -259,7 +272,18 @@ func (r *Request) SetStringBody(s string) { // SetReaderBody will set the request's body reader. func (r *Request) SetReaderBody(reader io.ReadSeeker) { r.Body = reader - r.BodyStart, _ = reader.Seek(0, sdkio.SeekCurrent) // Get the Bodies current offset. + + if aws.IsReaderSeekable(reader) { + var err error + // Get the Bodies current offset so retries will start from the same + // initial position. + r.BodyStart, err = reader.Seek(0, sdkio.SeekCurrent) + if err != nil { + r.Error = awserr.New(ErrCodeSerialization, + "failed to determine start of request body", err) + return + } + } r.ResetBody() } @@ -330,16 +354,15 @@ func getPresignedURL(r *Request, expire time.Duration) (string, http.Header, err return r.HTTPRequest.URL.String(), r.SignedHeaderVals, nil } -func debugLogReqError(r *Request, stage string, retrying bool, err error) { +const ( + notRetrying = "not retrying" +) + +func debugLogReqError(r *Request, stage, retryStr string, err error) { if !r.Config.LogLevel.Matches(aws.LogDebugWithRequestErrors) { return } - retryStr := "not retrying" - if retrying { - retryStr = "will retry" - } - r.Config.Logger.Log(fmt.Sprintf("DEBUG: %s %s/%s failed, %s, error %v", stage, r.ClientInfo.ServiceName, r.Operation.Name, retryStr, err)) } @@ -358,12 +381,12 @@ func (r *Request) Build() error { if !r.built { r.Handlers.Validate.Run(r) if r.Error != nil { - debugLogReqError(r, "Validate Request", false, r.Error) + debugLogReqError(r, "Validate Request", notRetrying, r.Error) return r.Error } r.Handlers.Build.Run(r) if r.Error != nil { - debugLogReqError(r, "Build Request", false, r.Error) + debugLogReqError(r, "Build Request", notRetrying, r.Error) return r.Error } r.built = true @@ -379,7 +402,7 @@ func (r *Request) Build() error { func (r *Request) Sign() error { r.Build() if r.Error != nil { - debugLogReqError(r, "Build Request", false, r.Error) + debugLogReqError(r, "Build Request", notRetrying, r.Error) return r.Error } @@ -387,12 +410,16 @@ func (r *Request) Sign() error { return r.Error } -func (r *Request) getNextRequestBody() (io.ReadCloser, error) { +func (r *Request) getNextRequestBody() (body io.ReadCloser, err error) { if r.safeBody != nil { r.safeBody.Close() } - r.safeBody = newOffsetReader(r.Body, r.BodyStart) + r.safeBody, err = newOffsetReader(r.Body, r.BodyStart) + if err != nil { + return nil, awserr.New(ErrCodeSerialization, + "failed to get next request body reader", err) + } // Go 1.8 tightened and clarified the rules code needs to use when building // requests with the http package. Go 1.8 removed the automatic detection @@ -409,10 +436,10 @@ func (r *Request) getNextRequestBody() (io.ReadCloser, error) { // Related golang/go#18257 l, err := aws.SeekerLen(r.Body) if err != nil { - return nil, awserr.New(ErrCodeSerialization, "failed to compute request body size", err) + return nil, awserr.New(ErrCodeSerialization, + "failed to compute request body size", err) } - var body io.ReadCloser if l == 0 { body = NoBody } else if l > 0 { @@ -473,29 +500,28 @@ func (r *Request) Send() error { r.AttemptTime = time.Now() if err := r.Sign(); err != nil { - debugLogReqError(r, "Sign Request", false, err) + debugLogReqError(r, "Sign Request", notRetrying, err) return err } if err := r.sendRequest(); err == nil { return nil - } else if !shouldRetryCancel(r.Error) { - return err - } else { - r.Handlers.Retry.Run(r) - r.Handlers.AfterRetry.Run(r) + } + r.Handlers.Retry.Run(r) + r.Handlers.AfterRetry.Run(r) - if r.Error != nil || !aws.BoolValue(r.Retryable) { - return r.Error - } + if r.Error != nil || !aws.BoolValue(r.Retryable) { + return r.Error + } - r.prepareRetry() - continue + if err := r.prepareRetry(); err != nil { + r.Error = err + return err } } } -func (r *Request) prepareRetry() { +func (r *Request) prepareRetry() error { if r.Config.LogLevel.Matches(aws.LogDebugWithRequestRetries) { r.Config.Logger.Log(fmt.Sprintf("DEBUG: Retrying Request %s/%s, attempt %d", r.ClientInfo.ServiceName, r.Operation.Name, r.RetryCount)) @@ -506,12 +532,19 @@ func (r *Request) prepareRetry() { // the request's body even though the Client's Do returned. r.HTTPRequest = copyHTTPRequest(r.HTTPRequest, nil) r.ResetBody() + if err := r.Error; err != nil { + return awserr.New(ErrCodeSerialization, + "failed to prepare body for retry", err) + + } // Closing response body to ensure that no response body is leaked // between retry attempts. if r.HTTPResponse != nil && r.HTTPResponse.Body != nil { r.HTTPResponse.Body.Close() } + + return nil } func (r *Request) sendRequest() (sendErr error) { @@ -520,7 +553,9 @@ func (r *Request) sendRequest() (sendErr error) { r.Retryable = nil r.Handlers.Send.Run(r) if r.Error != nil { - debugLogReqError(r, "Send Request", r.WillRetry(), r.Error) + debugLogReqError(r, "Send Request", + fmtAttemptCount(r.RetryCount, r.MaxRetries()), + r.Error) return r.Error } @@ -528,13 +563,17 @@ func (r *Request) sendRequest() (sendErr error) { r.Handlers.ValidateResponse.Run(r) if r.Error != nil { r.Handlers.UnmarshalError.Run(r) - debugLogReqError(r, "Validate Response", r.WillRetry(), r.Error) + debugLogReqError(r, "Validate Response", + fmtAttemptCount(r.RetryCount, r.MaxRetries()), + r.Error) return r.Error } r.Handlers.Unmarshal.Run(r) if r.Error != nil { - debugLogReqError(r, "Unmarshal Response", r.WillRetry(), r.Error) + debugLogReqError(r, "Unmarshal Response", + fmtAttemptCount(r.RetryCount, r.MaxRetries()), + r.Error) return r.Error } @@ -561,48 +600,6 @@ func AddToUserAgent(r *Request, s string) { r.HTTPRequest.Header.Set("User-Agent", s) } -type temporary interface { - Temporary() bool -} - -func shouldRetryCancel(err error) bool { - switch err := err.(type) { - case awserr.Error: - if err.Code() == CanceledErrorCode { - return false - } - return shouldRetryCancel(err.OrigErr()) - case *url.Error: - if strings.Contains(err.Error(), "connection refused") { - // Refused connections should be retried as the service may not yet - // be running on the port. Go TCP dial considers refused - // connections as not temporary. - return true - } - // *url.Error only implements Temporary after golang 1.6 but since - // url.Error only wraps the error: - return shouldRetryCancel(err.Err) - case temporary: - // If the error is temporary, we want to allow continuation of the - // retry process - return err.Temporary() - case nil: - // `awserr.Error.OrigErr()` can be nil, meaning there was an error but - // because we don't know the cause, it is marked as retryable. See - // TestRequest4xxUnretryable for an example. - return true - default: - switch err.Error() { - case "net/http: request canceled", - "net/http: request canceled while waiting for connection": - // known 1.5 error case when an http request is cancelled - return false - } - // here we don't know the error; so we allow a retry. - return true - } -} - // SanitizeHostForHeader removes default port from host and updates request.Host func SanitizeHostForHeader(r *http.Request) { host := getHost(r) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go index 7c6a8000..de1292f4 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go @@ -4,6 +4,8 @@ package request import ( "net/http" + + "github.com/aws/aws-sdk-go/aws/awserr" ) // NoBody is a http.NoBody reader instructing Go HTTP client to not include @@ -24,7 +26,8 @@ var NoBody = http.NoBody func (r *Request) ResetBody() { body, err := r.getNextRequestBody() if err != nil { - r.Error = err + r.Error = awserr.New(ErrCodeSerialization, + "failed to reset request body", err) return } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go index a633ed5a..f093fc54 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go @@ -146,7 +146,7 @@ func (r *Request) nextPageTokens() []interface{} { return nil } case bool: - if v == false { + if !v { return nil } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go index d0aa54c6..e84084da 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go @@ -1,23 +1,41 @@ package request import ( + "net" + "net/url" + "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" ) -// Retryer is an interface to control retry logic for a given service. -// The default implementation used by most services is the client.DefaultRetryer -// structure, which contains basic retry logic using exponential backoff. +// Retryer provides the interface drive the SDK's request retry behavior. The +// Retryer implementation is responsible for implementing exponential backoff, +// and determine if a request API error should be retried. +// +// client.DefaultRetryer is the SDK's default implementation of the Retryer. It +// uses the which uses the Request.IsErrorRetryable and Request.IsErrorThrottle +// methods to determine if the request is retried. type Retryer interface { + // RetryRules return the retry delay that should be used by the SDK before + // making another request attempt for the failed request. RetryRules(*Request) time.Duration + + // ShouldRetry returns if the failed request is retryable. + // + // Implementations may consider request attempt count when determining if a + // request is retryable, but the SDK will use MaxRetries to limit the + // number of attempts a request are made. ShouldRetry(*Request) bool + + // MaxRetries is the number of times a request may be retried before + // failing. MaxRetries() int } -// WithRetryer sets a config Retryer value to the given Config returning it -// for chaining. +// WithRetryer sets a Retryer value to the given Config returning the Config +// value for chaining. func WithRetryer(cfg *aws.Config, retryer Retryer) *aws.Config { cfg.Retryer = retryer return cfg @@ -76,10 +94,6 @@ var validParentCodes = map[string]struct{}{ ErrCodeRead: {}, } -type temporaryError interface { - Temporary() bool -} - func isNestedErrorRetryable(parentErr awserr.Error) bool { if parentErr == nil { return false @@ -98,7 +112,7 @@ func isNestedErrorRetryable(parentErr awserr.Error) bool { return isCodeRetryable(aerr.Code()) } - if t, ok := err.(temporaryError); ok { + if t, ok := err.(temporary); ok { return t.Temporary() || isErrConnectionReset(err) } @@ -108,32 +122,90 @@ func isNestedErrorRetryable(parentErr awserr.Error) bool { // IsErrorRetryable returns whether the error is retryable, based on its Code. // Returns false if error is nil. func IsErrorRetryable(err error) bool { - if err != nil { - if aerr, ok := err.(awserr.Error); ok { - return isCodeRetryable(aerr.Code()) || isNestedErrorRetryable(aerr) + if err == nil { + return false + } + return shouldRetryError(err) +} + +type temporary interface { + Temporary() bool +} + +func shouldRetryError(origErr error) bool { + switch err := origErr.(type) { + case awserr.Error: + if err.Code() == CanceledErrorCode { + return false + } + if isNestedErrorRetryable(err) { + return true + } + + origErr := err.OrigErr() + var shouldRetry bool + if origErr != nil { + shouldRetry := shouldRetryError(origErr) + if err.Code() == "RequestError" && !shouldRetry { + return false + } + } + if isCodeRetryable(err.Code()) { + return true + } + return shouldRetry + + case *url.Error: + if strings.Contains(err.Error(), "connection refused") { + // Refused connections should be retried as the service may not yet + // be running on the port. Go TCP dial considers refused + // connections as not temporary. + return true + } + // *url.Error only implements Temporary after golang 1.6 but since + // url.Error only wraps the error: + return shouldRetryError(err.Err) + + case temporary: + if netErr, ok := err.(*net.OpError); ok && netErr.Op == "dial" { + return true } + // If the error is temporary, we want to allow continuation of the + // retry process + return err.Temporary() || isErrConnectionReset(origErr) + + case nil: + // `awserr.Error.OrigErr()` can be nil, meaning there was an error but + // because we don't know the cause, it is marked as retryable. See + // TestRequest4xxUnretryable for an example. + return true + + default: + switch err.Error() { + case "net/http: request canceled", + "net/http: request canceled while waiting for connection": + // known 1.5 error case when an http request is cancelled + return false + } + // here we don't know the error; so we allow a retry. + return true } - return false } // IsErrorThrottle returns whether the error is to be throttled based on its code. // Returns false if error is nil. func IsErrorThrottle(err error) bool { - if err != nil { - if aerr, ok := err.(awserr.Error); ok { - return isCodeThrottle(aerr.Code()) - } + if aerr, ok := err.(awserr.Error); ok && aerr != nil { + return isCodeThrottle(aerr.Code()) } return false } -// IsErrorExpiredCreds returns whether the error code is a credential expiry error. -// Returns false if error is nil. +// IsErrorExpiredCreds returns whether the error code is a credential expiry +// error. Returns false if error is nil. func IsErrorExpiredCreds(err error) bool { - if err != nil { - if aerr, ok := err.(awserr.Error); ok { - return isCodeExpiredCreds(aerr.Code()) - } + if aerr, ok := err.(awserr.Error); ok && aerr != nil { + return isCodeExpiredCreds(aerr.Code()) } return false } @@ -143,17 +215,58 @@ func IsErrorExpiredCreds(err error) bool { // // Alias for the utility function IsErrorRetryable func (r *Request) IsErrorRetryable() bool { + if isErrCode(r.Error, r.RetryErrorCodes) { + return true + } + + // HTTP response status code 501 should not be retried. + // 501 represents Not Implemented which means the request method is not + // supported by the server and cannot be handled. + if r.HTTPResponse != nil { + // HTTP response status code 500 represents internal server error and + // should be retried without any throttle. + if r.HTTPResponse.StatusCode == 500 { + return true + } + } return IsErrorRetryable(r.Error) } -// IsErrorThrottle returns whether the error is to be throttled based on its code. -// Returns false if the request has no Error set +// IsErrorThrottle returns whether the error is to be throttled based on its +// code. Returns false if the request has no Error set. // // Alias for the utility function IsErrorThrottle func (r *Request) IsErrorThrottle() bool { + if isErrCode(r.Error, r.ThrottleErrorCodes) { + return true + } + + if r.HTTPResponse != nil { + switch r.HTTPResponse.StatusCode { + case + 429, // error caused due to too many requests + 502, // Bad Gateway error should be throttled + 503, // caused when service is unavailable + 504: // error occurred due to gateway timeout + return true + } + } + return IsErrorThrottle(r.Error) } +func isErrCode(err error, codes []string) bool { + if aerr, ok := err.(awserr.Error); ok && aerr != nil { + for _, code := range codes { + if code == aerr.Code() { + return true + } + } + } + + return false +} + // IsErrorExpired returns whether the error code is a credential expiry error. // Returns false if the request has no Error set. // diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go new file mode 100644 index 00000000..7713ccfc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go @@ -0,0 +1,259 @@ +package session + +import ( + "fmt" + "os" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/credentials/processcreds" + "github.com/aws/aws-sdk-go/aws/credentials/stscreds" + "github.com/aws/aws-sdk-go/aws/defaults" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/shareddefaults" +) + +func resolveCredentials(cfg *aws.Config, + envCfg envConfig, sharedCfg sharedConfig, + handlers request.Handlers, + sessOpts Options, +) (*credentials.Credentials, error) { + + switch { + case len(sessOpts.Profile) != 0: + // User explicitly provided an Profile in the session's configuration + // so load that profile from shared config first. + // Github(aws/aws-sdk-go#2727) + return resolveCredsFromProfile(cfg, envCfg, sharedCfg, handlers, sessOpts) + + case envCfg.Creds.HasKeys(): + // Environment credentials + return credentials.NewStaticCredentialsFromCreds(envCfg.Creds), nil + + case len(envCfg.WebIdentityTokenFilePath) != 0: + // Web identity token from environment, RoleARN required to also be + // set. + return assumeWebIdentity(cfg, handlers, + envCfg.WebIdentityTokenFilePath, + envCfg.RoleARN, + envCfg.RoleSessionName, + ) + + default: + // Fallback to the "default" credential resolution chain. + return resolveCredsFromProfile(cfg, envCfg, sharedCfg, handlers, sessOpts) + } +} + +// WebIdentityEmptyRoleARNErr will occur if 'AWS_WEB_IDENTITY_TOKEN_FILE' was set but +// 'AWS_IAM_ROLE_ARN' was not set. +var WebIdentityEmptyRoleARNErr = awserr.New(stscreds.ErrCodeWebIdentity, "role ARN is not set", nil) + +// WebIdentityEmptyTokenFilePathErr will occur if 'AWS_IAM_ROLE_ARN' was set but +// 'AWS_WEB_IDENTITY_TOKEN_FILE' was not set. +var WebIdentityEmptyTokenFilePathErr = awserr.New(stscreds.ErrCodeWebIdentity, "token file path is not set", nil) + +func assumeWebIdentity(cfg *aws.Config, handlers request.Handlers, + filepath string, + roleARN, sessionName string, +) (*credentials.Credentials, error) { + + if len(filepath) == 0 { + return nil, WebIdentityEmptyTokenFilePathErr + } + + if len(roleARN) == 0 { + return nil, WebIdentityEmptyRoleARNErr + } + + creds := stscreds.NewWebIdentityCredentials( + &Session{ + Config: cfg, + Handlers: handlers.Copy(), + }, + roleARN, + sessionName, + filepath, + ) + + return creds, nil +} + +func resolveCredsFromProfile(cfg *aws.Config, + envCfg envConfig, sharedCfg sharedConfig, + handlers request.Handlers, + sessOpts Options, +) (creds *credentials.Credentials, err error) { + + switch { + case sharedCfg.SourceProfile != nil: + // Assume IAM role with credentials source from a different profile. + creds, err = resolveCredsFromProfile(cfg, envCfg, + *sharedCfg.SourceProfile, handlers, sessOpts, + ) + + case sharedCfg.Creds.HasKeys(): + // Static Credentials from Shared Config/Credentials file. + creds = credentials.NewStaticCredentialsFromCreds( + sharedCfg.Creds, + ) + + case len(sharedCfg.CredentialProcess) != 0: + // Get credentials from CredentialProcess + creds = processcreds.NewCredentials(sharedCfg.CredentialProcess) + + case len(sharedCfg.CredentialSource) != 0: + creds, err = resolveCredsFromSource(cfg, envCfg, + sharedCfg, handlers, sessOpts, + ) + + case len(sharedCfg.WebIdentityTokenFile) != 0: + // Credentials from Assume Web Identity token require an IAM Role, and + // that roll will be assumed. May be wrapped with another assume role + // via SourceProfile. + return assumeWebIdentity(cfg, handlers, + sharedCfg.WebIdentityTokenFile, + sharedCfg.RoleARN, + sharedCfg.RoleSessionName, + ) + + default: + // Fallback to default credentials provider, include mock errors for + // the credential chain so user can identify why credentials failed to + // be retrieved. + creds = credentials.NewCredentials(&credentials.ChainProvider{ + VerboseErrors: aws.BoolValue(cfg.CredentialsChainVerboseErrors), + Providers: []credentials.Provider{ + &credProviderError{ + Err: awserr.New("EnvAccessKeyNotFound", + "failed to find credentials in the environment.", nil), + }, + &credProviderError{ + Err: awserr.New("SharedCredsLoad", + fmt.Sprintf("failed to load profile, %s.", envCfg.Profile), nil), + }, + defaults.RemoteCredProvider(*cfg, handlers), + }, + }) + } + if err != nil { + return nil, err + } + + if len(sharedCfg.RoleARN) > 0 { + cfgCp := *cfg + cfgCp.Credentials = creds + return credsFromAssumeRole(cfgCp, handlers, sharedCfg, sessOpts) + } + + return creds, nil +} + +// valid credential source values +const ( + credSourceEc2Metadata = "Ec2InstanceMetadata" + credSourceEnvironment = "Environment" + credSourceECSContainer = "EcsContainer" +) + +func resolveCredsFromSource(cfg *aws.Config, + envCfg envConfig, sharedCfg sharedConfig, + handlers request.Handlers, + sessOpts Options, +) (creds *credentials.Credentials, err error) { + + switch sharedCfg.CredentialSource { + case credSourceEc2Metadata: + p := defaults.RemoteCredProvider(*cfg, handlers) + creds = credentials.NewCredentials(p) + + case credSourceEnvironment: + creds = credentials.NewStaticCredentialsFromCreds(envCfg.Creds) + + case credSourceECSContainer: + if len(os.Getenv(shareddefaults.ECSCredsProviderEnvVar)) == 0 { + return nil, ErrSharedConfigECSContainerEnvVarEmpty + } + + p := defaults.RemoteCredProvider(*cfg, handlers) + creds = credentials.NewCredentials(p) + + default: + return nil, ErrSharedConfigInvalidCredSource + } + + return creds, nil +} + +func credsFromAssumeRole(cfg aws.Config, + handlers request.Handlers, + sharedCfg sharedConfig, + sessOpts Options, +) (*credentials.Credentials, error) { + + if len(sharedCfg.MFASerial) != 0 && sessOpts.AssumeRoleTokenProvider == nil { + // AssumeRole Token provider is required if doing Assume Role + // with MFA. + return nil, AssumeRoleTokenProviderNotSetError{} + } + + return stscreds.NewCredentials( + &Session{ + Config: &cfg, + Handlers: handlers.Copy(), + }, + sharedCfg.RoleARN, + func(opt *stscreds.AssumeRoleProvider) { + opt.RoleSessionName = sharedCfg.RoleSessionName + opt.Duration = sessOpts.AssumeRoleDuration + + // Assume role with external ID + if len(sharedCfg.ExternalID) > 0 { + opt.ExternalID = aws.String(sharedCfg.ExternalID) + } + + // Assume role with MFA + if len(sharedCfg.MFASerial) > 0 { + opt.SerialNumber = aws.String(sharedCfg.MFASerial) + opt.TokenProvider = sessOpts.AssumeRoleTokenProvider + } + }, + ), nil +} + +// AssumeRoleTokenProviderNotSetError is an error returned when creating a +// session when the MFAToken option is not set when shared config is configured +// load assume a role with an MFA token. +type AssumeRoleTokenProviderNotSetError struct{} + +// Code is the short id of the error. +func (e AssumeRoleTokenProviderNotSetError) Code() string { + return "AssumeRoleTokenProviderNotSetError" +} + +// Message is the description of the error +func (e AssumeRoleTokenProviderNotSetError) Message() string { + return fmt.Sprintf("assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.") +} + +// OrigErr is the underlying error that caused the failure. +func (e AssumeRoleTokenProviderNotSetError) OrigErr() error { + return nil +} + +// Error satisfies the error interface. +func (e AssumeRoleTokenProviderNotSetError) Error() string { + return awserr.SprintError(e.Code(), e.Message(), "", nil) +} + +type credProviderError struct { + Err error +} + +func (c credProviderError) Retrieve() (credentials.Value, error) { + return credentials.Value{}, c.Err +} +func (c credProviderError) IsExpired() bool { + return true +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go index 38a7b05a..7ec66e7e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go @@ -1,97 +1,93 @@ /* -Package session provides configuration for the SDK's service clients. - -Sessions can be shared across all service clients that share the same base -configuration. The Session is built from the SDK's default configuration and -request handlers. - -Sessions should be cached when possible, because creating a new Session will -load all configuration values from the environment, and config files each time -the Session is created. Sharing the Session value across all of your service -clients will ensure the configuration is loaded the fewest number of times possible. - -Concurrency +Package session provides configuration for the SDK's service clients. Sessions +can be shared across service clients that share the same base configuration. Sessions are safe to use concurrently as long as the Session is not being -modified. The SDK will not modify the Session once the Session has been created. -Creating service clients concurrently from a shared Session is safe. - -Sessions from Shared Config - -Sessions can be created using the method above that will only load the -additional config if the AWS_SDK_LOAD_CONFIG environment variable is set. -Alternatively you can explicitly create a Session with shared config enabled. -To do this you can use NewSessionWithOptions to configure how the Session will -be created. Using the NewSessionWithOptions with SharedConfigState set to -SharedConfigEnable will create the session as if the AWS_SDK_LOAD_CONFIG -environment variable was set. +modified. Sessions should be cached when possible, because creating a new +Session will load all configuration values from the environment, and config +files each time the Session is created. Sharing the Session value across all of +your service clients will ensure the configuration is loaded the fewest number +of times possible. -Creating Sessions - -When creating Sessions optional aws.Config values can be passed in that will -override the default, or loaded config values the Session is being created -with. This allows you to provide additional, or case based, configuration -as needed. +Sessions options from Shared Config By default NewSession will only load credentials from the shared credentials file (~/.aws/credentials). If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value the Session will be created from the configuration values from the shared config (~/.aws/config) and shared credentials -(~/.aws/credentials) files. See the section Sessions from Shared Config for -more information. +(~/.aws/credentials) files. Using the NewSessionWithOptions with +SharedConfigState set to SharedConfigEnable will create the session as if the +AWS_SDK_LOAD_CONFIG environment variable was set. -Create a Session with the default config and request handlers. With credentials -region, and profile loaded from the environment and shared config automatically. -Requires the AWS_PROFILE to be set, or "default" is used. +Credential and config loading order - // Create Session - sess := session.Must(session.NewSession()) +The Session will attempt to load configuration and credentials from the +environment, configuration files, and other credential sources. The order +configuration is loaded in is: - // Create a Session with a custom region - sess := session.Must(session.NewSession(&aws.Config{ - Region: aws.String("us-east-1"), - })) + * Environment Variables + * Shared Credentials file + * Shared Configuration file (if SharedConfig is enabled) + * EC2 Instance Metadata (credentials only) - // Create a S3 client instance from a session - sess := session.Must(session.NewSession()) +The Environment variables for credentials will have precedence over shared +config even if SharedConfig is enabled. To override this behavior, and use +shared config credentials instead specify the session.Options.Profile, (e.g. +when using credential_source=Environment to assume a role). + + sess, err := session.NewSessionWithOptions(session.Options{ + Profile: "myProfile", + }) - svc := s3.New(sess) +Creating Sessions -Create Session With Option Overrides +Creating a Session without additional options will load credentials region, and +profile loaded from the environment and shared config automatically. See, +"Environment Variables" section for information on environment variables used +by Session. -In addition to NewSession, Sessions can be created using NewSessionWithOptions. -This func allows you to control and override how the Session will be created -through code instead of being driven by environment variables only. + // Create Session + sess, err := session.NewSession() -Use NewSessionWithOptions when you want to provide the config profile, or -override the shared config state (AWS_SDK_LOAD_CONFIG). + +When creating Sessions optional aws.Config values can be passed in that will +override the default, or loaded, config values the Session is being created +with. This allows you to provide additional, or case based, configuration +as needed. + + // Create a Session with a custom region + sess, err := session.NewSession(&aws.Config{ + Region: aws.String("us-west-2"), + }) + +Use NewSessionWithOptions to provide additional configuration driving how the +Session's configuration will be loaded. Such as, specifying shared config +profile, or override the shared config state, (AWS_SDK_LOAD_CONFIG). // Equivalent to session.NewSession() - sess := session.Must(session.NewSessionWithOptions(session.Options{ + sess, err := session.NewSessionWithOptions(session.Options{ // Options - })) + }) - // Specify profile to load for the session's config - sess := session.Must(session.NewSessionWithOptions(session.Options{ - Profile: "profile_name", - })) + sess, err := session.NewSessionWithOptions(session.Options{ + // Specify profile to load for the session's config + Profile: "profile_name", - // Specify profile for config and region for requests - sess := session.Must(session.NewSessionWithOptions(session.Options{ - Config: aws.Config{Region: aws.String("us-east-1")}, - Profile: "profile_name", - })) + // Provide SDK Config options, such as Region. + Config: aws.Config{ + Region: aws.String("us-west-2"), + }, - // Force enable Shared Config support - sess := session.Must(session.NewSessionWithOptions(session.Options{ + // Force enable Shared Config support SharedConfigState: session.SharedConfigEnable, - })) + }) Adding Handlers -You can add handlers to a session for processing HTTP requests. All service -clients that use the session inherit the handlers. For example, the following -handler logs every request and its payload made by a service client: +You can add handlers to a session to decorate API operation, (e.g. adding HTTP +headers). All clients that use the Session receive a copy of the Session's +handlers. For example, the following request handler added to the Session logs +every requests made. // Create a session, and add additional handlers for all service // clients created with the Session to inherit. Adds logging handler. @@ -99,22 +95,15 @@ handler logs every request and its payload made by a service client: sess.Handlers.Send.PushFront(func(r *request.Request) { // Log every request made and its payload - logger.Printf("Request: %s/%s, Payload: %s", + logger.Printf("Request: %s/%s, Params: %s", r.ClientInfo.ServiceName, r.Operation, r.Params) }) -Deprecated "New" function - -The New session function has been deprecated because it does not provide good -way to return errors that occur when loading the configuration files and values. -Because of this, NewSession was created so errors can be retrieved when -creating a session fails. - Shared Config Fields -By default the SDK will only load the shared credentials file's (~/.aws/credentials) -credentials values, and all other config is provided by the environment variables, -SDK defaults, and user provided aws.Config values. +By default the SDK will only load the shared credentials file's +(~/.aws/credentials) credentials values, and all other config is provided by +the environment variables, SDK defaults, and user provided aws.Config values. If the AWS_SDK_LOAD_CONFIG environment variable is set, or SharedConfigEnable option is used to create the Session the full shared config values will be @@ -125,24 +114,31 @@ files have the same format. If both config files are present the configuration from both files will be read. The Session will be created from configuration values from the shared -credentials file (~/.aws/credentials) over those in the shared config file (~/.aws/config). +credentials file (~/.aws/credentials) over those in the shared config file +(~/.aws/config). -Credentials are the values the SDK should use for authenticating requests with -AWS Services. They are from a configuration file will need to include both -aws_access_key_id and aws_secret_access_key must be provided together in the -same file to be considered valid. The values will be ignored if not a complete -group. aws_session_token is an optional field that can be provided if both of -the other two fields are also provided. +Credentials are the values the SDK uses to authenticating requests with AWS +Services. When specified in a file, both aws_access_key_id and +aws_secret_access_key must be provided together in the same file to be +considered valid. They will be ignored if both are not present. +aws_session_token is an optional field that can be provided in addition to the +other two fields. aws_access_key_id = AKID aws_secret_access_key = SECRET aws_session_token = TOKEN -Assume Role values allow you to configure the SDK to assume an IAM role using -a set of credentials provided in a config file via the source_profile field. -Both "role_arn" and "source_profile" are required. The SDK supports assuming -a role with MFA token if the session option AssumeRoleTokenProvider -is set. + ; region only supported if SharedConfigEnabled. + region = us-east-1 + +Assume Role configuration + +The role_arn field allows you to configure the SDK to assume an IAM role using +a set of credentials from another source. Such as when paired with static +credentials, "profile_source", "credential_process", or "credential_source" +fields. If "role_arn" is provided, a source of credentials must also be +specified, such as "source_profile", "credential_source", or +"credential_process". role_arn = arn:aws:iam:::role/ source_profile = profile_with_creds @@ -150,40 +146,16 @@ is set. mfa_serial = role_session_name = session_name -Region is the region the SDK should use for looking up AWS service endpoints -and signing requests. - - region = us-east-1 - -Assume Role with MFA token -To create a session with support for assuming an IAM role with MFA set the -session option AssumeRoleTokenProvider to a function that will prompt for the -MFA token code when the SDK assumes the role and refreshes the role's credentials. -This allows you to configure the SDK via the shared config to assumea role -with MFA tokens. - -In order for the SDK to assume a role with MFA the SharedConfigState -session option must be set to SharedConfigEnable, or AWS_SDK_LOAD_CONFIG -environment variable set. - -The shared configuration instructs the SDK to assume an IAM role with MFA -when the mfa_serial configuration field is set in the shared config -(~/.aws/config) or shared credentials (~/.aws/credentials) file. - -If mfa_serial is set in the configuration, the SDK will assume the role, and -the AssumeRoleTokenProvider session option is not set an an error will -be returned when creating the session. +The SDK supports assuming a role with MFA token. If "mfa_serial" is set, you +must also set the Session Option.AssumeRoleTokenProvider. The Session will fail +to load if the AssumeRoleTokenProvider is not specified. sess := session.Must(session.NewSessionWithOptions(session.Options{ AssumeRoleTokenProvider: stscreds.StdinTokenProvider, })) - // Create service client value configured for credentials - // from assumed role. - svc := s3.New(sess) - -To setup assume role outside of a session see the stscreds.AssumeRoleProvider +To setup Assume Role outside of a session see the stscreds.AssumeRoleProvider documentation. Environment Variables diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go index e3959b95..60a6f9ce 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go @@ -99,21 +99,41 @@ type envConfig struct { CustomCABundle string csmEnabled string - CSMEnabled bool + CSMEnabled *bool CSMPort string + CSMHost string CSMClientID string - enableEndpointDiscovery string // Enables endpoint discovery via environment variables. // // AWS_ENABLE_ENDPOINT_DISCOVERY=true EnableEndpointDiscovery *bool + enableEndpointDiscovery string + + // Specifies the WebIdentity token the SDK should use to assume a role + // with. + // + // AWS_WEB_IDENTITY_TOKEN_FILE=file_path + WebIdentityTokenFilePath string + + // Specifies the IAM role arn to use when assuming an role. + // + // AWS_ROLE_ARN=role_arn + RoleARN string + + // Specifies the IAM role session name to use when assuming a role. + // + // AWS_ROLE_SESSION_NAME=session_name + RoleSessionName string } var ( csmEnabledEnvKey = []string{ "AWS_CSM_ENABLED", } + csmHostEnvKey = []string{ + "AWS_CSM_HOST", + } csmPortEnvKey = []string{ "AWS_CSM_PORT", } @@ -150,6 +170,15 @@ var ( sharedConfigFileEnvKey = []string{ "AWS_CONFIG_FILE", } + webIdentityTokenFilePathEnvKey = []string{ + "AWS_WEB_IDENTITY_TOKEN_FILE", + } + roleARNEnvKey = []string{ + "AWS_ROLE_ARN", + } + roleSessionNameEnvKey = []string{ + "AWS_ROLE_SESSION_NAME", + } ) // loadEnvConfig retrieves the SDK's environment configuration. @@ -178,21 +207,33 @@ func envConfigLoad(enableSharedConfig bool) envConfig { cfg.EnableSharedConfig = enableSharedConfig - setFromEnvVal(&cfg.Creds.AccessKeyID, credAccessEnvKey) - setFromEnvVal(&cfg.Creds.SecretAccessKey, credSecretEnvKey) - setFromEnvVal(&cfg.Creds.SessionToken, credSessionEnvKey) + // Static environment credentials + var creds credentials.Value + setFromEnvVal(&creds.AccessKeyID, credAccessEnvKey) + setFromEnvVal(&creds.SecretAccessKey, credSecretEnvKey) + setFromEnvVal(&creds.SessionToken, credSessionEnvKey) + if creds.HasKeys() { + // Require logical grouping of credentials + creds.ProviderName = EnvProviderName + cfg.Creds = creds + } + + // Role Metadata + setFromEnvVal(&cfg.RoleARN, roleARNEnvKey) + setFromEnvVal(&cfg.RoleSessionName, roleSessionNameEnvKey) + + // Web identity environment variables + setFromEnvVal(&cfg.WebIdentityTokenFilePath, webIdentityTokenFilePathEnvKey) // CSM environment variables setFromEnvVal(&cfg.csmEnabled, csmEnabledEnvKey) + setFromEnvVal(&cfg.CSMHost, csmHostEnvKey) setFromEnvVal(&cfg.CSMPort, csmPortEnvKey) setFromEnvVal(&cfg.CSMClientID, csmClientIDEnvKey) - cfg.CSMEnabled = len(cfg.csmEnabled) > 0 - // Require logical grouping of credentials - if len(cfg.Creds.AccessKeyID) == 0 || len(cfg.Creds.SecretAccessKey) == 0 { - cfg.Creds = credentials.Value{} - } else { - cfg.Creds.ProviderName = EnvProviderName + if len(cfg.csmEnabled) != 0 { + v, _ := strconv.ParseBool(cfg.csmEnabled) + cfg.CSMEnabled = &v } regionKeys := regionEnvKeys diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go index be4b5f07..7b0a942e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go @@ -8,19 +8,17 @@ import ( "io/ioutil" "net/http" "os" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/corehandlers" "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/credentials/processcreds" - "github.com/aws/aws-sdk-go/aws/credentials/stscreds" "github.com/aws/aws-sdk-go/aws/csm" "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/shareddefaults" ) const ( @@ -106,8 +104,20 @@ func New(cfgs ...*aws.Config) *Session { } s := deprecatedNewSession(cfgs...) - if envCfg.CSMEnabled { - enableCSM(&s.Handlers, envCfg.CSMClientID, envCfg.CSMPort, s.Config.Logger) + + if csmCfg, err := loadCSMConfig(envCfg, []string{}); err != nil { + if l := s.Config.Logger; l != nil { + l.Log(fmt.Sprintf("ERROR: failed to load CSM configuration, %v", err)) + } + } else if csmCfg.Enabled { + err := enableCSM(&s.Handlers, csmCfg, s.Config.Logger) + if err != nil { + err = fmt.Errorf("failed to enable CSM, %v", err) + s.Config.Logger.Log("ERROR:", err.Error()) + s.Handlers.Validate.PushBack(func(r *request.Request) { + r.Error = err + }) + } } return s @@ -126,7 +136,7 @@ func New(cfgs ...*aws.Config) *Session { // to be built with retrieving credentials with AssumeRole set in the config. // // See the NewSessionWithOptions func for information on how to override or -// control through code how the Session will be created. Such as specifying the +// control through code how the Session will be created, such as specifying the // config profile, and controlling if shared config is enabled or not. func NewSession(cfgs ...*aws.Config) (*Session, error) { opts := Options{} @@ -210,6 +220,12 @@ type Options struct { // the config enables assume role wit MFA via the mfa_serial field. AssumeRoleTokenProvider func() (string, error) + // When the SDK's shared config is configured to assume a role this option + // may be provided to set the expiry duration of the STS credentials. + // Defaults to 15 minutes if not set as documented in the + // stscreds.AssumeRoleProvider. + AssumeRoleDuration time.Duration + // Reader for a custom Credentials Authority (CA) bundle in PEM format that // the SDK will use instead of the default system's root CA bundle. Use this // only if you want to replace the CA bundle the SDK uses for TLS requests. @@ -224,6 +240,12 @@ type Options struct { // to also enable this feature. CustomCABundle session option field has priority // over the AWS_CA_BUNDLE environment variable, and will be used if both are set. CustomCABundle io.Reader + + // The handlers that the session and all API clients will be created with. + // This must be a complete set of handlers. Use the defaults.Handlers() + // function to initialize this value before changing the handlers to be + // used by the SDK. + Handlers request.Handlers } // NewSessionWithOptions returns a new Session created from SDK defaults, config files, @@ -263,7 +285,7 @@ func NewSessionWithOptions(opts Options) (*Session, error) { envCfg = loadEnvConfig() } - if len(opts.Profile) > 0 { + if len(opts.Profile) != 0 { envCfg.Profile = opts.Profile } @@ -329,27 +351,33 @@ func deprecatedNewSession(cfgs ...*aws.Config) *Session { return s } -func enableCSM(handlers *request.Handlers, clientID string, port string, logger aws.Logger) { - logger.Log("Enabling CSM") - if len(port) == 0 { - port = csm.DefaultPort +func enableCSM(handlers *request.Handlers, cfg csmConfig, logger aws.Logger) error { + if logger != nil { + logger.Log("Enabling CSM") } - r, err := csm.Start(clientID, "127.0.0.1:"+port) + r, err := csm.Start(cfg.ClientID, csm.AddressWithDefaults(cfg.Host, cfg.Port)) if err != nil { - return + return err } r.InjectHandlers(handlers) + + return nil } func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, error) { cfg := defaults.Config() - handlers := defaults.Handlers() + + handlers := opts.Handlers + if handlers.IsEmpty() { + handlers = defaults.Handlers() + } // Get a merged version of the user provided config to determine if // credentials were. userCfg := &aws.Config{} userCfg.MergeIn(cfgs...) + cfg.MergeIn(userCfg) // Ordered config files will be loaded in with later files overwriting // previous config file values. @@ -366,9 +394,17 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, } // Load additional config from file(s) - sharedCfg, err := loadSharedConfig(envCfg.Profile, cfgFiles) + sharedCfg, err := loadSharedConfig(envCfg.Profile, cfgFiles, envCfg.EnableSharedConfig) if err != nil { - return nil, err + if len(envCfg.Profile) == 0 && !envCfg.EnableSharedConfig && (envCfg.Creds.HasKeys() || userCfg.Credentials != nil) { + // Special case where the user has not explicitly specified an AWS_PROFILE, + // or session.Options.profile, shared config is not enabled, and the + // environment has credentials, allow the shared config file to fail to + // load since the user has already provided credentials, and nothing else + // is required to be read file. Github(aws/aws-sdk-go#2455) + } else if _, ok := err.(SharedConfigProfileNotExistsError); !ok { + return nil, err + } } if err := mergeConfigSrcs(cfg, userCfg, envCfg, sharedCfg, handlers, opts); err != nil { @@ -381,8 +417,16 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, } initHandlers(s) - if envCfg.CSMEnabled { - enableCSM(&s.Handlers, envCfg.CSMClientID, envCfg.CSMPort, s.Config.Logger) + + if csmCfg, err := loadCSMConfig(envCfg, cfgFiles); err != nil { + if l := s.Config.Logger; l != nil { + l.Log(fmt.Sprintf("ERROR: failed to load CSM configuration, %v", err)) + } + } else if csmCfg.Enabled { + err = enableCSM(&s.Handlers, csmCfg, s.Config.Logger) + if err != nil { + return nil, err + } } // Setup HTTP client with custom cert bundle if enabled @@ -395,6 +439,46 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, return s, nil } +type csmConfig struct { + Enabled bool + Host string + Port string + ClientID string +} + +var csmProfileName = "aws_csm" + +func loadCSMConfig(envCfg envConfig, cfgFiles []string) (csmConfig, error) { + if envCfg.CSMEnabled != nil { + if *envCfg.CSMEnabled { + return csmConfig{ + Enabled: true, + ClientID: envCfg.CSMClientID, + Host: envCfg.CSMHost, + Port: envCfg.CSMPort, + }, nil + } + return csmConfig{}, nil + } + + sharedCfg, err := loadSharedConfig(csmProfileName, cfgFiles, false) + if err != nil { + if _, ok := err.(SharedConfigProfileNotExistsError); !ok { + return csmConfig{}, err + } + } + if sharedCfg.CSMEnabled != nil && *sharedCfg.CSMEnabled == true { + return csmConfig{ + Enabled: true, + ClientID: sharedCfg.CSMClientID, + Host: sharedCfg.CSMHost, + Port: sharedCfg.CSMPort, + }, nil + } + + return csmConfig{}, nil +} + func loadCustomCABundle(s *Session, bundle io.Reader) error { var t *http.Transport switch v := s.Config.HTTPClient.Transport.(type) { @@ -443,9 +527,11 @@ func loadCertPool(r io.Reader) (*x509.CertPool, error) { return p, nil } -func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig, handlers request.Handlers, sessOpts Options) error { - // Merge in user provided configuration - cfg.MergeIn(userCfg) +func mergeConfigSrcs(cfg, userCfg *aws.Config, + envCfg envConfig, sharedCfg sharedConfig, + handlers request.Handlers, + sessOpts Options, +) error { // Region if not already set by user if len(aws.StringValue(cfg.Region)) == 0 { @@ -464,164 +550,19 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg share } } - // Configure credentials if not already set + // Configure credentials if not already set by the user when creating the + // Session. if cfg.Credentials == credentials.AnonymousCredentials && userCfg.Credentials == nil { - - // inspect the profile to see if a credential source has been specified. - if envCfg.EnableSharedConfig && len(sharedCfg.AssumeRole.CredentialSource) > 0 { - - // if both credential_source and source_profile have been set, return an error - // as this is undefined behavior. - if len(sharedCfg.AssumeRole.SourceProfile) > 0 { - return ErrSharedConfigSourceCollision - } - - // valid credential source values - const ( - credSourceEc2Metadata = "Ec2InstanceMetadata" - credSourceEnvironment = "Environment" - credSourceECSContainer = "EcsContainer" - ) - - switch sharedCfg.AssumeRole.CredentialSource { - case credSourceEc2Metadata: - cfgCp := *cfg - p := defaults.RemoteCredProvider(cfgCp, handlers) - cfgCp.Credentials = credentials.NewCredentials(p) - - if len(sharedCfg.AssumeRole.MFASerial) > 0 && sessOpts.AssumeRoleTokenProvider == nil { - // AssumeRole Token provider is required if doing Assume Role - // with MFA. - return AssumeRoleTokenProviderNotSetError{} - } - - cfg.Credentials = assumeRoleCredentials(cfgCp, handlers, sharedCfg, sessOpts) - case credSourceEnvironment: - cfg.Credentials = credentials.NewStaticCredentialsFromCreds( - envCfg.Creds, - ) - case credSourceECSContainer: - if len(os.Getenv(shareddefaults.ECSCredsProviderEnvVar)) == 0 { - return ErrSharedConfigECSContainerEnvVarEmpty - } - - cfgCp := *cfg - p := defaults.RemoteCredProvider(cfgCp, handlers) - creds := credentials.NewCredentials(p) - - cfg.Credentials = creds - default: - return ErrSharedConfigInvalidCredSource - } - - return nil - } - - if len(envCfg.Creds.AccessKeyID) > 0 { - cfg.Credentials = credentials.NewStaticCredentialsFromCreds( - envCfg.Creds, - ) - } else if envCfg.EnableSharedConfig && len(sharedCfg.AssumeRole.RoleARN) > 0 && sharedCfg.AssumeRoleSource != nil { - cfgCp := *cfg - cfgCp.Credentials = credentials.NewStaticCredentialsFromCreds( - sharedCfg.AssumeRoleSource.Creds, - ) - - if len(sharedCfg.AssumeRole.MFASerial) > 0 && sessOpts.AssumeRoleTokenProvider == nil { - // AssumeRole Token provider is required if doing Assume Role - // with MFA. - return AssumeRoleTokenProviderNotSetError{} - } - - cfg.Credentials = assumeRoleCredentials(cfgCp, handlers, sharedCfg, sessOpts) - } else if len(sharedCfg.Creds.AccessKeyID) > 0 { - cfg.Credentials = credentials.NewStaticCredentialsFromCreds( - sharedCfg.Creds, - ) - } else if len(sharedCfg.CredentialProcess) > 0 { - cfg.Credentials = processcreds.NewCredentials( - sharedCfg.CredentialProcess, - ) - } else { - // Fallback to default credentials provider, include mock errors - // for the credential chain so user can identify why credentials - // failed to be retrieved. - cfg.Credentials = credentials.NewCredentials(&credentials.ChainProvider{ - VerboseErrors: aws.BoolValue(cfg.CredentialsChainVerboseErrors), - Providers: []credentials.Provider{ - &credProviderError{Err: awserr.New("EnvAccessKeyNotFound", "failed to find credentials in the environment.", nil)}, - &credProviderError{Err: awserr.New("SharedCredsLoad", fmt.Sprintf("failed to load profile, %s.", envCfg.Profile), nil)}, - defaults.RemoteCredProvider(*cfg, handlers), - }, - }) + creds, err := resolveCredentials(cfg, envCfg, sharedCfg, handlers, sessOpts) + if err != nil { + return err } + cfg.Credentials = creds } return nil } -func assumeRoleCredentials(cfg aws.Config, handlers request.Handlers, sharedCfg sharedConfig, sessOpts Options) *credentials.Credentials { - return stscreds.NewCredentials( - &Session{ - Config: &cfg, - Handlers: handlers.Copy(), - }, - sharedCfg.AssumeRole.RoleARN, - func(opt *stscreds.AssumeRoleProvider) { - opt.RoleSessionName = sharedCfg.AssumeRole.RoleSessionName - - // Assume role with external ID - if len(sharedCfg.AssumeRole.ExternalID) > 0 { - opt.ExternalID = aws.String(sharedCfg.AssumeRole.ExternalID) - } - - // Assume role with MFA - if len(sharedCfg.AssumeRole.MFASerial) > 0 { - opt.SerialNumber = aws.String(sharedCfg.AssumeRole.MFASerial) - opt.TokenProvider = sessOpts.AssumeRoleTokenProvider - } - }, - ) -} - -// AssumeRoleTokenProviderNotSetError is an error returned when creating a session when the -// MFAToken option is not set when shared config is configured load assume a -// role with an MFA token. -type AssumeRoleTokenProviderNotSetError struct{} - -// Code is the short id of the error. -func (e AssumeRoleTokenProviderNotSetError) Code() string { - return "AssumeRoleTokenProviderNotSetError" -} - -// Message is the description of the error -func (e AssumeRoleTokenProviderNotSetError) Message() string { - return fmt.Sprintf("assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.") -} - -// OrigErr is the underlying error that caused the failure. -func (e AssumeRoleTokenProviderNotSetError) OrigErr() error { - return nil -} - -// Error satisfies the error interface. -func (e AssumeRoleTokenProviderNotSetError) Error() string { - return awserr.SprintError(e.Code(), e.Message(), "", nil) -} - -type credProviderError struct { - Err error -} - -var emptyCreds = credentials.Value{} - -func (c credProviderError) Retrieve() (credentials.Value, error) { - return credentials.Value{}, c.Err -} -func (c credProviderError) IsExpired() bool { - return true -} - func initHandlers(s *Session) { // Add the Validate parameter handler if it is not disabled. s.Handlers.Validate.Remove(corehandlers.ValidateParametersHandler) @@ -630,7 +571,7 @@ func initHandlers(s *Session) { } } -// Copy creates and returns a copy of the current Session, coping the config +// Copy creates and returns a copy of the current Session, copying the config // and handlers. If any additional configs are provided they will be merged // on top of the Session's copied config. // diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go index 7cb44021..d91ac93a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go @@ -5,7 +5,6 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/internal/ini" ) @@ -23,13 +22,23 @@ const ( mfaSerialKey = `mfa_serial` // optional roleSessionNameKey = `role_session_name` // optional + // CSM options + csmEnabledKey = `csm_enabled` + csmHostKey = `csm_host` + csmPortKey = `csm_port` + csmClientIDKey = `csm_client_id` + // Additional Config fields regionKey = `region` // endpoint discovery group enableEndpointDiscoveryKey = `endpoint_discovery_enabled` // optional + // External Credential Process - credentialProcessKey = `credential_process` + credentialProcessKey = `credential_process` // optional + + // Web Identity Token File + webIdentityTokenFileKey = `web_identity_token_file` // optional // DefaultSharedConfigProfile is the default profile to be used when // loading configuration from the config files if another profile name @@ -37,36 +46,33 @@ const ( DefaultSharedConfigProfile = `default` ) -type assumeRoleConfig struct { - RoleARN string - SourceProfile string - CredentialSource string - ExternalID string - MFASerial string - RoleSessionName string -} - // sharedConfig represents the configuration fields of the SDK config files. type sharedConfig struct { - // Credentials values from the config file. Both aws_access_key_id - // and aws_secret_access_key must be provided together in the same file - // to be considered valid. The values will be ignored if not a complete group. - // aws_session_token is an optional field that can be provided if both of the - // other two fields are also provided. + // Credentials values from the config file. Both aws_access_key_id and + // aws_secret_access_key must be provided together in the same file to be + // considered valid. The values will be ignored if not a complete group. + // aws_session_token is an optional field that can be provided if both of + // the other two fields are also provided. // // aws_access_key_id // aws_secret_access_key // aws_session_token Creds credentials.Value - AssumeRole assumeRoleConfig - AssumeRoleSource *sharedConfig + CredentialSource string + CredentialProcess string + WebIdentityTokenFile string - // An external process to request credentials - CredentialProcess string + RoleARN string + RoleSessionName string + ExternalID string + MFASerial string - // Region is the region the SDK should use for looking up AWS service endpoints - // and signing requests. + SourceProfileName string + SourceProfile *sharedConfig + + // Region is the region the SDK should use for looking up AWS service + // endpoints and signing requests. // // region Region string @@ -76,6 +82,12 @@ type sharedConfig struct { // // endpoint_discovery_enabled = true EnableEndpointDiscovery *bool + + // CSM Options + CSMEnabled *bool + CSMHost string + CSMPort string + CSMClientID string } type sharedConfigFile struct { @@ -83,17 +95,18 @@ type sharedConfigFile struct { IniData ini.Sections } -// loadSharedConfig retrieves the configuration from the list of files -// using the profile provided. The order the files are listed will determine +// loadSharedConfig retrieves the configuration from the list of files using +// the profile provided. The order the files are listed will determine // precedence. Values in subsequent files will overwrite values defined in // earlier files. // // For example, given two files A and B. Both define credentials. If the order -// of the files are A then B, B's credential values will be used instead of A's. +// of the files are A then B, B's credential values will be used instead of +// A's. // // See sharedConfig.setFromFile for information how the config files // will be loaded. -func loadSharedConfig(profile string, filenames []string) (sharedConfig, error) { +func loadSharedConfig(profile string, filenames []string, exOpts bool) (sharedConfig, error) { if len(profile) == 0 { profile = DefaultSharedConfigProfile } @@ -104,16 +117,11 @@ func loadSharedConfig(profile string, filenames []string) (sharedConfig, error) } cfg := sharedConfig{} - if err = cfg.setFromIniFiles(profile, files); err != nil { + profiles := map[string]struct{}{} + if err = cfg.setFromIniFiles(profiles, profile, files, exOpts); err != nil { return sharedConfig{}, err } - if len(cfg.AssumeRole.SourceProfile) > 0 { - if err := cfg.setAssumeRoleSource(profile, files); err != nil { - return sharedConfig{}, err - } - } - return cfg, nil } @@ -137,60 +145,88 @@ func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) { return files, nil } -func (cfg *sharedConfig) setAssumeRoleSource(origProfile string, files []sharedConfigFile) error { - var assumeRoleSrc sharedConfig - - if len(cfg.AssumeRole.CredentialSource) > 0 { - // setAssumeRoleSource is only called when source_profile is found. - // If both source_profile and credential_source are set, then - // ErrSharedConfigSourceCollision will be returned - return ErrSharedConfigSourceCollision +func (cfg *sharedConfig) setFromIniFiles(profiles map[string]struct{}, profile string, files []sharedConfigFile, exOpts bool) error { + // Trim files from the list that don't exist. + var skippedFiles int + var profileNotFoundErr error + for _, f := range files { + if err := cfg.setFromIniFile(profile, f, exOpts); err != nil { + if _, ok := err.(SharedConfigProfileNotExistsError); ok { + // Ignore profiles not defined in individual files. + profileNotFoundErr = err + skippedFiles++ + continue + } + return err + } + } + if skippedFiles == len(files) { + // If all files were skipped because the profile is not found, return + // the original profile not found error. + return profileNotFoundErr } - // Multiple level assume role chains are not support - if cfg.AssumeRole.SourceProfile == origProfile { - assumeRoleSrc = *cfg - assumeRoleSrc.AssumeRole = assumeRoleConfig{} + if _, ok := profiles[profile]; ok { + // if this is the second instance of the profile the Assume Role + // options must be cleared because they are only valid for the + // first reference of a profile. The self linked instance of the + // profile only have credential provider options. + cfg.clearAssumeRoleOptions() } else { - err := assumeRoleSrc.setFromIniFiles(cfg.AssumeRole.SourceProfile, files) - if err != nil { + // First time a profile has been seen, It must either be a assume role + // or credentials. Assert if the credential type requires a role ARN, + // the ARN is also set. + if err := cfg.validateCredentialsRequireARN(profile); err != nil { return err } } + profiles[profile] = struct{}{} - if len(assumeRoleSrc.Creds.AccessKeyID) == 0 { - return SharedConfigAssumeRoleError{RoleARN: cfg.AssumeRole.RoleARN} + if err := cfg.validateCredentialType(); err != nil { + return err } - cfg.AssumeRoleSource = &assumeRoleSrc + // Link source profiles for assume roles + if len(cfg.SourceProfileName) != 0 { + // Linked profile via source_profile ignore credential provider + // options, the source profile must provide the credentials. + cfg.clearCredentialOptions() - return nil -} - -func (cfg *sharedConfig) setFromIniFiles(profile string, files []sharedConfigFile) error { - // Trim files from the list that don't exist. - for _, f := range files { - if err := cfg.setFromIniFile(profile, f); err != nil { + srcCfg := &sharedConfig{} + err := srcCfg.setFromIniFiles(profiles, cfg.SourceProfileName, files, exOpts) + if err != nil { + // SourceProfile that doesn't exist is an error in configuration. if _, ok := err.(SharedConfigProfileNotExistsError); ok { - // Ignore proviles missings - continue + err = SharedConfigAssumeRoleError{ + RoleARN: cfg.RoleARN, + SourceProfile: cfg.SourceProfileName, + } } return err } + + if !srcCfg.hasCredentials() { + return SharedConfigAssumeRoleError{ + RoleARN: cfg.RoleARN, + SourceProfile: cfg.SourceProfileName, + } + } + + cfg.SourceProfile = srcCfg } return nil } -// setFromFile loads the configuration from the file using -// the profile provided. A sharedConfig pointer type value is used so that -// multiple config file loadings can be chained. +// setFromFile loads the configuration from the file using the profile +// provided. A sharedConfig pointer type value is used so that multiple config +// file loadings can be chained. // // Only loads complete logically grouped values, and will not set fields in cfg -// for incomplete grouped values in the config. Such as credentials. For example -// if a config file only includes aws_access_key_id but no aws_secret_access_key -// the aws_access_key_id will be ignored. -func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile) error { +// for incomplete grouped values in the config. Such as credentials. For +// example if a config file only includes aws_access_key_id but no +// aws_secret_access_key the aws_access_key_id will be ignored. +func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile, exOpts bool) error { section, ok := file.IniData.GetSection(profile) if !ok { // Fallback to to alternate profile name: profile @@ -200,51 +236,141 @@ func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile) e } } + if exOpts { + // Assume Role Parameters + updateString(&cfg.RoleARN, section, roleArnKey) + updateString(&cfg.ExternalID, section, externalIDKey) + updateString(&cfg.MFASerial, section, mfaSerialKey) + updateString(&cfg.RoleSessionName, section, roleSessionNameKey) + updateString(&cfg.SourceProfileName, section, sourceProfileKey) + updateString(&cfg.CredentialSource, section, credentialSourceKey) + + updateString(&cfg.Region, section, regionKey) + } + + updateString(&cfg.CredentialProcess, section, credentialProcessKey) + updateString(&cfg.WebIdentityTokenFile, section, webIdentityTokenFileKey) + // Shared Credentials - akid := section.String(accessKeyIDKey) - secret := section.String(secretAccessKey) - if len(akid) > 0 && len(secret) > 0 { - cfg.Creds = credentials.Value{ - AccessKeyID: akid, - SecretAccessKey: secret, - SessionToken: section.String(sessionTokenKey), - ProviderName: fmt.Sprintf("SharedConfigCredentials: %s", file.Filename), - } + creds := credentials.Value{ + AccessKeyID: section.String(accessKeyIDKey), + SecretAccessKey: section.String(secretAccessKey), + SessionToken: section.String(sessionTokenKey), + ProviderName: fmt.Sprintf("SharedConfigCredentials: %s", file.Filename), + } + if creds.HasKeys() { + cfg.Creds = creds + } + + // Endpoint discovery + updateBoolPtr(&cfg.EnableEndpointDiscovery, section, enableEndpointDiscoveryKey) + + // CSM options + updateBoolPtr(&cfg.CSMEnabled, section, csmEnabledKey) + updateString(&cfg.CSMHost, section, csmHostKey) + updateString(&cfg.CSMPort, section, csmPortKey) + updateString(&cfg.CSMClientID, section, csmClientIDKey) + + return nil +} + +func (cfg *sharedConfig) validateCredentialsRequireARN(profile string) error { + var credSource string + + switch { + case len(cfg.SourceProfileName) != 0: + credSource = sourceProfileKey + case len(cfg.CredentialSource) != 0: + credSource = credentialSourceKey + case len(cfg.WebIdentityTokenFile) != 0: + credSource = webIdentityTokenFileKey } - // Assume Role - roleArn := section.String(roleArnKey) - srcProfile := section.String(sourceProfileKey) - credentialSource := section.String(credentialSourceKey) - hasSource := len(srcProfile) > 0 || len(credentialSource) > 0 - if len(roleArn) > 0 && hasSource { - cfg.AssumeRole = assumeRoleConfig{ - RoleARN: roleArn, - SourceProfile: srcProfile, - CredentialSource: credentialSource, - ExternalID: section.String(externalIDKey), - MFASerial: section.String(mfaSerialKey), - RoleSessionName: section.String(roleSessionNameKey), + if len(credSource) != 0 && len(cfg.RoleARN) == 0 { + return CredentialRequiresARNError{ + Type: credSource, + Profile: profile, } } - // `credential_process` - if credProc := section.String(credentialProcessKey); len(credProc) > 0 { - cfg.CredentialProcess = credProc + return nil +} + +func (cfg *sharedConfig) validateCredentialType() error { + // Only one or no credential type can be defined. + if !oneOrNone( + len(cfg.SourceProfileName) != 0, + len(cfg.CredentialSource) != 0, + len(cfg.CredentialProcess) != 0, + len(cfg.WebIdentityTokenFile) != 0, + ) { + return ErrSharedConfigSourceCollision } - // Region - if v := section.String(regionKey); len(v) > 0 { - cfg.Region = v + return nil +} + +func (cfg *sharedConfig) hasCredentials() bool { + switch { + case len(cfg.SourceProfileName) != 0: + case len(cfg.CredentialSource) != 0: + case len(cfg.CredentialProcess) != 0: + case len(cfg.WebIdentityTokenFile) != 0: + case cfg.Creds.HasKeys(): + default: + return false } - // Endpoint discovery - if section.Has(enableEndpointDiscoveryKey) { - v := section.Bool(enableEndpointDiscoveryKey) - cfg.EnableEndpointDiscovery = &v + return true +} + +func (cfg *sharedConfig) clearCredentialOptions() { + cfg.CredentialSource = "" + cfg.CredentialProcess = "" + cfg.WebIdentityTokenFile = "" + cfg.Creds = credentials.Value{} +} + +func (cfg *sharedConfig) clearAssumeRoleOptions() { + cfg.RoleARN = "" + cfg.ExternalID = "" + cfg.MFASerial = "" + cfg.RoleSessionName = "" + cfg.SourceProfileName = "" +} + +func oneOrNone(bs ...bool) bool { + var count int + + for _, b := range bs { + if b { + count++ + if count > 1 { + return false + } + } } - return nil + return true +} + +// updateString will only update the dst with the value in the section key, key +// is present in the section. +func updateString(dst *string, section ini.Section, key string) { + if !section.Has(key) { + return + } + *dst = section.String(key) +} + +// updateBoolPtr will only update the dst with the value in the section key, +// key is present in the section. +func updateBoolPtr(dst **bool, section ini.Section, key string) { + if !section.Has(key) { + return + } + *dst = new(bool) + **dst = section.Bool(key) } // SharedConfigLoadError is an error for the shared config file failed to load. @@ -304,7 +430,8 @@ func (e SharedConfigProfileNotExistsError) Error() string { // profile contains assume role information, but that information is invalid // or not complete. type SharedConfigAssumeRoleError struct { - RoleARN string + RoleARN string + SourceProfile string } // Code is the short id of the error. @@ -314,8 +441,10 @@ func (e SharedConfigAssumeRoleError) Code() string { // Message is the description of the error func (e SharedConfigAssumeRoleError) Message() string { - return fmt.Sprintf("failed to load assume role for %s, source profile has no shared credentials", - e.RoleARN) + return fmt.Sprintf( + "failed to load assume role for %s, source profile %s has no shared credentials", + e.RoleARN, e.SourceProfile, + ) } // OrigErr is the underlying error that caused the failure. @@ -327,3 +456,36 @@ func (e SharedConfigAssumeRoleError) OrigErr() error { func (e SharedConfigAssumeRoleError) Error() string { return awserr.SprintError(e.Code(), e.Message(), "", nil) } + +// CredentialRequiresARNError provides the error for shared config credentials +// that are incorrectly configured in the shared config or credentials file. +type CredentialRequiresARNError struct { + // type of credentials that were configured. + Type string + + // Profile name the credentials were in. + Profile string +} + +// Code is the short id of the error. +func (e CredentialRequiresARNError) Code() string { + return "CredentialRequiresARNError" +} + +// Message is the description of the error +func (e CredentialRequiresARNError) Message() string { + return fmt.Sprintf( + "credential type %s requires role_arn, profile %s", + e.Type, e.Profile, + ) +} + +// OrigErr is the underlying error that caused the failure. +func (e CredentialRequiresARNError) OrigErr() error { + return nil +} + +// Error satisfies the error interface. +func (e CredentialRequiresARNError) Error() string { + return awserr.SprintError(e.Code(), e.Message(), "", nil) +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go index 523db79f..8104793a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go @@ -687,7 +687,11 @@ func (ctx *signingCtx) buildBodyDigest() error { if !aws.IsReaderSeekable(ctx.Body) { return fmt.Errorf("cannot use unseekable request body %T, for signed request with body", ctx.Body) } - hash = hex.EncodeToString(makeSha256Reader(ctx.Body)) + hashBytes, err := makeSha256Reader(ctx.Body) + if err != nil { + return err + } + hash = hex.EncodeToString(hashBytes) } if includeSHA256Header { @@ -734,10 +738,16 @@ func makeSha256(data []byte) []byte { return hash.Sum(nil) } -func makeSha256Reader(reader io.ReadSeeker) []byte { +func makeSha256Reader(reader io.ReadSeeker) (hashBytes []byte, err error) { hash := sha256.New() - start, _ := reader.Seek(0, sdkio.SeekCurrent) - defer reader.Seek(start, sdkio.SeekStart) + start, err := reader.Seek(0, sdkio.SeekCurrent) + if err != nil { + return nil, err + } + defer func() { + // ensure error is return if unable to seek back to start of payload. + _, err = reader.Seek(start, sdkio.SeekStart) + }() // Use CopyN to avoid allocating the 32KB buffer in io.Copy for bodies // smaller than 32KB. Fall back to io.Copy if we fail to determine the size. @@ -748,7 +758,7 @@ func makeSha256Reader(reader io.ReadSeeker) []byte { io.CopyN(hash, reader, size) } - return hash.Sum(nil) + return hash.Sum(nil), nil } const doubleSpace = " " diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 9ed1367d..448ff119 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.19.41" +const SDKVersion = "1.25.5" diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go index e56dcee2..cf9fad81 100644 --- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go @@ -162,7 +162,7 @@ loop: if len(tokens) == 0 { break loop } - + // if should skip is true, we skip the tokens until should skip is set to false. step = SkipTokenState } @@ -218,7 +218,7 @@ loop: // S -> equal_expr' expr_stmt' switch k.Kind { case ASTKindEqualExpr: - // assiging a value to some key + // assigning a value to some key k.AppendChild(newExpression(tok)) stack.Push(newExprStatement(k)) case ASTKindExpr: @@ -250,6 +250,13 @@ loop: if !runeCompare(tok.Raw(), openBrace) { return nil, NewParseError("expected '['") } + // If OpenScopeState is not at the start, we must mark the previous ast as complete + // + // for example: if previous ast was a skip statement; + // we should mark it as complete before we create a new statement + if k.Kind != ASTKindStart { + stack.MarkComplete(k) + } stmt := newStatement() stack.Push(stmt) diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go index 6bb69644..da7a4049 100644 --- a/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go @@ -22,24 +22,24 @@ func newSkipper() skipper { } func (s *skipper) ShouldSkip(tok Token) bool { + // should skip state will be modified only if previous token was new line (NL); + // and the current token is not WhiteSpace (WS). if s.shouldSkip && s.prevTok.Type() == TokenNL && tok.Type() != TokenWS { - s.Continue() return false } s.prevTok = tok - return s.shouldSkip } func (s *skipper) Skip() { s.shouldSkip = true - s.prevTok = emptyToken } func (s *skipper) Continue() { s.shouldSkip = false + // empty token is assigned as we return to default state, when should skip is false s.prevTok = emptyToken } diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go new file mode 100644 index 00000000..6c443988 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go @@ -0,0 +1,12 @@ +package sdkio + +const ( + // Byte is 8 bits + Byte int64 = 1 + // KibiByte (KiB) is 1024 Bytes + KibiByte = Byte * 1024 + // MebiByte (MiB) is 1024 KiB + MebiByte = KibiByte * 1024 + // GibiByte (GiB) is 1024 MiB + GibiByte = MebiByte * 1024 +) diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor.go new file mode 100644 index 00000000..44898eed --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor.go @@ -0,0 +1,15 @@ +// +build go1.10 + +package sdkmath + +import "math" + +// Round returns the nearest integer, rounding half away from zero. +// +// Special cases are: +// Round(±0) = ±0 +// Round(±Inf) = ±Inf +// Round(NaN) = NaN +func Round(x float64) float64 { + return math.Round(x) +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor_go1.9.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor_go1.9.go new file mode 100644 index 00000000..810ec7f0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor_go1.9.go @@ -0,0 +1,56 @@ +// +build !go1.10 + +package sdkmath + +import "math" + +// Copied from the Go standard library's (Go 1.12) math/floor.go for use in +// Go version prior to Go 1.10. +const ( + uvone = 0x3FF0000000000000 + mask = 0x7FF + shift = 64 - 11 - 1 + bias = 1023 + signMask = 1 << 63 + fracMask = 1<= 0.5 { + // return t + Copysign(1, x) + // } + // return t + // } + bits := math.Float64bits(x) + e := uint(bits>>shift) & mask + if e < bias { + // Round abs(x) < 1 including denormals. + bits &= signMask // +-0 + if e == bias-1 { + bits |= uvone // +-1 + } + } else if e < bias+shift { + // Round any abs(x) >= 1 containing a fractional component [0,1). + // + // Numbers with larger exponents are returned unchanged since they + // must be either an integer, infinity, or NaN. + const half = 1 << (shift - 1) + e -= bias + bits += half >> e + bits &^= fracMask >> e + } + return math.Float64frombits(bits) +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go new file mode 100644 index 00000000..f4651da2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go @@ -0,0 +1,11 @@ +// +build go1.6 + +package sdkrand + +import "math/rand" + +// Read provides the stub for math.Rand.Read method support for go version's +// 1.6 and greater. +func Read(r *rand.Rand, p []byte) (int, error) { + return r.Read(p) +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go new file mode 100644 index 00000000..b1d93a33 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go @@ -0,0 +1,24 @@ +// +build !go1.6 + +package sdkrand + +import "math/rand" + +// Read backfills Go 1.6's math.Rand.Reader for Go 1.5 +func Read(r *rand.Rand, p []byte) (n int, err error) { + // Copy of Go standard libraries math package's read function not added to + // standard library until Go 1.6. + var pos int8 + var val int64 + for n = 0; n < len(p); n++ { + if pos == 0 { + val = r.Int63() + pos = 7 + } + p[n] = byte(val) + val >>= 8 + pos-- + } + + return n, err +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go index de021367..74e361e0 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go @@ -146,6 +146,9 @@ func unmarshalStatusCode(v reflect.Value, statusCode int) { } func unmarshalHeaderMap(r reflect.Value, headers http.Header, prefix string) error { + if len(headers) == 0 { + return nil + } switch r.Interface().(type) { case map[string]*string: // we only support string map value types out := map[string]*string{} @@ -155,19 +158,28 @@ func unmarshalHeaderMap(r reflect.Value, headers http.Header, prefix string) err out[k[len(prefix):]] = &v[0] } } - r.Set(reflect.ValueOf(out)) + if len(out) != 0 { + r.Set(reflect.ValueOf(out)) + } + } return nil } func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) error { - isJSONValue := tag.Get("type") == "jsonvalue" - if isJSONValue { + switch tag.Get("type") { + case "jsonvalue": if len(header) == 0 { return nil } - } else if !v.IsValid() || (header == "" && v.Elem().Kind() != reflect.String) { - return nil + case "blob": + if len(header) == 0 { + return nil + } + default: + if !v.IsValid() || (header == "" && v.Elem().Kind() != reflect.String) { + return nil + } } switch v.Interface().(type) { @@ -178,7 +190,7 @@ func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) erro if err != nil { return err } - v.Set(reflect.ValueOf(&b)) + v.Set(reflect.ValueOf(b)) case *bool: b, err := strconv.ParseBool(header) if err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go index b7ed6c6f..05d4ff51 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go @@ -1,8 +1,11 @@ package protocol import ( + "math" "strconv" "time" + + "github.com/aws/aws-sdk-go/internal/sdkmath" ) // Names of time formats supported by the SDK @@ -13,12 +16,19 @@ const ( ) // Time formats supported by the SDK +// Output time is intended to not contain decimals const ( // RFC 7231#section-7.1.1.1 timetamp format. e.g Tue, 29 Apr 2014 18:30:38 GMT RFC822TimeFormat = "Mon, 2 Jan 2006 15:04:05 GMT" + // This format is used for output time without seconds precision + RFC822OutputTimeFormat = "Mon, 02 Jan 2006 15:04:05 GMT" + // RFC3339 a subset of the ISO8601 timestamp format. e.g 2014-04-29T18:30:38Z - ISO8601TimeFormat = "2006-01-02T15:04:05Z" + ISO8601TimeFormat = "2006-01-02T15:04:05.999999999Z" + + // This format is used for output time without seconds precision + ISO8601OutputTimeFormat = "2006-01-02T15:04:05Z" ) // IsKnownTimestampFormat returns if the timestamp format name @@ -42,9 +52,9 @@ func FormatTime(name string, t time.Time) string { switch name { case RFC822TimeFormatName: - return t.Format(RFC822TimeFormat) + return t.Format(RFC822OutputTimeFormat) case ISO8601TimeFormatName: - return t.Format(ISO8601TimeFormat) + return t.Format(ISO8601OutputTimeFormat) case UnixTimeFormatName: return strconv.FormatInt(t.Unix(), 10) default: @@ -62,10 +72,12 @@ func ParseTime(formatName, value string) (time.Time, error) { return time.Parse(ISO8601TimeFormat, value) case UnixTimeFormatName: v, err := strconv.ParseFloat(value, 64) + _, dec := math.Modf(v) + dec = sdkmath.Round(dec*1e3) / 1e3 //Rounds 0.1229999 to 0.123 if err != nil { return time.Time{}, err } - return time.Unix(int64(v), 0), nil + return time.Unix(int64(v), int64(dec*(1e9))), nil default: panic("unknown timestamp format name, " + formatName) } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/sort.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/sort.go new file mode 100644 index 00000000..c1a51185 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/sort.go @@ -0,0 +1,32 @@ +package xmlutil + +import ( + "encoding/xml" + "strings" +) + +type xmlAttrSlice []xml.Attr + +func (x xmlAttrSlice) Len() int { + return len(x) +} + +func (x xmlAttrSlice) Less(i, j int) bool { + spaceI, spaceJ := x[i].Name.Space, x[j].Name.Space + localI, localJ := x[i].Name.Local, x[j].Name.Local + valueI, valueJ := x[i].Value, x[j].Value + + spaceCmp := strings.Compare(spaceI, spaceJ) + localCmp := strings.Compare(localI, localJ) + valueCmp := strings.Compare(valueI, valueJ) + + if spaceCmp == -1 || (spaceCmp == 0 && (localCmp == -1 || (localCmp == 0 && valueCmp == -1))) { + return true + } + + return false +} + +func (x xmlAttrSlice) Swap(i, j int) { + x[i], x[j] = x[j], x[i] +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go index 515ce152..42f71648 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go @@ -119,7 +119,18 @@ func (n *XMLNode) findElem(name string) (string, bool) { // StructToXML writes an XMLNode to a xml.Encoder as tokens. func StructToXML(e *xml.Encoder, node *XMLNode, sorted bool) error { - e.EncodeToken(xml.StartElement{Name: node.Name, Attr: node.Attr}) + // Sort Attributes + attrs := node.Attr + if sorted { + sortedAttrs := make([]xml.Attr, len(attrs)) + for _, k := range node.Attr { + sortedAttrs = append(sortedAttrs, k) + } + sort.Sort(xmlAttrSlice(sortedAttrs)) + attrs = sortedAttrs + } + + e.EncodeToken(xml.StartElement{Name: node.Name, Attr: attrs}) if node.Text != "" { e.EncodeToken(xml.CharData([]byte(node.Text))) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 7ab3c049..1e9a303f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -778,7 +778,6 @@ func (c *EC2) AssignPrivateIpAddressesRequest(input *AssignPrivateIpAddressesInp output = &AssignPrivateIpAddressesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1062,7 +1061,7 @@ func (c *EC2) AssociateDhcpOptionsRequest(input *AssociateDhcpOptionsInput) (req // its DHCP lease. You can explicitly renew the lease using the operating system // on the instance. // -// For more information, see DHCP Options Sets (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) +// For more information, see DHCP Options Sets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1218,7 +1217,7 @@ func (c *EC2) AssociateRouteTableRequest(input *AssociateRouteTableInput) (req * // an association ID, which you need in order to disassociate the route table // from the subnet later. A route table can be associated with multiple subnets. // -// For more information, see Route Tables (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) +// For more information, see Route Tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1449,7 +1448,7 @@ func (c *EC2) AssociateVpcCidrBlockRequest(input *AssociateVpcCidrBlockInput) (r // IPv6 CIDR block size is fixed at /56. // // For more information about associating CIDR blocks with your VPC and applicable -// restrictions, see VPC and Subnet Sizing (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html#VPC_Sizing) +// restrictions, see VPC and Subnet Sizing (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html#VPC_Sizing) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1612,7 +1611,7 @@ func (c *EC2) AttachInternetGatewayRequest(input *AttachInternetGatewayInput) (r // // Attaches an internet gateway to a VPC, enabling connectivity between the // internet and the VPC. For more information about your VPC and internet gateway, -// see the Amazon Virtual Private Cloud User Guide (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/). +// see the Amazon Virtual Private Cloud User Guide (https://docs.aws.amazon.com/vpc/latest/userguide/). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1763,15 +1762,12 @@ func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Reques // Attaches an EBS volume to a running or stopped instance and exposes it to // the instance with the specified device name. // -// Encrypted EBS volumes may only be attached to instances that support Amazon -// EBS encryption. For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) +// Encrypted EBS volumes must be attached to instances that support Amazon EBS +// encryption. For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) // in the Amazon Elastic Compute Cloud User Guide. // -// For a list of supported device names, see Attaching an EBS Volume to an Instance -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html). -// Any device names that aren't reserved for instance store volumes can be used -// for EBS volumes. For more information, see Amazon EC2 Instance Store (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html) -// in the Amazon Elastic Compute Cloud User Guide. +// After you attach an EBS volume, you must make it available. For more information, +// see Making an EBS Volume Available For Use (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html). // // If a volume has an AWS Marketplace product code: // @@ -1785,8 +1781,7 @@ func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Reques // the product. For example, you can't detach a volume from a Windows instance // and attach it to a Linux instance. // -// For more information about EBS volumes, see Attaching Amazon EBS Volumes -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html) +// For more information, see Attaching Amazon EBS Volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3140,14 +3135,13 @@ func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Reques // Copies a point-in-time snapshot of an EBS volume and stores it in Amazon // S3. You can copy the snapshot within the same Region or from one Region to // another. You can use the snapshot to create EBS volumes or Amazon Machine -// Images (AMIs). The snapshot is copied to the regional endpoint that you send -// the HTTP request to. +// Images (AMIs). // // Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted -// snapshots remain unencrypted, unless the Encrypted flag is specified during -// the snapshot copy operation. By default, encrypted snapshot copies use the -// default AWS Key Management Service (AWS KMS) customer master key (CMK); however, -// you can specify a non-default CMK with the KmsKeyId parameter. +// snapshots remain unencrypted, unless you enable encryption for the snapshot +// copy operation. By default, encrypted snapshot copies use the default AWS +// Key Management Service (AWS KMS) customer master key (CMK); however, you +// can specify a different CMK. // // To copy an encrypted snapshot that has been shared from another account, // you must have permissions for the CMK used to encrypt the snapshot. @@ -3484,7 +3478,7 @@ func (c *EC2) CreateCustomerGatewayRequest(input *CreateCustomerGatewayInput) (r // gateway is the appliance at your end of the VPN connection. (The device on // the AWS side of the VPN connection is the virtual private gateway.) You must // provide the Internet-routable IP address of the customer gateway's external -// interface. The IP address must be static and may be behind a device performing +// interface. The IP address must be static and can be behind a device performing // network address translation (NAT). // // For devices that use Border Gateway Protocol (BGP), you can also provide @@ -3580,7 +3574,7 @@ func (c *EC2) CreateDefaultSubnetRequest(input *CreateDefaultSubnetInput) (req * // Creates a default subnet with a size /20 IPv4 CIDR block in the specified // Availability Zone in your default VPC. You can have only one default subnet // per Availability Zone. For more information, see Creating a Default Subnet -// (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html#create-default-subnet) +// (https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html#create-default-subnet) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3657,7 +3651,7 @@ func (c *EC2) CreateDefaultVpcRequest(input *CreateDefaultVpcInput) (req *reques // // Creates a default VPC with a size /16 IPv4 CIDR block and a default subnet // in each Availability Zone. For more information about the components of a -// default VPC, see Default VPC and Default Subnets (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html) +// default VPC, see Default VPC and Default Subnets (https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html) // in the Amazon Virtual Private Cloud User Guide. You cannot specify the components // of the default VPC yourself. // @@ -3750,9 +3744,9 @@ func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *requ // * domain-name-servers - The IP addresses of up to four domain name servers, // or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. // If specifying more than one domain name server, specify the IP addresses -// in a single parameter, separated by commas. ITo have your instance to -// receive a custom DNS hostname as specified in domain-name, you must set -// domain-name-servers to a custom DNS server. +// in a single parameter, separated by commas. To have your instance receive +// a custom DNS hostname as specified in domain-name, you must set domain-name-servers +// to a custom DNS server. // // * domain-name - If you're using AmazonProvidedDNS in us-east-1, specify // ec2.internal. If you're using AmazonProvidedDNS in another Region, specify @@ -3778,7 +3772,7 @@ func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *requ // only a DNS server that we provide (AmazonProvidedDNS). If you create a set // of options, and if your VPC has an internet gateway, make sure to set the // domain-name-servers option either to AmazonProvidedDNS or to a domain name -// server of your choice. For more information, see DHCP Options Sets (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) +// server of your choice. For more information, see DHCP Options Sets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4015,7 +4009,7 @@ func (c *EC2) CreateFlowLogsRequest(input *CreateFlowLogsInput) (req *request.Re // // Flow log data for a monitored network interface is recorded as flow log records, // which are log events consisting of fields that describe the traffic flow. -// For more information, see Flow Log Records (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/flow-logs.html#flow-log-records) +// For more information, see Flow Log Records (https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records) // in the Amazon Virtual Private Cloud User Guide. // // When publishing to CloudWatch Logs, flow log records are published to a log @@ -4024,7 +4018,7 @@ func (c *EC2) CreateFlowLogsRequest(input *CreateFlowLogsInput) (req *request.Re // interfaces are published to a single log file object that is stored in the // specified bucket. // -// For more information, see VPC Flow Logs (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/flow-logs.html) +// For more information, see VPC Flow Logs (https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4346,7 +4340,7 @@ func (c *EC2) CreateInternetGatewayRequest(input *CreateInternetGatewayInput) (r // gateway, you attach it to a VPC using AttachInternetGateway. // // For more information about your VPC and internet gateway, see the Amazon -// Virtual Private Cloud User Guide (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/). +// Virtual Private Cloud User Guide (https://docs.aws.amazon.com/vpc/latest/userguide/). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4665,7 +4659,7 @@ func (c *EC2) CreateNatGatewayRequest(input *CreateNatGatewayInput) (req *reques // the IP address range of the subnet. Internet-bound traffic from a private // subnet can be routed to the NAT gateway, therefore enabling instances in // the private subnet to connect to the internet. For more information, see -// NAT Gateways (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html) +// NAT Gateways (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4743,7 +4737,7 @@ func (c *EC2) CreateNetworkAclRequest(input *CreateNetworkAclInput) (req *reques // Creates a network ACL in a VPC. Network ACLs provide an optional layer of // security (in addition to security groups) for the instances in your VPC. // -// For more information, see Network ACLs (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) +// For more information, see Network ACLs (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4834,7 +4828,7 @@ func (c *EC2) CreateNetworkAclEntryRequest(input *CreateNetworkAclEntryInput) (r // After you add an entry, you can't modify it; you must either replace it, // or create an entry and delete the old one. // -// For more information about network ACLs, see Network ACLs (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) +// For more information about network ACLs, see Network ACLs (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5265,7 +5259,7 @@ func (c *EC2) CreateRouteRequest(input *CreateRouteInput) (req *request.Request, // route in the list covers a smaller number of IP addresses and is therefore // more specific, so we use that route to determine where to target the traffic. // -// For more information about route tables, see Route Tables (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) +// For more information about route tables, see Route Tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5343,7 +5337,7 @@ func (c *EC2) CreateRouteTableRequest(input *CreateRouteTableInput) (req *reques // Creates a route table for the specified VPC. After you create a route table, // you can add routes and associate the table with a subnet. // -// For more information, see Route Tables (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) +// For more information, see Route Tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5801,7 +5795,7 @@ func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *request.Reques // It's therefore possible to have a subnet with no running instances (they're // all stopped), but no remaining IP addresses available. // -// For more information about subnets, see Your VPC and Subnets (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) +// For more information about subnets, see Your VPC and Subnets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5915,6 +5909,333 @@ func (c *EC2) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opt return out, req.Send() } +const opCreateTrafficMirrorFilter = "CreateTrafficMirrorFilter" + +// CreateTrafficMirrorFilterRequest generates a "aws/request.Request" representing the +// client's request for the CreateTrafficMirrorFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTrafficMirrorFilter for more information on using the CreateTrafficMirrorFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTrafficMirrorFilterRequest method. +// req, resp := client.CreateTrafficMirrorFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorFilter +func (c *EC2) CreateTrafficMirrorFilterRequest(input *CreateTrafficMirrorFilterInput) (req *request.Request, output *CreateTrafficMirrorFilterOutput) { + op := &request.Operation{ + Name: opCreateTrafficMirrorFilter, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTrafficMirrorFilterInput{} + } + + output = &CreateTrafficMirrorFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTrafficMirrorFilter API operation for Amazon Elastic Compute Cloud. +// +// Creates a Traffic Mirror filter. +// +// A Traffic Mirror filter is a set of rules that defines the traffic to mirror. +// +// By default, no traffic is mirrored. To mirror traffic, use CreateTrafficMirrorFilterRule +// to add Traffic Mirror rules to the filter. The rules you add define what +// traffic gets mirrored. You can also use ModifyTrafficMirrorFilterNetworkServices +// to mirror supported network services. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateTrafficMirrorFilter for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorFilter +func (c *EC2) CreateTrafficMirrorFilter(input *CreateTrafficMirrorFilterInput) (*CreateTrafficMirrorFilterOutput, error) { + req, out := c.CreateTrafficMirrorFilterRequest(input) + return out, req.Send() +} + +// CreateTrafficMirrorFilterWithContext is the same as CreateTrafficMirrorFilter with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTrafficMirrorFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) CreateTrafficMirrorFilterWithContext(ctx aws.Context, input *CreateTrafficMirrorFilterInput, opts ...request.Option) (*CreateTrafficMirrorFilterOutput, error) { + req, out := c.CreateTrafficMirrorFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTrafficMirrorFilterRule = "CreateTrafficMirrorFilterRule" + +// CreateTrafficMirrorFilterRuleRequest generates a "aws/request.Request" representing the +// client's request for the CreateTrafficMirrorFilterRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTrafficMirrorFilterRule for more information on using the CreateTrafficMirrorFilterRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTrafficMirrorFilterRuleRequest method. +// req, resp := client.CreateTrafficMirrorFilterRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorFilterRule +func (c *EC2) CreateTrafficMirrorFilterRuleRequest(input *CreateTrafficMirrorFilterRuleInput) (req *request.Request, output *CreateTrafficMirrorFilterRuleOutput) { + op := &request.Operation{ + Name: opCreateTrafficMirrorFilterRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTrafficMirrorFilterRuleInput{} + } + + output = &CreateTrafficMirrorFilterRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTrafficMirrorFilterRule API operation for Amazon Elastic Compute Cloud. +// +// Creates a Traffic Mirror rule. +// +// A Traffic Mirror rule defines the Traffic Mirror source traffic to mirror. +// +// You need the Traffic Mirror filter ID when you create the rule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateTrafficMirrorFilterRule for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorFilterRule +func (c *EC2) CreateTrafficMirrorFilterRule(input *CreateTrafficMirrorFilterRuleInput) (*CreateTrafficMirrorFilterRuleOutput, error) { + req, out := c.CreateTrafficMirrorFilterRuleRequest(input) + return out, req.Send() +} + +// CreateTrafficMirrorFilterRuleWithContext is the same as CreateTrafficMirrorFilterRule with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTrafficMirrorFilterRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) CreateTrafficMirrorFilterRuleWithContext(ctx aws.Context, input *CreateTrafficMirrorFilterRuleInput, opts ...request.Option) (*CreateTrafficMirrorFilterRuleOutput, error) { + req, out := c.CreateTrafficMirrorFilterRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTrafficMirrorSession = "CreateTrafficMirrorSession" + +// CreateTrafficMirrorSessionRequest generates a "aws/request.Request" representing the +// client's request for the CreateTrafficMirrorSession operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTrafficMirrorSession for more information on using the CreateTrafficMirrorSession +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTrafficMirrorSessionRequest method. +// req, resp := client.CreateTrafficMirrorSessionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorSession +func (c *EC2) CreateTrafficMirrorSessionRequest(input *CreateTrafficMirrorSessionInput) (req *request.Request, output *CreateTrafficMirrorSessionOutput) { + op := &request.Operation{ + Name: opCreateTrafficMirrorSession, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTrafficMirrorSessionInput{} + } + + output = &CreateTrafficMirrorSessionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTrafficMirrorSession API operation for Amazon Elastic Compute Cloud. +// +// Creates a Traffic Mirror session. +// +// A Traffic Mirror session actively copies packets from a Traffic Mirror source +// to a Traffic Mirror target. Create a filter, and then assign it to the session +// to define a subset of the traffic to mirror, for example all TCP traffic. +// +// The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) +// can be in the same VPC, or in a different VPC connected via VPC peering or +// a transit gateway. +// +// By default, no traffic is mirrored. Use CreateTrafficMirrorFilter to create +// filter rules that specify the traffic to mirror. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateTrafficMirrorSession for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorSession +func (c *EC2) CreateTrafficMirrorSession(input *CreateTrafficMirrorSessionInput) (*CreateTrafficMirrorSessionOutput, error) { + req, out := c.CreateTrafficMirrorSessionRequest(input) + return out, req.Send() +} + +// CreateTrafficMirrorSessionWithContext is the same as CreateTrafficMirrorSession with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTrafficMirrorSession for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) CreateTrafficMirrorSessionWithContext(ctx aws.Context, input *CreateTrafficMirrorSessionInput, opts ...request.Option) (*CreateTrafficMirrorSessionOutput, error) { + req, out := c.CreateTrafficMirrorSessionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTrafficMirrorTarget = "CreateTrafficMirrorTarget" + +// CreateTrafficMirrorTargetRequest generates a "aws/request.Request" representing the +// client's request for the CreateTrafficMirrorTarget operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTrafficMirrorTarget for more information on using the CreateTrafficMirrorTarget +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTrafficMirrorTargetRequest method. +// req, resp := client.CreateTrafficMirrorTargetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorTarget +func (c *EC2) CreateTrafficMirrorTargetRequest(input *CreateTrafficMirrorTargetInput) (req *request.Request, output *CreateTrafficMirrorTargetOutput) { + op := &request.Operation{ + Name: opCreateTrafficMirrorTarget, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTrafficMirrorTargetInput{} + } + + output = &CreateTrafficMirrorTargetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTrafficMirrorTarget API operation for Amazon Elastic Compute Cloud. +// +// Creates a target for your Traffic Mirror session. +// +// A Traffic Mirror target is the destination for mirrored traffic. The Traffic +// Mirror source and the Traffic Mirror target (monitoring appliances) can be +// in the same VPC, or in different VPCs connected via VPC peering or a transit +// gateway. +// +// A Traffic Mirror target can be a network interface, or a Network Load Balancer. +// +// To use the target in a Traffic Mirror session, use CreateTrafficMirrorSession. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateTrafficMirrorTarget for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorTarget +func (c *EC2) CreateTrafficMirrorTarget(input *CreateTrafficMirrorTargetInput) (*CreateTrafficMirrorTargetOutput, error) { + req, out := c.CreateTrafficMirrorTargetRequest(input) + return out, req.Send() +} + +// CreateTrafficMirrorTargetWithContext is the same as CreateTrafficMirrorTarget with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTrafficMirrorTarget for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) CreateTrafficMirrorTargetWithContext(ctx aws.Context, input *CreateTrafficMirrorTargetInput, opts ...request.Option) (*CreateTrafficMirrorTargetOutput, error) { + req, out := c.CreateTrafficMirrorTargetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateTransitGateway = "CreateTransitGateway" // CreateTransitGatewayRequest generates a "aws/request.Request" representing the @@ -6289,10 +6610,10 @@ func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Reques // Any AWS Marketplace product codes from the snapshot are propagated to the // volume. // -// You can create encrypted volumes with the Encrypted parameter. Encrypted -// volumes may only be attached to instances that support Amazon EBS encryption. -// Volumes that are created from encrypted snapshots are also automatically -// encrypted. For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) +// You can create encrypted volumes. Encrypted volumes must be attached to instances +// that support Amazon EBS encryption. Volumes that are created from encrypted +// snapshots are also automatically encrypted. For more information, see Amazon +// EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) // in the Amazon Elastic Compute Cloud User Guide. // // You can tag your volumes during creation. For more information, see Tagging @@ -6377,7 +6698,7 @@ func (c *EC2) CreateVpcRequest(input *CreateVpcInput) (req *request.Request, out // Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can // create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 // netmask (65,536 IPv4 addresses). For more information about how large to -// make your VPC, see Your VPC and Subnets (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) +// make your VPC, see Your VPC and Subnets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html) // in the Amazon Virtual Private Cloud User Guide. // // You can optionally request an Amazon-provided IPv6 CIDR block for the VPC. @@ -6386,7 +6707,7 @@ func (c *EC2) CreateVpcRequest(input *CreateVpcInput) (req *request.Request, out // // By default, each instance you launch in the VPC has the default DHCP options, // which include only a default DNS server that we provide (AmazonProvidedDNS). -// For more information, see DHCP Options Sets (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) +// For more information, see DHCP Options Sets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html) // in the Amazon Virtual Private Cloud User Guide. // // You can specify the instance tenancy value for the VPC when you create it. @@ -6469,7 +6790,7 @@ func (c *EC2) CreateVpcEndpointRequest(input *CreateVpcEndpointInput) (req *requ // Creates a VPC endpoint for a specified service. An endpoint enables you to // create a private connection between your VPC and the service. The service // may be provided by AWS, an AWS Marketplace partner, or another AWS account. -// For more information, see VPC Endpoints (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-endpoints.html) +// For more information, see VPC Endpoints (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html) // in the Amazon Virtual Private Cloud User Guide. // // A gateway endpoint serves as a target for a route in your route table for @@ -6642,7 +6963,7 @@ func (c *EC2) CreateVpcEndpointServiceConfigurationRequest(input *CreateVpcEndpo // // To create an endpoint service configuration, you must first create a Network // Load Balancer for your service. For more information, see VPC Endpoint Services -// (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/endpoint-service.html) +// (https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6724,7 +7045,7 @@ func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectio // CIDR blocks. // // Limitations and rules apply to a VPC peering connection. For more information, -// see the limitations (https://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/vpc-peering-basics.html#vpc-peering-limitations) +// see the limitations (https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-basics.html#vpc-peering-limitations) // section in the VPC Peering Guide. // // The owner of the accepter VPC must accept the peering request to activate @@ -6807,7 +7128,7 @@ func (c *EC2) CreateVpnConnectionRequest(input *CreateVpnConnectionInput) (req * // CreateVpnConnection API operation for Amazon Elastic Compute Cloud. // // Creates a VPN connection between an existing virtual private gateway and -// a VPN customer gateway. The supported connection types are ipsec.1 and ipsec.2. +// a VPN customer gateway. The supported connection type is ipsec.1. // // The response includes information that you need to give to your network administrator // to configure your customer gateway. @@ -8385,6 +8706,80 @@ func (c *EC2) DeletePlacementGroupWithContext(ctx aws.Context, input *DeletePlac return out, req.Send() } +const opDeleteQueuedReservedInstances = "DeleteQueuedReservedInstances" + +// DeleteQueuedReservedInstancesRequest generates a "aws/request.Request" representing the +// client's request for the DeleteQueuedReservedInstances operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteQueuedReservedInstances for more information on using the DeleteQueuedReservedInstances +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteQueuedReservedInstancesRequest method. +// req, resp := client.DeleteQueuedReservedInstancesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteQueuedReservedInstances +func (c *EC2) DeleteQueuedReservedInstancesRequest(input *DeleteQueuedReservedInstancesInput) (req *request.Request, output *DeleteQueuedReservedInstancesOutput) { + op := &request.Operation{ + Name: opDeleteQueuedReservedInstances, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteQueuedReservedInstancesInput{} + } + + output = &DeleteQueuedReservedInstancesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteQueuedReservedInstances API operation for Amazon Elastic Compute Cloud. +// +// Deletes the queued purchases for the specified Reserved Instances. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DeleteQueuedReservedInstances for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteQueuedReservedInstances +func (c *EC2) DeleteQueuedReservedInstances(input *DeleteQueuedReservedInstancesInput) (*DeleteQueuedReservedInstancesOutput, error) { + req, out := c.DeleteQueuedReservedInstancesRequest(input) + return out, req.Send() +} + +// DeleteQueuedReservedInstancesWithContext is the same as DeleteQueuedReservedInstances with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteQueuedReservedInstances for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DeleteQueuedReservedInstancesWithContext(ctx aws.Context, input *DeleteQueuedReservedInstancesInput, opts ...request.Option) (*DeleteQueuedReservedInstancesOutput, error) { + req, out := c.DeleteQueuedReservedInstancesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteRoute = "DeleteRoute" // DeleteRouteRequest generates a "aws/request.Request" representing the @@ -8935,6 +9330,308 @@ func (c *EC2) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opt return out, req.Send() } +const opDeleteTrafficMirrorFilter = "DeleteTrafficMirrorFilter" + +// DeleteTrafficMirrorFilterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTrafficMirrorFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteTrafficMirrorFilter for more information on using the DeleteTrafficMirrorFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTrafficMirrorFilterRequest method. +// req, resp := client.DeleteTrafficMirrorFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTrafficMirrorFilter +func (c *EC2) DeleteTrafficMirrorFilterRequest(input *DeleteTrafficMirrorFilterInput) (req *request.Request, output *DeleteTrafficMirrorFilterOutput) { + op := &request.Operation{ + Name: opDeleteTrafficMirrorFilter, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTrafficMirrorFilterInput{} + } + + output = &DeleteTrafficMirrorFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTrafficMirrorFilter API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified Traffic Mirror filter. +// +// You cannot delete a Traffic Mirror filter that is in use by a Traffic Mirror +// session. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DeleteTrafficMirrorFilter for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTrafficMirrorFilter +func (c *EC2) DeleteTrafficMirrorFilter(input *DeleteTrafficMirrorFilterInput) (*DeleteTrafficMirrorFilterOutput, error) { + req, out := c.DeleteTrafficMirrorFilterRequest(input) + return out, req.Send() +} + +// DeleteTrafficMirrorFilterWithContext is the same as DeleteTrafficMirrorFilter with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTrafficMirrorFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DeleteTrafficMirrorFilterWithContext(ctx aws.Context, input *DeleteTrafficMirrorFilterInput, opts ...request.Option) (*DeleteTrafficMirrorFilterOutput, error) { + req, out := c.DeleteTrafficMirrorFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTrafficMirrorFilterRule = "DeleteTrafficMirrorFilterRule" + +// DeleteTrafficMirrorFilterRuleRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTrafficMirrorFilterRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteTrafficMirrorFilterRule for more information on using the DeleteTrafficMirrorFilterRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTrafficMirrorFilterRuleRequest method. +// req, resp := client.DeleteTrafficMirrorFilterRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTrafficMirrorFilterRule +func (c *EC2) DeleteTrafficMirrorFilterRuleRequest(input *DeleteTrafficMirrorFilterRuleInput) (req *request.Request, output *DeleteTrafficMirrorFilterRuleOutput) { + op := &request.Operation{ + Name: opDeleteTrafficMirrorFilterRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTrafficMirrorFilterRuleInput{} + } + + output = &DeleteTrafficMirrorFilterRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTrafficMirrorFilterRule API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified Traffic Mirror rule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DeleteTrafficMirrorFilterRule for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTrafficMirrorFilterRule +func (c *EC2) DeleteTrafficMirrorFilterRule(input *DeleteTrafficMirrorFilterRuleInput) (*DeleteTrafficMirrorFilterRuleOutput, error) { + req, out := c.DeleteTrafficMirrorFilterRuleRequest(input) + return out, req.Send() +} + +// DeleteTrafficMirrorFilterRuleWithContext is the same as DeleteTrafficMirrorFilterRule with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTrafficMirrorFilterRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DeleteTrafficMirrorFilterRuleWithContext(ctx aws.Context, input *DeleteTrafficMirrorFilterRuleInput, opts ...request.Option) (*DeleteTrafficMirrorFilterRuleOutput, error) { + req, out := c.DeleteTrafficMirrorFilterRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTrafficMirrorSession = "DeleteTrafficMirrorSession" + +// DeleteTrafficMirrorSessionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTrafficMirrorSession operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteTrafficMirrorSession for more information on using the DeleteTrafficMirrorSession +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTrafficMirrorSessionRequest method. +// req, resp := client.DeleteTrafficMirrorSessionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTrafficMirrorSession +func (c *EC2) DeleteTrafficMirrorSessionRequest(input *DeleteTrafficMirrorSessionInput) (req *request.Request, output *DeleteTrafficMirrorSessionOutput) { + op := &request.Operation{ + Name: opDeleteTrafficMirrorSession, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTrafficMirrorSessionInput{} + } + + output = &DeleteTrafficMirrorSessionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTrafficMirrorSession API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified Traffic Mirror session. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DeleteTrafficMirrorSession for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTrafficMirrorSession +func (c *EC2) DeleteTrafficMirrorSession(input *DeleteTrafficMirrorSessionInput) (*DeleteTrafficMirrorSessionOutput, error) { + req, out := c.DeleteTrafficMirrorSessionRequest(input) + return out, req.Send() +} + +// DeleteTrafficMirrorSessionWithContext is the same as DeleteTrafficMirrorSession with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTrafficMirrorSession for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DeleteTrafficMirrorSessionWithContext(ctx aws.Context, input *DeleteTrafficMirrorSessionInput, opts ...request.Option) (*DeleteTrafficMirrorSessionOutput, error) { + req, out := c.DeleteTrafficMirrorSessionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTrafficMirrorTarget = "DeleteTrafficMirrorTarget" + +// DeleteTrafficMirrorTargetRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTrafficMirrorTarget operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteTrafficMirrorTarget for more information on using the DeleteTrafficMirrorTarget +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTrafficMirrorTargetRequest method. +// req, resp := client.DeleteTrafficMirrorTargetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTrafficMirrorTarget +func (c *EC2) DeleteTrafficMirrorTargetRequest(input *DeleteTrafficMirrorTargetInput) (req *request.Request, output *DeleteTrafficMirrorTargetOutput) { + op := &request.Operation{ + Name: opDeleteTrafficMirrorTarget, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTrafficMirrorTargetInput{} + } + + output = &DeleteTrafficMirrorTargetOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTrafficMirrorTarget API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified Traffic Mirror target. +// +// You cannot delete a Traffic Mirror target that is in use by a Traffic Mirror +// session. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DeleteTrafficMirrorTarget for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTrafficMirrorTarget +func (c *EC2) DeleteTrafficMirrorTarget(input *DeleteTrafficMirrorTargetInput) (*DeleteTrafficMirrorTargetOutput, error) { + req, out := c.DeleteTrafficMirrorTargetRequest(input) + return out, req.Send() +} + +// DeleteTrafficMirrorTargetWithContext is the same as DeleteTrafficMirrorTarget with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTrafficMirrorTarget for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DeleteTrafficMirrorTargetWithContext(ctx aws.Context, input *DeleteTrafficMirrorTargetInput, opts ...request.Option) (*DeleteTrafficMirrorTargetOutput, error) { + req, out := c.DeleteTrafficMirrorTargetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteTransitGateway = "DeleteTransitGateway" // DeleteTransitGatewayRequest generates a "aws/request.Request" representing the @@ -11775,7 +12472,7 @@ func (c *EC2) DescribeDhcpOptionsRequest(input *DescribeDhcpOptionsInput) (req * // // Describes one or more of your DHCP options sets. // -// For more information, see DHCP Options Sets (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) +// For more information, see DHCP Options Sets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -12062,6 +12759,80 @@ func (c *EC2) DescribeElasticGpusWithContext(ctx aws.Context, input *DescribeEla return out, req.Send() } +const opDescribeExportImageTasks = "DescribeExportImageTasks" + +// DescribeExportImageTasksRequest generates a "aws/request.Request" representing the +// client's request for the DescribeExportImageTasks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeExportImageTasks for more information on using the DescribeExportImageTasks +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeExportImageTasksRequest method. +// req, resp := client.DescribeExportImageTasksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportImageTasks +func (c *EC2) DescribeExportImageTasksRequest(input *DescribeExportImageTasksInput) (req *request.Request, output *DescribeExportImageTasksOutput) { + op := &request.Operation{ + Name: opDescribeExportImageTasks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeExportImageTasksInput{} + } + + output = &DescribeExportImageTasksOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeExportImageTasks API operation for Amazon Elastic Compute Cloud. +// +// Describes the specified export image tasks or all your export image tasks. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeExportImageTasks for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportImageTasks +func (c *EC2) DescribeExportImageTasks(input *DescribeExportImageTasksInput) (*DescribeExportImageTasksOutput, error) { + req, out := c.DescribeExportImageTasksRequest(input) + return out, req.Send() +} + +// DescribeExportImageTasksWithContext is the same as DescribeExportImageTasks with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeExportImageTasks for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeExportImageTasksWithContext(ctx aws.Context, input *DescribeExportImageTasksInput, opts ...request.Option) (*DescribeExportImageTasksOutput, error) { + req, out := c.DescribeExportImageTasksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeExportTasks = "DescribeExportTasks" // DescribeExportTasksRequest generates a "aws/request.Request" representing the @@ -12106,7 +12877,8 @@ func (c *EC2) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req * // DescribeExportTasks API operation for Amazon Elastic Compute Cloud. // -// Describes the specified export tasks or all your export tasks. +// Describes the specified export instance tasks or all your export instance +// tasks. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -14318,7 +15090,7 @@ func (c *EC2) DescribeInstancesRequest(input *DescribeInstancesInput) (req *requ // DescribeInstances API operation for Amazon Elastic Compute Cloud. // -// Describes the specified instances or all of your instances. +// Describes the specified instances or all of AWS account's instances. // // If you specify one or more instance IDs, Amazon EC2 returns information for // those instances. If you do not specify instance IDs, Amazon EC2 returns information @@ -15195,7 +15967,7 @@ func (c *EC2) DescribeNetworkAclsRequest(input *DescribeNetworkAclsInput) (req * // // Describes one or more of your network ACLs. // -// For more information, see Network ACLs (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) +// For more information, see Network ACLs (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -16140,15 +16912,15 @@ func (c *EC2) DescribeRegionsRequest(input *DescribeRegionsInput) (req *request. // DescribeRegions API operation for Amazon Elastic Compute Cloud. // -// Describes the Regions that are currently available to you. The API returns -// a list of all the Regions, including Regions that are disabled for your account. -// For information about enabling Regions for your account, see Enabling and -// Disabling Regions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-account-payment.html#manage-account-payment-enable-disable-regions) -// in the AWS Billing and Cost Management User Guide. +// Describes the Regions that are enabled for your account, or all Regions. // // For a list of the Regions supported by Amazon EC2, see Regions and Endpoints // (https://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region). // +// For information about enabling and disabling Regions for your account, see +// Managing AWS Regions (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html) +// in the AWS General Reference. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -16683,7 +17455,7 @@ func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req * // with the main route table. This command does not return the subnet ID for // implicit associations. // -// For more information, see Route Tables (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) +// For more information, see Route Tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -18329,7 +19101,7 @@ func (c *EC2) DescribeSubnetsRequest(input *DescribeSubnetsInput) (req *request. // // Describes one or more of your subnets. // -// For more information, see Your VPC and Subnets (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) +// For more information, see Your VPC and Subnets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -18543,6 +19315,397 @@ func (c *EC2) DescribeTagsPagesWithContext(ctx aws.Context, input *DescribeTagsI return p.Err() } +const opDescribeTrafficMirrorFilters = "DescribeTrafficMirrorFilters" + +// DescribeTrafficMirrorFiltersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTrafficMirrorFilters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTrafficMirrorFilters for more information on using the DescribeTrafficMirrorFilters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTrafficMirrorFiltersRequest method. +// req, resp := client.DescribeTrafficMirrorFiltersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTrafficMirrorFilters +func (c *EC2) DescribeTrafficMirrorFiltersRequest(input *DescribeTrafficMirrorFiltersInput) (req *request.Request, output *DescribeTrafficMirrorFiltersOutput) { + op := &request.Operation{ + Name: opDescribeTrafficMirrorFilters, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeTrafficMirrorFiltersInput{} + } + + output = &DescribeTrafficMirrorFiltersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTrafficMirrorFilters API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more Traffic Mirror filters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeTrafficMirrorFilters for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTrafficMirrorFilters +func (c *EC2) DescribeTrafficMirrorFilters(input *DescribeTrafficMirrorFiltersInput) (*DescribeTrafficMirrorFiltersOutput, error) { + req, out := c.DescribeTrafficMirrorFiltersRequest(input) + return out, req.Send() +} + +// DescribeTrafficMirrorFiltersWithContext is the same as DescribeTrafficMirrorFilters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTrafficMirrorFilters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeTrafficMirrorFiltersWithContext(ctx aws.Context, input *DescribeTrafficMirrorFiltersInput, opts ...request.Option) (*DescribeTrafficMirrorFiltersOutput, error) { + req, out := c.DescribeTrafficMirrorFiltersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeTrafficMirrorFiltersPages iterates over the pages of a DescribeTrafficMirrorFilters operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTrafficMirrorFilters method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeTrafficMirrorFilters operation. +// pageNum := 0 +// err := client.DescribeTrafficMirrorFiltersPages(params, +// func(page *ec2.DescribeTrafficMirrorFiltersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeTrafficMirrorFiltersPages(input *DescribeTrafficMirrorFiltersInput, fn func(*DescribeTrafficMirrorFiltersOutput, bool) bool) error { + return c.DescribeTrafficMirrorFiltersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTrafficMirrorFiltersPagesWithContext same as DescribeTrafficMirrorFiltersPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeTrafficMirrorFiltersPagesWithContext(ctx aws.Context, input *DescribeTrafficMirrorFiltersInput, fn func(*DescribeTrafficMirrorFiltersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTrafficMirrorFiltersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTrafficMirrorFiltersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeTrafficMirrorFiltersOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeTrafficMirrorSessions = "DescribeTrafficMirrorSessions" + +// DescribeTrafficMirrorSessionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTrafficMirrorSessions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTrafficMirrorSessions for more information on using the DescribeTrafficMirrorSessions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTrafficMirrorSessionsRequest method. +// req, resp := client.DescribeTrafficMirrorSessionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTrafficMirrorSessions +func (c *EC2) DescribeTrafficMirrorSessionsRequest(input *DescribeTrafficMirrorSessionsInput) (req *request.Request, output *DescribeTrafficMirrorSessionsOutput) { + op := &request.Operation{ + Name: opDescribeTrafficMirrorSessions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeTrafficMirrorSessionsInput{} + } + + output = &DescribeTrafficMirrorSessionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTrafficMirrorSessions API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror +// sessions are described. Alternatively, you can filter the results. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeTrafficMirrorSessions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTrafficMirrorSessions +func (c *EC2) DescribeTrafficMirrorSessions(input *DescribeTrafficMirrorSessionsInput) (*DescribeTrafficMirrorSessionsOutput, error) { + req, out := c.DescribeTrafficMirrorSessionsRequest(input) + return out, req.Send() +} + +// DescribeTrafficMirrorSessionsWithContext is the same as DescribeTrafficMirrorSessions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTrafficMirrorSessions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeTrafficMirrorSessionsWithContext(ctx aws.Context, input *DescribeTrafficMirrorSessionsInput, opts ...request.Option) (*DescribeTrafficMirrorSessionsOutput, error) { + req, out := c.DescribeTrafficMirrorSessionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeTrafficMirrorSessionsPages iterates over the pages of a DescribeTrafficMirrorSessions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTrafficMirrorSessions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeTrafficMirrorSessions operation. +// pageNum := 0 +// err := client.DescribeTrafficMirrorSessionsPages(params, +// func(page *ec2.DescribeTrafficMirrorSessionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeTrafficMirrorSessionsPages(input *DescribeTrafficMirrorSessionsInput, fn func(*DescribeTrafficMirrorSessionsOutput, bool) bool) error { + return c.DescribeTrafficMirrorSessionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTrafficMirrorSessionsPagesWithContext same as DescribeTrafficMirrorSessionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeTrafficMirrorSessionsPagesWithContext(ctx aws.Context, input *DescribeTrafficMirrorSessionsInput, fn func(*DescribeTrafficMirrorSessionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTrafficMirrorSessionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTrafficMirrorSessionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeTrafficMirrorSessionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeTrafficMirrorTargets = "DescribeTrafficMirrorTargets" + +// DescribeTrafficMirrorTargetsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTrafficMirrorTargets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTrafficMirrorTargets for more information on using the DescribeTrafficMirrorTargets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTrafficMirrorTargetsRequest method. +// req, resp := client.DescribeTrafficMirrorTargetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTrafficMirrorTargets +func (c *EC2) DescribeTrafficMirrorTargetsRequest(input *DescribeTrafficMirrorTargetsInput) (req *request.Request, output *DescribeTrafficMirrorTargetsOutput) { + op := &request.Operation{ + Name: opDescribeTrafficMirrorTargets, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeTrafficMirrorTargetsInput{} + } + + output = &DescribeTrafficMirrorTargetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTrafficMirrorTargets API operation for Amazon Elastic Compute Cloud. +// +// Information about one or more Traffic Mirror targets. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeTrafficMirrorTargets for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTrafficMirrorTargets +func (c *EC2) DescribeTrafficMirrorTargets(input *DescribeTrafficMirrorTargetsInput) (*DescribeTrafficMirrorTargetsOutput, error) { + req, out := c.DescribeTrafficMirrorTargetsRequest(input) + return out, req.Send() +} + +// DescribeTrafficMirrorTargetsWithContext is the same as DescribeTrafficMirrorTargets with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTrafficMirrorTargets for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeTrafficMirrorTargetsWithContext(ctx aws.Context, input *DescribeTrafficMirrorTargetsInput, opts ...request.Option) (*DescribeTrafficMirrorTargetsOutput, error) { + req, out := c.DescribeTrafficMirrorTargetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeTrafficMirrorTargetsPages iterates over the pages of a DescribeTrafficMirrorTargets operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTrafficMirrorTargets method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeTrafficMirrorTargets operation. +// pageNum := 0 +// err := client.DescribeTrafficMirrorTargetsPages(params, +// func(page *ec2.DescribeTrafficMirrorTargetsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeTrafficMirrorTargetsPages(input *DescribeTrafficMirrorTargetsInput, fn func(*DescribeTrafficMirrorTargetsOutput, bool) bool) error { + return c.DescribeTrafficMirrorTargetsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTrafficMirrorTargetsPagesWithContext same as DescribeTrafficMirrorTargetsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeTrafficMirrorTargetsPagesWithContext(ctx aws.Context, input *DescribeTrafficMirrorTargetsInput, fn func(*DescribeTrafficMirrorTargetsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTrafficMirrorTargetsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTrafficMirrorTargetsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeTrafficMirrorTargetsOutput), !p.HasNextPage()) + } + return p.Err() +} + const opDescribeTransitGatewayAttachments = "DescribeTransitGatewayAttachments" // DescribeTransitGatewayAttachmentsRequest generates a "aws/request.Request" representing the @@ -21462,16 +22625,16 @@ func (c *EC2) DisableEbsEncryptionByDefaultRequest(input *DisableEbsEncryptionBy // DisableEbsEncryptionByDefault API operation for Amazon Elastic Compute Cloud. // -// Disables default encryption for EBS volumes that are created in your account -// in the current region. +// Disables EBS encryption by default for your account in the current Region. // -// Call this API if you have enabled default encryption using EnableEbsEncryptionByDefault -// and want to disable default EBS encryption. Once default EBS encryption is -// disabled, you can still create an encrypted volume by setting encrypted to -// true in the API call that creates the volume. +// After you disable encryption by default, you can still create encrypted volumes +// by enabling encryption when you create each volume. // -// Disabling default EBS encryption will not change the encryption status of -// any of your existing volumes. +// Disabling encryption by default does not change the encryption status of +// your existing volumes. +// +// For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) +// in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -22097,7 +23260,7 @@ func (c *EC2) DisassociateRouteTableRequest(input *DisassociateRouteTableInput) // // After you perform this action, the subnet no longer uses the routes in the // route table. Instead, it uses the routes in the VPC's main route table. For -// more information about route tables, see Route Tables (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) +// more information about route tables, see Route Tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -22402,32 +23565,23 @@ func (c *EC2) EnableEbsEncryptionByDefaultRequest(input *EnableEbsEncryptionByDe // EnableEbsEncryptionByDefault API operation for Amazon Elastic Compute Cloud. // -// Enables default encryption for EBS volumes that are created in your account -// in the current region. +// Enables EBS encryption by default for your account in the current Region. // -// Once encryption is enabled with this action, EBS volumes that are created -// in your account will always be encrypted even if encryption is not specified -// at launch. This setting overrides the encrypted setting to true in all API -// calls that create EBS volumes in your account. A volume will be encrypted -// even if you specify encryption to be false in the API call that creates the -// volume. -// -// If you do not specify a customer master key (CMK) in the API call that creates -// the EBS volume, then the volume is encrypted to your AWS account's default -// CMK. +// After you enable encryption by default, the EBS volumes that you create are +// are always encrypted, either using the default CMK or the CMK that you specified +// when you created each volume. For more information, see Amazon EBS Encryption +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) +// in the Amazon Elastic Compute Cloud User Guide. // -// You can specify a default CMK of your choice using ModifyEbsDefaultKmsKeyId. +// You can specify the default CMK for encryption by default using ModifyEbsDefaultKmsKeyId +// or ResetEbsDefaultKmsKeyId. // -// Enabling default encryption for EBS volumes has no effect on existing unencrypted -// volumes in your account. Encrypting the data in these requires manual action. -// You can either create an encrypted snapshot of an unencrypted volume, or -// encrypt a copy of an unencrypted snapshot. Any volume restored from an encrypted -// snapshot is also encrypted. For more information, see Amazon EBS Snapshots -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html). +// Enabling encryption by default has no effect on the encryption status of +// your existing volumes. // -// After EBS encryption by default is enabled, you can no longer launch older-generation -// instance types that do not support encryption. For more information, see -// Supported Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances). +// After you enable encryption by default, you can no longer launch instances +// using instance types that do not support encryption. For more information, +// see Supported Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -22996,6 +24150,82 @@ func (c *EC2) ExportClientVpnClientConfigurationWithContext(ctx aws.Context, inp return out, req.Send() } +const opExportImage = "ExportImage" + +// ExportImageRequest generates a "aws/request.Request" representing the +// client's request for the ExportImage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ExportImage for more information on using the ExportImage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ExportImageRequest method. +// req, resp := client.ExportImageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportImage +func (c *EC2) ExportImageRequest(input *ExportImageInput) (req *request.Request, output *ExportImageOutput) { + op := &request.Operation{ + Name: opExportImage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ExportImageInput{} + } + + output = &ExportImageOutput{} + req = c.newRequest(op, input, output) + return +} + +// ExportImage API operation for Amazon Elastic Compute Cloud. +// +// Exports an Amazon Machine Image (AMI) to a VM file. For more information, +// see Exporting a VM Directory from an Amazon Machine Image (AMI) (https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport_image.html) +// in the VM Import/Export User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ExportImage for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportImage +func (c *EC2) ExportImage(input *ExportImageInput) (*ExportImageOutput, error) { + req, out := c.ExportImageRequest(input) + return out, req.Send() +} + +// ExportImageWithContext is the same as ExportImage with the addition of +// the ability to pass a context and additional request options. +// +// See ExportImage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ExportImageWithContext(ctx aws.Context, input *ExportImageInput, opts ...request.Option) (*ExportImageOutput, error) { + req, out := c.ExportImageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opExportTransitGatewayRoutes = "ExportTransitGatewayRoutes" // ExportTransitGatewayRoutesRequest generates a "aws/request.Request" representing the @@ -23072,6 +24302,84 @@ func (c *EC2) ExportTransitGatewayRoutesWithContext(ctx aws.Context, input *Expo return out, req.Send() } +const opGetCapacityReservationUsage = "GetCapacityReservationUsage" + +// GetCapacityReservationUsageRequest generates a "aws/request.Request" representing the +// client's request for the GetCapacityReservationUsage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCapacityReservationUsage for more information on using the GetCapacityReservationUsage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCapacityReservationUsageRequest method. +// req, resp := client.GetCapacityReservationUsageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetCapacityReservationUsage +func (c *EC2) GetCapacityReservationUsageRequest(input *GetCapacityReservationUsageInput) (req *request.Request, output *GetCapacityReservationUsageOutput) { + op := &request.Operation{ + Name: opGetCapacityReservationUsage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetCapacityReservationUsageInput{} + } + + output = &GetCapacityReservationUsageOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCapacityReservationUsage API operation for Amazon Elastic Compute Cloud. +// +// Gets usage information about a Capacity Reservation. If the Capacity Reservation +// is shared, it shows usage information for the Capacity Reservation owner +// and each AWS account that is currently using the shared capacity. If the +// Capacity Reservation is not shared, it shows only the Capacity Reservation +// owner's usage. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation GetCapacityReservationUsage for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetCapacityReservationUsage +func (c *EC2) GetCapacityReservationUsage(input *GetCapacityReservationUsageInput) (*GetCapacityReservationUsageOutput, error) { + req, out := c.GetCapacityReservationUsageRequest(input) + return out, req.Send() +} + +// GetCapacityReservationUsageWithContext is the same as GetCapacityReservationUsage with the addition of +// the ability to pass a context and additional request options. +// +// See GetCapacityReservationUsage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) GetCapacityReservationUsageWithContext(ctx aws.Context, input *GetCapacityReservationUsageInput, opts ...request.Option) (*GetCapacityReservationUsageOutput, error) { + req, out := c.GetCapacityReservationUsageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetConsoleOutput = "GetConsoleOutput" // GetConsoleOutputRequest generates a "aws/request.Request" representing the @@ -23282,9 +24590,12 @@ func (c *EC2) GetEbsDefaultKmsKeyIdRequest(input *GetEbsDefaultKmsKeyIdInput) (r // GetEbsDefaultKmsKeyId API operation for Amazon Elastic Compute Cloud. // -// Describes the default customer master key (CMK) that your account uses to -// encrypt EBS volumes if you don’t specify a CMK in the API call. You can -// change this default using ModifyEbsDefaultKmsKeyId. +// Describes the default customer master key (CMK) for EBS encryption by default +// for your account in this Region. You can change the default CMK for encryption +// by default using ModifyEbsDefaultKmsKeyId or ResetEbsDefaultKmsKeyId. +// +// For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) +// in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -23358,8 +24669,11 @@ func (c *EC2) GetEbsEncryptionByDefaultRequest(input *GetEbsEncryptionByDefaultI // GetEbsEncryptionByDefault API operation for Amazon Elastic Compute Cloud. // -// Describes whether default EBS encryption is enabled for your account in the -// current region. +// Describes whether EBS encryption by default is enabled for your account in +// the current Region. +// +// For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) +// in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -24772,16 +26086,19 @@ func (c *EC2) ModifyEbsDefaultKmsKeyIdRequest(input *ModifyEbsDefaultKmsKeyIdInp // ModifyEbsDefaultKmsKeyId API operation for Amazon Elastic Compute Cloud. // -// Changes the default customer master key (CMK) that your account uses to encrypt -// EBS volumes if you don't specify a CMK in the API call. +// Changes the default customer master key (CMK) for EBS encryption by default +// for your account in this Region. +// +// AWS creates a unique AWS managed CMK in each Region for use with encryption +// by default. If you change the default CMK to a customer managed CMK, it is +// used instead of the AWS managed CMK. To reset the default CMK to the AWS +// managed CMK for EBS, use ResetEbsDefaultKmsKeyId. // -// Your account has an AWS-managed default CMK that is used for encrypting an -// EBS volume when no CMK is specified in the API call that creates the volume. -// By calling this API, you can specify a customer-managed CMK to use in place -// of the AWS-managed default CMK. +// If you delete or disable the customer managed CMK that you specified for +// use with encryption by default, your instances will fail to launch. // -// Note: Deleting or disabling the custom CMK that you have specified to act -// as your default CMK will result in instance-launch failures. +// For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) +// in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -24857,8 +26174,35 @@ func (c *EC2) ModifyFleetRequest(input *ModifyFleetInput) (req *request.Request, // // Modifies the specified EC2 Fleet. // +// You can only modify an EC2 Fleet request of type maintain. +// // While the EC2 Fleet is being modified, it is in the modifying state. // +// To scale up your EC2 Fleet, increase its target capacity. The EC2 Fleet launches +// the additional Spot Instances according to the allocation strategy for the +// EC2 Fleet request. If the allocation strategy is lowestPrice, the EC2 Fleet +// launches instances using the Spot Instance pool with the lowest price. If +// the allocation strategy is diversified, the EC2 Fleet distributes the instances +// across the Spot Instance pools. If the allocation strategy is capacityOptimized, +// EC2 Fleet launches instances from Spot Instance pools with optimal capacity +// for the number of instances that are launching. +// +// To scale down your EC2 Fleet, decrease its target capacity. First, the EC2 +// Fleet cancels any open requests that exceed the new target capacity. You +// can request that the EC2 Fleet terminate Spot Instances until the size of +// the fleet no longer exceeds the new target capacity. If the allocation strategy +// is lowestPrice, the EC2 Fleet terminates the instances with the highest price +// per unit. If the allocation strategy is capacityOptimized, the EC2 Fleet +// terminates the instances in the Spot Instance pools that have the least available +// Spot Instance capacity. If the allocation strategy is diversified, the EC2 +// Fleet terminates instances across the Spot Instance pools. Alternatively, +// you can request that the EC2 Fleet keep the fleet at its current size, but +// not replace any Spot Instances that are interrupted or that you terminate +// manually. +// +// If you are finished with your EC2 Fleet for now, but will use it again later, +// you can set the target capacity to 0. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -26009,9 +27353,9 @@ func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput // // Adds or removes permission settings for the specified snapshot. You may add // or remove specified AWS account IDs from a snapshot's list of create volume -// permissions, but you cannot do both in a single API call. If you need to -// both add and remove account IDs for a snapshot, you must use multiple API -// calls. +// permissions, but you cannot do both in a single operation. If you need to +// both add and remove account IDs for a snapshot, you must use multiple operations. +// You can make up to 500 modifications to a snapshot in a single operation. // // Encrypted snapshots and snapshots with AWS Marketplace product codes cannot // be made public. Snapshots encrypted with your default CMK cannot be shared @@ -26102,19 +27446,24 @@ func (c *EC2) ModifySpotFleetRequestRequest(input *ModifySpotFleetRequestInput) // To scale up your Spot Fleet, increase its target capacity. The Spot Fleet // launches the additional Spot Instances according to the allocation strategy // for the Spot Fleet request. If the allocation strategy is lowestPrice, the -// Spot Fleet launches instances using the Spot pool with the lowest price. -// If the allocation strategy is diversified, the Spot Fleet distributes the -// instances across the Spot pools. +// Spot Fleet launches instances using the Spot Instance pool with the lowest +// price. If the allocation strategy is diversified, the Spot Fleet distributes +// the instances across the Spot Instance pools. If the allocation strategy +// is capacityOptimized, Spot Fleet launches instances from Spot Instance pools +// with optimal capacity for the number of instances that are launching. // // To scale down your Spot Fleet, decrease its target capacity. First, the Spot // Fleet cancels any open requests that exceed the new target capacity. You // can request that the Spot Fleet terminate Spot Instances until the size of // the fleet no longer exceeds the new target capacity. If the allocation strategy // is lowestPrice, the Spot Fleet terminates the instances with the highest -// price per unit. If the allocation strategy is diversified, the Spot Fleet -// terminates instances across the Spot pools. Alternatively, you can request -// that the Spot Fleet keep the fleet at its current size, but not replace any -// Spot Instances that are interrupted or that you terminate manually. +// price per unit. If the allocation strategy is capacityOptimized, the Spot +// Fleet terminates the instances in the Spot Instance pools that have the least +// available Spot Instance capacity. If the allocation strategy is diversified, +// the Spot Fleet terminates instances across the Spot Instance pools. Alternatively, +// you can request that the Spot Fleet keep the fleet at its current size, but +// not replace any Spot Instances that are interrupted or that you terminate +// manually. // // If you are finished with your Spot Fleet for now, but will use it again later, // you can set the target capacity to 0. @@ -26222,6 +27571,241 @@ func (c *EC2) ModifySubnetAttributeWithContext(ctx aws.Context, input *ModifySub return out, req.Send() } +const opModifyTrafficMirrorFilterNetworkServices = "ModifyTrafficMirrorFilterNetworkServices" + +// ModifyTrafficMirrorFilterNetworkServicesRequest generates a "aws/request.Request" representing the +// client's request for the ModifyTrafficMirrorFilterNetworkServices operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyTrafficMirrorFilterNetworkServices for more information on using the ModifyTrafficMirrorFilterNetworkServices +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyTrafficMirrorFilterNetworkServicesRequest method. +// req, resp := client.ModifyTrafficMirrorFilterNetworkServicesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTrafficMirrorFilterNetworkServices +func (c *EC2) ModifyTrafficMirrorFilterNetworkServicesRequest(input *ModifyTrafficMirrorFilterNetworkServicesInput) (req *request.Request, output *ModifyTrafficMirrorFilterNetworkServicesOutput) { + op := &request.Operation{ + Name: opModifyTrafficMirrorFilterNetworkServices, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyTrafficMirrorFilterNetworkServicesInput{} + } + + output = &ModifyTrafficMirrorFilterNetworkServicesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyTrafficMirrorFilterNetworkServices API operation for Amazon Elastic Compute Cloud. +// +// Allows or restricts mirroring network services. +// +// By default, Amazon DNS network services are not eligible for Traffic Mirror. +// Use AddNetworkServices to add network services to a Traffic Mirror filter. +// When a network service is added to the Traffic Mirror filter, all traffic +// related to that network service will be mirrored. When you no longer want +// to mirror network services, use RemoveNetworkServices to remove the network +// services from the Traffic Mirror filter. +// +// FFor information about filter rule properties, see Network Services (https://docs.aws.amazon.com/vpc/latest/mirroring/traffic-mirroring-considerations.html#traffic-mirroring-network-services) +// in the Traffic Mirroring User Guide . +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ModifyTrafficMirrorFilterNetworkServices for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTrafficMirrorFilterNetworkServices +func (c *EC2) ModifyTrafficMirrorFilterNetworkServices(input *ModifyTrafficMirrorFilterNetworkServicesInput) (*ModifyTrafficMirrorFilterNetworkServicesOutput, error) { + req, out := c.ModifyTrafficMirrorFilterNetworkServicesRequest(input) + return out, req.Send() +} + +// ModifyTrafficMirrorFilterNetworkServicesWithContext is the same as ModifyTrafficMirrorFilterNetworkServices with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyTrafficMirrorFilterNetworkServices for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ModifyTrafficMirrorFilterNetworkServicesWithContext(ctx aws.Context, input *ModifyTrafficMirrorFilterNetworkServicesInput, opts ...request.Option) (*ModifyTrafficMirrorFilterNetworkServicesOutput, error) { + req, out := c.ModifyTrafficMirrorFilterNetworkServicesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyTrafficMirrorFilterRule = "ModifyTrafficMirrorFilterRule" + +// ModifyTrafficMirrorFilterRuleRequest generates a "aws/request.Request" representing the +// client's request for the ModifyTrafficMirrorFilterRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyTrafficMirrorFilterRule for more information on using the ModifyTrafficMirrorFilterRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyTrafficMirrorFilterRuleRequest method. +// req, resp := client.ModifyTrafficMirrorFilterRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTrafficMirrorFilterRule +func (c *EC2) ModifyTrafficMirrorFilterRuleRequest(input *ModifyTrafficMirrorFilterRuleInput) (req *request.Request, output *ModifyTrafficMirrorFilterRuleOutput) { + op := &request.Operation{ + Name: opModifyTrafficMirrorFilterRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyTrafficMirrorFilterRuleInput{} + } + + output = &ModifyTrafficMirrorFilterRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyTrafficMirrorFilterRule API operation for Amazon Elastic Compute Cloud. +// +// Modifies the specified Traffic Mirror rule. +// +// DestinationCidrBlock and SourceCidrBlock must both be an IPv4 range or an +// IPv6 range. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ModifyTrafficMirrorFilterRule for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTrafficMirrorFilterRule +func (c *EC2) ModifyTrafficMirrorFilterRule(input *ModifyTrafficMirrorFilterRuleInput) (*ModifyTrafficMirrorFilterRuleOutput, error) { + req, out := c.ModifyTrafficMirrorFilterRuleRequest(input) + return out, req.Send() +} + +// ModifyTrafficMirrorFilterRuleWithContext is the same as ModifyTrafficMirrorFilterRule with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyTrafficMirrorFilterRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ModifyTrafficMirrorFilterRuleWithContext(ctx aws.Context, input *ModifyTrafficMirrorFilterRuleInput, opts ...request.Option) (*ModifyTrafficMirrorFilterRuleOutput, error) { + req, out := c.ModifyTrafficMirrorFilterRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyTrafficMirrorSession = "ModifyTrafficMirrorSession" + +// ModifyTrafficMirrorSessionRequest generates a "aws/request.Request" representing the +// client's request for the ModifyTrafficMirrorSession operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyTrafficMirrorSession for more information on using the ModifyTrafficMirrorSession +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyTrafficMirrorSessionRequest method. +// req, resp := client.ModifyTrafficMirrorSessionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTrafficMirrorSession +func (c *EC2) ModifyTrafficMirrorSessionRequest(input *ModifyTrafficMirrorSessionInput) (req *request.Request, output *ModifyTrafficMirrorSessionOutput) { + op := &request.Operation{ + Name: opModifyTrafficMirrorSession, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyTrafficMirrorSessionInput{} + } + + output = &ModifyTrafficMirrorSessionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyTrafficMirrorSession API operation for Amazon Elastic Compute Cloud. +// +// Modifies a Traffic Mirror session. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ModifyTrafficMirrorSession for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTrafficMirrorSession +func (c *EC2) ModifyTrafficMirrorSession(input *ModifyTrafficMirrorSessionInput) (*ModifyTrafficMirrorSessionOutput, error) { + req, out := c.ModifyTrafficMirrorSessionRequest(input) + return out, req.Send() +} + +// ModifyTrafficMirrorSessionWithContext is the same as ModifyTrafficMirrorSession with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyTrafficMirrorSession for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ModifyTrafficMirrorSessionWithContext(ctx aws.Context, input *ModifyTrafficMirrorSessionInput, opts ...request.Option) (*ModifyTrafficMirrorSessionOutput, error) { + req, out := c.ModifyTrafficMirrorSessionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyTransitGatewayVpcAttachment = "ModifyTransitGatewayVpcAttachment" // ModifyTransitGatewayVpcAttachmentRequest generates a "aws/request.Request" representing the @@ -26359,9 +27943,9 @@ func (c *EC2) ModifyVolumeRequest(input *ModifyVolumeInput) (req *request.Reques // You can use CloudWatch Events to check the status of a modification to an // EBS volume. For information about CloudWatch Events, see the Amazon CloudWatch // Events User Guide (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/). -// You can also track the status of a modification using the DescribeVolumesModifications -// API. For information about tracking status changes using either method, see -// Monitoring Volume Modifications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods). +// You can also track the status of a modification using DescribeVolumesModifications. +// For information about tracking status changes using either method, see Monitoring +// Volume Modifications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods). // // With previous-generation instance types, resizing an EBS volume may require // detaching and reattaching the volume or stopping and restarting the instance. @@ -26606,7 +28190,7 @@ func (c *EC2) ModifyVpcEndpointRequest(input *ModifyVpcEndpointInput) (req *requ // // Modifies attributes of a specified VPC endpoint. The attributes that you // can modify depend on the type of VPC endpoint (interface or gateway). For -// more information, see VPC Endpoints (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-endpoints.html) +// more information, see VPC Endpoints (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -26834,7 +28418,7 @@ func (c *EC2) ModifyVpcEndpointServicePermissionsRequest(input *ModifyVpcEndpoin // ModifyVpcEndpointServicePermissions API operation for Amazon Elastic Compute Cloud. // -// Modifies the permissions for your VPC endpoint service (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/endpoint-service.html). +// Modifies the permissions for your VPC endpoint service (https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html). // You can add or remove permissions for service consumers (IAM users, IAM roles, // and AWS accounts) to connect to your endpoint service. // @@ -27095,7 +28679,7 @@ func (c *EC2) ModifyVpnConnectionRequest(input *ModifyVpnConnectionInput) (req * // ModifyVpnConnection API operation for Amazon Elastic Compute Cloud. // -// Modifies the target gateway of a AWS Site-to-Site VPN connection. The following +// Modifies the target gateway of an AWS Site-to-Site VPN connection. The following // migration options are available: // // * An existing virtual private gateway to a new virtual private gateway @@ -27164,6 +28748,158 @@ func (c *EC2) ModifyVpnConnectionWithContext(ctx aws.Context, input *ModifyVpnCo return out, req.Send() } +const opModifyVpnTunnelCertificate = "ModifyVpnTunnelCertificate" + +// ModifyVpnTunnelCertificateRequest generates a "aws/request.Request" representing the +// client's request for the ModifyVpnTunnelCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyVpnTunnelCertificate for more information on using the ModifyVpnTunnelCertificate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyVpnTunnelCertificateRequest method. +// req, resp := client.ModifyVpnTunnelCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpnTunnelCertificate +func (c *EC2) ModifyVpnTunnelCertificateRequest(input *ModifyVpnTunnelCertificateInput) (req *request.Request, output *ModifyVpnTunnelCertificateOutput) { + op := &request.Operation{ + Name: opModifyVpnTunnelCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyVpnTunnelCertificateInput{} + } + + output = &ModifyVpnTunnelCertificateOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyVpnTunnelCertificate API operation for Amazon Elastic Compute Cloud. +// +// Modifies the VPN tunnel endpoint certificate. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ModifyVpnTunnelCertificate for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpnTunnelCertificate +func (c *EC2) ModifyVpnTunnelCertificate(input *ModifyVpnTunnelCertificateInput) (*ModifyVpnTunnelCertificateOutput, error) { + req, out := c.ModifyVpnTunnelCertificateRequest(input) + return out, req.Send() +} + +// ModifyVpnTunnelCertificateWithContext is the same as ModifyVpnTunnelCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyVpnTunnelCertificate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ModifyVpnTunnelCertificateWithContext(ctx aws.Context, input *ModifyVpnTunnelCertificateInput, opts ...request.Option) (*ModifyVpnTunnelCertificateOutput, error) { + req, out := c.ModifyVpnTunnelCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyVpnTunnelOptions = "ModifyVpnTunnelOptions" + +// ModifyVpnTunnelOptionsRequest generates a "aws/request.Request" representing the +// client's request for the ModifyVpnTunnelOptions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyVpnTunnelOptions for more information on using the ModifyVpnTunnelOptions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyVpnTunnelOptionsRequest method. +// req, resp := client.ModifyVpnTunnelOptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpnTunnelOptions +func (c *EC2) ModifyVpnTunnelOptionsRequest(input *ModifyVpnTunnelOptionsInput) (req *request.Request, output *ModifyVpnTunnelOptionsOutput) { + op := &request.Operation{ + Name: opModifyVpnTunnelOptions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyVpnTunnelOptionsInput{} + } + + output = &ModifyVpnTunnelOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyVpnTunnelOptions API operation for Amazon Elastic Compute Cloud. +// +// Modifies the options for a VPN tunnel in an AWS Site-to-Site VPN connection. +// You can modify multiple options for a tunnel in a single request, but you +// can only modify one tunnel at a time. For more information, see Site-to-Site +// VPN Tunnel Options for Your Site-to-Site VPN Connection (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPNTunnels.html) +// in the AWS Site-to-Site VPN User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ModifyVpnTunnelOptions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpnTunnelOptions +func (c *EC2) ModifyVpnTunnelOptions(input *ModifyVpnTunnelOptionsInput) (*ModifyVpnTunnelOptionsOutput, error) { + req, out := c.ModifyVpnTunnelOptionsRequest(input) + return out, req.Send() +} + +// ModifyVpnTunnelOptionsWithContext is the same as ModifyVpnTunnelOptions with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyVpnTunnelOptions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ModifyVpnTunnelOptionsWithContext(ctx aws.Context, input *ModifyVpnTunnelOptionsInput, opts ...request.Option) (*ModifyVpnTunnelOptionsOutput, error) { + req, out := c.ModifyVpnTunnelOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opMonitorInstances = "MonitorInstances" // MonitorInstancesRequest generates a "aws/request.Request" representing the @@ -27541,6 +29277,9 @@ func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedIn // offerings that match your specifications. After you've purchased a Reserved // Instance, you can check for your new Reserved Instance with DescribeReservedInstances. // +// To queue a purchase for a future date and time, specify a purchase time. +// If you do not specify a purchase time, the default is the current time. +// // For more information, see Reserved Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html) // and Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -28378,7 +30117,7 @@ func (c *EC2) ReplaceNetworkAclAssociationRequest(input *ReplaceNetworkAclAssoci // // Changes which network ACL a subnet is associated with. By default when you // create a subnet, it's automatically associated with the default network ACL. -// For more information, see Network ACLs (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) +// For more information, see Network ACLs (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. // // This is an idempotent operation. @@ -28457,8 +30196,8 @@ func (c *EC2) ReplaceNetworkAclEntryRequest(input *ReplaceNetworkAclEntryInput) // ReplaceNetworkAclEntry API operation for Amazon Elastic Compute Cloud. // // Replaces an entry (rule) in a network ACL. For more information, see Network -// ACLs (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) -// in the Amazon Virtual Private Cloud User Guide. +// ACLs (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html) in +// the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -28538,7 +30277,7 @@ func (c *EC2) ReplaceRouteRequest(input *ReplaceRouteInput) (req *request.Reques // instance, NAT gateway, VPC peering connection, network interface, or egress-only // internet gateway. // -// For more information, see Route Tables (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) +// For more information, see Route Tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -28616,7 +30355,7 @@ func (c *EC2) ReplaceRouteTableAssociationRequest(input *ReplaceRouteTableAssoci // Changes the route table associated with a given subnet in a VPC. After the // operation completes, the subnet uses the routes in the new route table it's // associated with. For more information about route tables, see Route Tables -// (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) +// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) // in the Amazon Virtual Private Cloud User Guide. // // You can also use ReplaceRouteTableAssociation to change which table is the @@ -28859,10 +30598,10 @@ func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *reques // You can submit a single request that includes multiple launch specifications // that vary by instance type, AMI, Availability Zone, or subnet. // -// By default, the Spot Fleet requests Spot Instances in the Spot pool where -// the price per unit is the lowest. Each launch specification can include its -// own instance weighting that reflects the value of the instance type to your -// application workload. +// By default, the Spot Fleet requests Spot Instances in the Spot Instance pool +// where the price per unit is the lowest. Each launch specification can include +// its own instance weighting that reflects the value of the instance type to +// your application workload. // // Alternatively, you can specify that the Spot Fleet distribute the target // capacity across the Spot pools included in its launch specifications. By @@ -29025,19 +30764,13 @@ func (c *EC2) ResetEbsDefaultKmsKeyIdRequest(input *ResetEbsDefaultKmsKeyIdInput // ResetEbsDefaultKmsKeyId API operation for Amazon Elastic Compute Cloud. // -// Resets the account's default customer master key (CMK) to the account's AWS-managed -// default CMK. This default CMK is used to encrypt EBS volumes when you have -// enabled EBS encryption by default without specifying a CMK in the API call. -// If you have not enabled encryption by default, then this CMK is used when -// you set the Encrypted parameter to true without specifying a custom CMK in -// the API call. +// Resets the default customer master key (CMK) for EBS encryption for your +// account in this Region to the AWS managed CMK for EBS. // -// Call this API if you have modified the default CMK that is used for encrypting -// your EBS volume using ModifyEbsDefaultKmsKeyId and you want to reset it to -// the AWS-managed default CMK. After resetting, you can continue to provide -// a CMK of your choice in the API call that creates the volume. However, if -// no CMK is specified, your account will encrypt the volume to the AWS-managed -// default CMK. +// After resetting the default CMK to the AWS managed CMK, you can continue +// to encrypt by a customer managed CMK by specifying it when you create the +// volume. For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) +// in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -30070,6 +31803,98 @@ func (c *EC2) SearchTransitGatewayRoutesWithContext(ctx aws.Context, input *Sear return out, req.Send() } +const opSendDiagnosticInterrupt = "SendDiagnosticInterrupt" + +// SendDiagnosticInterruptRequest generates a "aws/request.Request" representing the +// client's request for the SendDiagnosticInterrupt operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SendDiagnosticInterrupt for more information on using the SendDiagnosticInterrupt +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SendDiagnosticInterruptRequest method. +// req, resp := client.SendDiagnosticInterruptRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SendDiagnosticInterrupt +func (c *EC2) SendDiagnosticInterruptRequest(input *SendDiagnosticInterruptInput) (req *request.Request, output *SendDiagnosticInterruptOutput) { + op := &request.Operation{ + Name: opSendDiagnosticInterrupt, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &SendDiagnosticInterruptInput{} + } + + output = &SendDiagnosticInterruptOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// SendDiagnosticInterrupt API operation for Amazon Elastic Compute Cloud. +// +// Sends a diagnostic interrupt to the specified Amazon EC2 instance to trigger +// a kernel panic (on Linux instances), or a blue screen/stop error (on Windows +// instances). For instances based on Intel and AMD processors, the interrupt +// is received as a non-maskable interrupt (NMI). +// +// In general, the operating system crashes and reboots when a kernel panic +// or stop error is triggered. The operating system can also be configured to +// perform diagnostic tasks, such as generating a memory dump file, loading +// a secondary kernel, or obtaining a call trace. +// +// Before sending a diagnostic interrupt to your instance, ensure that its operating +// system is configured to perform the required diagnostic tasks. +// +// For more information about configuring your operating system to generate +// a crash dump when a kernel panic or stop error occurs, see Send a Diagnostic +// Interrupt (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/diagnostic-interrupt.html) +// (Linux instances) or Send a Diagnostic Interrupt (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/diagnostic-interrupt.html) +// (Windows instances). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation SendDiagnosticInterrupt for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SendDiagnosticInterrupt +func (c *EC2) SendDiagnosticInterrupt(input *SendDiagnosticInterruptInput) (*SendDiagnosticInterruptOutput, error) { + req, out := c.SendDiagnosticInterruptRequest(input) + return out, req.Send() +} + +// SendDiagnosticInterruptWithContext is the same as SendDiagnosticInterrupt with the addition of +// the ability to pass a context and additional request options. +// +// See SendDiagnosticInterrupt for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) SendDiagnosticInterruptWithContext(ctx aws.Context, input *SendDiagnosticInterruptInput, opts ...request.Option) (*SendDiagnosticInterruptOutput, error) { + req, out := c.SendDiagnosticInterruptRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartInstances = "StartInstances" // StartInstancesRequest generates a "aws/request.Request" representing the @@ -31657,10 +33482,17 @@ type AllocateHostsInput struct { AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" type:"string"` + // Indicates whether to enable or disable host recovery for the Dedicated Host. + // Host recovery is disabled by default. For more information, see Host Recovery + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html) + // in the Amazon Elastic Compute Cloud User Guide. + // + // Default: off + HostRecovery *string `type:"string" enum:"HostRecovery"` + // Specifies the instance type for which to configure your Dedicated Hosts. // When you specify the instance type, that is the only instance type that you // can launch onto that host. @@ -31724,6 +33556,12 @@ func (s *AllocateHostsInput) SetClientToken(v string) *AllocateHostsInput { return s } +// SetHostRecovery sets the HostRecovery field's value. +func (s *AllocateHostsInput) SetHostRecovery(v string) *AllocateHostsInput { + s.HostRecovery = &v + return s +} + // SetInstanceType sets the InstanceType field's value. func (s *AllocateHostsInput) SetInstanceType(v string) *AllocateHostsInput { s.InstanceType = &v @@ -32068,6 +33906,12 @@ func (s *AssignPrivateIpAddressesInput) SetSecondaryPrivateIpAddressCount(v int6 type AssignPrivateIpAddressesOutput struct { _ struct{} `type:"structure"` + + // The private IP addresses assigned to the network interface. + AssignedPrivateIpAddresses []*AssignedPrivateIpAddress `locationName:"assignedPrivateIpAddressesSet" locationNameList:"item" type:"list"` + + // The ID of the network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` } // String returns the string representation @@ -32080,6 +33924,42 @@ func (s AssignPrivateIpAddressesOutput) GoString() string { return s.String() } +// SetAssignedPrivateIpAddresses sets the AssignedPrivateIpAddresses field's value. +func (s *AssignPrivateIpAddressesOutput) SetAssignedPrivateIpAddresses(v []*AssignedPrivateIpAddress) *AssignPrivateIpAddressesOutput { + s.AssignedPrivateIpAddresses = v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *AssignPrivateIpAddressesOutput) SetNetworkInterfaceId(v string) *AssignPrivateIpAddressesOutput { + s.NetworkInterfaceId = &v + return s +} + +// Describes the private IP addresses assigned to a network interface. +type AssignedPrivateIpAddress struct { + _ struct{} `type:"structure"` + + // The private IP address assigned to the network interface. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` +} + +// String returns the string representation +func (s AssignedPrivateIpAddress) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssignedPrivateIpAddress) GoString() string { + return s.String() +} + +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *AssignedPrivateIpAddress) SetPrivateIpAddress(v string) *AssignedPrivateIpAddress { + s.PrivateIpAddress = &v + return s +} + type AssociateAddressInput struct { _ struct{} `type:"structure"` @@ -34493,7 +36373,6 @@ func (s *CancelCapacityReservationOutput) SetReturn(v bool) *CancelCapacityReser return s } -// Contains the parameters for CancelConversionTask. type CancelConversionTaskInput struct { _ struct{} `type:"structure"` @@ -34567,7 +36446,6 @@ func (s CancelConversionTaskOutput) GoString() string { return s.String() } -// Contains the parameters for CancelExportTask. type CancelExportTaskInput struct { _ struct{} `type:"structure"` @@ -34620,7 +36498,6 @@ func (s CancelExportTaskOutput) GoString() string { return s.String() } -// Contains the parameters for CancelImportTask. type CancelImportTaskInput struct { _ struct{} `type:"structure"` @@ -34665,7 +36542,6 @@ func (s *CancelImportTaskInput) SetImportTaskId(v string) *CancelImportTaskInput return s } -// Contains the output for CancelImportTask. type CancelImportTaskOutput struct { _ struct{} `type:"structure"` @@ -35092,10 +36968,16 @@ type CapacityReservation struct { // The Availability Zone in which the capacity is reserved. AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + // The Availability Zone ID of the Capacity Reservation. + AvailabilityZoneId *string `locationName:"availabilityZoneId" type:"string"` + // The remaining capacity. Indicates the number of instances that can be launched // in the Capacity Reservation. AvailableInstanceCount *int64 `locationName:"availableInstanceCount" type:"integer"` + // The Amazon Resource Name (ARN) of the Capacity Reservation. + CapacityReservationArn *string `locationName:"capacityReservationArn" type:"string"` + // The ID of the Capacity Reservation. CapacityReservationId *string `locationName:"capacityReservationId" type:"string"` @@ -35150,17 +37032,20 @@ type CapacityReservation struct { // The type of instance for which the Capacity Reservation reserves capacity. InstanceType *string `locationName:"instanceType" type:"string"` + // The ID of the AWS account that owns the Capacity Reservation. + OwnerId *string `locationName:"ownerId" type:"string"` + // The current state of the Capacity Reservation. A Capacity Reservation can // be in one of the following states: // // * active - The Capacity Reservation is active and the capacity is available // for your use. // - // * cancelled - The Capacity Reservation expired automatically at the date + // * expired - The Capacity Reservation expired automatically at the date // and time specified in your request. The reserved capacity is no longer // available for your use. // - // * expired - The Capacity Reservation was manually cancelled. The reserved + // * cancelled - The Capacity Reservation was manually cancelled. The reserved // capacity is no longer available for your use. // // * pending - The Capacity Reservation request was successful but the capacity @@ -35184,7 +37069,8 @@ type CapacityReservation struct { // that is dedicated to a single AWS account. Tenancy *string `locationName:"tenancy" type:"string" enum:"CapacityReservationTenancy"` - // The number of instances for which the Capacity Reservation reserves capacity. + // The total number of instances for which the Capacity Reservation reserves + // capacity. TotalInstanceCount *int64 `locationName:"totalInstanceCount" type:"integer"` } @@ -35204,12 +37090,24 @@ func (s *CapacityReservation) SetAvailabilityZone(v string) *CapacityReservation return s } +// SetAvailabilityZoneId sets the AvailabilityZoneId field's value. +func (s *CapacityReservation) SetAvailabilityZoneId(v string) *CapacityReservation { + s.AvailabilityZoneId = &v + return s +} + // SetAvailableInstanceCount sets the AvailableInstanceCount field's value. func (s *CapacityReservation) SetAvailableInstanceCount(v int64) *CapacityReservation { s.AvailableInstanceCount = &v return s } +// SetCapacityReservationArn sets the CapacityReservationArn field's value. +func (s *CapacityReservation) SetCapacityReservationArn(v string) *CapacityReservation { + s.CapacityReservationArn = &v + return s +} + // SetCapacityReservationId sets the CapacityReservationId field's value. func (s *CapacityReservation) SetCapacityReservationId(v string) *CapacityReservation { s.CapacityReservationId = &v @@ -35264,6 +37162,12 @@ func (s *CapacityReservation) SetInstanceType(v string) *CapacityReservation { return s } +// SetOwnerId sets the OwnerId field's value. +func (s *CapacityReservation) SetOwnerId(v string) *CapacityReservation { + s.OwnerId = &v + return s +} + // SetState sets the State field's value. func (s *CapacityReservation) SetState(v string) *CapacityReservation { s.State = &v @@ -36126,7 +38030,11 @@ type ClientVpnEndpoint struct { // The ARN of the server certificate. ServerCertificateArn *string `locationName:"serverCertificateArn" type:"string"` - // Indicates whether VPN split tunneling is supported. + // Indicates whether split-tunnel is enabled in the AWS Client VPN endpoint. + // + // For information about split-tunnel VPN endpoints, see Split-Tunnel AWS Client + // VPN Endpoint (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html) + // in the AWS Client VPN Administrator Guide. SplitTunnel *bool `locationName:"splitTunnel" type:"boolean"` // The current state of the Client VPN endpoint. @@ -37062,39 +38970,32 @@ type CopySnapshotInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // Specifies whether the destination snapshot should be encrypted. You can encrypt - // a copy of an unencrypted snapshot, but you cannot use it to create an unencrypted - // copy of an encrypted snapshot. Your default CMK for EBS is used unless you - // specify a non-default AWS Key Management Service (AWS KMS) CMK using KmsKeyId. - // For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) + // To encrypt a copy of an unencrypted snapshot if encryption by default is + // not enabled, enable encryption using this parameter. Otherwise, omit this + // parameter. Encrypted snapshots are encrypted, even if you omit this parameter + // and encryption by default is not enabled. You cannot set this parameter to + // false. For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) // in the Amazon Elastic Compute Cloud User Guide. Encrypted *bool `locationName:"encrypted" type:"boolean"` - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use when creating the encrypted volume. This parameter is only - // required if you want to use a non-default CMK; if this parameter is not specified, - // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted - // flag must also be set. + // The identifier of the AWS Key Management Service (AWS KMS) customer master + // key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, + // your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted + // state must be true. // - // The CMK identifier may be provided in any of the following formats: + // You can specify the CMK using any of the following: // - // * Key ID + // * Key ID. For example, key/1234abcd-12ab-34cd-56ef-1234567890ab. // - // * Key alias. The alias ARN contains the arn:aws:kms namespace, followed - // by the Region of the CMK, the AWS account ID of the CMK owner, the alias - // namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // * Key alias. For example, alias/ExampleAlias. // - // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed - // by the Region of the CMK, the AWS account ID of the CMK owner, the key - // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // * Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. // - // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the Region of the CMK, the AWS account ID of the CMK owner, - // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. // - // AWS parses KmsKeyId asynchronously, meaning that the action you call may - // appear to complete even though you provided an invalid identifier. The action - // will eventually fail. + // AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, + // alias, or ARN that is not valid, the action can appear to complete, but eventually + // fails. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // When you copy an encrypted source snapshot using the Amazon EC2 Query API, @@ -37262,9 +39163,8 @@ type CpuOptionsRequest struct { // The number of CPU cores for the instance. CoreCount *int64 `type:"integer"` - // The number of threads per CPU core. To disable Intel Hyper-Threading Technology - // for the instance, specify a value of 1. Otherwise, specify the default value - // of 2. + // The number of threads per CPU core. To disable multithreading for the instance, + // specify a value of 1. Otherwise, specify the default value of 2. ThreadsPerCore *int64 `type:"integer"` } @@ -37294,9 +39194,10 @@ type CreateCapacityReservationInput struct { _ struct{} `type:"structure"` // The Availability Zone in which to create the Capacity Reservation. - // - // AvailabilityZone is a required field - AvailabilityZone *string `type:"string" required:"true"` + AvailabilityZone *string `type:"string"` + + // The ID of the Availability Zone in which to create the Capacity Reservation. + AvailabilityZoneId *string `type:"string"` // Unique, case-sensitive identifier that you provide to ensure the idempotency // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). @@ -37406,9 +39307,6 @@ func (s CreateCapacityReservationInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateCapacityReservationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateCapacityReservationInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } if s.InstanceCount == nil { invalidParams.Add(request.NewErrParamRequired("InstanceCount")) } @@ -37431,6 +39329,12 @@ func (s *CreateCapacityReservationInput) SetAvailabilityZone(v string) *CreateCa return s } +// SetAvailabilityZoneId sets the AvailabilityZoneId field's value. +func (s *CreateCapacityReservationInput) SetAvailabilityZoneId(v string) *CreateCapacityReservationInput { + s.AvailabilityZoneId = &v + return s +} + // SetClientToken sets the ClientToken field's value. func (s *CreateCapacityReservationInput) SetClientToken(v string) *CreateCapacityReservationInput { s.ClientToken = &v @@ -37568,8 +39472,7 @@ type CreateClientVpnEndpointInput struct { // Information about the DNS servers to be used for DNS resolution. A Client // VPN endpoint can have up to two DNS servers. If no DNS server is specified, - // the DNS address of the VPC that is to be associated with Client VPN endpoint - // is used as the DNS server. + // the DNS address configured on the device is used for the DNS server. DnsServers []*string `locationNameList:"item" type:"list"` // Checks whether you have the required permissions for the action, without @@ -37584,6 +39487,15 @@ type CreateClientVpnEndpointInput struct { // ServerCertificateArn is a required field ServerCertificateArn *string `type:"string" required:"true"` + // Indicates whether split-tunnel is enabled on the AWS Client VPN endpoint. + // + // By default, split-tunnel on a VPN endpoint is disabled. + // + // For information about split-tunnel VPN endpoints, see Split-Tunnel AWS Client + // VPN Endpoint (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html) + // in the AWS Client VPN Administrator Guide. + SplitTunnel *bool `type:"boolean"` + // The tags to apply to the Client VPN endpoint during creation. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` @@ -37673,6 +39585,12 @@ func (s *CreateClientVpnEndpointInput) SetServerCertificateArn(v string) *Create return s } +// SetSplitTunnel sets the SplitTunnel field's value. +func (s *CreateClientVpnEndpointInput) SetSplitTunnel(v bool) *CreateClientVpnEndpointInput { + s.SplitTunnel = &v + return s +} + // SetTagSpecifications sets the TagSpecifications field's value. func (s *CreateClientVpnEndpointInput) SetTagSpecifications(v []*TagSpecification) *CreateClientVpnEndpointInput { s.TagSpecifications = v @@ -37868,6 +39786,9 @@ type CreateCustomerGatewayInput struct { // BgpAsn is a required field BgpAsn *int64 `type:"integer" required:"true"` + // The Amazon Resource Name (ARN) for the customer gateway certificate. + CertificateArn *string `type:"string"` + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -37876,9 +39797,7 @@ type CreateCustomerGatewayInput struct { // The Internet-routable IP address for the customer gateway's outside interface. // The address must be static. - // - // PublicIp is a required field - PublicIp *string `locationName:"IpAddress" type:"string" required:"true"` + PublicIp *string `locationName:"IpAddress" type:"string"` // The type of VPN connection that this customer gateway supports (ipsec.1). // @@ -37902,9 +39821,6 @@ func (s *CreateCustomerGatewayInput) Validate() error { if s.BgpAsn == nil { invalidParams.Add(request.NewErrParamRequired("BgpAsn")) } - if s.PublicIp == nil { - invalidParams.Add(request.NewErrParamRequired("PublicIp")) - } if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } @@ -37921,6 +39837,12 @@ func (s *CreateCustomerGatewayInput) SetBgpAsn(v int64) *CreateCustomerGatewayIn return s } +// SetCertificateArn sets the CertificateArn field's value. +func (s *CreateCustomerGatewayInput) SetCertificateArn(v string) *CreateCustomerGatewayInput { + s.CertificateArn = &v + return s +} + // SetDryRun sets the DryRun field's value. func (s *CreateCustomerGatewayInput) SetDryRun(v bool) *CreateCustomerGatewayInput { s.DryRun = &v @@ -38330,7 +40252,7 @@ type CreateFleetInput struct { // LaunchTemplateConfigs is a required field LaunchTemplateConfigs []*FleetLaunchTemplateConfigRequest `locationNameList:"item" type:"list" required:"true"` - // The allocation strategy of On-Demand Instances in an EC2 Fleet. + // Describes the configuration of On-Demand Instances in an EC2 Fleet. OnDemandOptions *OnDemandOptionsRequest `type:"structure"` // Indicates whether EC2 Fleet should replace unhealthy instances. @@ -38345,8 +40267,7 @@ type CreateFleetInput struct { // For information about tagging after launch, see Tagging Your Resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources). TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` - // The TotalTargetCapacity, OnDemandTargetCapacity, SpotTargetCapacity, and - // DefaultCapacityType structure. + // The number of units to request. // // TargetCapacitySpecification is a required field TargetCapacitySpecification *TargetCapacitySpecificationRequest `type:"structure" required:"true"` @@ -38647,6 +40568,17 @@ type CreateFlowLogsInput struct { // Default: cloud-watch-logs LogDestinationType *string `type:"string" enum:"LogDestinationType"` + // The fields to include in the flow log record, in the order in which they + // should appear. For a list of available fields, see Flow Log Records (https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records). + // If you omit this parameter, the flow log is created using the default format. + // If you specify this parameter, you must specify at least one field. + // + // Specify the fields using the ${field-id} format, separated by spaces. For + // the AWS CLI, use single quotation marks (' ') to surround the parameter value. + // + // Only applicable to flow logs that are published to an Amazon S3 bucket. + LogFormat *string `type:"string"` + // The name of a new or existing CloudWatch Logs log group where Amazon EC2 // publishes your flow logs. // @@ -38734,6 +40666,12 @@ func (s *CreateFlowLogsInput) SetLogDestinationType(v string) *CreateFlowLogsInp return s } +// SetLogFormat sets the LogFormat field's value. +func (s *CreateFlowLogsInput) SetLogFormat(v string) *CreateFlowLogsInput { + s.LogFormat = &v + return s +} + // SetLogGroupName sets the LogGroupName field's value. func (s *CreateFlowLogsInput) SetLogGroupName(v string) *CreateFlowLogsInput { s.LogGroupName = &v @@ -38923,7 +40861,7 @@ func (s *CreateFpgaImageOutput) SetFpgaImageId(v string) *CreateFpgaImageOutput type CreateImageInput struct { _ struct{} `type:"structure"` - // Tthe block device mappings. This parameter cannot be used to modify the encryption + // The block device mappings. This parameter cannot be used to modify the encryption // status of existing volumes or snapshots. To create an AMI with encrypted // snapshots, use the CopyImage action. BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` @@ -39043,7 +40981,6 @@ func (s *CreateImageOutput) SetImageId(v string) *CreateImageOutput { return s } -// Contains the parameters for CreateInstanceExportTask. type CreateInstanceExportTaskInput struct { _ struct{} `type:"structure"` @@ -39110,7 +41047,6 @@ func (s *CreateInstanceExportTaskInput) SetTargetEnvironment(v string) *CreateIn return s } -// Contains the output for CreateInstanceExportTask. type CreateInstanceExportTaskOutput struct { _ struct{} `type:"structure"` @@ -39302,6 +41238,9 @@ type CreateLaunchTemplateInput struct { // LaunchTemplateName is a required field LaunchTemplateName *string `min:"3" type:"string" required:"true"` + // The tags to apply to the launch template during creation. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + // A description for the first version of the launch template. VersionDescription *string `type:"string"` } @@ -39364,6 +41303,12 @@ func (s *CreateLaunchTemplateInput) SetLaunchTemplateName(v string) *CreateLaunc return s } +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateLaunchTemplateInput) SetTagSpecifications(v []*TagSpecification) *CreateLaunchTemplateInput { + s.TagSpecifications = v + return s +} + // SetVersionDescription sets the VersionDescription field's value. func (s *CreateLaunchTemplateInput) SetVersionDescription(v string) *CreateLaunchTemplateInput { s.VersionDescription = &v @@ -39423,7 +41368,9 @@ type CreateLaunchTemplateVersionInput struct { // The version number of the launch template version on which to base the new // version. The new version inherits the same launch parameters as the source - // version, except for parameters that you specify in LaunchTemplateData. + // version, except for parameters that you specify in LaunchTemplateData. Snapshots + // applied to the block device mapping are ignored when creating a new version + // unless they are explicitly included. SourceVersion *string `type:"string"` // A description for the version of the launch template. @@ -39886,8 +41833,6 @@ type CreateNetworkInterfaceInput struct { // Indicates the type of network interface. To create an Elastic Fabric Adapter // (EFA), specify efa. For more information, see Elastic Fabric Adapter (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html) // in the Amazon Elastic Compute Cloud User Guide. - // - // If you are not creating an EFA, specify interface or omit this parameter. InterfaceType *string `type:"string" enum:"NetworkInterfaceCreationType"` // The number of IPv6 addresses to assign to a network interface. Amazon EC2 @@ -40734,7 +42679,7 @@ func (s *CreateSnapshotInput) SetVolumeId(v string) *CreateSnapshotInput { type CreateSnapshotsInput struct { _ struct{} `type:"structure"` - // Copies the tags from the specified instance to all snapshots. + // Copies the tags from the specified volume to corresponding snapshot. CopyTagsFromSource *string `type:"string" enum:"CopyTagsFromSource"` // A description propagated to every snapshot specified by the instance. @@ -41115,6 +43060,589 @@ func (s CreateTagsOutput) GoString() string { return s.String() } +type CreateTrafficMirrorFilterInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + + // The description of the Traffic Mirror filter. + Description *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The tags to assign to a Traffic Mirror filter. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s CreateTrafficMirrorFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTrafficMirrorFilterInput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateTrafficMirrorFilterInput) SetClientToken(v string) *CreateTrafficMirrorFilterInput { + s.ClientToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateTrafficMirrorFilterInput) SetDescription(v string) *CreateTrafficMirrorFilterInput { + s.Description = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateTrafficMirrorFilterInput) SetDryRun(v bool) *CreateTrafficMirrorFilterInput { + s.DryRun = &v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateTrafficMirrorFilterInput) SetTagSpecifications(v []*TagSpecification) *CreateTrafficMirrorFilterInput { + s.TagSpecifications = v + return s +} + +type CreateTrafficMirrorFilterOutput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the Traffic Mirror filter. + TrafficMirrorFilter *TrafficMirrorFilter `locationName:"trafficMirrorFilter" type:"structure"` +} + +// String returns the string representation +func (s CreateTrafficMirrorFilterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTrafficMirrorFilterOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateTrafficMirrorFilterOutput) SetClientToken(v string) *CreateTrafficMirrorFilterOutput { + s.ClientToken = &v + return s +} + +// SetTrafficMirrorFilter sets the TrafficMirrorFilter field's value. +func (s *CreateTrafficMirrorFilterOutput) SetTrafficMirrorFilter(v *TrafficMirrorFilter) *CreateTrafficMirrorFilterOutput { + s.TrafficMirrorFilter = v + return s +} + +type CreateTrafficMirrorFilterRuleInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + + // The description of the Traffic Mirror rule. + Description *string `type:"string"` + + // The destination CIDR block to assign to the Traffic Mirror rule. + // + // DestinationCidrBlock is a required field + DestinationCidrBlock *string `type:"string" required:"true"` + + // The destination port range. + DestinationPortRange *TrafficMirrorPortRangeRequest `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The protocol, for example UDP, to assign to the Traffic Mirror rule. + // + // For information about the protocol value, see Protocol Numbers (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) + // on the Internet Assigned Numbers Authority (IANA) website. + Protocol *int64 `type:"integer"` + + // The action to take (accept | reject) on the filtered traffic. + // + // RuleAction is a required field + RuleAction *string `type:"string" required:"true" enum:"TrafficMirrorRuleAction"` + + // The number of the Traffic Mirror rule. This number must be unique for each + // Traffic Mirror rule in a given direction. The rules are processed in ascending + // order by rule number. + // + // RuleNumber is a required field + RuleNumber *int64 `type:"integer" required:"true"` + + // The source CIDR block to assign to the Traffic Mirror rule. + // + // SourceCidrBlock is a required field + SourceCidrBlock *string `type:"string" required:"true"` + + // The source port range. + SourcePortRange *TrafficMirrorPortRangeRequest `type:"structure"` + + // The type of traffic (ingress | egress). + // + // TrafficDirection is a required field + TrafficDirection *string `type:"string" required:"true" enum:"TrafficDirection"` + + // The ID of the filter that this rule is associated with. + // + // TrafficMirrorFilterId is a required field + TrafficMirrorFilterId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateTrafficMirrorFilterRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTrafficMirrorFilterRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTrafficMirrorFilterRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTrafficMirrorFilterRuleInput"} + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + if s.RuleAction == nil { + invalidParams.Add(request.NewErrParamRequired("RuleAction")) + } + if s.RuleNumber == nil { + invalidParams.Add(request.NewErrParamRequired("RuleNumber")) + } + if s.SourceCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("SourceCidrBlock")) + } + if s.TrafficDirection == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficDirection")) + } + if s.TrafficMirrorFilterId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficMirrorFilterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateTrafficMirrorFilterRuleInput) SetClientToken(v string) *CreateTrafficMirrorFilterRuleInput { + s.ClientToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateTrafficMirrorFilterRuleInput) SetDescription(v string) *CreateTrafficMirrorFilterRuleInput { + s.Description = &v + return s +} + +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *CreateTrafficMirrorFilterRuleInput) SetDestinationCidrBlock(v string) *CreateTrafficMirrorFilterRuleInput { + s.DestinationCidrBlock = &v + return s +} + +// SetDestinationPortRange sets the DestinationPortRange field's value. +func (s *CreateTrafficMirrorFilterRuleInput) SetDestinationPortRange(v *TrafficMirrorPortRangeRequest) *CreateTrafficMirrorFilterRuleInput { + s.DestinationPortRange = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateTrafficMirrorFilterRuleInput) SetDryRun(v bool) *CreateTrafficMirrorFilterRuleInput { + s.DryRun = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *CreateTrafficMirrorFilterRuleInput) SetProtocol(v int64) *CreateTrafficMirrorFilterRuleInput { + s.Protocol = &v + return s +} + +// SetRuleAction sets the RuleAction field's value. +func (s *CreateTrafficMirrorFilterRuleInput) SetRuleAction(v string) *CreateTrafficMirrorFilterRuleInput { + s.RuleAction = &v + return s +} + +// SetRuleNumber sets the RuleNumber field's value. +func (s *CreateTrafficMirrorFilterRuleInput) SetRuleNumber(v int64) *CreateTrafficMirrorFilterRuleInput { + s.RuleNumber = &v + return s +} + +// SetSourceCidrBlock sets the SourceCidrBlock field's value. +func (s *CreateTrafficMirrorFilterRuleInput) SetSourceCidrBlock(v string) *CreateTrafficMirrorFilterRuleInput { + s.SourceCidrBlock = &v + return s +} + +// SetSourcePortRange sets the SourcePortRange field's value. +func (s *CreateTrafficMirrorFilterRuleInput) SetSourcePortRange(v *TrafficMirrorPortRangeRequest) *CreateTrafficMirrorFilterRuleInput { + s.SourcePortRange = v + return s +} + +// SetTrafficDirection sets the TrafficDirection field's value. +func (s *CreateTrafficMirrorFilterRuleInput) SetTrafficDirection(v string) *CreateTrafficMirrorFilterRuleInput { + s.TrafficDirection = &v + return s +} + +// SetTrafficMirrorFilterId sets the TrafficMirrorFilterId field's value. +func (s *CreateTrafficMirrorFilterRuleInput) SetTrafficMirrorFilterId(v string) *CreateTrafficMirrorFilterRuleInput { + s.TrafficMirrorFilterId = &v + return s +} + +type CreateTrafficMirrorFilterRuleOutput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `locationName:"clientToken" type:"string"` + + // The Traffic Mirror rule. + TrafficMirrorFilterRule *TrafficMirrorFilterRule `locationName:"trafficMirrorFilterRule" type:"structure"` +} + +// String returns the string representation +func (s CreateTrafficMirrorFilterRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTrafficMirrorFilterRuleOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateTrafficMirrorFilterRuleOutput) SetClientToken(v string) *CreateTrafficMirrorFilterRuleOutput { + s.ClientToken = &v + return s +} + +// SetTrafficMirrorFilterRule sets the TrafficMirrorFilterRule field's value. +func (s *CreateTrafficMirrorFilterRuleOutput) SetTrafficMirrorFilterRule(v *TrafficMirrorFilterRule) *CreateTrafficMirrorFilterRuleOutput { + s.TrafficMirrorFilterRule = v + return s +} + +type CreateTrafficMirrorSessionInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + + // The description of the Traffic Mirror session. + Description *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the source network interface. + // + // NetworkInterfaceId is a required field + NetworkInterfaceId *string `type:"string" required:"true"` + + // The number of bytes in each packet to mirror. These are bytes after the VXLAN + // header. Do not specify this parameter when you want to mirror the entire + // packet. To mirror a subset of the packet, set this to the length (in bytes) + // that you want to mirror. For example, if you set this value to 1network0, + // then the first 100 bytes that meet the filter criteria are copied to the + // target. + // + // If you do not want to mirror the entire packet, use the PacketLength parameter + // to specify the number of bytes in each packet to mirror. + PacketLength *int64 `type:"integer"` + + // The session number determines the order in which sessions are evaluated when + // an interface is used by multiple sessions. The first session with a matching + // filter is the one that mirrors the packets. + // + // Valid values are 1-32766. + // + // SessionNumber is a required field + SessionNumber *int64 `type:"integer" required:"true"` + + // The tags to assign to a Traffic Mirror session. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + + // The ID of the Traffic Mirror filter. + // + // TrafficMirrorFilterId is a required field + TrafficMirrorFilterId *string `type:"string" required:"true"` + + // The ID of the Traffic Mirror target. + // + // TrafficMirrorTargetId is a required field + TrafficMirrorTargetId *string `type:"string" required:"true"` + + // The VXLAN ID for the Traffic Mirror session. For more information about the + // VXLAN protocol, see RFC 7348 (https://tools.ietf.org/html/rfc7348). If you + // do not specify a VirtualNetworkId, an account-wide unique id is chosen at + // random. + VirtualNetworkId *int64 `type:"integer"` +} + +// String returns the string representation +func (s CreateTrafficMirrorSessionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTrafficMirrorSessionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTrafficMirrorSessionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTrafficMirrorSessionInput"} + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + if s.SessionNumber == nil { + invalidParams.Add(request.NewErrParamRequired("SessionNumber")) + } + if s.TrafficMirrorFilterId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficMirrorFilterId")) + } + if s.TrafficMirrorTargetId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficMirrorTargetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateTrafficMirrorSessionInput) SetClientToken(v string) *CreateTrafficMirrorSessionInput { + s.ClientToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateTrafficMirrorSessionInput) SetDescription(v string) *CreateTrafficMirrorSessionInput { + s.Description = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateTrafficMirrorSessionInput) SetDryRun(v bool) *CreateTrafficMirrorSessionInput { + s.DryRun = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *CreateTrafficMirrorSessionInput) SetNetworkInterfaceId(v string) *CreateTrafficMirrorSessionInput { + s.NetworkInterfaceId = &v + return s +} + +// SetPacketLength sets the PacketLength field's value. +func (s *CreateTrafficMirrorSessionInput) SetPacketLength(v int64) *CreateTrafficMirrorSessionInput { + s.PacketLength = &v + return s +} + +// SetSessionNumber sets the SessionNumber field's value. +func (s *CreateTrafficMirrorSessionInput) SetSessionNumber(v int64) *CreateTrafficMirrorSessionInput { + s.SessionNumber = &v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateTrafficMirrorSessionInput) SetTagSpecifications(v []*TagSpecification) *CreateTrafficMirrorSessionInput { + s.TagSpecifications = v + return s +} + +// SetTrafficMirrorFilterId sets the TrafficMirrorFilterId field's value. +func (s *CreateTrafficMirrorSessionInput) SetTrafficMirrorFilterId(v string) *CreateTrafficMirrorSessionInput { + s.TrafficMirrorFilterId = &v + return s +} + +// SetTrafficMirrorTargetId sets the TrafficMirrorTargetId field's value. +func (s *CreateTrafficMirrorSessionInput) SetTrafficMirrorTargetId(v string) *CreateTrafficMirrorSessionInput { + s.TrafficMirrorTargetId = &v + return s +} + +// SetVirtualNetworkId sets the VirtualNetworkId field's value. +func (s *CreateTrafficMirrorSessionInput) SetVirtualNetworkId(v int64) *CreateTrafficMirrorSessionInput { + s.VirtualNetworkId = &v + return s +} + +type CreateTrafficMirrorSessionOutput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the Traffic Mirror session. + TrafficMirrorSession *TrafficMirrorSession `locationName:"trafficMirrorSession" type:"structure"` +} + +// String returns the string representation +func (s CreateTrafficMirrorSessionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTrafficMirrorSessionOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateTrafficMirrorSessionOutput) SetClientToken(v string) *CreateTrafficMirrorSessionOutput { + s.ClientToken = &v + return s +} + +// SetTrafficMirrorSession sets the TrafficMirrorSession field's value. +func (s *CreateTrafficMirrorSessionOutput) SetTrafficMirrorSession(v *TrafficMirrorSession) *CreateTrafficMirrorSessionOutput { + s.TrafficMirrorSession = v + return s +} + +type CreateTrafficMirrorTargetInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + + // The description of the Traffic Mirror target. + Description *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The network interface ID that is associated with the target. + NetworkInterfaceId *string `type:"string"` + + // The Amazon Resource Name (ARN) of the Network Load Balancer that is associated + // with the target. + NetworkLoadBalancerArn *string `type:"string"` + + // The tags to assign to the Traffic Mirror target. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s CreateTrafficMirrorTargetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTrafficMirrorTargetInput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateTrafficMirrorTargetInput) SetClientToken(v string) *CreateTrafficMirrorTargetInput { + s.ClientToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateTrafficMirrorTargetInput) SetDescription(v string) *CreateTrafficMirrorTargetInput { + s.Description = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateTrafficMirrorTargetInput) SetDryRun(v bool) *CreateTrafficMirrorTargetInput { + s.DryRun = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *CreateTrafficMirrorTargetInput) SetNetworkInterfaceId(v string) *CreateTrafficMirrorTargetInput { + s.NetworkInterfaceId = &v + return s +} + +// SetNetworkLoadBalancerArn sets the NetworkLoadBalancerArn field's value. +func (s *CreateTrafficMirrorTargetInput) SetNetworkLoadBalancerArn(v string) *CreateTrafficMirrorTargetInput { + s.NetworkLoadBalancerArn = &v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateTrafficMirrorTargetInput) SetTagSpecifications(v []*TagSpecification) *CreateTrafficMirrorTargetInput { + s.TagSpecifications = v + return s +} + +type CreateTrafficMirrorTargetOutput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the Traffic Mirror target. + TrafficMirrorTarget *TrafficMirrorTarget `locationName:"trafficMirrorTarget" type:"structure"` +} + +// String returns the string representation +func (s CreateTrafficMirrorTargetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTrafficMirrorTargetOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateTrafficMirrorTargetOutput) SetClientToken(v string) *CreateTrafficMirrorTargetOutput { + s.ClientToken = &v + return s +} + +// SetTrafficMirrorTarget sets the TrafficMirrorTarget field's value. +func (s *CreateTrafficMirrorTargetOutput) SetTrafficMirrorTarget(v *TrafficMirrorTarget) *CreateTrafficMirrorTargetOutput { + s.TrafficMirrorTarget = v + return s +} + type CreateTransitGatewayInput struct { _ struct{} `type:"structure"` @@ -41549,18 +44077,14 @@ type CreateVolumeInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // Specifies the encryption state of the volume. The default effect of setting - // the Encrypted parameter to true depends on the volume origin (new or from - // a snapshot), starting encryption state, ownership, and whether account-level - // encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/account-level-encryption.html) - // is enabled. Each default case can be overridden by specifying a customer - // master key (CMK) using the KmsKeyId parameter, in addition to setting Encrypted - // to true. For a complete list of possible encryption cases, see Amazon EBS - // Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html). - // - // Encrypted Amazon EBS volumes may only be attached to instances that support - // Amazon EBS encryption. For more information, see Supported Instance Types - // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances). + // Specifies whether the volume should be encrypted. The effect of setting the + // encryption state to true depends on the volume origin (new or from a snapshot), + // starting encryption state, ownership, and whether encryption by default is + // enabled. For more information, see Encryption by Default (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default) + // in the Amazon Elastic Compute Cloud User Guide. + // + // Encrypted Amazon EBS volumes must be attached to instances that support Amazon + // EBS encryption. For more information, see Supported Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances). Encrypted *bool `locationName:"encrypted" type:"boolean"` // The number of I/O operations per second (IOPS) to provision for the volume, @@ -41574,31 +44098,24 @@ type CreateVolumeInput struct { // This parameter is valid only for Provisioned IOPS SSD (io1) volumes. Iops *int64 `type:"integer"` - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use to encrypt the volume. This parameter is only required if - // you want to use a non-default CMK; if this parameter is not specified, the - // default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted flag - // must also be set. + // The identifier of the AWS Key Management Service (AWS KMS) customer master + // key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, + // your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted + // state must be true. // - // The CMK identifier may be provided in any of the following formats: + // You can specify the CMK using any of the following: // - // * Key ID + // * Key ID. For example, key/1234abcd-12ab-34cd-56ef-1234567890ab. // - // * Key alias. The alias ARN contains the arn:aws:kms namespace, followed - // by the Region of the CMK, the AWS account ID of the CMK owner, the alias - // namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // * Key alias. For example, alias/ExampleAlias. // - // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed - // by the Region of the CMK, the AWS account ID of the CMK owner, the key - // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // * Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. // - // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the Region of the CMK, the AWS account ID of the CMK owner, - // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. // - // AWS parses KmsKeyId asynchronously, meaning that the action you call may - // appear to complete even though you provided an invalid identifier. The action - // will eventually fail. + // AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, + // alias, or ARN that is not valid, the action can appear to complete, but eventually + // fails. KmsKeyId *string `type:"string"` // The size of the volume, in GiBs. @@ -41625,10 +44142,7 @@ type CreateVolumeInput struct { // IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard // for Magnetic volumes. // - // Defaults: If no volume type is specified, the default is standard in us-east-1, - // eu-west-1, eu-central-1, us-west-2, us-west-1, sa-east-1, ap-northeast-1, - // ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-south-1, us-gov-west-1, - // and cn-north-1. In all other Regions, EBS defaults to gp2. + // Default: gp2 VolumeType *string `type:"string" enum:"VolumeType"` } @@ -42403,7 +44917,7 @@ type CreateVpnConnectionInput struct { // specify a virtual private gateway. TransitGatewayId *string `type:"string"` - // The type of VPN connection (ipsec.1 | ipsec.2). + // The type of VPN connection (ipsec.1). // // Type is a required field Type *string `type:"string" required:"true"` @@ -42736,6 +45250,9 @@ type CustomerGateway struct { // (ASN). BgpAsn *string `locationName:"bgpAsn" type:"string"` + // The Amazon Resource Name (ARN) for the customer gateway certificate. + CertificateArn *string `locationName:"certificateArn" type:"string"` + // The ID of the customer gateway. CustomerGatewayId *string `locationName:"customerGatewayId" type:"string"` @@ -42769,6 +45286,12 @@ func (s *CustomerGateway) SetBgpAsn(v string) *CustomerGateway { return s } +// SetCertificateArn sets the CertificateArn field's value. +func (s *CustomerGateway) SetCertificateArn(v string) *CustomerGateway { + s.CertificateArn = &v + return s +} + // SetCustomerGatewayId sets the CustomerGatewayId field's value. func (s *CustomerGateway) SetCustomerGatewayId(v string) *CustomerGateway { s.CustomerGatewayId = &v @@ -44362,6 +46885,125 @@ func (s DeletePlacementGroupOutput) GoString() string { return s.String() } +// Describes the error for a Reserved Instance whose queued purchase could not +// be deleted. +type DeleteQueuedReservedInstancesError struct { + _ struct{} `type:"structure"` + + // The error code. + Code *string `locationName:"code" type:"string" enum:"DeleteQueuedReservedInstancesErrorCode"` + + // The error message. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s DeleteQueuedReservedInstancesError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteQueuedReservedInstancesError) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *DeleteQueuedReservedInstancesError) SetCode(v string) *DeleteQueuedReservedInstancesError { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *DeleteQueuedReservedInstancesError) SetMessage(v string) *DeleteQueuedReservedInstancesError { + s.Message = &v + return s +} + +type DeleteQueuedReservedInstancesInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The IDs of the Reserved Instances. + // + // ReservedInstancesIds is a required field + ReservedInstancesIds []*string `locationName:"ReservedInstancesId" locationNameList:"item" min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s DeleteQueuedReservedInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteQueuedReservedInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteQueuedReservedInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteQueuedReservedInstancesInput"} + if s.ReservedInstancesIds == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedInstancesIds")) + } + if s.ReservedInstancesIds != nil && len(s.ReservedInstancesIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ReservedInstancesIds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteQueuedReservedInstancesInput) SetDryRun(v bool) *DeleteQueuedReservedInstancesInput { + s.DryRun = &v + return s +} + +// SetReservedInstancesIds sets the ReservedInstancesIds field's value. +func (s *DeleteQueuedReservedInstancesInput) SetReservedInstancesIds(v []*string) *DeleteQueuedReservedInstancesInput { + s.ReservedInstancesIds = v + return s +} + +type DeleteQueuedReservedInstancesOutput struct { + _ struct{} `type:"structure"` + + // Information about the queued purchases that could not be deleted. + FailedQueuedPurchaseDeletions []*FailedQueuedPurchaseDeletion `locationName:"failedQueuedPurchaseDeletionSet" locationNameList:"item" type:"list"` + + // Information about the queued purchases that were successfully deleted. + SuccessfulQueuedPurchaseDeletions []*SuccessfulQueuedPurchaseDeletion `locationName:"successfulQueuedPurchaseDeletionSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DeleteQueuedReservedInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteQueuedReservedInstancesOutput) GoString() string { + return s.String() +} + +// SetFailedQueuedPurchaseDeletions sets the FailedQueuedPurchaseDeletions field's value. +func (s *DeleteQueuedReservedInstancesOutput) SetFailedQueuedPurchaseDeletions(v []*FailedQueuedPurchaseDeletion) *DeleteQueuedReservedInstancesOutput { + s.FailedQueuedPurchaseDeletions = v + return s +} + +// SetSuccessfulQueuedPurchaseDeletions sets the SuccessfulQueuedPurchaseDeletions field's value. +func (s *DeleteQueuedReservedInstancesOutput) SetSuccessfulQueuedPurchaseDeletions(v []*SuccessfulQueuedPurchaseDeletion) *DeleteQueuedReservedInstancesOutput { + s.SuccessfulQueuedPurchaseDeletions = v + return s +} + type DeleteRouteInput struct { _ struct{} `type:"structure"` @@ -44822,6 +47464,298 @@ func (s DeleteTagsOutput) GoString() string { return s.String() } +type DeleteTrafficMirrorFilterInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the Traffic Mirror filter. + // + // TrafficMirrorFilterId is a required field + TrafficMirrorFilterId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTrafficMirrorFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTrafficMirrorFilterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTrafficMirrorFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTrafficMirrorFilterInput"} + if s.TrafficMirrorFilterId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficMirrorFilterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteTrafficMirrorFilterInput) SetDryRun(v bool) *DeleteTrafficMirrorFilterInput { + s.DryRun = &v + return s +} + +// SetTrafficMirrorFilterId sets the TrafficMirrorFilterId field's value. +func (s *DeleteTrafficMirrorFilterInput) SetTrafficMirrorFilterId(v string) *DeleteTrafficMirrorFilterInput { + s.TrafficMirrorFilterId = &v + return s +} + +type DeleteTrafficMirrorFilterOutput struct { + _ struct{} `type:"structure"` + + // The ID of the Traffic Mirror filter. + TrafficMirrorFilterId *string `locationName:"trafficMirrorFilterId" type:"string"` +} + +// String returns the string representation +func (s DeleteTrafficMirrorFilterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTrafficMirrorFilterOutput) GoString() string { + return s.String() +} + +// SetTrafficMirrorFilterId sets the TrafficMirrorFilterId field's value. +func (s *DeleteTrafficMirrorFilterOutput) SetTrafficMirrorFilterId(v string) *DeleteTrafficMirrorFilterOutput { + s.TrafficMirrorFilterId = &v + return s +} + +type DeleteTrafficMirrorFilterRuleInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the Traffic Mirror rule. + // + // TrafficMirrorFilterRuleId is a required field + TrafficMirrorFilterRuleId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTrafficMirrorFilterRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTrafficMirrorFilterRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTrafficMirrorFilterRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTrafficMirrorFilterRuleInput"} + if s.TrafficMirrorFilterRuleId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficMirrorFilterRuleId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteTrafficMirrorFilterRuleInput) SetDryRun(v bool) *DeleteTrafficMirrorFilterRuleInput { + s.DryRun = &v + return s +} + +// SetTrafficMirrorFilterRuleId sets the TrafficMirrorFilterRuleId field's value. +func (s *DeleteTrafficMirrorFilterRuleInput) SetTrafficMirrorFilterRuleId(v string) *DeleteTrafficMirrorFilterRuleInput { + s.TrafficMirrorFilterRuleId = &v + return s +} + +type DeleteTrafficMirrorFilterRuleOutput struct { + _ struct{} `type:"structure"` + + // The ID of the deleted Traffic Mirror rule. + TrafficMirrorFilterRuleId *string `locationName:"trafficMirrorFilterRuleId" type:"string"` +} + +// String returns the string representation +func (s DeleteTrafficMirrorFilterRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTrafficMirrorFilterRuleOutput) GoString() string { + return s.String() +} + +// SetTrafficMirrorFilterRuleId sets the TrafficMirrorFilterRuleId field's value. +func (s *DeleteTrafficMirrorFilterRuleOutput) SetTrafficMirrorFilterRuleId(v string) *DeleteTrafficMirrorFilterRuleOutput { + s.TrafficMirrorFilterRuleId = &v + return s +} + +type DeleteTrafficMirrorSessionInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the Traffic Mirror session. + // + // TrafficMirrorSessionId is a required field + TrafficMirrorSessionId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTrafficMirrorSessionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTrafficMirrorSessionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTrafficMirrorSessionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTrafficMirrorSessionInput"} + if s.TrafficMirrorSessionId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficMirrorSessionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteTrafficMirrorSessionInput) SetDryRun(v bool) *DeleteTrafficMirrorSessionInput { + s.DryRun = &v + return s +} + +// SetTrafficMirrorSessionId sets the TrafficMirrorSessionId field's value. +func (s *DeleteTrafficMirrorSessionInput) SetTrafficMirrorSessionId(v string) *DeleteTrafficMirrorSessionInput { + s.TrafficMirrorSessionId = &v + return s +} + +type DeleteTrafficMirrorSessionOutput struct { + _ struct{} `type:"structure"` + + // The ID of the deleted Traffic Mirror session. + TrafficMirrorSessionId *string `locationName:"trafficMirrorSessionId" type:"string"` +} + +// String returns the string representation +func (s DeleteTrafficMirrorSessionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTrafficMirrorSessionOutput) GoString() string { + return s.String() +} + +// SetTrafficMirrorSessionId sets the TrafficMirrorSessionId field's value. +func (s *DeleteTrafficMirrorSessionOutput) SetTrafficMirrorSessionId(v string) *DeleteTrafficMirrorSessionOutput { + s.TrafficMirrorSessionId = &v + return s +} + +type DeleteTrafficMirrorTargetInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the Traffic Mirror target. + // + // TrafficMirrorTargetId is a required field + TrafficMirrorTargetId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTrafficMirrorTargetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTrafficMirrorTargetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTrafficMirrorTargetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTrafficMirrorTargetInput"} + if s.TrafficMirrorTargetId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficMirrorTargetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteTrafficMirrorTargetInput) SetDryRun(v bool) *DeleteTrafficMirrorTargetInput { + s.DryRun = &v + return s +} + +// SetTrafficMirrorTargetId sets the TrafficMirrorTargetId field's value. +func (s *DeleteTrafficMirrorTargetInput) SetTrafficMirrorTargetId(v string) *DeleteTrafficMirrorTargetInput { + s.TrafficMirrorTargetId = &v + return s +} + +type DeleteTrafficMirrorTargetOutput struct { + _ struct{} `type:"structure"` + + // The ID of the deleted Traffic Mirror target. + TrafficMirrorTargetId *string `locationName:"trafficMirrorTargetId" type:"string"` +} + +// String returns the string representation +func (s DeleteTrafficMirrorTargetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTrafficMirrorTargetOutput) GoString() string { + return s.String() +} + +// SetTrafficMirrorTargetId sets the TrafficMirrorTargetId field's value. +func (s *DeleteTrafficMirrorTargetOutput) SetTrafficMirrorTargetId(v string) *DeleteTrafficMirrorTargetOutput { + s.TrafficMirrorTargetId = &v + return s +} + type DeleteTransitGatewayInput struct { _ struct{} `type:"structure"` @@ -46305,10 +49239,10 @@ type DescribeByoipCidrsInput struct { // remaining results, make another call with the returned nextToken value. // // MaxResults is a required field - MaxResults *int64 `min:"5" type:"integer" required:"true"` + MaxResults *int64 `min:"1" type:"integer" required:"true"` // The token for the next page of results. - NextToken *string `min:"1" type:"string"` + NextToken *string `type:"string"` } // String returns the string representation @@ -46327,11 +49261,8 @@ func (s *DescribeByoipCidrsInput) Validate() error { if s.MaxResults == nil { invalidParams.Add(request.NewErrParamRequired("MaxResults")) } - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if invalidParams.Len() > 0 { @@ -46538,7 +49469,7 @@ type DescribeClassicLinkInstancesInput struct { // remaining results, make another call with the returned nextToken value. // // Constraint: If the value is greater than 1000, we return only 1000 items. - MaxResults *int64 `locationName:"maxResults" type:"integer"` + MaxResults *int64 `locationName:"maxResults" min:"5" type:"integer"` // The token for the next page of results. NextToken *string `locationName:"nextToken" type:"string"` @@ -46554,6 +49485,19 @@ func (s DescribeClassicLinkInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClassicLinkInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClassicLinkInstancesInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDryRun sets the DryRun field's value. func (s *DescribeClassicLinkInstancesInput) SetDryRun(v bool) *DescribeClassicLinkInstancesInput { s.DryRun = &v @@ -46640,7 +49584,7 @@ type DescribeClientVpnAuthorizationRulesInput struct { MaxResults *int64 `min:"5" type:"integer"` // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` + NextToken *string `type:"string"` } // String returns the string representation @@ -46662,9 +49606,6 @@ func (s *DescribeClientVpnAuthorizationRulesInput) Validate() error { if s.MaxResults != nil && *s.MaxResults < 5 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -46710,7 +49651,7 @@ type DescribeClientVpnAuthorizationRulesOutput struct { // The token to use to retrieve the next page of results. This value is null // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation @@ -46758,7 +49699,7 @@ type DescribeClientVpnConnectionsInput struct { MaxResults *int64 `min:"5" type:"integer"` // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` + NextToken *string `type:"string"` } // String returns the string representation @@ -46780,9 +49721,6 @@ func (s *DescribeClientVpnConnectionsInput) Validate() error { if s.MaxResults != nil && *s.MaxResults < 5 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -46828,7 +49766,7 @@ type DescribeClientVpnConnectionsOutput struct { // The token to use to retrieve the next page of results. This value is null // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation @@ -46874,7 +49812,7 @@ type DescribeClientVpnEndpointsInput struct { MaxResults *int64 `min:"5" type:"integer"` // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` + NextToken *string `type:"string"` } // String returns the string representation @@ -46893,9 +49831,6 @@ func (s *DescribeClientVpnEndpointsInput) Validate() error { if s.MaxResults != nil && *s.MaxResults < 5 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -46941,7 +49876,7 @@ type DescribeClientVpnEndpointsOutput struct { // The token to use to retrieve the next page of results. This value is null // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation @@ -46989,7 +49924,7 @@ type DescribeClientVpnRoutesInput struct { MaxResults *int64 `min:"5" type:"integer"` // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` + NextToken *string `type:"string"` } // String returns the string representation @@ -47011,9 +49946,6 @@ func (s *DescribeClientVpnRoutesInput) Validate() error { if s.MaxResults != nil && *s.MaxResults < 5 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -47056,7 +49988,7 @@ type DescribeClientVpnRoutesOutput struct { // The token to use to retrieve the next page of results. This value is null // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + NextToken *string `locationName:"nextToken" type:"string"` // Information about the Client VPN endpoint routes. Routes []*ClientVpnRoute `locationName:"routes" locationNameList:"item" type:"list"` @@ -47110,7 +50042,7 @@ type DescribeClientVpnTargetNetworksInput struct { MaxResults *int64 `min:"5" type:"integer"` // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` + NextToken *string `type:"string"` } // String returns the string representation @@ -47132,9 +50064,6 @@ func (s *DescribeClientVpnTargetNetworksInput) Validate() error { if s.MaxResults != nil && *s.MaxResults < 5 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -47186,7 +50115,7 @@ type DescribeClientVpnTargetNetworksOutput struct { // The token to use to retrieve the next page of results. This value is null // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation @@ -47211,7 +50140,6 @@ func (s *DescribeClientVpnTargetNetworksOutput) SetNextToken(v string) *Describe return s } -// Contains the parameters for DescribeConversionTasks. type DescribeConversionTasksInput struct { _ struct{} `type:"structure"` @@ -47247,7 +50175,6 @@ func (s *DescribeConversionTasksInput) SetDryRun(v bool) *DescribeConversionTask return s } -// Contains the output for DescribeConversionTasks. type DescribeConversionTasksOutput struct { _ struct{} `type:"structure"` @@ -47509,7 +50436,7 @@ type DescribeEgressOnlyInternetGatewaysInput struct { // The maximum number of results to return with a single call. To retrieve the // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `type:"integer"` + MaxResults *int64 `min:"5" type:"integer"` // The token for the next page of results. NextToken *string `type:"string"` @@ -47525,6 +50452,19 @@ func (s DescribeEgressOnlyInternetGatewaysInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEgressOnlyInternetGatewaysInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEgressOnlyInternetGatewaysInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDryRun sets the DryRun field's value. func (s *DescribeEgressOnlyInternetGatewaysInput) SetDryRun(v bool) *DescribeEgressOnlyInternetGatewaysInput { s.DryRun = &v @@ -47717,7 +50657,115 @@ func (s *DescribeElasticGpusOutput) SetNextToken(v string) *DescribeElasticGpusO return s } -// Contains the parameters for DescribeExportTasks. +type DescribeExportImageTasksInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The IDs of the export image tasks. + ExportImageTaskIds []*string `locationName:"ExportImageTaskId" locationNameList:"ExportImageTaskId" type:"list"` + + // Filter tasks using the task-state filter and one of the following values: + // active, completed, deleting, or deleted. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return in a single call. + MaxResults *int64 `min:"1" type:"integer"` + + // A token that indicates the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeExportImageTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeExportImageTasksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeExportImageTasksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeExportImageTasksInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeExportImageTasksInput) SetDryRun(v bool) *DescribeExportImageTasksInput { + s.DryRun = &v + return s +} + +// SetExportImageTaskIds sets the ExportImageTaskIds field's value. +func (s *DescribeExportImageTasksInput) SetExportImageTaskIds(v []*string) *DescribeExportImageTasksInput { + s.ExportImageTaskIds = v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeExportImageTasksInput) SetFilters(v []*Filter) *DescribeExportImageTasksInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeExportImageTasksInput) SetMaxResults(v int64) *DescribeExportImageTasksInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeExportImageTasksInput) SetNextToken(v string) *DescribeExportImageTasksInput { + s.NextToken = &v + return s +} + +type DescribeExportImageTasksOutput struct { + _ struct{} `type:"structure"` + + // Information about the export image tasks. + ExportImageTasks []*ExportImageTask `locationName:"exportImageTaskSet" locationNameList:"item" type:"list"` + + // The token to use to get the next page of results. This value is null when + // there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeExportImageTasksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeExportImageTasksOutput) GoString() string { + return s.String() +} + +// SetExportImageTasks sets the ExportImageTasks field's value. +func (s *DescribeExportImageTasksOutput) SetExportImageTasks(v []*ExportImageTask) *DescribeExportImageTasksOutput { + s.ExportImageTasks = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeExportImageTasksOutput) SetNextToken(v string) *DescribeExportImageTasksOutput { + s.NextToken = &v + return s +} + type DescribeExportTasksInput struct { _ struct{} `type:"structure"` @@ -47741,7 +50789,6 @@ func (s *DescribeExportTasksInput) SetExportTaskIds(v []*string) *DescribeExport return s } -// Contains the output for DescribeExportTasks. type DescribeExportTasksOutput struct { _ struct{} `type:"structure"` @@ -48520,7 +51567,7 @@ type DescribeFpgaImagesInput struct { MaxResults *int64 `min:"5" type:"integer"` // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` + NextToken *string `type:"string"` // Filters the AFI by owner. Specify an AWS account ID, self (owner is the sender // of the request), or an AWS owner alias (valid values are amazon | aws-marketplace). @@ -48543,9 +51590,6 @@ func (s *DescribeFpgaImagesInput) Validate() error { if s.MaxResults != nil && *s.MaxResults < 5 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -48597,7 +51641,7 @@ type DescribeFpgaImagesOutput struct { // The token to use to retrieve the next page of results. This value is null // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation @@ -48887,11 +51931,13 @@ type DescribeHostsInput struct { // The maximum number of results to return for the request in a single page. // The remaining results can be seen by sending another request with the returned // nextToken value. This value can be between 5 and 500. If maxResults is given - // a larger value than 500, you receive an error. You cannot specify this parameter - // and the host IDs parameter in the same request. + // a larger value than 500, you receive an error. + // + // You cannot specify this parameter and the host IDs parameter in the same + // request. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // The token to retrieve the next page of results. + // The token to use to retrieve the next page of results. NextToken *string `locationName:"nextToken" type:"string"` } @@ -48981,7 +52027,7 @@ type DescribeIamInstanceProfileAssociationsInput struct { MaxResults *int64 `min:"5" type:"integer"` // The token to request the next page of results. - NextToken *string `min:"1" type:"string"` + NextToken *string `type:"string"` } // String returns the string representation @@ -49000,9 +52046,6 @@ func (s *DescribeIamInstanceProfileAssociationsInput) Validate() error { if s.MaxResults != nil && *s.MaxResults < 5 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -49042,7 +52085,7 @@ type DescribeIamInstanceProfileAssociationsOutput struct { // The token to use to retrieve the next page of results. This value is null // when there are no more results to return. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation @@ -49368,7 +52411,7 @@ type DescribeImagesInput struct { // The filters. // - // * architecture - The image architecture (i386 | x86_64). + // * architecture - The image architecture (i386 | x86_64 | arm64). // // * block-device-mapping.delete-on-termination - A Boolean value that indicates // whether the Amazon EBS volume is deleted on instance termination. @@ -49523,7 +52566,6 @@ func (s *DescribeImagesOutput) SetImages(v []*Image) *DescribeImagesOutput { return s } -// Contains the parameters for DescribeImportImageTasks. type DescribeImportImageTasksInput struct { _ struct{} `type:"structure"` @@ -49534,14 +52576,13 @@ type DescribeImportImageTasksInput struct { DryRun *bool `type:"boolean"` // Filter tasks using the task-state filter and one of the following values: - // active, completed, deleting, deleted. + // active, completed, deleting, or deleted. Filters []*Filter `locationNameList:"Filter" type:"list"` - // A list of import image task IDs. + // The IDs of the import image tasks. ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"` - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. + // The maximum number of results to return in a single call. MaxResults *int64 `type:"integer"` // A token that indicates the next page of results. @@ -49588,7 +52629,6 @@ func (s *DescribeImportImageTasksInput) SetNextToken(v string) *DescribeImportIm return s } -// Contains the output for DescribeImportImageTasks. type DescribeImportImageTasksOutput struct { _ struct{} `type:"structure"` @@ -49623,7 +52663,6 @@ func (s *DescribeImportImageTasksOutput) SetNextToken(v string) *DescribeImportI return s } -// Contains the parameters for DescribeImportSnapshotTasks. type DescribeImportSnapshotTasksInput struct { _ struct{} `type:"structure"` @@ -49687,7 +52726,6 @@ func (s *DescribeImportSnapshotTasksInput) SetNextToken(v string) *DescribeImpor return s } -// Contains the output for DescribeImportSnapshotTasks. type DescribeImportSnapshotTasksOutput struct { _ struct{} `type:"structure"` @@ -50228,7 +53266,7 @@ type DescribeInstancesInput struct { // * affinity - The affinity setting for an instance running on a Dedicated // Host (default | host). // - // * architecture - The instance architecture (i386 | x86_64). + // * architecture - The instance architecture (i386 | x86_64 | arm64). // // * availability-zone - The Availability Zone of the instance. // @@ -51073,7 +54111,7 @@ type DescribeMovingAddressesInput struct { // 1000; if MaxResults is given a value outside of this range, an error is returned. // // Default: If no value is provided, the default is 1000. - MaxResults *int64 `locationName:"maxResults" type:"integer"` + MaxResults *int64 `locationName:"maxResults" min:"5" type:"integer"` // The token for the next page of results. NextToken *string `locationName:"nextToken" type:"string"` @@ -51092,6 +54130,19 @@ func (s DescribeMovingAddressesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeMovingAddressesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMovingAddressesInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDryRun sets the DryRun field's value. func (s *DescribeMovingAddressesInput) SetDryRun(v bool) *DescribeMovingAddressesInput { s.DryRun = &v @@ -51182,7 +54233,7 @@ type DescribeNatGatewaysInput struct { // The maximum number of results to return with a single call. To retrieve the // remaining results, make another call with the returned nextToken value. - MaxResults *int64 `type:"integer"` + MaxResults *int64 `min:"5" type:"integer"` // One or more NAT gateway IDs. NatGatewayIds []*string `locationName:"NatGatewayId" locationNameList:"item" type:"list"` @@ -51201,6 +54252,19 @@ func (s DescribeNatGatewaysInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeNatGatewaysInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeNatGatewaysInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetFilter sets the Filter field's value. func (s *DescribeNatGatewaysInput) SetFilter(v []*Filter) *DescribeNatGatewaysInput { s.Filter = v @@ -51689,7 +54753,7 @@ type DescribeNetworkInterfacesInput struct { // // * attachment.attachment-id - The ID of the interface attachment. // - // * attachment.attach.time - The time that the network interface was attached + // * attachment.attach-time - The time that the network interface was attached // to an instance. // // * attachment.delete-on-termination - Indicates whether the attachment @@ -52053,7 +55117,7 @@ type DescribePrincipalIdFormatInput struct { // The maximum number of results to return in a single call. To retrieve the // remaining results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` + MaxResults *int64 `min:"1" type:"integer"` // The token to request the next page of results. NextToken *string `type:"string"` @@ -52078,6 +55142,19 @@ func (s DescribePrincipalIdFormatInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribePrincipalIdFormatInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribePrincipalIdFormatInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDryRun sets the DryRun field's value. func (s *DescribePrincipalIdFormatInput) SetDryRun(v bool) *DescribePrincipalIdFormatInput { s.DryRun = &v @@ -52143,7 +55220,7 @@ type DescribePublicIpv4PoolsInput struct { MaxResults *int64 `min:"1" type:"integer"` // The token for the next page of results. - NextToken *string `min:"1" type:"string"` + NextToken *string `type:"string"` // The IDs of the address pools. PoolIds []*string `locationName:"PoolId" locationNameList:"item" type:"list"` @@ -52165,9 +55242,6 @@ func (s *DescribePublicIpv4PoolsInput) Validate() error { if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -52229,6 +55303,10 @@ func (s *DescribePublicIpv4PoolsOutput) SetPublicIpv4Pools(v []*PublicIpv4Pool) type DescribeRegionsInput struct { _ struct{} `type:"structure"` + // Indicates whether to display all Regions, including Regions that are disabled + // for your account. + AllRegions *bool `type:"boolean"` + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -52239,10 +55317,14 @@ type DescribeRegionsInput struct { // // * endpoint - The endpoint of the Region (for example, ec2.us-east-1.amazonaws.com). // + // * opt-in-status - The opt-in status of the Region (opt-in-not-required + // | opted-in | not-opted-in). + // // * region-name - The name of the Region (for example, us-east-1). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // The names of the Regions. + // The names of the Regions. You can specify any Regions, whether they are enabled + // and disabled for your account. RegionNames []*string `locationName:"RegionName" locationNameList:"RegionName" type:"list"` } @@ -52256,6 +55338,12 @@ func (s DescribeRegionsInput) GoString() string { return s.String() } +// SetAllRegions sets the AllRegions field's value. +func (s *DescribeRegionsInput) SetAllRegions(v bool) *DescribeRegionsInput { + s.AllRegions = &v + return s +} + // SetDryRun sets the DryRun field's value. func (s *DescribeRegionsInput) SetDryRun(v bool) *DescribeRegionsInput { s.DryRun = &v @@ -53067,7 +56155,7 @@ type DescribeScheduledInstanceAvailabilityInput struct { // The maximum number of results to return in a single call. This value can // be between 5 and 300. The default value is 300. To retrieve the remaining // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` + MaxResults *int64 `min:"5" type:"integer"` // The maximum available duration, in hours. This value must be greater than // MinSlotDurationInHours and less than 1,720. @@ -53104,6 +56192,9 @@ func (s *DescribeScheduledInstanceAvailabilityInput) Validate() error { if s.FirstSlotStartTimeRange == nil { invalidParams.Add(request.NewErrParamRequired("FirstSlotStartTimeRange")) } + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } if s.Recurrence == nil { invalidParams.Add(request.NewErrParamRequired("Recurrence")) } @@ -53929,7 +57020,7 @@ type DescribeSpotFleetInstancesInput struct { // The maximum number of results to return in a single call. Specify a value // between 1 and 1000. The default value is 1000. To retrieve the remaining // results, make another call with the returned NextToken value. - MaxResults *int64 `locationName:"maxResults" type:"integer"` + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` // The token for the next set of results. NextToken *string `locationName:"nextToken" type:"string"` @@ -53953,6 +57044,9 @@ func (s DescribeSpotFleetInstancesInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeSpotFleetInstancesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeSpotFleetInstancesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } if s.SpotFleetRequestId == nil { invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) } @@ -54047,7 +57141,7 @@ type DescribeSpotFleetRequestHistoryInput struct { // The maximum number of results to return in a single call. Specify a value // between 1 and 1000. The default value is 1000. To retrieve the remaining // results, make another call with the returned NextToken value. - MaxResults *int64 `locationName:"maxResults" type:"integer"` + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` // The token for the next set of results. NextToken *string `locationName:"nextToken" type:"string"` @@ -54076,6 +57170,9 @@ func (s DescribeSpotFleetRequestHistoryInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeSpotFleetRequestHistoryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeSpotFleetRequestHistoryInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } if s.SpotFleetRequestId == nil { invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) } @@ -55008,6 +58105,367 @@ func (s *DescribeTagsOutput) SetTags(v []*TagDescription) *DescribeTagsOutput { return s } +type DescribeTrafficMirrorFiltersInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. The possible values are: + // + // * description: The Traffic Mirror filter description. + // + // * traffic-mirror-filter-id: The ID of the Traffic Mirror filter. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token for the next page of results. + NextToken *string `type:"string"` + + // The ID of the Traffic Mirror filter. + TrafficMirrorFilterIds []*string `locationName:"TrafficMirrorFilterId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTrafficMirrorFiltersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTrafficMirrorFiltersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTrafficMirrorFiltersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTrafficMirrorFiltersInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeTrafficMirrorFiltersInput) SetDryRun(v bool) *DescribeTrafficMirrorFiltersInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeTrafficMirrorFiltersInput) SetFilters(v []*Filter) *DescribeTrafficMirrorFiltersInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeTrafficMirrorFiltersInput) SetMaxResults(v int64) *DescribeTrafficMirrorFiltersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTrafficMirrorFiltersInput) SetNextToken(v string) *DescribeTrafficMirrorFiltersInput { + s.NextToken = &v + return s +} + +// SetTrafficMirrorFilterIds sets the TrafficMirrorFilterIds field's value. +func (s *DescribeTrafficMirrorFiltersInput) SetTrafficMirrorFilterIds(v []*string) *DescribeTrafficMirrorFiltersInput { + s.TrafficMirrorFilterIds = v + return s +} + +type DescribeTrafficMirrorFiltersOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. The value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about one or more Traffic Mirror filters. + TrafficMirrorFilters []*TrafficMirrorFilter `locationName:"trafficMirrorFilterSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTrafficMirrorFiltersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTrafficMirrorFiltersOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTrafficMirrorFiltersOutput) SetNextToken(v string) *DescribeTrafficMirrorFiltersOutput { + s.NextToken = &v + return s +} + +// SetTrafficMirrorFilters sets the TrafficMirrorFilters field's value. +func (s *DescribeTrafficMirrorFiltersOutput) SetTrafficMirrorFilters(v []*TrafficMirrorFilter) *DescribeTrafficMirrorFiltersOutput { + s.TrafficMirrorFilters = v + return s +} + +type DescribeTrafficMirrorSessionsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. The possible values are: + // + // * description: The Traffic Mirror session description. + // + // * network-interface-id: The ID of the Traffic Mirror session network interface. + // + // * owner-id: The ID of the account that owns the Traffic Mirror session. + // + // * packet-length: The assigned number of packets to mirror. + // + // * session-number: The assigned session number. + // + // * traffic-mirror-filter-id: The ID of the Traffic Mirror filter. + // + // * traffic-mirror-session-id: The ID of the Traffic Mirror session. + // + // * traffic-mirror-target-id: The ID of the Traffic Mirror target. + // + // * virtual-network-id: The virtual network ID of the Traffic Mirror session. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token for the next page of results. + NextToken *string `type:"string"` + + // The ID of the Traffic Mirror session. + TrafficMirrorSessionIds []*string `locationName:"TrafficMirrorSessionId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTrafficMirrorSessionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTrafficMirrorSessionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTrafficMirrorSessionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTrafficMirrorSessionsInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeTrafficMirrorSessionsInput) SetDryRun(v bool) *DescribeTrafficMirrorSessionsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeTrafficMirrorSessionsInput) SetFilters(v []*Filter) *DescribeTrafficMirrorSessionsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeTrafficMirrorSessionsInput) SetMaxResults(v int64) *DescribeTrafficMirrorSessionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTrafficMirrorSessionsInput) SetNextToken(v string) *DescribeTrafficMirrorSessionsInput { + s.NextToken = &v + return s +} + +// SetTrafficMirrorSessionIds sets the TrafficMirrorSessionIds field's value. +func (s *DescribeTrafficMirrorSessionsInput) SetTrafficMirrorSessionIds(v []*string) *DescribeTrafficMirrorSessionsInput { + s.TrafficMirrorSessionIds = v + return s +} + +type DescribeTrafficMirrorSessionsOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. The value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror + // sessions are described. Alternatively, you can filter the results. + TrafficMirrorSessions []*TrafficMirrorSession `locationName:"trafficMirrorSessionSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTrafficMirrorSessionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTrafficMirrorSessionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTrafficMirrorSessionsOutput) SetNextToken(v string) *DescribeTrafficMirrorSessionsOutput { + s.NextToken = &v + return s +} + +// SetTrafficMirrorSessions sets the TrafficMirrorSessions field's value. +func (s *DescribeTrafficMirrorSessionsOutput) SetTrafficMirrorSessions(v []*TrafficMirrorSession) *DescribeTrafficMirrorSessionsOutput { + s.TrafficMirrorSessions = v + return s +} + +type DescribeTrafficMirrorTargetsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. The possible values are: + // + // * description: The Traffic Mirror target description. + // + // * network-interface-id: The ID of the Traffic Mirror session network interface. + // + // * network-load-balancer-arn: The Amazon Resource Name (ARN) of the Network + // Load Balancer that is associated with the session. + // + // * owner-id: The ID of the account that owns the Traffic Mirror session. + // + // * traffic-mirror-target-id: The ID of the Traffic Mirror target. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token for the next page of results. + NextToken *string `type:"string"` + + // The ID of the Traffic Mirror targets. + TrafficMirrorTargetIds []*string `locationName:"TrafficMirrorTargetId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTrafficMirrorTargetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTrafficMirrorTargetsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTrafficMirrorTargetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTrafficMirrorTargetsInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeTrafficMirrorTargetsInput) SetDryRun(v bool) *DescribeTrafficMirrorTargetsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeTrafficMirrorTargetsInput) SetFilters(v []*Filter) *DescribeTrafficMirrorTargetsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeTrafficMirrorTargetsInput) SetMaxResults(v int64) *DescribeTrafficMirrorTargetsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTrafficMirrorTargetsInput) SetNextToken(v string) *DescribeTrafficMirrorTargetsInput { + s.NextToken = &v + return s +} + +// SetTrafficMirrorTargetIds sets the TrafficMirrorTargetIds field's value. +func (s *DescribeTrafficMirrorTargetsInput) SetTrafficMirrorTargetIds(v []*string) *DescribeTrafficMirrorTargetsInput { + s.TrafficMirrorTargetIds = v + return s +} + +type DescribeTrafficMirrorTargetsOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. The value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about one or more Traffic Mirror targets. + TrafficMirrorTargets []*TrafficMirrorTarget `locationName:"trafficMirrorTargetSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTrafficMirrorTargetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTrafficMirrorTargetsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTrafficMirrorTargetsOutput) SetNextToken(v string) *DescribeTrafficMirrorTargetsOutput { + s.NextToken = &v + return s +} + +// SetTrafficMirrorTargets sets the TrafficMirrorTargets field's value. +func (s *DescribeTrafficMirrorTargetsOutput) SetTrafficMirrorTargets(v []*TrafficMirrorTarget) *DescribeTrafficMirrorTargetsOutput { + s.TrafficMirrorTargets = v + return s +} + type DescribeTransitGatewayAttachmentsInput struct { _ struct{} `type:"structure"` @@ -56881,8 +60339,8 @@ type DescribeVpcEndpointsInput struct { // // * vpc-endpoint-id: The ID of the endpoint. // - // * vpc-endpoint-state: The state of the endpoint. (pending | available - // | deleting | deleted) + // * vpc-endpoint-state - The state of the endpoint (pendingAcceptance | + // pending | available | deleting | deleted | rejected | failed). // // * tag: - The key/value combination of a tag assigned to the resource. // Use the tag key in the filter name and the tag value as the filter value. @@ -57673,6 +61131,19 @@ type DetachNetworkInterfaceInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // Specifies whether to force a detachment. + // + // * Use the Force parameter only as a last resort to detach a network interface + // from a failed instance. + // + // * If you use the Force parameter to detach a network interface, you might + // not be able to attach a different network interface to the same index + // on the instance without first stopping and starting the instance. + // + // * If you force the detachment of a network interface, the instance metadata + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) + // might not get updated. This means that the attributes associated with + // the detached network interface might still be visible. The instance metadata + // will get updated when you stop and start the instance. Force *bool `locationName:"force" type:"boolean"` } @@ -58055,7 +61526,7 @@ func (s *DisableEbsEncryptionByDefaultInput) SetDryRun(v bool) *DisableEbsEncryp type DisableEbsEncryptionByDefaultOutput struct { _ struct{} `type:"structure"` - // Account-level encryption status after performing the action. + // The updated status of encryption by default. EbsEncryptionByDefault *bool `locationName:"ebsEncryptionByDefault" type:"boolean"` } @@ -59164,18 +62635,17 @@ func (s *DnsServersOptionsModifyStructure) SetEnabled(v bool) *DnsServersOptions type EbsBlockDevice struct { _ struct{} `type:"structure"` - // Indicates whether the EBS volume is deleted on instance termination. + // Indicates whether the EBS volume is deleted on instance termination. For + // more information, see Preserving Amazon EBS Volumes on Instance Termination + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#preserving-volumes-on-termination) + // in the Amazon Elastic Compute Cloud User Guide. DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` // Indicates whether the encryption state of an EBS volume is changed while - // being restored from a backing snapshot. The default effect of setting the - // Encrypted parameter to true through the console, API, or CLI depends on the - // volume's origin (new or from a snapshot), starting encryption state, ownership, - // and whether account-level encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/account-level-encryption.html) - // is enabled. Each default case can be overridden by specifying a customer - // master key (CMK) with the KmsKeyId parameter in addition to setting Encrypted - // to true. For a complete list of possible encryption cases, see Amazon EBS - // Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-parameters) + // being restored from a backing snapshot. The effect of setting the encryption + // state to true depends on the volume origin (new or from a snapshot), starting + // encryption state, ownership, and whether encryption by default is enabled. + // For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-parameters) // in the Amazon Elastic Compute Cloud User Guide. // // In no case can you remove encryption from an encrypted volume. @@ -59202,8 +62672,8 @@ type EbsBlockDevice struct { // it is not used in requests to create gp2, st1, sc1, or standard volumes. Iops *int64 `locationName:"iops" type:"integer"` - // Identifier (key ID, key alias, ID ARN, or alias ARN) for a user-managed CMK - // under which the EBS volume is encrypted. + // Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed + // CMK under which the EBS volume is encrypted. // // This parameter is only supported on BlockDeviceMapping objects called by // RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html), @@ -59226,9 +62696,10 @@ type EbsBlockDevice struct { // size. VolumeSize *int64 `locationName:"volumeSize" type:"integer"` - // The volume type. If you set the type to io1, you must also set the Iops property. + // The volume type. If you set the type to io1, you must also specify the IOPS + // that the volume supports. // - // Default: standard + // Default: gp2 VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` } @@ -59731,7 +63202,7 @@ func (s *EnableEbsEncryptionByDefaultInput) SetDryRun(v bool) *EnableEbsEncrypti type EnableEbsEncryptionByDefaultOutput struct { _ struct{} `type:"structure"` - // Account-level encryption status after performing the action. + // The updated status of encryption by default. EbsEncryptionByDefault *bool `locationName:"ebsEncryptionByDefault" type:"boolean"` } @@ -60352,6 +63823,295 @@ func (s *ExportClientVpnClientConfigurationOutput) SetClientConfiguration(v stri return s } +type ExportImageInput struct { + _ struct{} `type:"structure"` + + // Token to enable idempotency for export image requests. + ClientToken *string `type:"string" idempotencyToken:"true"` + + // A description of the image being exported. The maximum length is 255 bytes. + Description *string `type:"string"` + + // The disk image format. + // + // DiskImageFormat is a required field + DiskImageFormat *string `type:"string" required:"true" enum:"DiskImageFormat"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the image. + // + // ImageId is a required field + ImageId *string `type:"string" required:"true"` + + // The name of the role that grants VM Import/Export permission to export images + // to your S3 bucket. If this parameter is not specified, the default role is + // named 'vmimport'. + RoleName *string `type:"string"` + + // Information about the destination S3 bucket. The bucket must exist and grant + // WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com. + // + // S3ExportLocation is a required field + S3ExportLocation *ExportTaskS3LocationRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s ExportImageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportImageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportImageInput"} + if s.DiskImageFormat == nil { + invalidParams.Add(request.NewErrParamRequired("DiskImageFormat")) + } + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + if s.S3ExportLocation == nil { + invalidParams.Add(request.NewErrParamRequired("S3ExportLocation")) + } + if s.S3ExportLocation != nil { + if err := s.S3ExportLocation.Validate(); err != nil { + invalidParams.AddNested("S3ExportLocation", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *ExportImageInput) SetClientToken(v string) *ExportImageInput { + s.ClientToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ExportImageInput) SetDescription(v string) *ExportImageInput { + s.Description = &v + return s +} + +// SetDiskImageFormat sets the DiskImageFormat field's value. +func (s *ExportImageInput) SetDiskImageFormat(v string) *ExportImageInput { + s.DiskImageFormat = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ExportImageInput) SetDryRun(v bool) *ExportImageInput { + s.DryRun = &v + return s +} + +// SetImageId sets the ImageId field's value. +func (s *ExportImageInput) SetImageId(v string) *ExportImageInput { + s.ImageId = &v + return s +} + +// SetRoleName sets the RoleName field's value. +func (s *ExportImageInput) SetRoleName(v string) *ExportImageInput { + s.RoleName = &v + return s +} + +// SetS3ExportLocation sets the S3ExportLocation field's value. +func (s *ExportImageInput) SetS3ExportLocation(v *ExportTaskS3LocationRequest) *ExportImageInput { + s.S3ExportLocation = v + return s +} + +type ExportImageOutput struct { + _ struct{} `type:"structure"` + + // A description of the image being exported. + Description *string `locationName:"description" type:"string"` + + // The disk image format for the exported image. + DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"` + + // The ID of the export image task. + ExportImageTaskId *string `locationName:"exportImageTaskId" type:"string"` + + // The ID of the image. + ImageId *string `locationName:"imageId" type:"string"` + + // The percent complete of the export image task. + Progress *string `locationName:"progress" type:"string"` + + // The name of the role that grants VM Import/Export permission to export images + // to your S3 bucket. + RoleName *string `locationName:"roleName" type:"string"` + + // Information about the destination S3 bucket. + S3ExportLocation *ExportTaskS3Location `locationName:"s3ExportLocation" type:"structure"` + + // The status of the export image task. The possible values are active, completed, + // deleting, and deleted. + Status *string `locationName:"status" type:"string"` + + // The status message for the export image task. + StatusMessage *string `locationName:"statusMessage" type:"string"` +} + +// String returns the string representation +func (s ExportImageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportImageOutput) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *ExportImageOutput) SetDescription(v string) *ExportImageOutput { + s.Description = &v + return s +} + +// SetDiskImageFormat sets the DiskImageFormat field's value. +func (s *ExportImageOutput) SetDiskImageFormat(v string) *ExportImageOutput { + s.DiskImageFormat = &v + return s +} + +// SetExportImageTaskId sets the ExportImageTaskId field's value. +func (s *ExportImageOutput) SetExportImageTaskId(v string) *ExportImageOutput { + s.ExportImageTaskId = &v + return s +} + +// SetImageId sets the ImageId field's value. +func (s *ExportImageOutput) SetImageId(v string) *ExportImageOutput { + s.ImageId = &v + return s +} + +// SetProgress sets the Progress field's value. +func (s *ExportImageOutput) SetProgress(v string) *ExportImageOutput { + s.Progress = &v + return s +} + +// SetRoleName sets the RoleName field's value. +func (s *ExportImageOutput) SetRoleName(v string) *ExportImageOutput { + s.RoleName = &v + return s +} + +// SetS3ExportLocation sets the S3ExportLocation field's value. +func (s *ExportImageOutput) SetS3ExportLocation(v *ExportTaskS3Location) *ExportImageOutput { + s.S3ExportLocation = v + return s +} + +// SetStatus sets the Status field's value. +func (s *ExportImageOutput) SetStatus(v string) *ExportImageOutput { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ExportImageOutput) SetStatusMessage(v string) *ExportImageOutput { + s.StatusMessage = &v + return s +} + +// Describes an export image task. +type ExportImageTask struct { + _ struct{} `type:"structure"` + + // A description of the image being exported. + Description *string `locationName:"description" type:"string"` + + // The ID of the export image task. + ExportImageTaskId *string `locationName:"exportImageTaskId" type:"string"` + + // The ID of the image. + ImageId *string `locationName:"imageId" type:"string"` + + // The percent complete of the export image task. + Progress *string `locationName:"progress" type:"string"` + + // Information about the destination S3 bucket. + S3ExportLocation *ExportTaskS3Location `locationName:"s3ExportLocation" type:"structure"` + + // The status of the export image task. The possible values are active, completed, + // deleting, and deleted. + Status *string `locationName:"status" type:"string"` + + // The status message for the export image task. + StatusMessage *string `locationName:"statusMessage" type:"string"` +} + +// String returns the string representation +func (s ExportImageTask) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportImageTask) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *ExportImageTask) SetDescription(v string) *ExportImageTask { + s.Description = &v + return s +} + +// SetExportImageTaskId sets the ExportImageTaskId field's value. +func (s *ExportImageTask) SetExportImageTaskId(v string) *ExportImageTask { + s.ExportImageTaskId = &v + return s +} + +// SetImageId sets the ImageId field's value. +func (s *ExportImageTask) SetImageId(v string) *ExportImageTask { + s.ImageId = &v + return s +} + +// SetProgress sets the Progress field's value. +func (s *ExportImageTask) SetProgress(v string) *ExportImageTask { + s.Progress = &v + return s +} + +// SetS3ExportLocation sets the S3ExportLocation field's value. +func (s *ExportImageTask) SetS3ExportLocation(v *ExportTaskS3Location) *ExportImageTask { + s.S3ExportLocation = v + return s +} + +// SetStatus sets the Status field's value. +func (s *ExportImageTask) SetStatus(v string) *ExportImageTask { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ExportImageTask) SetStatusMessage(v string) *ExportImageTask { + s.StatusMessage = &v + return s +} + // Describes an instance export task. type ExportTask struct { _ struct{} `type:"structure"` @@ -60421,6 +64181,87 @@ func (s *ExportTask) SetStatusMessage(v string) *ExportTask { return s } +// Describes the destination for an export image task. +type ExportTaskS3Location struct { + _ struct{} `type:"structure"` + + // The destination S3 bucket. + S3Bucket *string `locationName:"s3Bucket" type:"string"` + + // The prefix (logical hierarchy) in the bucket. + S3Prefix *string `locationName:"s3Prefix" type:"string"` +} + +// String returns the string representation +func (s ExportTaskS3Location) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportTaskS3Location) GoString() string { + return s.String() +} + +// SetS3Bucket sets the S3Bucket field's value. +func (s *ExportTaskS3Location) SetS3Bucket(v string) *ExportTaskS3Location { + s.S3Bucket = &v + return s +} + +// SetS3Prefix sets the S3Prefix field's value. +func (s *ExportTaskS3Location) SetS3Prefix(v string) *ExportTaskS3Location { + s.S3Prefix = &v + return s +} + +// Describes the destination for an export image task. +type ExportTaskS3LocationRequest struct { + _ struct{} `type:"structure"` + + // The destination S3 bucket. + // + // S3Bucket is a required field + S3Bucket *string `type:"string" required:"true"` + + // The prefix (logical hierarchy) in the bucket. + S3Prefix *string `type:"string"` +} + +// String returns the string representation +func (s ExportTaskS3LocationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportTaskS3LocationRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportTaskS3LocationRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportTaskS3LocationRequest"} + if s.S3Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("S3Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3Bucket sets the S3Bucket field's value. +func (s *ExportTaskS3LocationRequest) SetS3Bucket(v string) *ExportTaskS3LocationRequest { + s.S3Bucket = &v + return s +} + +// SetS3Prefix sets the S3Prefix field's value. +func (s *ExportTaskS3LocationRequest) SetS3Prefix(v string) *ExportTaskS3LocationRequest { + s.S3Prefix = &v + return s +} + // Describes the format and location for an instance export task. type ExportToS3Task struct { _ struct{} `type:"structure"` @@ -60539,7 +64380,7 @@ type ExportTransitGatewayRoutesInput struct { // One or more filters. The possible values are: // - // * attachment.transit-gateway-attachment-id- The id of the transit gateway + // * attachment.transit-gateway-attachment-id - The id of the transit gateway // attachment. // // * attachment.resource-id - The resource id of the transit gateway attachment. @@ -60563,7 +64404,7 @@ type ExportTransitGatewayRoutesInput struct { // // * transit-gateway-route-destination-cidr-block - The CIDR range. // - // * type - The type of roue (active | blackhole). + // * type - The type of route (active | blackhole). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The name of the S3 bucket. @@ -60650,6 +64491,39 @@ func (s *ExportTransitGatewayRoutesOutput) SetS3Location(v string) *ExportTransi return s } +// Describes a Reserved Instance whose queued purchase was not deleted. +type FailedQueuedPurchaseDeletion struct { + _ struct{} `type:"structure"` + + // The error. + Error *DeleteQueuedReservedInstancesError `locationName:"error" type:"structure"` + + // The ID of the Reserved Instance. + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` +} + +// String returns the string representation +func (s FailedQueuedPurchaseDeletion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailedQueuedPurchaseDeletion) GoString() string { + return s.String() +} + +// SetError sets the Error field's value. +func (s *FailedQueuedPurchaseDeletion) SetError(v *DeleteQueuedReservedInstancesError) *FailedQueuedPurchaseDeletion { + s.Error = v + return s +} + +// SetReservedInstancesId sets the ReservedInstancesId field's value. +func (s *FailedQueuedPurchaseDeletion) SetReservedInstancesId(v string) *FailedQueuedPurchaseDeletion { + s.ReservedInstancesId = &v + return s +} + // A filter name and value pair that is used to return a more specific list // of results from a describe operation. Filters can be used to match a set // of resources by specific criteria, such as tags, attributes, or IDs. The @@ -61247,7 +65121,8 @@ type FleetLaunchTemplateSpecificationRequest struct { // The name of the launch template. LaunchTemplateName *string `min:"3" type:"string"` - // The version number of the launch template. + // The version number of the launch template. Note: This is a required parameter + // and will be updated soon. Version *string `type:"string"` } @@ -61331,6 +65206,9 @@ type FlowLog struct { // Flow log data can be published to CloudWatch Logs or Amazon S3. LogDestinationType *string `locationName:"logDestinationType" type:"string" enum:"LogDestinationType"` + // The format of the flow log record. + LogFormat *string `locationName:"logFormat" type:"string"` + // The name of the flow log group. LogGroupName *string `locationName:"logGroupName" type:"string"` @@ -61399,6 +65277,12 @@ func (s *FlowLog) SetLogDestinationType(v string) *FlowLog { return s } +// SetLogFormat sets the LogFormat field's value. +func (s *FlowLog) SetLogFormat(v string) *FlowLog { + s.LogFormat = &v + return s +} + // SetLogGroupName sets the LogGroupName field's value. func (s *FlowLog) SetLogGroupName(v string) *FlowLog { s.LogGroupName = &v @@ -61669,6 +65553,178 @@ func (s *FpgaImageState) SetMessage(v string) *FpgaImageState { return s } +type GetCapacityReservationUsageInput struct { + _ struct{} `type:"structure"` + + // The ID of the Capacity Reservation. + // + // CapacityReservationId is a required field + CapacityReservationId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the returned + // nextToken value. + // + // Valid range: Minimum value of 1. Maximum value of 1000. + MaxResults *int64 `min:"1" type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetCapacityReservationUsageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCapacityReservationUsageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCapacityReservationUsageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCapacityReservationUsageInput"} + if s.CapacityReservationId == nil { + invalidParams.Add(request.NewErrParamRequired("CapacityReservationId")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCapacityReservationId sets the CapacityReservationId field's value. +func (s *GetCapacityReservationUsageInput) SetCapacityReservationId(v string) *GetCapacityReservationUsageInput { + s.CapacityReservationId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *GetCapacityReservationUsageInput) SetDryRun(v bool) *GetCapacityReservationUsageInput { + s.DryRun = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetCapacityReservationUsageInput) SetMaxResults(v int64) *GetCapacityReservationUsageInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetCapacityReservationUsageInput) SetNextToken(v string) *GetCapacityReservationUsageInput { + s.NextToken = &v + return s +} + +type GetCapacityReservationUsageOutput struct { + _ struct{} `type:"structure"` + + // The remaining capacity. Indicates the number of instances that can be launched + // in the Capacity Reservation. + AvailableInstanceCount *int64 `locationName:"availableInstanceCount" type:"integer"` + + // The ID of the Capacity Reservation. + CapacityReservationId *string `locationName:"capacityReservationId" type:"string"` + + // The type of instance for which the Capacity Reservation reserves capacity. + InstanceType *string `locationName:"instanceType" type:"string"` + + // Information about the Capacity Reservation usage. + InstanceUsages []*InstanceUsage `locationName:"instanceUsageSet" locationNameList:"item" type:"list"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // The current state of the Capacity Reservation. A Capacity Reservation can + // be in one of the following states: + // + // * active - The Capacity Reservation is active and the capacity is available + // for your use. + // + // * expired - The Capacity Reservation expired automatically at the date + // and time specified in your request. The reserved capacity is no longer + // available for your use. + // + // * cancelled - The Capacity Reservation was manually cancelled. The reserved + // capacity is no longer available for your use. + // + // * pending - The Capacity Reservation request was successful but the capacity + // provisioning is still pending. + // + // * failed - The Capacity Reservation request has failed. A request might + // fail due to invalid request parameters, capacity constraints, or instance + // limit constraints. Failed requests are retained for 60 minutes. + State *string `locationName:"state" type:"string" enum:"CapacityReservationState"` + + // The number of instances for which the Capacity Reservation reserves capacity. + TotalInstanceCount *int64 `locationName:"totalInstanceCount" type:"integer"` +} + +// String returns the string representation +func (s GetCapacityReservationUsageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCapacityReservationUsageOutput) GoString() string { + return s.String() +} + +// SetAvailableInstanceCount sets the AvailableInstanceCount field's value. +func (s *GetCapacityReservationUsageOutput) SetAvailableInstanceCount(v int64) *GetCapacityReservationUsageOutput { + s.AvailableInstanceCount = &v + return s +} + +// SetCapacityReservationId sets the CapacityReservationId field's value. +func (s *GetCapacityReservationUsageOutput) SetCapacityReservationId(v string) *GetCapacityReservationUsageOutput { + s.CapacityReservationId = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *GetCapacityReservationUsageOutput) SetInstanceType(v string) *GetCapacityReservationUsageOutput { + s.InstanceType = &v + return s +} + +// SetInstanceUsages sets the InstanceUsages field's value. +func (s *GetCapacityReservationUsageOutput) SetInstanceUsages(v []*InstanceUsage) *GetCapacityReservationUsageOutput { + s.InstanceUsages = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetCapacityReservationUsageOutput) SetNextToken(v string) *GetCapacityReservationUsageOutput { + s.NextToken = &v + return s +} + +// SetState sets the State field's value. +func (s *GetCapacityReservationUsageOutput) SetState(v string) *GetCapacityReservationUsageOutput { + s.State = &v + return s +} + +// SetTotalInstanceCount sets the TotalInstanceCount field's value. +func (s *GetCapacityReservationUsageOutput) SetTotalInstanceCount(v int64) *GetCapacityReservationUsageOutput { + s.TotalInstanceCount = &v + return s +} + type GetConsoleOutputInput struct { _ struct{} `type:"structure"` @@ -61893,8 +65949,7 @@ func (s *GetEbsDefaultKmsKeyIdInput) SetDryRun(v bool) *GetEbsDefaultKmsKeyIdInp type GetEbsDefaultKmsKeyIdOutput struct { _ struct{} `type:"structure"` - // The full ARN of the default CMK that your account uses to encrypt an EBS - // volume when no CMK is specified in the API call that creates the volume. + // The Amazon Resource Name (ARN) of the default CMK for encryption by default. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` } @@ -61943,7 +65998,7 @@ func (s *GetEbsEncryptionByDefaultInput) SetDryRun(v bool) *GetEbsEncryptionByDe type GetEbsEncryptionByDefaultOutput struct { _ struct{} `type:"structure"` - // Indicates whether default encryption for EBS volumes is enabled or disabled. + // Indicates whether encryption by default is enabled. EbsEncryptionByDefault *bool `locationName:"ebsEncryptionByDefault" type:"boolean"` } @@ -62957,9 +67012,8 @@ type Host struct { // The number of new instances that can be launched onto the Dedicated Host. AvailableCapacity *AvailableCapacity `locationName:"availableCapacity" type:"structure"` - // Unique, case-sensitive identifier that you provide to ensure idempotency - // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" type:"string"` // The ID of the Dedicated Host. @@ -62968,6 +67022,10 @@ type Host struct { // The hardware specifications of the Dedicated Host. HostProperties *HostProperties `locationName:"hostProperties" type:"structure"` + // Indicates whether host recovery is enabled or disabled for the Dedicated + // Host. + HostRecovery *string `locationName:"hostRecovery" type:"string" enum:"HostRecovery"` + // The reservation ID of the Dedicated Host. This returns a null response if // the Dedicated Host doesn't have an associated reservation. HostReservationId *string `locationName:"hostReservationId" type:"string"` @@ -63037,6 +67095,12 @@ func (s *Host) SetHostProperties(v *HostProperties) *Host { return s } +// SetHostRecovery sets the HostRecovery field's value. +func (s *Host) SetHostRecovery(v string) *Host { + s.HostRecovery = &v + return s +} + // SetHostReservationId sets the HostReservationId field's value. func (s *Host) SetHostReservationId(v string) *Host { s.HostReservationId = &v @@ -63375,6 +67439,54 @@ func (s *HostReservation) SetUpfrontPrice(v string) *HostReservation { return s } +// The internet key exchange (IKE) version permitted for the VPN tunnel. +type IKEVersionsListValue struct { + _ struct{} `type:"structure"` + + // The IKE version. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s IKEVersionsListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IKEVersionsListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *IKEVersionsListValue) SetValue(v string) *IKEVersionsListValue { + s.Value = &v + return s +} + +// The IKE version that is permitted for the VPN tunnel. +type IKEVersionsRequestListValue struct { + _ struct{} `type:"structure"` + + // The IKE version. + Value *string `type:"string"` +} + +// String returns the string representation +func (s IKEVersionsRequestListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IKEVersionsRequestListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *IKEVersionsRequestListValue) SetValue(v string) *IKEVersionsRequestListValue { + s.Value = &v + return s +} + // Describes an IAM instance profile. type IamInstanceProfile struct { _ struct{} `type:"structure"` @@ -63623,7 +67735,7 @@ type Image struct { // The AWS account ID of the image owner. OwnerId *string `locationName:"imageOwnerId" type:"string"` - // The value is Windows for Windows AMIs; otherwise blank. + // This value is set to windows for Windows AMIs; otherwise, it is blank. Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` // Any product codes associated with the AMI. @@ -63979,13 +68091,12 @@ func (s *ImportClientVpnClientCertificateRevocationListOutput) SetReturn(v bool) return s } -// Contains the parameters for ImportImage. type ImportImageInput struct { _ struct{} `type:"structure"` // The architecture of the virtual machine. // - // Valid values: i386 | x86_64 + // Valid values: i386 | x86_64 | arm64 Architecture *string `type:"string"` // The client-specific data. @@ -64049,21 +68160,15 @@ type ImportImageInput struct { // The license type to be used for the Amazon Machine Image (AMI) after importing. // - // Note: You may only use BYOL if you have existing licenses with rights to - // use these licenses in a third party cloud like AWS. For more information, - // see Prerequisites (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image) - // in the VM Import/Export User Guide. - // - // Valid values include: - // - // * Auto - Detects the source-system operating system (OS) and applies the - // appropriate license. - // - // * AWS - Replaces the source-system license with an AWS license, if appropriate. - // - // * BYOL - Retains the source-system license, if appropriate. + // By default, we detect the source-system operating system (OS) and apply the + // appropriate license. Specify AWS to replace the source-system license with + // an AWS license, if appropriate. Specify BYOL to retain the source-system + // license, if appropriate. // - // Default value: Auto + // To use BYOL, you must have existing licenses with rights to use these licenses + // in a third party cloud, such as AWS. For more information, see Prerequisites + // (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image) + // in the VM Import/Export User Guide. LicenseType *string `type:"string"` // The operating system of the virtual machine. @@ -64157,7 +68262,6 @@ func (s *ImportImageInput) SetRoleName(v string) *ImportImageInput { return s } -// Contains the output for ImportImage. type ImportImageOutput struct { _ struct{} `type:"structure"` @@ -64296,7 +68400,7 @@ type ImportImageTask struct { // The architecture of the virtual machine. // - // Valid values: i386 | x86_64 + // Valid values: i386 | x86_64 | arm64 Architecture *string `locationName:"architecture" type:"string"` // A description of the import task. @@ -64427,7 +68531,6 @@ func (s *ImportImageTask) SetStatusMessage(v string) *ImportImageTask { return s } -// Contains the parameters for ImportInstance. type ImportInstanceInput struct { _ struct{} `type:"structure"` @@ -64632,7 +68735,6 @@ func (s *ImportInstanceLaunchSpecification) SetUserData(v *UserData) *ImportInst return s } -// Contains the output for ImportInstance. type ImportInstanceOutput struct { _ struct{} `type:"structure"` @@ -64884,7 +68986,6 @@ func (s *ImportKeyPairOutput) SetKeyName(v string) *ImportKeyPairOutput { return s } -// Contains the parameters for ImportSnapshot. type ImportSnapshotInput struct { _ struct{} `type:"structure"` @@ -65005,7 +69106,6 @@ func (s *ImportSnapshotInput) SetRoleName(v string) *ImportSnapshotInput { return s } -// Contains the output for ImportSnapshot. type ImportSnapshotOutput struct { _ struct{} `type:"structure"` @@ -65089,7 +69189,6 @@ func (s *ImportSnapshotTask) SetSnapshotTaskDetail(v *SnapshotTaskDetail) *Impor return s } -// Contains the parameters for ImportVolume. type ImportVolumeInput struct { _ struct{} `type:"structure"` @@ -65187,7 +69286,6 @@ func (s *ImportVolumeInput) SetVolume(v *VolumeDetail) *ImportVolumeInput { return s } -// Contains the output for ImportVolume. type ImportVolumeOutput struct { _ struct{} `type:"structure"` @@ -66429,8 +70527,8 @@ type InstanceNetworkInterfaceSpecification struct { // request. SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` - // The ID of the subnet associated with the network string. Applies only if - // creating a network interface when launching an instance. + // The ID of the subnet associated with the network interface. Applies only + // if creating a network interface when launching an instance. SubnetId *string `locationName:"subnetId" type:"string"` } @@ -66929,6 +71027,39 @@ func (s *InstanceStatusSummary) SetStatus(v string) *InstanceStatusSummary { return s } +// Information about the Capacity Reservation usage. +type InstanceUsage struct { + _ struct{} `type:"structure"` + + // The ID of the AWS account that is making use of the Capacity Reservation. + AccountId *string `locationName:"accountId" type:"string"` + + // The number of instances the AWS account currently has in the Capacity Reservation. + UsedInstanceCount *int64 `locationName:"usedInstanceCount" type:"integer"` +} + +// String returns the string representation +func (s InstanceUsage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceUsage) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *InstanceUsage) SetAccountId(v string) *InstanceUsage { + s.AccountId = &v + return s +} + +// SetUsedInstanceCount sets the UsedInstanceCount field's value. +func (s *InstanceUsage) SetUsedInstanceCount(v int64) *InstanceUsage { + s.UsedInstanceCount = &v + return s +} + // Describes an internet gateway. type InternetGateway struct { _ struct{} `type:"structure"` @@ -67865,9 +71996,8 @@ type LaunchTemplateCpuOptionsRequest struct { // The number of CPU cores for the instance. CoreCount *int64 `type:"integer"` - // The number of threads per CPU core. To disable Intel Hyper-Threading Technology - // for the instance, specify a value of 1. Otherwise, specify the default value - // of 2. + // The number of threads per CPU core. To disable multithreading for the instance, + // specify a value of 1. Otherwise, specify the default value of 2. ThreadsPerCore *int64 `type:"integer"` } @@ -69528,7 +73658,7 @@ func (s *ModifyCapacityReservationInput) SetInstanceCount(v int64) *ModifyCapaci type ModifyCapacityReservationOutput struct { _ struct{} `type:"structure"` - // Information about the Capacity Reservation. + // Returns true if the request succeeds; otherwise, it returns an error. Return *bool `locationName:"return" type:"boolean"` } @@ -69586,6 +73716,13 @@ type ModifyClientVpnEndpointInput struct { // The ARN of the server certificate to be used. The server certificate must // be provisioned in AWS Certificate Manager (ACM). ServerCertificateArn *string `type:"string"` + + // Indicates whether the VPN is split-tunnel. + // + // For information about split-tunnel VPN endpoints, see Split-Tunnel AWS Client + // VPN Endpoint (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html) + // in the AWS Client VPN Administrator Guide. + SplitTunnel *bool `type:"boolean"` } // String returns the string representation @@ -69647,6 +73784,12 @@ func (s *ModifyClientVpnEndpointInput) SetServerCertificateArn(v string) *Modify return s } +// SetSplitTunnel sets the SplitTunnel field's value. +func (s *ModifyClientVpnEndpointInput) SetSplitTunnel(v bool) *ModifyClientVpnEndpointInput { + s.SplitTunnel = &v + return s +} + type ModifyClientVpnEndpointOutput struct { _ struct{} `type:"structure"` @@ -69679,25 +73822,24 @@ type ModifyEbsDefaultKmsKeyIdInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use to encrypt the volume. This parameter is only required if - // you want to use a non-default CMK; if this parameter is not specified, the - // default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted flag - // must also be set. + // The identifier of the AWS Key Management Service (AWS KMS) customer master + // key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, + // your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted + // state must be true. // - // The CMK identifier may be provided in any of the following formats: + // You can specify the CMK using any of the following: // - // * Key ID + // * Key ID. For example, key/1234abcd-12ab-34cd-56ef-1234567890ab. // - // * Key alias + // * Key alias. For example, alias/ExampleAlias. // - // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed - // by the Region of the CMK, the AWS account ID of the CMK owner, the key - // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // * Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. // - // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the Region of the CMK, the AWS account ID of the CMK owner, - // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // + // AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, + // alias, or ARN that is not valid, the action can appear to complete, but eventually + // fails. // // KmsKeyId is a required field KmsKeyId *string `type:"string" required:"true"` @@ -69741,8 +73883,7 @@ func (s *ModifyEbsDefaultKmsKeyIdInput) SetKmsKeyId(v string) *ModifyEbsDefaultK type ModifyEbsDefaultKmsKeyIdOutput struct { _ struct{} `type:"structure"` - // The full ARN of the default CMK that your account uses to encrypt an EBS - // volume when no CMK is specified in the API call that creates the volume. + // The Amazon Resource Name (ARN) of the default CMK for encryption by default. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` } @@ -70017,14 +74158,17 @@ type ModifyHostsInput struct { _ struct{} `type:"structure"` // Specify whether to enable or disable auto-placement. - // - // AutoPlacement is a required field - AutoPlacement *string `locationName:"autoPlacement" type:"string" required:"true" enum:"AutoPlacement"` + AutoPlacement *string `locationName:"autoPlacement" type:"string" enum:"AutoPlacement"` // The IDs of the Dedicated Hosts to modify. // // HostIds is a required field HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list" required:"true"` + + // Indicates whether to enable or disable host recovery for the Dedicated Host. + // For more information, see Host Recovery (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html) + // in the Amazon Elastic Compute Cloud User Guide. + HostRecovery *string `type:"string" enum:"HostRecovery"` } // String returns the string representation @@ -70040,9 +74184,6 @@ func (s ModifyHostsInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ModifyHostsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ModifyHostsInput"} - if s.AutoPlacement == nil { - invalidParams.Add(request.NewErrParamRequired("AutoPlacement")) - } if s.HostIds == nil { invalidParams.Add(request.NewErrParamRequired("HostIds")) } @@ -70065,6 +74206,12 @@ func (s *ModifyHostsInput) SetHostIds(v []*string) *ModifyHostsInput { return s } +// SetHostRecovery sets the HostRecovery field's value. +func (s *ModifyHostsInput) SetHostRecovery(v string) *ModifyHostsInput { + s.HostRecovery = &v + return s +} + type ModifyHostsOutput struct { _ struct{} `type:"structure"` @@ -71449,6 +75596,9 @@ type ModifySpotFleetRequestInput struct { // the Spot Fleet. ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"` + // The number of On-Demand Instances in the fleet. + OnDemandTargetCapacity *int64 `type:"integer"` + // The ID of the Spot Fleet request. // // SpotFleetRequestId is a required field @@ -71487,6 +75637,12 @@ func (s *ModifySpotFleetRequestInput) SetExcessCapacityTerminationPolicy(v strin return s } +// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. +func (s *ModifySpotFleetRequestInput) SetOnDemandTargetCapacity(v int64) *ModifySpotFleetRequestInput { + s.OnDemandTargetCapacity = &v + return s +} + // SetSpotFleetRequestId sets the SpotFleetRequestId field's value. func (s *ModifySpotFleetRequestInput) SetSpotFleetRequestId(v string) *ModifySpotFleetRequestInput { s.SpotFleetRequestId = &v @@ -71601,6 +75757,413 @@ func (s ModifySubnetAttributeOutput) GoString() string { return s.String() } +type ModifyTrafficMirrorFilterNetworkServicesInput struct { + _ struct{} `type:"structure"` + + // The network service, for example Amazon DNS, that you want to mirror. + AddNetworkServices []*string `locationName:"AddNetworkService" locationNameList:"item" type:"list"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The network service, for example Amazon DNS, that you no longer want to mirror. + RemoveNetworkServices []*string `locationName:"RemoveNetworkService" locationNameList:"item" type:"list"` + + // The ID of the Traffic Mirror filter. + // + // TrafficMirrorFilterId is a required field + TrafficMirrorFilterId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyTrafficMirrorFilterNetworkServicesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyTrafficMirrorFilterNetworkServicesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyTrafficMirrorFilterNetworkServicesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyTrafficMirrorFilterNetworkServicesInput"} + if s.TrafficMirrorFilterId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficMirrorFilterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAddNetworkServices sets the AddNetworkServices field's value. +func (s *ModifyTrafficMirrorFilterNetworkServicesInput) SetAddNetworkServices(v []*string) *ModifyTrafficMirrorFilterNetworkServicesInput { + s.AddNetworkServices = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyTrafficMirrorFilterNetworkServicesInput) SetDryRun(v bool) *ModifyTrafficMirrorFilterNetworkServicesInput { + s.DryRun = &v + return s +} + +// SetRemoveNetworkServices sets the RemoveNetworkServices field's value. +func (s *ModifyTrafficMirrorFilterNetworkServicesInput) SetRemoveNetworkServices(v []*string) *ModifyTrafficMirrorFilterNetworkServicesInput { + s.RemoveNetworkServices = v + return s +} + +// SetTrafficMirrorFilterId sets the TrafficMirrorFilterId field's value. +func (s *ModifyTrafficMirrorFilterNetworkServicesInput) SetTrafficMirrorFilterId(v string) *ModifyTrafficMirrorFilterNetworkServicesInput { + s.TrafficMirrorFilterId = &v + return s +} + +type ModifyTrafficMirrorFilterNetworkServicesOutput struct { + _ struct{} `type:"structure"` + + // The Traffic Mirror filter that the network service is associated with. + TrafficMirrorFilter *TrafficMirrorFilter `locationName:"trafficMirrorFilter" type:"structure"` +} + +// String returns the string representation +func (s ModifyTrafficMirrorFilterNetworkServicesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyTrafficMirrorFilterNetworkServicesOutput) GoString() string { + return s.String() +} + +// SetTrafficMirrorFilter sets the TrafficMirrorFilter field's value. +func (s *ModifyTrafficMirrorFilterNetworkServicesOutput) SetTrafficMirrorFilter(v *TrafficMirrorFilter) *ModifyTrafficMirrorFilterNetworkServicesOutput { + s.TrafficMirrorFilter = v + return s +} + +type ModifyTrafficMirrorFilterRuleInput struct { + _ struct{} `type:"structure"` + + // The description to assign to the Traffic Mirror rule. + Description *string `type:"string"` + + // The destination CIDR block to assign to the Traffic Mirror rule. + DestinationCidrBlock *string `type:"string"` + + // The destination ports that are associated with the Traffic Mirror rule. + DestinationPortRange *TrafficMirrorPortRangeRequest `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The protocol, for example TCP, to assign to the Traffic Mirror rule. + Protocol *int64 `type:"integer"` + + // The properties that you want to remove from the Traffic Mirror filter rule. + // + // When you remove a property from a Traffic Mirror filter rule, the property + // is set to the default. + RemoveFields []*string `locationName:"RemoveField" type:"list"` + + // The action to assign to the rule. + RuleAction *string `type:"string" enum:"TrafficMirrorRuleAction"` + + // The number of the Traffic Mirror rule. This number must be unique for each + // Traffic Mirror rule in a given direction. The rules are processed in ascending + // order by rule number. + RuleNumber *int64 `type:"integer"` + + // The source CIDR block to assign to the Traffic Mirror rule. + SourceCidrBlock *string `type:"string"` + + // The port range to assign to the Traffic Mirror rule. + SourcePortRange *TrafficMirrorPortRangeRequest `type:"structure"` + + // The type of traffic (ingress | egress) to assign to the rule. + TrafficDirection *string `type:"string" enum:"TrafficDirection"` + + // The ID of the Traffic Mirror rule. + // + // TrafficMirrorFilterRuleId is a required field + TrafficMirrorFilterRuleId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyTrafficMirrorFilterRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyTrafficMirrorFilterRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyTrafficMirrorFilterRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyTrafficMirrorFilterRuleInput"} + if s.TrafficMirrorFilterRuleId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficMirrorFilterRuleId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *ModifyTrafficMirrorFilterRuleInput) SetDescription(v string) *ModifyTrafficMirrorFilterRuleInput { + s.Description = &v + return s +} + +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *ModifyTrafficMirrorFilterRuleInput) SetDestinationCidrBlock(v string) *ModifyTrafficMirrorFilterRuleInput { + s.DestinationCidrBlock = &v + return s +} + +// SetDestinationPortRange sets the DestinationPortRange field's value. +func (s *ModifyTrafficMirrorFilterRuleInput) SetDestinationPortRange(v *TrafficMirrorPortRangeRequest) *ModifyTrafficMirrorFilterRuleInput { + s.DestinationPortRange = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyTrafficMirrorFilterRuleInput) SetDryRun(v bool) *ModifyTrafficMirrorFilterRuleInput { + s.DryRun = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *ModifyTrafficMirrorFilterRuleInput) SetProtocol(v int64) *ModifyTrafficMirrorFilterRuleInput { + s.Protocol = &v + return s +} + +// SetRemoveFields sets the RemoveFields field's value. +func (s *ModifyTrafficMirrorFilterRuleInput) SetRemoveFields(v []*string) *ModifyTrafficMirrorFilterRuleInput { + s.RemoveFields = v + return s +} + +// SetRuleAction sets the RuleAction field's value. +func (s *ModifyTrafficMirrorFilterRuleInput) SetRuleAction(v string) *ModifyTrafficMirrorFilterRuleInput { + s.RuleAction = &v + return s +} + +// SetRuleNumber sets the RuleNumber field's value. +func (s *ModifyTrafficMirrorFilterRuleInput) SetRuleNumber(v int64) *ModifyTrafficMirrorFilterRuleInput { + s.RuleNumber = &v + return s +} + +// SetSourceCidrBlock sets the SourceCidrBlock field's value. +func (s *ModifyTrafficMirrorFilterRuleInput) SetSourceCidrBlock(v string) *ModifyTrafficMirrorFilterRuleInput { + s.SourceCidrBlock = &v + return s +} + +// SetSourcePortRange sets the SourcePortRange field's value. +func (s *ModifyTrafficMirrorFilterRuleInput) SetSourcePortRange(v *TrafficMirrorPortRangeRequest) *ModifyTrafficMirrorFilterRuleInput { + s.SourcePortRange = v + return s +} + +// SetTrafficDirection sets the TrafficDirection field's value. +func (s *ModifyTrafficMirrorFilterRuleInput) SetTrafficDirection(v string) *ModifyTrafficMirrorFilterRuleInput { + s.TrafficDirection = &v + return s +} + +// SetTrafficMirrorFilterRuleId sets the TrafficMirrorFilterRuleId field's value. +func (s *ModifyTrafficMirrorFilterRuleInput) SetTrafficMirrorFilterRuleId(v string) *ModifyTrafficMirrorFilterRuleInput { + s.TrafficMirrorFilterRuleId = &v + return s +} + +type ModifyTrafficMirrorFilterRuleOutput struct { + _ struct{} `type:"structure"` + + // Modifies a Traffic Mirror rule. + TrafficMirrorFilterRule *TrafficMirrorFilterRule `locationName:"trafficMirrorFilterRule" type:"structure"` +} + +// String returns the string representation +func (s ModifyTrafficMirrorFilterRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyTrafficMirrorFilterRuleOutput) GoString() string { + return s.String() +} + +// SetTrafficMirrorFilterRule sets the TrafficMirrorFilterRule field's value. +func (s *ModifyTrafficMirrorFilterRuleOutput) SetTrafficMirrorFilterRule(v *TrafficMirrorFilterRule) *ModifyTrafficMirrorFilterRuleOutput { + s.TrafficMirrorFilterRule = v + return s +} + +type ModifyTrafficMirrorSessionInput struct { + _ struct{} `type:"structure"` + + // The description to assign to the Traffic Mirror session. + Description *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The number of bytes in each packet to mirror. These are bytes after the VXLAN + // header. To mirror a subset, set this to the length (in bytes) to mirror. + // For example, if you set this value to 100, then the first 100 bytes that + // meet the filter criteria are copied to the target. Do not specify this parameter + // when you want to mirror the entire packet. + PacketLength *int64 `type:"integer"` + + // The properties that you want to remove from the Traffic Mirror session. + // + // When you remove a property from a Traffic Mirror session, the property is + // set to the default. + RemoveFields []*string `locationName:"RemoveField" type:"list"` + + // The session number determines the order in which sessions are evaluated when + // an interface is used by multiple sessions. The first session with a matching + // filter is the one that mirrors the packets. + // + // Valid values are 1-32766. + SessionNumber *int64 `type:"integer"` + + // The ID of the Traffic Mirror filter. + TrafficMirrorFilterId *string `type:"string"` + + // The ID of the Traffic Mirror session. + // + // TrafficMirrorSessionId is a required field + TrafficMirrorSessionId *string `type:"string" required:"true"` + + // The Traffic Mirror target. The target must be in the same VPC as the source, + // or have a VPC peering connection with the source. + TrafficMirrorTargetId *string `type:"string"` + + // The virtual network ID of the Traffic Mirror session. + VirtualNetworkId *int64 `type:"integer"` +} + +// String returns the string representation +func (s ModifyTrafficMirrorSessionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyTrafficMirrorSessionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyTrafficMirrorSessionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyTrafficMirrorSessionInput"} + if s.TrafficMirrorSessionId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficMirrorSessionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *ModifyTrafficMirrorSessionInput) SetDescription(v string) *ModifyTrafficMirrorSessionInput { + s.Description = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyTrafficMirrorSessionInput) SetDryRun(v bool) *ModifyTrafficMirrorSessionInput { + s.DryRun = &v + return s +} + +// SetPacketLength sets the PacketLength field's value. +func (s *ModifyTrafficMirrorSessionInput) SetPacketLength(v int64) *ModifyTrafficMirrorSessionInput { + s.PacketLength = &v + return s +} + +// SetRemoveFields sets the RemoveFields field's value. +func (s *ModifyTrafficMirrorSessionInput) SetRemoveFields(v []*string) *ModifyTrafficMirrorSessionInput { + s.RemoveFields = v + return s +} + +// SetSessionNumber sets the SessionNumber field's value. +func (s *ModifyTrafficMirrorSessionInput) SetSessionNumber(v int64) *ModifyTrafficMirrorSessionInput { + s.SessionNumber = &v + return s +} + +// SetTrafficMirrorFilterId sets the TrafficMirrorFilterId field's value. +func (s *ModifyTrafficMirrorSessionInput) SetTrafficMirrorFilterId(v string) *ModifyTrafficMirrorSessionInput { + s.TrafficMirrorFilterId = &v + return s +} + +// SetTrafficMirrorSessionId sets the TrafficMirrorSessionId field's value. +func (s *ModifyTrafficMirrorSessionInput) SetTrafficMirrorSessionId(v string) *ModifyTrafficMirrorSessionInput { + s.TrafficMirrorSessionId = &v + return s +} + +// SetTrafficMirrorTargetId sets the TrafficMirrorTargetId field's value. +func (s *ModifyTrafficMirrorSessionInput) SetTrafficMirrorTargetId(v string) *ModifyTrafficMirrorSessionInput { + s.TrafficMirrorTargetId = &v + return s +} + +// SetVirtualNetworkId sets the VirtualNetworkId field's value. +func (s *ModifyTrafficMirrorSessionInput) SetVirtualNetworkId(v int64) *ModifyTrafficMirrorSessionInput { + s.VirtualNetworkId = &v + return s +} + +type ModifyTrafficMirrorSessionOutput struct { + _ struct{} `type:"structure"` + + // Information about the Traffic Mirror session. + TrafficMirrorSession *TrafficMirrorSession `locationName:"trafficMirrorSession" type:"structure"` +} + +// String returns the string representation +func (s ModifyTrafficMirrorSessionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyTrafficMirrorSessionOutput) GoString() string { + return s.String() +} + +// SetTrafficMirrorSession sets the TrafficMirrorSession field's value. +func (s *ModifyTrafficMirrorSessionOutput) SetTrafficMirrorSession(v *TrafficMirrorSession) *ModifyTrafficMirrorSessionOutput { + s.TrafficMirrorSession = v + return s +} + type ModifyTransitGatewayVpcAttachmentInput struct { _ struct{} `type:"structure"` @@ -72115,8 +76678,7 @@ type ModifyVpcEndpointInput struct { DryRun *bool `type:"boolean"` // A policy to attach to the endpoint that controls access to the service. The - // policy must be in valid JSON format. If this parameter is not specified, - // we attach a default policy that allows full access to the service. + // policy must be in valid JSON format. PolicyDocument *string `type:"string"` // (Interface endpoint) Indicate whether a private hosted zone is associated @@ -72641,6 +77203,9 @@ func (s *ModifyVpcTenancyOutput) SetReturnValue(v bool) *ModifyVpcTenancyOutput type ModifyVpnConnectionInput struct { _ struct{} `type:"structure"` + // The ID of the customer gateway at your end of the VPN connection. + CustomerGatewayId *string `type:"string"` + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -72682,6 +77247,12 @@ func (s *ModifyVpnConnectionInput) Validate() error { return nil } +// SetCustomerGatewayId sets the CustomerGatewayId field's value. +func (s *ModifyVpnConnectionInput) SetCustomerGatewayId(v string) *ModifyVpnConnectionInput { + s.CustomerGatewayId = &v + return s +} + // SetDryRun sets the DryRun field's value. func (s *ModifyVpnConnectionInput) SetDryRun(v bool) *ModifyVpnConnectionInput { s.DryRun = &v @@ -72729,6 +77300,416 @@ func (s *ModifyVpnConnectionOutput) SetVpnConnection(v *VpnConnection) *ModifyVp return s } +type ModifyVpnTunnelCertificateInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the AWS Site-to-Site VPN connection. + // + // VpnConnectionId is a required field + VpnConnectionId *string `type:"string" required:"true"` + + // The external IP address of the VPN tunnel. + // + // VpnTunnelOutsideIpAddress is a required field + VpnTunnelOutsideIpAddress *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyVpnTunnelCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpnTunnelCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyVpnTunnelCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpnTunnelCertificateInput"} + if s.VpnConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) + } + if s.VpnTunnelOutsideIpAddress == nil { + invalidParams.Add(request.NewErrParamRequired("VpnTunnelOutsideIpAddress")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyVpnTunnelCertificateInput) SetDryRun(v bool) *ModifyVpnTunnelCertificateInput { + s.DryRun = &v + return s +} + +// SetVpnConnectionId sets the VpnConnectionId field's value. +func (s *ModifyVpnTunnelCertificateInput) SetVpnConnectionId(v string) *ModifyVpnTunnelCertificateInput { + s.VpnConnectionId = &v + return s +} + +// SetVpnTunnelOutsideIpAddress sets the VpnTunnelOutsideIpAddress field's value. +func (s *ModifyVpnTunnelCertificateInput) SetVpnTunnelOutsideIpAddress(v string) *ModifyVpnTunnelCertificateInput { + s.VpnTunnelOutsideIpAddress = &v + return s +} + +type ModifyVpnTunnelCertificateOutput struct { + _ struct{} `type:"structure"` + + // Describes a VPN connection. + VpnConnection *VpnConnection `locationName:"vpnConnection" type:"structure"` +} + +// String returns the string representation +func (s ModifyVpnTunnelCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpnTunnelCertificateOutput) GoString() string { + return s.String() +} + +// SetVpnConnection sets the VpnConnection field's value. +func (s *ModifyVpnTunnelCertificateOutput) SetVpnConnection(v *VpnConnection) *ModifyVpnTunnelCertificateOutput { + s.VpnConnection = v + return s +} + +type ModifyVpnTunnelOptionsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The tunnel options to modify. + // + // TunnelOptions is a required field + TunnelOptions *ModifyVpnTunnelOptionsSpecification `type:"structure" required:"true"` + + // The ID of the AWS Site-to-Site VPN connection. + // + // VpnConnectionId is a required field + VpnConnectionId *string `type:"string" required:"true"` + + // The external IP address of the VPN tunnel. + // + // VpnTunnelOutsideIpAddress is a required field + VpnTunnelOutsideIpAddress *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyVpnTunnelOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpnTunnelOptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyVpnTunnelOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpnTunnelOptionsInput"} + if s.TunnelOptions == nil { + invalidParams.Add(request.NewErrParamRequired("TunnelOptions")) + } + if s.VpnConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) + } + if s.VpnTunnelOutsideIpAddress == nil { + invalidParams.Add(request.NewErrParamRequired("VpnTunnelOutsideIpAddress")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyVpnTunnelOptionsInput) SetDryRun(v bool) *ModifyVpnTunnelOptionsInput { + s.DryRun = &v + return s +} + +// SetTunnelOptions sets the TunnelOptions field's value. +func (s *ModifyVpnTunnelOptionsInput) SetTunnelOptions(v *ModifyVpnTunnelOptionsSpecification) *ModifyVpnTunnelOptionsInput { + s.TunnelOptions = v + return s +} + +// SetVpnConnectionId sets the VpnConnectionId field's value. +func (s *ModifyVpnTunnelOptionsInput) SetVpnConnectionId(v string) *ModifyVpnTunnelOptionsInput { + s.VpnConnectionId = &v + return s +} + +// SetVpnTunnelOutsideIpAddress sets the VpnTunnelOutsideIpAddress field's value. +func (s *ModifyVpnTunnelOptionsInput) SetVpnTunnelOutsideIpAddress(v string) *ModifyVpnTunnelOptionsInput { + s.VpnTunnelOutsideIpAddress = &v + return s +} + +type ModifyVpnTunnelOptionsOutput struct { + _ struct{} `type:"structure"` + + // Describes a VPN connection. + VpnConnection *VpnConnection `locationName:"vpnConnection" type:"structure"` +} + +// String returns the string representation +func (s ModifyVpnTunnelOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpnTunnelOptionsOutput) GoString() string { + return s.String() +} + +// SetVpnConnection sets the VpnConnection field's value. +func (s *ModifyVpnTunnelOptionsOutput) SetVpnConnection(v *VpnConnection) *ModifyVpnTunnelOptionsOutput { + s.VpnConnection = v + return s +} + +// The AWS Site-to-Site VPN tunnel options to modify. +type ModifyVpnTunnelOptionsSpecification struct { + _ struct{} `type:"structure"` + + // The number of seconds after which a DPD timeout occurs. + // + // Constraints: A value between 0 and 30. + // + // Default: 30 + DPDTimeoutSeconds *int64 `type:"integer"` + + // The IKE versions that are permitted for the VPN tunnel. + // + // Valid values: ikev1 | ikev2 + IKEVersions []*IKEVersionsRequestListValue `locationName:"IKEVersion" locationNameList:"item" type:"list"` + + // One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel + // for phase 1 IKE negotiations. + // + // Valid values: 2 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | 24 + Phase1DHGroupNumbers []*Phase1DHGroupNumbersRequestListValue `locationName:"Phase1DHGroupNumber" locationNameList:"item" type:"list"` + + // One or more encryption algorithms that are permitted for the VPN tunnel for + // phase 1 IKE negotiations. + // + // Valid values: AES128 | AES256 + Phase1EncryptionAlgorithms []*Phase1EncryptionAlgorithmsRequestListValue `locationName:"Phase1EncryptionAlgorithm" locationNameList:"item" type:"list"` + + // One or more integrity algorithms that are permitted for the VPN tunnel for + // phase 1 IKE negotiations. + // + // Valid values: SHA1 | SHA2-256 + Phase1IntegrityAlgorithms []*Phase1IntegrityAlgorithmsRequestListValue `locationName:"Phase1IntegrityAlgorithm" locationNameList:"item" type:"list"` + + // The lifetime for phase 1 of the IKE negotiation, in seconds. + // + // Constraints: A value between 900 and 28,800. + // + // Default: 28800 + Phase1LifetimeSeconds *int64 `type:"integer"` + + // One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel + // for phase 2 IKE negotiations. + // + // Valid values: 2 | 5 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | 24 + Phase2DHGroupNumbers []*Phase2DHGroupNumbersRequestListValue `locationName:"Phase2DHGroupNumber" locationNameList:"item" type:"list"` + + // One or more encryption algorithms that are permitted for the VPN tunnel for + // phase 2 IKE negotiations. + // + // Valid values: AES128 | AES256 + Phase2EncryptionAlgorithms []*Phase2EncryptionAlgorithmsRequestListValue `locationName:"Phase2EncryptionAlgorithm" locationNameList:"item" type:"list"` + + // One or more integrity algorithms that are permitted for the VPN tunnel for + // phase 2 IKE negotiations. + // + // Valid values: SHA1 | SHA2-256 + Phase2IntegrityAlgorithms []*Phase2IntegrityAlgorithmsRequestListValue `locationName:"Phase2IntegrityAlgorithm" locationNameList:"item" type:"list"` + + // The lifetime for phase 2 of the IKE negotiation, in seconds. + // + // Constraints: A value between 900 and 3,600. The value must be less than the + // value for Phase1LifetimeSeconds. + // + // Default: 3600 + Phase2LifetimeSeconds *int64 `type:"integer"` + + // The pre-shared key (PSK) to establish initial authentication between the + // virtual private gateway and the customer gateway. + // + // Constraints: Allowed characters are alphanumeric characters, periods (.), + // and underscores (_). Must be between 8 and 64 characters in length and cannot + // start with zero (0). + PreSharedKey *string `type:"string"` + + // The percentage of the rekey window (determined by RekeyMarginTimeSeconds) + // during which the rekey time is randomly selected. + // + // Constraints: A value between 0 and 100. + // + // Default: 100 + RekeyFuzzPercentage *int64 `type:"integer"` + + // The margin time, in seconds, before the phase 2 lifetime expires, during + // which the AWS side of the VPN connection performs an IKE rekey. The exact + // time of the rekey is randomly selected based on the value for RekeyFuzzPercentage. + // + // Constraints: A value between 60 and half of Phase2LifetimeSeconds. + // + // Default: 540 + RekeyMarginTimeSeconds *int64 `type:"integer"` + + // The number of packets in an IKE replay window. + // + // Constraints: A value between 64 and 2048. + // + // Default: 1024 + ReplayWindowSize *int64 `type:"integer"` + + // The range of inside IP addresses for the tunnel. Any specified CIDR blocks + // must be unique across all VPN connections that use the same virtual private + // gateway. + // + // Constraints: A size /30 CIDR block from the 169.254.0.0/16 range. The following + // CIDR blocks are reserved and cannot be used: + // + // * 169.254.0.0/30 + // + // * 169.254.1.0/30 + // + // * 169.254.2.0/30 + // + // * 169.254.3.0/30 + // + // * 169.254.4.0/30 + // + // * 169.254.5.0/30 + // + // * 169.254.169.252/30 + TunnelInsideCidr *string `type:"string"` +} + +// String returns the string representation +func (s ModifyVpnTunnelOptionsSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpnTunnelOptionsSpecification) GoString() string { + return s.String() +} + +// SetDPDTimeoutSeconds sets the DPDTimeoutSeconds field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetDPDTimeoutSeconds(v int64) *ModifyVpnTunnelOptionsSpecification { + s.DPDTimeoutSeconds = &v + return s +} + +// SetIKEVersions sets the IKEVersions field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetIKEVersions(v []*IKEVersionsRequestListValue) *ModifyVpnTunnelOptionsSpecification { + s.IKEVersions = v + return s +} + +// SetPhase1DHGroupNumbers sets the Phase1DHGroupNumbers field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetPhase1DHGroupNumbers(v []*Phase1DHGroupNumbersRequestListValue) *ModifyVpnTunnelOptionsSpecification { + s.Phase1DHGroupNumbers = v + return s +} + +// SetPhase1EncryptionAlgorithms sets the Phase1EncryptionAlgorithms field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetPhase1EncryptionAlgorithms(v []*Phase1EncryptionAlgorithmsRequestListValue) *ModifyVpnTunnelOptionsSpecification { + s.Phase1EncryptionAlgorithms = v + return s +} + +// SetPhase1IntegrityAlgorithms sets the Phase1IntegrityAlgorithms field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetPhase1IntegrityAlgorithms(v []*Phase1IntegrityAlgorithmsRequestListValue) *ModifyVpnTunnelOptionsSpecification { + s.Phase1IntegrityAlgorithms = v + return s +} + +// SetPhase1LifetimeSeconds sets the Phase1LifetimeSeconds field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetPhase1LifetimeSeconds(v int64) *ModifyVpnTunnelOptionsSpecification { + s.Phase1LifetimeSeconds = &v + return s +} + +// SetPhase2DHGroupNumbers sets the Phase2DHGroupNumbers field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetPhase2DHGroupNumbers(v []*Phase2DHGroupNumbersRequestListValue) *ModifyVpnTunnelOptionsSpecification { + s.Phase2DHGroupNumbers = v + return s +} + +// SetPhase2EncryptionAlgorithms sets the Phase2EncryptionAlgorithms field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetPhase2EncryptionAlgorithms(v []*Phase2EncryptionAlgorithmsRequestListValue) *ModifyVpnTunnelOptionsSpecification { + s.Phase2EncryptionAlgorithms = v + return s +} + +// SetPhase2IntegrityAlgorithms sets the Phase2IntegrityAlgorithms field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetPhase2IntegrityAlgorithms(v []*Phase2IntegrityAlgorithmsRequestListValue) *ModifyVpnTunnelOptionsSpecification { + s.Phase2IntegrityAlgorithms = v + return s +} + +// SetPhase2LifetimeSeconds sets the Phase2LifetimeSeconds field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetPhase2LifetimeSeconds(v int64) *ModifyVpnTunnelOptionsSpecification { + s.Phase2LifetimeSeconds = &v + return s +} + +// SetPreSharedKey sets the PreSharedKey field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetPreSharedKey(v string) *ModifyVpnTunnelOptionsSpecification { + s.PreSharedKey = &v + return s +} + +// SetRekeyFuzzPercentage sets the RekeyFuzzPercentage field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetRekeyFuzzPercentage(v int64) *ModifyVpnTunnelOptionsSpecification { + s.RekeyFuzzPercentage = &v + return s +} + +// SetRekeyMarginTimeSeconds sets the RekeyMarginTimeSeconds field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetRekeyMarginTimeSeconds(v int64) *ModifyVpnTunnelOptionsSpecification { + s.RekeyMarginTimeSeconds = &v + return s +} + +// SetReplayWindowSize sets the ReplayWindowSize field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetReplayWindowSize(v int64) *ModifyVpnTunnelOptionsSpecification { + s.ReplayWindowSize = &v + return s +} + +// SetTunnelInsideCidr sets the TunnelInsideCidr field's value. +func (s *ModifyVpnTunnelOptionsSpecification) SetTunnelInsideCidr(v string) *ModifyVpnTunnelOptionsSpecification { + s.TunnelInsideCidr = &v + return s +} + type MonitorInstancesInput struct { _ struct{} `type:"structure"` @@ -72988,7 +77969,7 @@ type NatGateway struct { NatGatewayId *string `locationName:"natGatewayId" type:"string"` // Reserved. If you need to sustain traffic greater than the documented limits - // (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), + // (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html), // contact us through the Support Center (https://console.aws.amazon.com/support/home?). ProvisionedBandwidth *ProvisionedBandwidth `locationName:"provisionedBandwidth" type:"structure"` @@ -73935,7 +78916,7 @@ func (s *NewDhcpConfiguration) SetValues(v []*string) *NewDhcpConfiguration { return s } -// The allocation strategy of On-Demand Instances in an EC2 Fleet. +// Describes the configuration of On-Demand Instances in an EC2 Fleet. type OnDemandOptions struct { _ struct{} `type:"structure"` @@ -73947,6 +78928,10 @@ type OnDemandOptions struct { // Fleet defaults to lowest-price. AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"FleetOnDemandAllocationStrategy"` + // The maximum amount per hour for On-Demand Instances that you're willing to + // pay. + MaxTotalPrice *string `locationName:"maxTotalPrice" type:"string"` + // The minimum target capacity for On-Demand Instances in the fleet. If the // minimum target capacity is not reached, the fleet launches no instances. MinTargetCapacity *int64 `locationName:"minTargetCapacity" type:"integer"` @@ -73976,6 +78961,12 @@ func (s *OnDemandOptions) SetAllocationStrategy(v string) *OnDemandOptions { return s } +// SetMaxTotalPrice sets the MaxTotalPrice field's value. +func (s *OnDemandOptions) SetMaxTotalPrice(v string) *OnDemandOptions { + s.MaxTotalPrice = &v + return s +} + // SetMinTargetCapacity sets the MinTargetCapacity field's value. func (s *OnDemandOptions) SetMinTargetCapacity(v int64) *OnDemandOptions { s.MinTargetCapacity = &v @@ -73994,7 +78985,7 @@ func (s *OnDemandOptions) SetSingleInstanceType(v bool) *OnDemandOptions { return s } -// The allocation strategy of On-Demand Instances in an EC2 Fleet. +// Describes the configuration of On-Demand Instances in an EC2 Fleet. type OnDemandOptionsRequest struct { _ struct{} `type:"structure"` @@ -74006,6 +78997,10 @@ type OnDemandOptionsRequest struct { // Fleet defaults to lowest-price. AllocationStrategy *string `type:"string" enum:"FleetOnDemandAllocationStrategy"` + // The maximum amount per hour for On-Demand Instances that you're willing to + // pay. + MaxTotalPrice *string `type:"string"` + // The minimum target capacity for On-Demand Instances in the fleet. If the // minimum target capacity is not reached, the fleet launches no instances. MinTargetCapacity *int64 `type:"integer"` @@ -74035,6 +79030,12 @@ func (s *OnDemandOptionsRequest) SetAllocationStrategy(v string) *OnDemandOption return s } +// SetMaxTotalPrice sets the MaxTotalPrice field's value. +func (s *OnDemandOptionsRequest) SetMaxTotalPrice(v string) *OnDemandOptionsRequest { + s.MaxTotalPrice = &v + return s +} + // SetMinTargetCapacity sets the MinTargetCapacity field's value. func (s *OnDemandOptionsRequest) SetMinTargetCapacity(v int64) *OnDemandOptionsRequest { s.MinTargetCapacity = &v @@ -74195,6 +79196,296 @@ func (s *PeeringConnectionOptionsRequest) SetAllowEgressFromLocalVpcToRemoteClas return s } +// The Diffie-Hellmann group number for phase 1 IKE negotiations. +type Phase1DHGroupNumbersListValue struct { + _ struct{} `type:"structure"` + + // The Diffie-Hellmann group number. + Value *int64 `locationName:"value" type:"integer"` +} + +// String returns the string representation +func (s Phase1DHGroupNumbersListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Phase1DHGroupNumbersListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *Phase1DHGroupNumbersListValue) SetValue(v int64) *Phase1DHGroupNumbersListValue { + s.Value = &v + return s +} + +// Specifies a Diffie-Hellman group number for the VPN tunnel for phase 1 IKE +// negotiations. +type Phase1DHGroupNumbersRequestListValue struct { + _ struct{} `type:"structure"` + + // The Diffie-Hellmann group number. + Value *int64 `type:"integer"` +} + +// String returns the string representation +func (s Phase1DHGroupNumbersRequestListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Phase1DHGroupNumbersRequestListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *Phase1DHGroupNumbersRequestListValue) SetValue(v int64) *Phase1DHGroupNumbersRequestListValue { + s.Value = &v + return s +} + +// The encryption algorithm for phase 1 IKE negotiations. +type Phase1EncryptionAlgorithmsListValue struct { + _ struct{} `type:"structure"` + + // The value for the encryption algorithm. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Phase1EncryptionAlgorithmsListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Phase1EncryptionAlgorithmsListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *Phase1EncryptionAlgorithmsListValue) SetValue(v string) *Phase1EncryptionAlgorithmsListValue { + s.Value = &v + return s +} + +// Specifies the encryption algorithm for the VPN tunnel for phase 1 IKE negotiations. +type Phase1EncryptionAlgorithmsRequestListValue struct { + _ struct{} `type:"structure"` + + // The value for the encryption algorithm. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Phase1EncryptionAlgorithmsRequestListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Phase1EncryptionAlgorithmsRequestListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *Phase1EncryptionAlgorithmsRequestListValue) SetValue(v string) *Phase1EncryptionAlgorithmsRequestListValue { + s.Value = &v + return s +} + +// The integrity algorithm for phase 1 IKE negotiations. +type Phase1IntegrityAlgorithmsListValue struct { + _ struct{} `type:"structure"` + + // The value for the integrity algorithm. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Phase1IntegrityAlgorithmsListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Phase1IntegrityAlgorithmsListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *Phase1IntegrityAlgorithmsListValue) SetValue(v string) *Phase1IntegrityAlgorithmsListValue { + s.Value = &v + return s +} + +// Specifies the integrity algorithm for the VPN tunnel for phase 1 IKE negotiations. +type Phase1IntegrityAlgorithmsRequestListValue struct { + _ struct{} `type:"structure"` + + // The value for the integrity algorithm. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Phase1IntegrityAlgorithmsRequestListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Phase1IntegrityAlgorithmsRequestListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *Phase1IntegrityAlgorithmsRequestListValue) SetValue(v string) *Phase1IntegrityAlgorithmsRequestListValue { + s.Value = &v + return s +} + +// The Diffie-Hellmann group number for phase 2 IKE negotiations. +type Phase2DHGroupNumbersListValue struct { + _ struct{} `type:"structure"` + + // The Diffie-Hellmann group number. + Value *int64 `locationName:"value" type:"integer"` +} + +// String returns the string representation +func (s Phase2DHGroupNumbersListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Phase2DHGroupNumbersListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *Phase2DHGroupNumbersListValue) SetValue(v int64) *Phase2DHGroupNumbersListValue { + s.Value = &v + return s +} + +// Specifies a Diffie-Hellman group number for the VPN tunnel for phase 2 IKE +// negotiations. +type Phase2DHGroupNumbersRequestListValue struct { + _ struct{} `type:"structure"` + + // The Diffie-Hellmann group number. + Value *int64 `type:"integer"` +} + +// String returns the string representation +func (s Phase2DHGroupNumbersRequestListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Phase2DHGroupNumbersRequestListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *Phase2DHGroupNumbersRequestListValue) SetValue(v int64) *Phase2DHGroupNumbersRequestListValue { + s.Value = &v + return s +} + +// The encryption algorithm for phase 2 IKE negotiations. +type Phase2EncryptionAlgorithmsListValue struct { + _ struct{} `type:"structure"` + + // The encryption algorithm. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Phase2EncryptionAlgorithmsListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Phase2EncryptionAlgorithmsListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *Phase2EncryptionAlgorithmsListValue) SetValue(v string) *Phase2EncryptionAlgorithmsListValue { + s.Value = &v + return s +} + +// Specifies the encryption algorithm for the VPN tunnel for phase 2 IKE negotiations. +type Phase2EncryptionAlgorithmsRequestListValue struct { + _ struct{} `type:"structure"` + + // The encryption algorithm. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Phase2EncryptionAlgorithmsRequestListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Phase2EncryptionAlgorithmsRequestListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *Phase2EncryptionAlgorithmsRequestListValue) SetValue(v string) *Phase2EncryptionAlgorithmsRequestListValue { + s.Value = &v + return s +} + +// The integrity algorithm for phase 2 IKE negotiations. +type Phase2IntegrityAlgorithmsListValue struct { + _ struct{} `type:"structure"` + + // The integrity algorithm. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Phase2IntegrityAlgorithmsListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Phase2IntegrityAlgorithmsListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *Phase2IntegrityAlgorithmsListValue) SetValue(v string) *Phase2IntegrityAlgorithmsListValue { + s.Value = &v + return s +} + +// Specifies the integrity algorithm for the VPN tunnel for phase 2 IKE negotiations. +type Phase2IntegrityAlgorithmsRequestListValue struct { + _ struct{} `type:"structure"` + + // The integrity algorithm. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Phase2IntegrityAlgorithmsRequestListValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Phase2IntegrityAlgorithmsRequestListValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *Phase2IntegrityAlgorithmsRequestListValue) SetValue(v string) *Phase2IntegrityAlgorithmsRequestListValue { + s.Value = &v + return s +} + // Describes the placement of an instance. type Placement struct { _ struct{} `type:"structure"` @@ -74831,33 +80122,33 @@ func (s *ProvisionByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *ProvisionByoipCid } // Reserved. If you need to sustain traffic greater than the documented limits -// (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), +// (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html), // contact us through the Support Center (https://console.aws.amazon.com/support/home?). type ProvisionedBandwidth struct { _ struct{} `type:"structure"` // Reserved. If you need to sustain traffic greater than the documented limits - // (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), + // (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html), // contact us through the Support Center (https://console.aws.amazon.com/support/home?). ProvisionTime *time.Time `locationName:"provisionTime" type:"timestamp"` // Reserved. If you need to sustain traffic greater than the documented limits - // (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), + // (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html), // contact us through the Support Center (https://console.aws.amazon.com/support/home?). Provisioned *string `locationName:"provisioned" type:"string"` // Reserved. If you need to sustain traffic greater than the documented limits - // (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), + // (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html), // contact us through the Support Center (https://console.aws.amazon.com/support/home?). RequestTime *time.Time `locationName:"requestTime" type:"timestamp"` // Reserved. If you need to sustain traffic greater than the documented limits - // (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), + // (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html), // contact us through the Support Center (https://console.aws.amazon.com/support/home?). Requested *string `locationName:"requested" type:"string"` // Reserved. If you need to sustain traffic greater than the documented limits - // (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), + // (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html), // contact us through the Support Center (https://console.aws.amazon.com/support/home?). Status *string `locationName:"status" type:"string"` } @@ -75105,9 +80396,8 @@ func (s *Purchase) SetUpfrontPrice(v string) *Purchase { type PurchaseHostReservationInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `type:"string"` // The currency in which the totalUpfrontPrice, LimitPrice, and totalHourlyPrice @@ -75192,9 +80482,8 @@ func (s *PurchaseHostReservationInput) SetOfferingId(v string) *PurchaseHostRese type PurchaseHostReservationOutput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" type:"string"` // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts @@ -75324,6 +80613,9 @@ type PurchaseReservedInstancesOfferingInput struct { // prices. LimitPrice *ReservedInstanceLimitPrice `locationName:"limitPrice" type:"structure"` + // The time at which to purchase the Reserved Instance. + PurchaseTime *time.Time `type:"timestamp"` + // The ID of the Reserved Instance offering to purchase. // // ReservedInstancesOfferingId is a required field @@ -75374,6 +80666,12 @@ func (s *PurchaseReservedInstancesOfferingInput) SetLimitPrice(v *ReservedInstan return s } +// SetPurchaseTime sets the PurchaseTime field's value. +func (s *PurchaseReservedInstancesOfferingInput) SetPurchaseTime(v time.Time) *PurchaseReservedInstancesOfferingInput { + s.PurchaseTime = &v + return s +} + // SetReservedInstancesOfferingId sets the ReservedInstancesOfferingId field's value. func (s *PurchaseReservedInstancesOfferingInput) SetReservedInstancesOfferingId(v string) *PurchaseReservedInstancesOfferingInput { s.ReservedInstancesOfferingId = &v @@ -75606,6 +80904,10 @@ type Region struct { // The Region service endpoint. Endpoint *string `locationName:"regionEndpoint" type:"string"` + // The Region opt-in status. The possible values are opt-in-not-required, opted-in, + // and not-opted-in. + OptInStatus *string `locationName:"optInStatus" type:"string"` + // The name of the Region. RegionName *string `locationName:"regionName" type:"string"` } @@ -75626,6 +80928,12 @@ func (s *Region) SetEndpoint(v string) *Region { return s } +// SetOptInStatus sets the OptInStatus field's value. +func (s *Region) SetOptInStatus(v string) *Region { + s.OptInStatus = &v + return s +} + // SetRegionName sets the RegionName field's value. func (s *Region) SetRegionName(v string) *Region { s.RegionName = &v @@ -77097,7 +82405,7 @@ type RequestLaunchTemplateData struct { Monitoring *LaunchTemplatesMonitoringRequest `type:"structure"` // One or more network interfaces. If you specify a network interface, you must - // specify any security groups as part of the network interface. + // specify any security groups and subnets as part of the network interface. NetworkInterfaces []*LaunchTemplateInstanceNetworkInterfaceSpecificationRequest `locationName:"NetworkInterface" locationNameList:"InstanceNetworkInterfaceSpecification" type:"list"` // The placement for the instance. @@ -77489,6 +82797,10 @@ type RequestSpotInstancesInput struct { // launch, the request expires, or the request is canceled. If the request is // persistent, the request becomes active at this date and time and remains // active until it expires or is canceled. + // + // The specified start date and time cannot be equal to the current date and + // time. You must specify a start date and time that occurs after the current + // date and time. ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` // The end date of the request. If this is a one-time request, the request remains @@ -77680,7 +82992,9 @@ type RequestSpotLaunchSpecification struct { // you can specify the names or the IDs of the security groups. SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"item" type:"list"` - // The ID of the subnet in which to launch the instance. + // The IDs of the subnets in which to launch the instance. To specify multiple + // subnets, separate them using commas; for example, "subnet-1234abcdeexample1, + // subnet-0987cdef6example2". SubnetId *string `locationName:"subnetId" type:"string"` // The Base64-encoded user data for the instance. User data is limited to 16 @@ -78674,8 +83988,7 @@ func (s *ResetEbsDefaultKmsKeyIdInput) SetDryRun(v bool) *ResetEbsDefaultKmsKeyI type ResetEbsDefaultKmsKeyIdOutput struct { _ struct{} `type:"structure"` - // The full ARN of the default CMK that your account uses to encrypt an EBS - // volume when no CMK is specified in the API call that creates the volume. + // The Amazon Resource Name (ARN) of the default CMK for EBS encryption by default. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` } @@ -80106,10 +85419,7 @@ type RunInstancesInput struct { // Reserved. AdditionalInfo *string `locationName:"additionalInfo" type:"string"` - // The block device mapping entries. You can't specify both a snapshot ID and - // an encryption value. This is because only blank volumes can be encrypted - // on creation. If a snapshot is the basis for a volume, it is not blank and - // its encryption status is used for the volume encryption status. + // The block device mapping entries. BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` // Information about the Capacity Reservation targeting option. If you do not @@ -80272,7 +85582,8 @@ type RunInstancesInput struct { Monitoring *RunInstancesMonitoringEnabled `type:"structure"` // The network interfaces to associate with the instance. If you specify a network - // interface, you must specify any security groups as part of the network interface. + // interface, you must specify any security groups and subnets as part of the + // network interface. NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterface" locationNameList:"item" type:"list"` // The placement for the instance. @@ -80318,8 +85629,8 @@ type RunInstancesInput struct { // [EC2-VPC] The ID of the subnet to launch the instance into. // - // You cannot specify this option and the network interfaces option in the same - // request. + // If you specify a network interface, you must specify any subnets as part + // of the network interface. SubnetId *string `type:"string"` // The tags to apply to the resources during launch. You can only tag instances @@ -81341,7 +86652,7 @@ type ScheduledInstancesEbs struct { // The volume type. gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, // Throughput Optimized HDD for st1, Cold HDD for sc1, or standard for Magnetic. // - // Default: standard + // Default: gp2 VolumeType *string `type:"string"` } @@ -81864,11 +87175,9 @@ type SearchTransitGatewayRoutesInput struct { // routes in your route table and you specify supernet-of-match as 10.0.1.0/30, // then the result returns 10.0.1.0/29. // - // * state - The state of the attachment (available | deleted | deleting - // | failed | modifying | pendingAcceptance | pending | rollingBack | rejected - // | rejecting). + // * state - The state of the route (active | blackhole). // - // * type - The type of roue (active | blackhole). + // * type - The type of route (propagated | static). // // Filters is a required field Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list" required:"true"` @@ -82129,6 +87438,70 @@ func (s *SecurityGroupReference) SetVpcPeeringConnectionId(v string) *SecurityGr return s } +type SendDiagnosticInterruptInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the instance. + // + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s SendDiagnosticInterruptInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendDiagnosticInterruptInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SendDiagnosticInterruptInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SendDiagnosticInterruptInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *SendDiagnosticInterruptInput) SetDryRun(v bool) *SendDiagnosticInterruptInput { + s.DryRun = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *SendDiagnosticInterruptInput) SetInstanceId(v string) *SendDiagnosticInterruptInput { + s.InstanceId = &v + return s +} + +type SendDiagnosticInterruptOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s SendDiagnosticInterruptOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendDiagnosticInterruptOutput) GoString() string { + return s.String() +} + // Describes a service configuration for a VPC endpoint service. type ServiceConfiguration struct { _ struct{} `type:"structure"` @@ -82483,7 +87856,7 @@ type Snapshot struct { // the original volume or snapshot copy. Because data encryption keys are inherited // by volumes created from snapshots, and vice versa, if snapshots share the // same data encryption key identifier, then they belong to the same volume/snapshot - // lineage. This parameter is only returned by the DescribeSnapshots API operation. + // lineage. This parameter is only returned by DescribeSnapshots. DataEncryptionKeyId *string `locationName:"dataEncryptionKeyId" type:"string"` // The description for the snapshot. @@ -82492,9 +87865,9 @@ type Snapshot struct { // Indicates whether the snapshot is encrypted. Encrypted *bool `locationName:"encrypted" type:"boolean"` - // The full ARN of the AWS Key Management Service (AWS KMS) customer master - // key (CMK) that was used to protect the volume encryption key for the parent - // volume. + // The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) + // customer master key (CMK) that was used to protect the volume encryption + // key for the parent volume. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // Value from an Amazon-maintained list (amazon | self | all | aws-marketplace @@ -82522,7 +87895,7 @@ type Snapshot struct { // operation fails (for example, if the proper AWS Key Management Service (AWS // KMS) permissions are not obtained) this field displays error state details // to help you diagnose why the error occurred. This parameter is only returned - // by the DescribeSnapshots API operation. + // by DescribeSnapshots. StateMessage *string `locationName:"statusMessage" type:"string"` // Any tags assigned to the snapshot. @@ -82790,7 +88163,7 @@ func (s *SnapshotDiskContainer) SetUserBucket(v *UserBucket) *SnapshotDiskContai return s } -// Object that contains information about a snapshot. +// Information about a snapshot. type SnapshotInfo struct { _ struct{} `type:"structure"` @@ -82798,7 +88171,7 @@ type SnapshotInfo struct { // to all snapshots. Description *string `locationName:"description" type:"string"` - // Boolean that specifies whether or not this snapshot is encrypted. + // Indicates whether the snapshot is encrypted. Encrypted *bool `locationName:"encrypted" type:"boolean"` // Account id used when creating this snapshot. @@ -83081,7 +88454,7 @@ type SpotFleetLaunchSpecification struct { // Deprecated. AddressingType *string `locationName:"addressingType" type:"string"` - // One or more block devices that are mapped to the Spot instances. You can't + // One or more block devices that are mapped to the Spot Instances. You can't // specify both a snapshot ID and an encryption value. This is because only // blank volumes can be encrypted on creation. If a snapshot is the basis for // a volume, it is not blank and its encryption status is used for the volume @@ -83139,8 +88512,9 @@ type SpotFleetLaunchSpecification struct { // by the value of WeightedCapacity. SpotPrice *string `locationName:"spotPrice" type:"string"` - // The ID of the subnet in which to launch the instances. To specify multiple - // subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08". + // The IDs of the subnets in which to launch the instances. To specify multiple + // subnets, separate them using commas; for example, "subnet-1234abcdeexample1, + // subnet-0987cdef6example2". SubnetId *string `locationName:"subnetId" type:"string"` // The tags to apply during creation. @@ -83371,8 +88745,19 @@ func (s *SpotFleetRequestConfig) SetSpotFleetRequestState(v string) *SpotFleetRe type SpotFleetRequestConfigData struct { _ struct{} `type:"structure"` - // Indicates how to allocate the target capacity across the Spot pools specified - // by the Spot Fleet request. The default is lowestPrice. + // Indicates how to allocate the target Spot Instance capacity across the Spot + // Instance pools specified by the Spot Fleet request. + // + // If the allocation strategy is lowestPrice, Spot Fleet launches instances + // from the Spot Instance pools with the lowest price. This is the default allocation + // strategy. + // + // If the allocation strategy is diversified, Spot Fleet launches instances + // from all the Spot Instance pools that you specify. + // + // If the allocation strategy is capacityOptimized, Spot Fleet launches instances + // from Spot Instance pools with optimal capacity for the number of instances + // that are launching. AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"` // A unique, case-sensitive identifier that you provide to ensure the idempotency @@ -83441,6 +88826,16 @@ type SpotFleetRequestConfigData struct { // target On-Demand capacity. OnDemandFulfilledCapacity *float64 `locationName:"onDemandFulfilledCapacity" type:"double"` + // The maximum amount per hour for On-Demand Instances that you're willing to + // pay. You can use the onDemandMaxTotalPrice parameter, the spotMaxTotalPrice + // parameter, or both parameters to ensure that your fleet cost does not exceed + // your budget. If you set a maximum price per hour for the On-Demand Instances + // and Spot Instances in your request, Spot Fleet will launch instances until + // it reaches the maximum amount you're willing to pay. When the maximum amount + // you're willing to pay is reached, the fleet stops launching instances even + // if it hasn’t met the target capacity. + OnDemandMaxTotalPrice *string `locationName:"onDemandMaxTotalPrice" type:"string"` + // The number of On-Demand units to request. You can choose to set the target // capacity in terms of instances or a performance characteristic that is important // to your application workload, such as vCPUs, memory, or I/O. If the request @@ -83451,6 +88846,16 @@ type SpotFleetRequestConfigData struct { // Indicates whether Spot Fleet should replace unhealthy instances. ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` + // The maximum amount per hour for Spot Instances that you're willing to pay. + // You can use the spotdMaxTotalPrice parameter, the onDemandMaxTotalPrice parameter, + // or both parameters to ensure that your fleet cost does not exceed your budget. + // If you set a maximum price per hour for the On-Demand Instances and Spot + // Instances in your request, Spot Fleet will launch instances until it reaches + // the maximum amount you're willing to pay. When the maximum amount you're + // willing to pay is reached, the fleet stops launching instances even if it + // hasn’t met the target capacity. + SpotMaxTotalPrice *string `locationName:"spotMaxTotalPrice" type:"string"` + // The maximum price per unit hour that you are willing to pay for a Spot Instance. // The default is the On-Demand price. SpotPrice *string `locationName:"spotPrice" type:"string"` @@ -83602,6 +89007,12 @@ func (s *SpotFleetRequestConfigData) SetOnDemandFulfilledCapacity(v float64) *Sp return s } +// SetOnDemandMaxTotalPrice sets the OnDemandMaxTotalPrice field's value. +func (s *SpotFleetRequestConfigData) SetOnDemandMaxTotalPrice(v string) *SpotFleetRequestConfigData { + s.OnDemandMaxTotalPrice = &v + return s +} + // SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. func (s *SpotFleetRequestConfigData) SetOnDemandTargetCapacity(v int64) *SpotFleetRequestConfigData { s.OnDemandTargetCapacity = &v @@ -83614,6 +89025,12 @@ func (s *SpotFleetRequestConfigData) SetReplaceUnhealthyInstances(v bool) *SpotF return s } +// SetSpotMaxTotalPrice sets the SpotMaxTotalPrice field's value. +func (s *SpotFleetRequestConfigData) SetSpotMaxTotalPrice(v string) *SpotFleetRequestConfigData { + s.SpotMaxTotalPrice = &v + return s +} + // SetSpotPrice sets the SpotPrice field's value. func (s *SpotFleetRequestConfigData) SetSpotPrice(v string) *SpotFleetRequestConfigData { s.SpotPrice = &v @@ -84033,8 +89450,19 @@ func (s *SpotMarketOptions) SetValidUntil(v time.Time) *SpotMarketOptions { type SpotOptions struct { _ struct{} `type:"structure"` - // Indicates how to allocate the target capacity across the Spot pools specified - // by the Spot Fleet request. The default is lowest-price. + // Indicates how to allocate the target Spot Instance capacity across the Spot + // Instance pools specified by the EC2 Fleet. + // + // If the allocation strategy is lowestPrice, EC2 Fleet launches instances from + // the Spot Instance pools with the lowest price. This is the default allocation + // strategy. + // + // If the allocation strategy is diversified, EC2 Fleet launches instances from + // all the Spot Instance pools that you specify. + // + // If the allocation strategy is capacityOptimized, EC2 Fleet launches instances + // from Spot Instance pools with optimal capacity for the number of instances + // that are launching. AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"SpotAllocationStrategy"` // The behavior when a Spot Instance is interrupted. The default is terminate. @@ -84046,6 +89474,9 @@ type SpotOptions struct { // the number of Spot pools that you specify. InstancePoolsToUseCount *int64 `locationName:"instancePoolsToUseCount" type:"integer"` + // The maximum amount per hour for Spot Instances that you're willing to pay. + MaxTotalPrice *string `locationName:"maxTotalPrice" type:"string"` + // The minimum target capacity for Spot Instances in the fleet. If the minimum // target capacity is not reached, the fleet launches no instances. MinTargetCapacity *int64 `locationName:"minTargetCapacity" type:"integer"` @@ -84087,6 +89518,12 @@ func (s *SpotOptions) SetInstancePoolsToUseCount(v int64) *SpotOptions { return s } +// SetMaxTotalPrice sets the MaxTotalPrice field's value. +func (s *SpotOptions) SetMaxTotalPrice(v string) *SpotOptions { + s.MaxTotalPrice = &v + return s +} + // SetMinTargetCapacity sets the MinTargetCapacity field's value. func (s *SpotOptions) SetMinTargetCapacity(v int64) *SpotOptions { s.MinTargetCapacity = &v @@ -84109,8 +89546,19 @@ func (s *SpotOptions) SetSingleInstanceType(v bool) *SpotOptions { type SpotOptionsRequest struct { _ struct{} `type:"structure"` - // Indicates how to allocate the target capacity across the Spot pools specified - // by the Spot Fleet request. The default is lowestPrice. + // Indicates how to allocate the target Spot Instance capacity across the Spot + // Instance pools specified by the EC2 Fleet. + // + // If the allocation strategy is lowestPrice, EC2 Fleet launches instances from + // the Spot Instance pools with the lowest price. This is the default allocation + // strategy. + // + // If the allocation strategy is diversified, EC2 Fleet launches instances from + // all the Spot Instance pools that you specify. + // + // If the allocation strategy is capacityOptimized, EC2 Fleet launches instances + // from Spot Instance pools with optimal capacity for the number of instances + // that are launching. AllocationStrategy *string `type:"string" enum:"SpotAllocationStrategy"` // The behavior when a Spot Instance is interrupted. The default is terminate. @@ -84122,6 +89570,9 @@ type SpotOptionsRequest struct { // across the number of Spot pools that you specify. InstancePoolsToUseCount *int64 `type:"integer"` + // The maximum amount per hour for Spot Instances that you're willing to pay. + MaxTotalPrice *string `type:"string"` + // The minimum target capacity for Spot Instances in the fleet. If the minimum // target capacity is not reached, the fleet launches no instances. MinTargetCapacity *int64 `type:"integer"` @@ -84163,6 +89614,12 @@ func (s *SpotOptionsRequest) SetInstancePoolsToUseCount(v int64) *SpotOptionsReq return s } +// SetMaxTotalPrice sets the MaxTotalPrice field's value. +func (s *SpotOptionsRequest) SetMaxTotalPrice(v string) *SpotOptionsRequest { + s.MaxTotalPrice = &v + return s +} + // SetMinTargetCapacity sets the MinTargetCapacity field's value. func (s *SpotOptionsRequest) SetMinTargetCapacity(v int64) *SpotOptionsRequest { s.MinTargetCapacity = &v @@ -84987,6 +90444,30 @@ func (s *SuccessfulInstanceCreditSpecificationItem) SetInstanceId(v string) *Suc return s } +// Describes a Reserved Instance whose queued purchase was successfully deleted. +type SuccessfulQueuedPurchaseDeletion struct { + _ struct{} `type:"structure"` + + // The ID of the Reserved Instance. + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` +} + +// String returns the string representation +func (s SuccessfulQueuedPurchaseDeletion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SuccessfulQueuedPurchaseDeletion) GoString() string { + return s.String() +} + +// SetReservedInstancesId sets the ReservedInstancesId field's value. +func (s *SuccessfulQueuedPurchaseDeletion) SetReservedInstancesId(v string) *SuccessfulQueuedPurchaseDeletion { + s.ReservedInstancesId = &v + return s +} + // Describes a tag. type Tag struct { _ struct{} `type:"structure"` @@ -85082,8 +90563,11 @@ type TagSpecification struct { _ struct{} `type:"structure"` // The type of resource to tag. Currently, the resource types that support tagging - // on creation are fleet, dedicated-host, instance, snapshot, and volume. To - // tag a resource after it has been created, see CreateTags. + // on creation are: capacity-reservation | client-vpn-endpoint | dedicated-host + // | fleet | instance | launch-template | snapshot | transit-gateway | transit-gateway-attachment + // | transit-gateway-route-table | volume. + // + // To tag a resource after it has been created, see CreateTags. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` // The tags to apply to the resource. @@ -85117,16 +90601,27 @@ func (s *TagSpecification) SetTags(v []*Tag) *TagSpecification { // your application workload, such as vCPUs, memory, or I/O. If the request // type is maintain, you can specify a target capacity of 0 and add capacity // later. +// +// You can use the On-Demand Instance MaxTotalPrice parameter, the Spot Instance +// MaxTotalPrice, or both to ensure your fleet cost does not exceed your budget. +// If you set a maximum price per hour for the On-Demand Instances and Spot +// Instances in your request, EC2 Fleet will launch instances until it reaches +// the maximum amount you're willing to pay. When the maximum amount you're +// willing to pay is reached, the fleet stops launching instances even if it +// hasn’t met the target capacity. The MaxTotalPrice parameters are located +// in and type TargetCapacitySpecification struct { _ struct{} `type:"structure"` // The default TotalTargetCapacity, which is either Spot or On-Demand. DefaultTargetCapacityType *string `locationName:"defaultTargetCapacityType" type:"string" enum:"DefaultTargetCapacityType"` - // The number of On-Demand units to request. + // The number of On-Demand units to request. If you specify a target capacity + // for Spot units, you cannot specify a target capacity for On-Demand units. OnDemandTargetCapacity *int64 `locationName:"onDemandTargetCapacity" type:"integer"` - // The maximum number of Spot units to launch. + // The maximum number of Spot units to launch. If you specify a target capacity + // for On-Demand units, you cannot specify a target capacity for Spot units. SpotTargetCapacity *int64 `locationName:"spotTargetCapacity" type:"integer"` // The number of units to request, filled using DefaultTargetCapacityType. @@ -85168,10 +90663,19 @@ func (s *TargetCapacitySpecification) SetTotalTargetCapacity(v int64) *TargetCap } // The number of units to request. You can choose to set the target capacity -// in terms of instances or a performance characteristic that is important to -// your application workload, such as vCPUs, memory, or I/O. If the request -// type is maintain, you can specify a target capacity of 0 and add capacity -// later. +// as the number of instances. Or you can set the target capacity to a performance +// characteristic that is important to your application workload, such as vCPUs, +// memory, or I/O. If the request type is maintain, you can specify a target +// capacity of 0 and add capacity later. +// +// You can use the On-Demand Instance MaxTotalPrice parameter, the Spot Instance +// MaxTotalPrice parameter, or both parameters to ensure that your fleet cost +// does not exceed your budget. If you set a maximum price per hour for the +// On-Demand Instances and Spot Instances in your request, EC2 Fleet will launch +// instances until it reaches the maximum amount you're willing to pay. When +// the maximum amount you're willing to pay is reached, the fleet stops launching +// instances even if it hasn’t met the target capacity. The MaxTotalPrice +// parameters are located in and . type TargetCapacitySpecificationRequest struct { _ struct{} `type:"structure"` @@ -85716,6 +91220,452 @@ func (s *TerminateInstancesOutput) SetTerminatingInstances(v []*InstanceStateCha return s } +// Describes the Traffic Mirror filter. +type TrafficMirrorFilter struct { + _ struct{} `type:"structure"` + + // The description of the Traffic Mirror filter. + Description *string `locationName:"description" type:"string"` + + // Information about the egress rules that are associated with the Traffic Mirror + // filter. + EgressFilterRules []*TrafficMirrorFilterRule `locationName:"egressFilterRuleSet" locationNameList:"item" type:"list"` + + // Information about the ingress rules that are associated with the Traffic + // Mirror filter. + IngressFilterRules []*TrafficMirrorFilterRule `locationName:"ingressFilterRuleSet" locationNameList:"item" type:"list"` + + // The network service traffic that is associated with the Traffic Mirror filter. + NetworkServices []*string `locationName:"networkServiceSet" locationNameList:"item" type:"list"` + + // The tags assigned to the Traffic Mirror filter. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the Traffic Mirror filter. + TrafficMirrorFilterId *string `locationName:"trafficMirrorFilterId" type:"string"` +} + +// String returns the string representation +func (s TrafficMirrorFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrafficMirrorFilter) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *TrafficMirrorFilter) SetDescription(v string) *TrafficMirrorFilter { + s.Description = &v + return s +} + +// SetEgressFilterRules sets the EgressFilterRules field's value. +func (s *TrafficMirrorFilter) SetEgressFilterRules(v []*TrafficMirrorFilterRule) *TrafficMirrorFilter { + s.EgressFilterRules = v + return s +} + +// SetIngressFilterRules sets the IngressFilterRules field's value. +func (s *TrafficMirrorFilter) SetIngressFilterRules(v []*TrafficMirrorFilterRule) *TrafficMirrorFilter { + s.IngressFilterRules = v + return s +} + +// SetNetworkServices sets the NetworkServices field's value. +func (s *TrafficMirrorFilter) SetNetworkServices(v []*string) *TrafficMirrorFilter { + s.NetworkServices = v + return s +} + +// SetTags sets the Tags field's value. +func (s *TrafficMirrorFilter) SetTags(v []*Tag) *TrafficMirrorFilter { + s.Tags = v + return s +} + +// SetTrafficMirrorFilterId sets the TrafficMirrorFilterId field's value. +func (s *TrafficMirrorFilter) SetTrafficMirrorFilterId(v string) *TrafficMirrorFilter { + s.TrafficMirrorFilterId = &v + return s +} + +// Describes the Traffic Mirror rule. +type TrafficMirrorFilterRule struct { + _ struct{} `type:"structure"` + + // The description of the Traffic Mirror rule. + Description *string `locationName:"description" type:"string"` + + // The destination CIDR block assigned to the Traffic Mirror rule. + DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` + + // The destination port range assigned to the Traffic Mirror rule. + DestinationPortRange *TrafficMirrorPortRange `locationName:"destinationPortRange" type:"structure"` + + // The protocol assigned to the Traffic Mirror rule. + Protocol *int64 `locationName:"protocol" type:"integer"` + + // The action assigned to the Traffic Mirror rule. + RuleAction *string `locationName:"ruleAction" type:"string" enum:"TrafficMirrorRuleAction"` + + // The rule number of the Traffic Mirror rule. + RuleNumber *int64 `locationName:"ruleNumber" type:"integer"` + + // The source CIDR block assigned to the Traffic Mirror rule. + SourceCidrBlock *string `locationName:"sourceCidrBlock" type:"string"` + + // The source port range assigned to the Traffic Mirror rule. + SourcePortRange *TrafficMirrorPortRange `locationName:"sourcePortRange" type:"structure"` + + // The traffic direction assigned to the Traffic Mirror rule. + TrafficDirection *string `locationName:"trafficDirection" type:"string" enum:"TrafficDirection"` + + // The ID of the Traffic Mirror filter that the rule is associated with. + TrafficMirrorFilterId *string `locationName:"trafficMirrorFilterId" type:"string"` + + // The ID of the Traffic Mirror rule. + TrafficMirrorFilterRuleId *string `locationName:"trafficMirrorFilterRuleId" type:"string"` +} + +// String returns the string representation +func (s TrafficMirrorFilterRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrafficMirrorFilterRule) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *TrafficMirrorFilterRule) SetDescription(v string) *TrafficMirrorFilterRule { + s.Description = &v + return s +} + +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *TrafficMirrorFilterRule) SetDestinationCidrBlock(v string) *TrafficMirrorFilterRule { + s.DestinationCidrBlock = &v + return s +} + +// SetDestinationPortRange sets the DestinationPortRange field's value. +func (s *TrafficMirrorFilterRule) SetDestinationPortRange(v *TrafficMirrorPortRange) *TrafficMirrorFilterRule { + s.DestinationPortRange = v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *TrafficMirrorFilterRule) SetProtocol(v int64) *TrafficMirrorFilterRule { + s.Protocol = &v + return s +} + +// SetRuleAction sets the RuleAction field's value. +func (s *TrafficMirrorFilterRule) SetRuleAction(v string) *TrafficMirrorFilterRule { + s.RuleAction = &v + return s +} + +// SetRuleNumber sets the RuleNumber field's value. +func (s *TrafficMirrorFilterRule) SetRuleNumber(v int64) *TrafficMirrorFilterRule { + s.RuleNumber = &v + return s +} + +// SetSourceCidrBlock sets the SourceCidrBlock field's value. +func (s *TrafficMirrorFilterRule) SetSourceCidrBlock(v string) *TrafficMirrorFilterRule { + s.SourceCidrBlock = &v + return s +} + +// SetSourcePortRange sets the SourcePortRange field's value. +func (s *TrafficMirrorFilterRule) SetSourcePortRange(v *TrafficMirrorPortRange) *TrafficMirrorFilterRule { + s.SourcePortRange = v + return s +} + +// SetTrafficDirection sets the TrafficDirection field's value. +func (s *TrafficMirrorFilterRule) SetTrafficDirection(v string) *TrafficMirrorFilterRule { + s.TrafficDirection = &v + return s +} + +// SetTrafficMirrorFilterId sets the TrafficMirrorFilterId field's value. +func (s *TrafficMirrorFilterRule) SetTrafficMirrorFilterId(v string) *TrafficMirrorFilterRule { + s.TrafficMirrorFilterId = &v + return s +} + +// SetTrafficMirrorFilterRuleId sets the TrafficMirrorFilterRuleId field's value. +func (s *TrafficMirrorFilterRule) SetTrafficMirrorFilterRuleId(v string) *TrafficMirrorFilterRule { + s.TrafficMirrorFilterRuleId = &v + return s +} + +// Describes the Traffic Mirror port range. +type TrafficMirrorPortRange struct { + _ struct{} `type:"structure"` + + // The start of the Traffic Mirror port range. This applies to the TCP and UDP + // protocols. + FromPort *int64 `locationName:"fromPort" type:"integer"` + + // The end of the Traffic Mirror port range. This applies to the TCP and UDP + // protocols. + ToPort *int64 `locationName:"toPort" type:"integer"` +} + +// String returns the string representation +func (s TrafficMirrorPortRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrafficMirrorPortRange) GoString() string { + return s.String() +} + +// SetFromPort sets the FromPort field's value. +func (s *TrafficMirrorPortRange) SetFromPort(v int64) *TrafficMirrorPortRange { + s.FromPort = &v + return s +} + +// SetToPort sets the ToPort field's value. +func (s *TrafficMirrorPortRange) SetToPort(v int64) *TrafficMirrorPortRange { + s.ToPort = &v + return s +} + +// Information about the Traffic Mirror filter rule port range. +type TrafficMirrorPortRangeRequest struct { + _ struct{} `type:"structure"` + + // The first port in the Traffic Mirror port range. This applies to the TCP + // and UDP protocols. + FromPort *int64 `type:"integer"` + + // The last port in the Traffic Mirror port range. This applies to the TCP and + // UDP protocols. + ToPort *int64 `type:"integer"` +} + +// String returns the string representation +func (s TrafficMirrorPortRangeRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrafficMirrorPortRangeRequest) GoString() string { + return s.String() +} + +// SetFromPort sets the FromPort field's value. +func (s *TrafficMirrorPortRangeRequest) SetFromPort(v int64) *TrafficMirrorPortRangeRequest { + s.FromPort = &v + return s +} + +// SetToPort sets the ToPort field's value. +func (s *TrafficMirrorPortRangeRequest) SetToPort(v int64) *TrafficMirrorPortRangeRequest { + s.ToPort = &v + return s +} + +// Describes a Traffic Mirror session. +type TrafficMirrorSession struct { + _ struct{} `type:"structure"` + + // The description of the Traffic Mirror session. + Description *string `locationName:"description" type:"string"` + + // The ID of the Traffic Mirror session's network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + + // The ID of the account that owns the Traffic Mirror session. + OwnerId *string `locationName:"ownerId" type:"string"` + + // The number of bytes in each packet to mirror. These are the bytes after the + // VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. + // For example, if you set this value to 100, then the first 100 bytes that + // meet the filter criteria are copied to the target. Do not specify this parameter + // when you want to mirror the entire packet + PacketLength *int64 `locationName:"packetLength" type:"integer"` + + // The session number determines the order in which sessions are evaluated when + // an interface is used by multiple sessions. The first session with a matching + // filter is the one that mirrors the packets. + // + // Valid values are 1-32766. + SessionNumber *int64 `locationName:"sessionNumber" type:"integer"` + + // The tags assigned to the Traffic Mirror session. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the Traffic Mirror filter. + TrafficMirrorFilterId *string `locationName:"trafficMirrorFilterId" type:"string"` + + // The ID for the Traffic Mirror session. + TrafficMirrorSessionId *string `locationName:"trafficMirrorSessionId" type:"string"` + + // The ID of the Traffic Mirror target. + TrafficMirrorTargetId *string `locationName:"trafficMirrorTargetId" type:"string"` + + // The virtual network ID associated with the Traffic Mirror session. + VirtualNetworkId *int64 `locationName:"virtualNetworkId" type:"integer"` +} + +// String returns the string representation +func (s TrafficMirrorSession) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrafficMirrorSession) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *TrafficMirrorSession) SetDescription(v string) *TrafficMirrorSession { + s.Description = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *TrafficMirrorSession) SetNetworkInterfaceId(v string) *TrafficMirrorSession { + s.NetworkInterfaceId = &v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *TrafficMirrorSession) SetOwnerId(v string) *TrafficMirrorSession { + s.OwnerId = &v + return s +} + +// SetPacketLength sets the PacketLength field's value. +func (s *TrafficMirrorSession) SetPacketLength(v int64) *TrafficMirrorSession { + s.PacketLength = &v + return s +} + +// SetSessionNumber sets the SessionNumber field's value. +func (s *TrafficMirrorSession) SetSessionNumber(v int64) *TrafficMirrorSession { + s.SessionNumber = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TrafficMirrorSession) SetTags(v []*Tag) *TrafficMirrorSession { + s.Tags = v + return s +} + +// SetTrafficMirrorFilterId sets the TrafficMirrorFilterId field's value. +func (s *TrafficMirrorSession) SetTrafficMirrorFilterId(v string) *TrafficMirrorSession { + s.TrafficMirrorFilterId = &v + return s +} + +// SetTrafficMirrorSessionId sets the TrafficMirrorSessionId field's value. +func (s *TrafficMirrorSession) SetTrafficMirrorSessionId(v string) *TrafficMirrorSession { + s.TrafficMirrorSessionId = &v + return s +} + +// SetTrafficMirrorTargetId sets the TrafficMirrorTargetId field's value. +func (s *TrafficMirrorSession) SetTrafficMirrorTargetId(v string) *TrafficMirrorSession { + s.TrafficMirrorTargetId = &v + return s +} + +// SetVirtualNetworkId sets the VirtualNetworkId field's value. +func (s *TrafficMirrorSession) SetVirtualNetworkId(v int64) *TrafficMirrorSession { + s.VirtualNetworkId = &v + return s +} + +// Describes a Traffic Mirror target. +type TrafficMirrorTarget struct { + _ struct{} `type:"structure"` + + // Information about the Traffic Mirror target. + Description *string `locationName:"description" type:"string"` + + // The network interface ID that is attached to the target. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + + // The Amazon Resource Name (ARN) of the Network Load Balancer. + NetworkLoadBalancerArn *string `locationName:"networkLoadBalancerArn" type:"string"` + + // The ID of the account that owns the Traffic Mirror target. + OwnerId *string `locationName:"ownerId" type:"string"` + + // The tags assigned to the Traffic Mirror target. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the Traffic Mirror target. + TrafficMirrorTargetId *string `locationName:"trafficMirrorTargetId" type:"string"` + + // The type of Traffic Mirror target. + Type *string `locationName:"type" type:"string" enum:"TrafficMirrorTargetType"` +} + +// String returns the string representation +func (s TrafficMirrorTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrafficMirrorTarget) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *TrafficMirrorTarget) SetDescription(v string) *TrafficMirrorTarget { + s.Description = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *TrafficMirrorTarget) SetNetworkInterfaceId(v string) *TrafficMirrorTarget { + s.NetworkInterfaceId = &v + return s +} + +// SetNetworkLoadBalancerArn sets the NetworkLoadBalancerArn field's value. +func (s *TrafficMirrorTarget) SetNetworkLoadBalancerArn(v string) *TrafficMirrorTarget { + s.NetworkLoadBalancerArn = &v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *TrafficMirrorTarget) SetOwnerId(v string) *TrafficMirrorTarget { + s.OwnerId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TrafficMirrorTarget) SetTags(v []*Tag) *TrafficMirrorTarget { + s.Tags = v + return s +} + +// SetTrafficMirrorTargetId sets the TrafficMirrorTargetId field's value. +func (s *TrafficMirrorTarget) SetTrafficMirrorTargetId(v string) *TrafficMirrorTarget { + s.TrafficMirrorTargetId = &v + return s +} + +// SetType sets the Type field's value. +func (s *TrafficMirrorTarget) SetType(v string) *TrafficMirrorTarget { + s.Type = &v + return s +} + // Describes a transit gateway. type TransitGateway struct { _ struct{} `type:"structure"` @@ -86664,6 +92614,170 @@ func (s *TransitGatewayVpcAttachmentOptions) SetIpv6Support(v string) *TransitGa return s } +// The VPN tunnel options. +type TunnelOption struct { + _ struct{} `type:"structure"` + + // The number of seconds after which a DPD timeout occurs. + DpdTimeoutSeconds *int64 `locationName:"dpdTimeoutSeconds" type:"integer"` + + // The IKE versions that are permitted for the VPN tunnel. + IkeVersions []*IKEVersionsListValue `locationName:"ikeVersionSet" locationNameList:"item" type:"list"` + + // The external IP address of the VPN tunnel. + OutsideIpAddress *string `locationName:"outsideIpAddress" type:"string"` + + // The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 + // IKE negotiations. + Phase1DHGroupNumbers []*Phase1DHGroupNumbersListValue `locationName:"phase1DHGroupNumberSet" locationNameList:"item" type:"list"` + + // The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations. + Phase1EncryptionAlgorithms []*Phase1EncryptionAlgorithmsListValue `locationName:"phase1EncryptionAlgorithmSet" locationNameList:"item" type:"list"` + + // The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations. + Phase1IntegrityAlgorithms []*Phase1IntegrityAlgorithmsListValue `locationName:"phase1IntegrityAlgorithmSet" locationNameList:"item" type:"list"` + + // The lifetime for phase 1 of the IKE negotiation, in seconds. + Phase1LifetimeSeconds *int64 `locationName:"phase1LifetimeSeconds" type:"integer"` + + // The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 + // IKE negotiations. + Phase2DHGroupNumbers []*Phase2DHGroupNumbersListValue `locationName:"phase2DHGroupNumberSet" locationNameList:"item" type:"list"` + + // The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations. + Phase2EncryptionAlgorithms []*Phase2EncryptionAlgorithmsListValue `locationName:"phase2EncryptionAlgorithmSet" locationNameList:"item" type:"list"` + + // The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations. + Phase2IntegrityAlgorithms []*Phase2IntegrityAlgorithmsListValue `locationName:"phase2IntegrityAlgorithmSet" locationNameList:"item" type:"list"` + + // The lifetime for phase 2 of the IKE negotiation, in seconds. + Phase2LifetimeSeconds *int64 `locationName:"phase2LifetimeSeconds" type:"integer"` + + // The pre-shared key (PSK) to establish initial authentication between the + // virtual private gateway and the customer gateway. + PreSharedKey *string `locationName:"preSharedKey" type:"string"` + + // The percentage of the rekey window determined by RekeyMarginTimeSeconds during + // which the rekey time is randomly selected. + RekeyFuzzPercentage *int64 `locationName:"rekeyFuzzPercentage" type:"integer"` + + // The margin time, in seconds, before the phase 2 lifetime expires, during + // which the AWS side of the VPN connection performs an IKE rekey. + RekeyMarginTimeSeconds *int64 `locationName:"rekeyMarginTimeSeconds" type:"integer"` + + // The number of packets in an IKE replay window. + ReplayWindowSize *int64 `locationName:"replayWindowSize" type:"integer"` + + // The range of inside IP addresses for the tunnel. + TunnelInsideCidr *string `locationName:"tunnelInsideCidr" type:"string"` +} + +// String returns the string representation +func (s TunnelOption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TunnelOption) GoString() string { + return s.String() +} + +// SetDpdTimeoutSeconds sets the DpdTimeoutSeconds field's value. +func (s *TunnelOption) SetDpdTimeoutSeconds(v int64) *TunnelOption { + s.DpdTimeoutSeconds = &v + return s +} + +// SetIkeVersions sets the IkeVersions field's value. +func (s *TunnelOption) SetIkeVersions(v []*IKEVersionsListValue) *TunnelOption { + s.IkeVersions = v + return s +} + +// SetOutsideIpAddress sets the OutsideIpAddress field's value. +func (s *TunnelOption) SetOutsideIpAddress(v string) *TunnelOption { + s.OutsideIpAddress = &v + return s +} + +// SetPhase1DHGroupNumbers sets the Phase1DHGroupNumbers field's value. +func (s *TunnelOption) SetPhase1DHGroupNumbers(v []*Phase1DHGroupNumbersListValue) *TunnelOption { + s.Phase1DHGroupNumbers = v + return s +} + +// SetPhase1EncryptionAlgorithms sets the Phase1EncryptionAlgorithms field's value. +func (s *TunnelOption) SetPhase1EncryptionAlgorithms(v []*Phase1EncryptionAlgorithmsListValue) *TunnelOption { + s.Phase1EncryptionAlgorithms = v + return s +} + +// SetPhase1IntegrityAlgorithms sets the Phase1IntegrityAlgorithms field's value. +func (s *TunnelOption) SetPhase1IntegrityAlgorithms(v []*Phase1IntegrityAlgorithmsListValue) *TunnelOption { + s.Phase1IntegrityAlgorithms = v + return s +} + +// SetPhase1LifetimeSeconds sets the Phase1LifetimeSeconds field's value. +func (s *TunnelOption) SetPhase1LifetimeSeconds(v int64) *TunnelOption { + s.Phase1LifetimeSeconds = &v + return s +} + +// SetPhase2DHGroupNumbers sets the Phase2DHGroupNumbers field's value. +func (s *TunnelOption) SetPhase2DHGroupNumbers(v []*Phase2DHGroupNumbersListValue) *TunnelOption { + s.Phase2DHGroupNumbers = v + return s +} + +// SetPhase2EncryptionAlgorithms sets the Phase2EncryptionAlgorithms field's value. +func (s *TunnelOption) SetPhase2EncryptionAlgorithms(v []*Phase2EncryptionAlgorithmsListValue) *TunnelOption { + s.Phase2EncryptionAlgorithms = v + return s +} + +// SetPhase2IntegrityAlgorithms sets the Phase2IntegrityAlgorithms field's value. +func (s *TunnelOption) SetPhase2IntegrityAlgorithms(v []*Phase2IntegrityAlgorithmsListValue) *TunnelOption { + s.Phase2IntegrityAlgorithms = v + return s +} + +// SetPhase2LifetimeSeconds sets the Phase2LifetimeSeconds field's value. +func (s *TunnelOption) SetPhase2LifetimeSeconds(v int64) *TunnelOption { + s.Phase2LifetimeSeconds = &v + return s +} + +// SetPreSharedKey sets the PreSharedKey field's value. +func (s *TunnelOption) SetPreSharedKey(v string) *TunnelOption { + s.PreSharedKey = &v + return s +} + +// SetRekeyFuzzPercentage sets the RekeyFuzzPercentage field's value. +func (s *TunnelOption) SetRekeyFuzzPercentage(v int64) *TunnelOption { + s.RekeyFuzzPercentage = &v + return s +} + +// SetRekeyMarginTimeSeconds sets the RekeyMarginTimeSeconds field's value. +func (s *TunnelOption) SetRekeyMarginTimeSeconds(v int64) *TunnelOption { + s.RekeyMarginTimeSeconds = &v + return s +} + +// SetReplayWindowSize sets the ReplayWindowSize field's value. +func (s *TunnelOption) SetReplayWindowSize(v int64) *TunnelOption { + s.ReplayWindowSize = &v + return s +} + +// SetTunnelInsideCidr sets the TunnelInsideCidr field's value. +func (s *TunnelOption) SetTunnelInsideCidr(v string) *TunnelOption { + s.TunnelInsideCidr = &v + return s +} + type UnassignIpv6AddressesInput struct { _ struct{} `type:"structure"` @@ -87406,6 +93520,9 @@ type VgwTelemetry struct { // The number of accepted routes. AcceptedRouteCount *int64 `locationName:"acceptedRouteCount" type:"integer"` + // The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate. + CertificateArn *string `locationName:"certificateArn" type:"string"` + // The date and time of the last change in status. LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp"` @@ -87436,6 +93553,12 @@ func (s *VgwTelemetry) SetAcceptedRouteCount(v int64) *VgwTelemetry { return s } +// SetCertificateArn sets the CertificateArn field's value. +func (s *VgwTelemetry) SetCertificateArn(v string) *VgwTelemetry { + s.CertificateArn = &v + return s +} + // SetLastStatusChange sets the LastStatusChange field's value. func (s *VgwTelemetry) SetLastStatusChange(v time.Time) *VgwTelemetry { s.LastStatusChange = &v @@ -87473,7 +93596,7 @@ type Volume struct { // The time stamp when volume creation was initiated. CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - // Indicates whether the volume will be encrypted. + // Indicates whether the volume is encrypted. Encrypted *bool `locationName:"encrypted" type:"boolean"` // The number of I/O operations per second (IOPS) that the volume supports. @@ -87493,8 +93616,9 @@ type Volume struct { // it is not used in requests to create gp2, st1, sc1, or standard volumes. Iops *int64 `locationName:"iops" type:"integer"` - // The full ARN of the AWS Key Management Service (AWS KMS) customer master - // key (CMK) that was used to protect the volume encryption key for the volume. + // The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) + // customer master key (CMK) that was used to protect the volume encryption + // key for the volume. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // The size of the volume, in GiBs. @@ -88344,6 +94468,9 @@ type VpcEndpoint struct { // (Interface endpoint) One or more network interfaces for the endpoint. NetworkInterfaceIds []*string `locationName:"networkInterfaceIdSet" locationNameList:"item" type:"list"` + // The ID of the AWS account that owns the VPC endpoint. + OwnerId *string `locationName:"ownerId" type:"string"` + // The policy document associated with the endpoint, if applicable. PolicyDocument *string `locationName:"policyDocument" type:"string"` @@ -88413,6 +94540,12 @@ func (s *VpcEndpoint) SetNetworkInterfaceIds(v []*string) *VpcEndpoint { return s } +// SetOwnerId sets the OwnerId field's value. +func (s *VpcEndpoint) SetOwnerId(v string) *VpcEndpoint { + s.OwnerId = &v + return s +} + // SetPolicyDocument sets the PolicyDocument field's value. func (s *VpcEndpoint) SetPolicyDocument(v string) *VpcEndpoint { s.PolicyDocument = &v @@ -88486,6 +94619,12 @@ type VpcEndpointConnection struct { // The date and time the VPC endpoint was created. CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp"` + // The DNS entries for the VPC endpoint. + DnsEntries []*DnsEntry `locationName:"dnsEntrySet" locationNameList:"item" type:"list"` + + // The Amazon Resource Names (ARNs) of the network load balancers for the service. + NetworkLoadBalancerArns []*string `locationName:"networkLoadBalancerArnSet" locationNameList:"item" type:"list"` + // The ID of the service to which the endpoint is connected. ServiceId *string `locationName:"serviceId" type:"string"` @@ -88515,6 +94654,18 @@ func (s *VpcEndpointConnection) SetCreationTimestamp(v time.Time) *VpcEndpointCo return s } +// SetDnsEntries sets the DnsEntries field's value. +func (s *VpcEndpointConnection) SetDnsEntries(v []*DnsEntry) *VpcEndpointConnection { + s.DnsEntries = v + return s +} + +// SetNetworkLoadBalancerArns sets the NetworkLoadBalancerArns field's value. +func (s *VpcEndpointConnection) SetNetworkLoadBalancerArns(v []*string) *VpcEndpointConnection { + s.NetworkLoadBalancerArns = v + return s +} + // SetServiceId sets the ServiceId field's value. func (s *VpcEndpointConnection) SetServiceId(v string) *VpcEndpointConnection { s.ServiceId = &v @@ -88943,6 +95094,9 @@ type VpnConnectionOptions struct { // Indicates whether the VPN connection uses static routes only. Static routes // must be used for devices that don't support BGP. StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"` + + // Indicates the VPN tunnel options. + TunnelOptions []*TunnelOption `locationName:"tunnelOptionSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -88961,6 +95115,12 @@ func (s *VpnConnectionOptions) SetStaticRoutesOnly(v bool) *VpnConnectionOptions return s } +// SetTunnelOptions sets the TunnelOptions field's value. +func (s *VpnConnectionOptions) SetTunnelOptions(v []*TunnelOption) *VpnConnectionOptions { + s.TunnelOptions = v + return s +} + // Describes VPN connection options. type VpnConnectionOptionsSpecification struct { _ struct{} `type:"structure"` @@ -88973,7 +95133,7 @@ type VpnConnectionOptionsSpecification struct { StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"` // The tunnel options for the VPN connection. - TunnelOptions []*VpnTunnelOptionsSpecification `locationNameList:"item" type:"list"` + TunnelOptions []*VpnTunnelOptionsSpecification `type:"list"` } // String returns the string representation @@ -89123,13 +95283,101 @@ func (s *VpnStaticRoute) SetState(v string) *VpnStaticRoute { type VpnTunnelOptionsSpecification struct { _ struct{} `type:"structure"` + // The number of seconds after which a DPD timeout occurs. + // + // Constraints: A value between 0 and 30. + // + // Default: 30 + DPDTimeoutSeconds *int64 `type:"integer"` + + // The IKE versions that are permitted for the VPN tunnel. + // + // Valid values: ikev1 | ikev2 + IKEVersions []*IKEVersionsRequestListValue `locationName:"IKEVersion" locationNameList:"item" type:"list"` + + // One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel + // for phase 1 IKE negotiations. + // + // Valid values: 2 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | 24 + Phase1DHGroupNumbers []*Phase1DHGroupNumbersRequestListValue `locationName:"Phase1DHGroupNumber" locationNameList:"item" type:"list"` + + // One or more encryption algorithms that are permitted for the VPN tunnel for + // phase 1 IKE negotiations. + // + // Valid values: AES128 | AES256 + Phase1EncryptionAlgorithms []*Phase1EncryptionAlgorithmsRequestListValue `locationName:"Phase1EncryptionAlgorithm" locationNameList:"item" type:"list"` + + // One or more integrity algorithms that are permitted for the VPN tunnel for + // phase 1 IKE negotiations. + // + // Valid values: SHA1 | SHA2-256 + Phase1IntegrityAlgorithms []*Phase1IntegrityAlgorithmsRequestListValue `locationName:"Phase1IntegrityAlgorithm" locationNameList:"item" type:"list"` + + // The lifetime for phase 1 of the IKE negotiation, in seconds. + // + // Constraints: A value between 900 and 28,800. + // + // Default: 28800 + Phase1LifetimeSeconds *int64 `type:"integer"` + + // One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel + // for phase 2 IKE negotiations. + // + // Valid values: 2 | 5 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | 24 + Phase2DHGroupNumbers []*Phase2DHGroupNumbersRequestListValue `locationName:"Phase2DHGroupNumber" locationNameList:"item" type:"list"` + + // One or more encryption algorithms that are permitted for the VPN tunnel for + // phase 2 IKE negotiations. + // + // Valid values: AES128 | AES256 + Phase2EncryptionAlgorithms []*Phase2EncryptionAlgorithmsRequestListValue `locationName:"Phase2EncryptionAlgorithm" locationNameList:"item" type:"list"` + + // One or more integrity algorithms that are permitted for the VPN tunnel for + // phase 2 IKE negotiations. + // + // Valid values: SHA1 | SHA2-256 + Phase2IntegrityAlgorithms []*Phase2IntegrityAlgorithmsRequestListValue `locationName:"Phase2IntegrityAlgorithm" locationNameList:"item" type:"list"` + + // The lifetime for phase 2 of the IKE negotiation, in seconds. + // + // Constraints: A value between 900 and 3,600. The value must be less than the + // value for Phase1LifetimeSeconds. + // + // Default: 3600 + Phase2LifetimeSeconds *int64 `type:"integer"` + // The pre-shared key (PSK) to establish initial authentication between the // virtual private gateway and customer gateway. // - // Constraints: Allowed characters are alphanumeric characters and ._. Must - // be between 8 and 64 characters in length and cannot start with zero (0). + // Constraints: Allowed characters are alphanumeric characters, periods (.), + // and underscores (_). Must be between 8 and 64 characters in length and cannot + // start with zero (0). PreSharedKey *string `type:"string"` + // The percentage of the rekey window (determined by RekeyMarginTimeSeconds) + // during which the rekey time is randomly selected. + // + // Constraints: A value between 0 and 100. + // + // Default: 100 + RekeyFuzzPercentage *int64 `type:"integer"` + + // The margin time, in seconds, before the phase 2 lifetime expires, during + // which the AWS side of the VPN connection performs an IKE rekey. The exact + // time of the rekey is randomly selected based on the value for RekeyFuzzPercentage. + // + // Constraints: A value between 60 and half of Phase2LifetimeSeconds. + // + // Default: 540 + RekeyMarginTimeSeconds *int64 `type:"integer"` + + // The number of packets in an IKE replay window. + // + // Constraints: A value between 64 and 2048. + // + // Default: 1024 + ReplayWindowSize *int64 `type:"integer"` + // The range of inside IP addresses for the tunnel. Any specified CIDR blocks // must be unique across all VPN connections that use the same virtual private // gateway. @@ -89163,12 +95411,90 @@ func (s VpnTunnelOptionsSpecification) GoString() string { return s.String() } +// SetDPDTimeoutSeconds sets the DPDTimeoutSeconds field's value. +func (s *VpnTunnelOptionsSpecification) SetDPDTimeoutSeconds(v int64) *VpnTunnelOptionsSpecification { + s.DPDTimeoutSeconds = &v + return s +} + +// SetIKEVersions sets the IKEVersions field's value. +func (s *VpnTunnelOptionsSpecification) SetIKEVersions(v []*IKEVersionsRequestListValue) *VpnTunnelOptionsSpecification { + s.IKEVersions = v + return s +} + +// SetPhase1DHGroupNumbers sets the Phase1DHGroupNumbers field's value. +func (s *VpnTunnelOptionsSpecification) SetPhase1DHGroupNumbers(v []*Phase1DHGroupNumbersRequestListValue) *VpnTunnelOptionsSpecification { + s.Phase1DHGroupNumbers = v + return s +} + +// SetPhase1EncryptionAlgorithms sets the Phase1EncryptionAlgorithms field's value. +func (s *VpnTunnelOptionsSpecification) SetPhase1EncryptionAlgorithms(v []*Phase1EncryptionAlgorithmsRequestListValue) *VpnTunnelOptionsSpecification { + s.Phase1EncryptionAlgorithms = v + return s +} + +// SetPhase1IntegrityAlgorithms sets the Phase1IntegrityAlgorithms field's value. +func (s *VpnTunnelOptionsSpecification) SetPhase1IntegrityAlgorithms(v []*Phase1IntegrityAlgorithmsRequestListValue) *VpnTunnelOptionsSpecification { + s.Phase1IntegrityAlgorithms = v + return s +} + +// SetPhase1LifetimeSeconds sets the Phase1LifetimeSeconds field's value. +func (s *VpnTunnelOptionsSpecification) SetPhase1LifetimeSeconds(v int64) *VpnTunnelOptionsSpecification { + s.Phase1LifetimeSeconds = &v + return s +} + +// SetPhase2DHGroupNumbers sets the Phase2DHGroupNumbers field's value. +func (s *VpnTunnelOptionsSpecification) SetPhase2DHGroupNumbers(v []*Phase2DHGroupNumbersRequestListValue) *VpnTunnelOptionsSpecification { + s.Phase2DHGroupNumbers = v + return s +} + +// SetPhase2EncryptionAlgorithms sets the Phase2EncryptionAlgorithms field's value. +func (s *VpnTunnelOptionsSpecification) SetPhase2EncryptionAlgorithms(v []*Phase2EncryptionAlgorithmsRequestListValue) *VpnTunnelOptionsSpecification { + s.Phase2EncryptionAlgorithms = v + return s +} + +// SetPhase2IntegrityAlgorithms sets the Phase2IntegrityAlgorithms field's value. +func (s *VpnTunnelOptionsSpecification) SetPhase2IntegrityAlgorithms(v []*Phase2IntegrityAlgorithmsRequestListValue) *VpnTunnelOptionsSpecification { + s.Phase2IntegrityAlgorithms = v + return s +} + +// SetPhase2LifetimeSeconds sets the Phase2LifetimeSeconds field's value. +func (s *VpnTunnelOptionsSpecification) SetPhase2LifetimeSeconds(v int64) *VpnTunnelOptionsSpecification { + s.Phase2LifetimeSeconds = &v + return s +} + // SetPreSharedKey sets the PreSharedKey field's value. func (s *VpnTunnelOptionsSpecification) SetPreSharedKey(v string) *VpnTunnelOptionsSpecification { s.PreSharedKey = &v return s } +// SetRekeyFuzzPercentage sets the RekeyFuzzPercentage field's value. +func (s *VpnTunnelOptionsSpecification) SetRekeyFuzzPercentage(v int64) *VpnTunnelOptionsSpecification { + s.RekeyFuzzPercentage = &v + return s +} + +// SetRekeyMarginTimeSeconds sets the RekeyMarginTimeSeconds field's value. +func (s *VpnTunnelOptionsSpecification) SetRekeyMarginTimeSeconds(v int64) *VpnTunnelOptionsSpecification { + s.RekeyMarginTimeSeconds = &v + return s +} + +// SetReplayWindowSize sets the ReplayWindowSize field's value. +func (s *VpnTunnelOptionsSpecification) SetReplayWindowSize(v int64) *VpnTunnelOptionsSpecification { + s.ReplayWindowSize = &v + return s +} + // SetTunnelInsideCidr sets the TunnelInsideCidr field's value. func (s *VpnTunnelOptionsSpecification) SetTunnelInsideCidr(v string) *VpnTunnelOptionsSpecification { s.TunnelInsideCidr = &v @@ -89293,6 +95619,9 @@ const ( // AllocationStateReleasedPermanentFailure is a AllocationState enum value AllocationStateReleasedPermanentFailure = "released-permanent-failure" + + // AllocationStatePending is a AllocationState enum value + AllocationStatePending = "pending" ) const ( @@ -89301,6 +95630,9 @@ const ( // AllocationStrategyDiversified is a AllocationStrategy enum value AllocationStrategyDiversified = "diversified" + + // AllocationStrategyCapacityOptimized is a AllocationStrategy enum value + AllocationStrategyCapacityOptimized = "capacityOptimized" ) const ( @@ -89708,6 +96040,17 @@ const ( DeleteFleetErrorCodeUnexpectedError = "unexpectedError" ) +const ( + // DeleteQueuedReservedInstancesErrorCodeReservedInstancesIdInvalid is a DeleteQueuedReservedInstancesErrorCode enum value + DeleteQueuedReservedInstancesErrorCodeReservedInstancesIdInvalid = "reserved-instances-id-invalid" + + // DeleteQueuedReservedInstancesErrorCodeReservedInstancesNotInQueuedState is a DeleteQueuedReservedInstancesErrorCode enum value + DeleteQueuedReservedInstancesErrorCodeReservedInstancesNotInQueuedState = "reserved-instances-not-in-queued-state" + + // DeleteQueuedReservedInstancesErrorCodeUnexpectedError is a DeleteQueuedReservedInstancesErrorCode enum value + DeleteQueuedReservedInstancesErrorCodeUnexpectedError = "unexpected-error" +) + const ( // DeviceTypeEbs is a DeviceType enum value DeviceTypeEbs = "ebs" @@ -89790,6 +96133,9 @@ const ( // EventTypeError is a EventType enum value EventTypeError = "error" + + // EventTypeInformation is a EventType enum value + EventTypeInformation = "information" ) const ( @@ -89830,10 +96176,10 @@ const ( FleetActivityStatusError = "error" // FleetActivityStatusPendingFulfillment is a FleetActivityStatus enum value - FleetActivityStatusPendingFulfillment = "pending-fulfillment" + FleetActivityStatusPendingFulfillment = "pending_fulfillment" // FleetActivityStatusPendingTermination is a FleetActivityStatus enum value - FleetActivityStatusPendingTermination = "pending-termination" + FleetActivityStatusPendingTermination = "pending_termination" // FleetActivityStatusFulfilled is a FleetActivityStatus enum value FleetActivityStatusFulfilled = "fulfilled" @@ -89880,10 +96226,10 @@ const ( FleetStateCodeFailed = "failed" // FleetStateCodeDeletedRunning is a FleetStateCode enum value - FleetStateCodeDeletedRunning = "deleted-running" + FleetStateCodeDeletedRunning = "deleted_running" // FleetStateCodeDeletedTerminating is a FleetStateCode enum value - FleetStateCodeDeletedTerminating = "deleted-terminating" + FleetStateCodeDeletedTerminating = "deleted_terminating" // FleetStateCodeModifying is a FleetStateCode enum value FleetStateCodeModifying = "modifying" @@ -89944,6 +96290,14 @@ const ( GatewayTypeIpsec1 = "ipsec.1" ) +const ( + // HostRecoveryOn is a HostRecovery enum value + HostRecoveryOn = "on" + + // HostRecoveryOff is a HostRecovery enum value + HostRecoveryOff = "off" +) + const ( // HostTenancyDedicated is a HostTenancy enum value HostTenancyDedicated = "dedicated" @@ -90304,9 +96658,15 @@ const ( // InstanceTypeR54xlarge is a InstanceType enum value InstanceTypeR54xlarge = "r5.4xlarge" + // InstanceTypeR58xlarge is a InstanceType enum value + InstanceTypeR58xlarge = "r5.8xlarge" + // InstanceTypeR512xlarge is a InstanceType enum value InstanceTypeR512xlarge = "r5.12xlarge" + // InstanceTypeR516xlarge is a InstanceType enum value + InstanceTypeR516xlarge = "r5.16xlarge" + // InstanceTypeR524xlarge is a InstanceType enum value InstanceTypeR524xlarge = "r5.24xlarge" @@ -90325,9 +96685,15 @@ const ( // InstanceTypeR5a4xlarge is a InstanceType enum value InstanceTypeR5a4xlarge = "r5a.4xlarge" + // InstanceTypeR5a8xlarge is a InstanceType enum value + InstanceTypeR5a8xlarge = "r5a.8xlarge" + // InstanceTypeR5a12xlarge is a InstanceType enum value InstanceTypeR5a12xlarge = "r5a.12xlarge" + // InstanceTypeR5a16xlarge is a InstanceType enum value + InstanceTypeR5a16xlarge = "r5a.16xlarge" + // InstanceTypeR5a24xlarge is a InstanceType enum value InstanceTypeR5a24xlarge = "r5a.24xlarge" @@ -90343,9 +96709,15 @@ const ( // InstanceTypeR5d4xlarge is a InstanceType enum value InstanceTypeR5d4xlarge = "r5d.4xlarge" + // InstanceTypeR5d8xlarge is a InstanceType enum value + InstanceTypeR5d8xlarge = "r5d.8xlarge" + // InstanceTypeR5d12xlarge is a InstanceType enum value InstanceTypeR5d12xlarge = "r5d.12xlarge" + // InstanceTypeR5d16xlarge is a InstanceType enum value + InstanceTypeR5d16xlarge = "r5d.16xlarge" + // InstanceTypeR5d24xlarge is a InstanceType enum value InstanceTypeR5d24xlarge = "r5d.24xlarge" @@ -90433,6 +96805,30 @@ const ( // InstanceTypeI3Metal is a InstanceType enum value InstanceTypeI3Metal = "i3.metal" + // InstanceTypeI3enLarge is a InstanceType enum value + InstanceTypeI3enLarge = "i3en.large" + + // InstanceTypeI3enXlarge is a InstanceType enum value + InstanceTypeI3enXlarge = "i3en.xlarge" + + // InstanceTypeI3en2xlarge is a InstanceType enum value + InstanceTypeI3en2xlarge = "i3en.2xlarge" + + // InstanceTypeI3en3xlarge is a InstanceType enum value + InstanceTypeI3en3xlarge = "i3en.3xlarge" + + // InstanceTypeI3en6xlarge is a InstanceType enum value + InstanceTypeI3en6xlarge = "i3en.6xlarge" + + // InstanceTypeI3en12xlarge is a InstanceType enum value + InstanceTypeI3en12xlarge = "i3en.12xlarge" + + // InstanceTypeI3en24xlarge is a InstanceType enum value + InstanceTypeI3en24xlarge = "i3en.24xlarge" + + // InstanceTypeI3enMetal is a InstanceType enum value + InstanceTypeI3enMetal = "i3en.metal" + // InstanceTypeHi14xlarge is a InstanceType enum value InstanceTypeHi14xlarge = "hi1.4xlarge" @@ -90490,9 +96886,18 @@ const ( // InstanceTypeC59xlarge is a InstanceType enum value InstanceTypeC59xlarge = "c5.9xlarge" + // InstanceTypeC512xlarge is a InstanceType enum value + InstanceTypeC512xlarge = "c5.12xlarge" + // InstanceTypeC518xlarge is a InstanceType enum value InstanceTypeC518xlarge = "c5.18xlarge" + // InstanceTypeC524xlarge is a InstanceType enum value + InstanceTypeC524xlarge = "c5.24xlarge" + + // InstanceTypeC5Metal is a InstanceType enum value + InstanceTypeC5Metal = "c5.metal" + // InstanceTypeC5dLarge is a InstanceType enum value InstanceTypeC5dLarge = "c5d.large" @@ -90553,6 +96958,24 @@ const ( // InstanceTypeG3sXlarge is a InstanceType enum value InstanceTypeG3sXlarge = "g3s.xlarge" + // InstanceTypeG4dnXlarge is a InstanceType enum value + InstanceTypeG4dnXlarge = "g4dn.xlarge" + + // InstanceTypeG4dn2xlarge is a InstanceType enum value + InstanceTypeG4dn2xlarge = "g4dn.2xlarge" + + // InstanceTypeG4dn4xlarge is a InstanceType enum value + InstanceTypeG4dn4xlarge = "g4dn.4xlarge" + + // InstanceTypeG4dn8xlarge is a InstanceType enum value + InstanceTypeG4dn8xlarge = "g4dn.8xlarge" + + // InstanceTypeG4dn12xlarge is a InstanceType enum value + InstanceTypeG4dn12xlarge = "g4dn.12xlarge" + + // InstanceTypeG4dn16xlarge is a InstanceType enum value + InstanceTypeG4dn16xlarge = "g4dn.16xlarge" + // InstanceTypeCg14xlarge is a InstanceType enum value InstanceTypeCg14xlarge = "cg1.4xlarge" @@ -90610,9 +97033,15 @@ const ( // InstanceTypeM54xlarge is a InstanceType enum value InstanceTypeM54xlarge = "m5.4xlarge" + // InstanceTypeM58xlarge is a InstanceType enum value + InstanceTypeM58xlarge = "m5.8xlarge" + // InstanceTypeM512xlarge is a InstanceType enum value InstanceTypeM512xlarge = "m5.12xlarge" + // InstanceTypeM516xlarge is a InstanceType enum value + InstanceTypeM516xlarge = "m5.16xlarge" + // InstanceTypeM524xlarge is a InstanceType enum value InstanceTypeM524xlarge = "m5.24xlarge" @@ -90631,9 +97060,15 @@ const ( // InstanceTypeM5a4xlarge is a InstanceType enum value InstanceTypeM5a4xlarge = "m5a.4xlarge" + // InstanceTypeM5a8xlarge is a InstanceType enum value + InstanceTypeM5a8xlarge = "m5a.8xlarge" + // InstanceTypeM5a12xlarge is a InstanceType enum value InstanceTypeM5a12xlarge = "m5a.12xlarge" + // InstanceTypeM5a16xlarge is a InstanceType enum value + InstanceTypeM5a16xlarge = "m5a.16xlarge" + // InstanceTypeM5a24xlarge is a InstanceType enum value InstanceTypeM5a24xlarge = "m5a.24xlarge" @@ -90649,9 +97084,15 @@ const ( // InstanceTypeM5d4xlarge is a InstanceType enum value InstanceTypeM5d4xlarge = "m5d.4xlarge" + // InstanceTypeM5d8xlarge is a InstanceType enum value + InstanceTypeM5d8xlarge = "m5d.8xlarge" + // InstanceTypeM5d12xlarge is a InstanceType enum value InstanceTypeM5d12xlarge = "m5d.12xlarge" + // InstanceTypeM5d16xlarge is a InstanceType enum value + InstanceTypeM5d16xlarge = "m5d.16xlarge" + // InstanceTypeM5d24xlarge is a InstanceType enum value InstanceTypeM5d24xlarge = "m5d.24xlarge" @@ -91117,6 +97558,12 @@ const ( // ReservedInstanceStateRetired is a ReservedInstanceState enum value ReservedInstanceStateRetired = "retired" + + // ReservedInstanceStateQueued is a ReservedInstanceState enum value + ReservedInstanceStateQueued = "queued" + + // ReservedInstanceStateQueuedDeleted is a ReservedInstanceState enum value + ReservedInstanceStateQueuedDeleted = "queued-deleted" ) const ( @@ -91193,6 +97640,15 @@ const ( // ResourceTypeSubnet is a ResourceType enum value ResourceTypeSubnet = "subnet" + // ResourceTypeTrafficMirrorFilter is a ResourceType enum value + ResourceTypeTrafficMirrorFilter = "traffic-mirror-filter" + + // ResourceTypeTrafficMirrorSession is a ResourceType enum value + ResourceTypeTrafficMirrorSession = "traffic-mirror-session" + + // ResourceTypeTrafficMirrorTarget is a ResourceType enum value + ResourceTypeTrafficMirrorTarget = "traffic-mirror-target" + // ResourceTypeTransitGateway is a ResourceType enum value ResourceTypeTransitGateway = "transit-gateway" @@ -91303,6 +97759,9 @@ const ( // SpotAllocationStrategyDiversified is a SpotAllocationStrategy enum value SpotAllocationStrategyDiversified = "diversified" + + // SpotAllocationStrategyCapacityOptimized is a SpotAllocationStrategy enum value + SpotAllocationStrategyCapacityOptimized = "capacity-optimized" ) const ( @@ -91461,6 +97920,60 @@ const ( TenancyHost = "host" ) +const ( + // TrafficDirectionIngress is a TrafficDirection enum value + TrafficDirectionIngress = "ingress" + + // TrafficDirectionEgress is a TrafficDirection enum value + TrafficDirectionEgress = "egress" +) + +const ( + // TrafficMirrorFilterRuleFieldDestinationPortRange is a TrafficMirrorFilterRuleField enum value + TrafficMirrorFilterRuleFieldDestinationPortRange = "destination-port-range" + + // TrafficMirrorFilterRuleFieldSourcePortRange is a TrafficMirrorFilterRuleField enum value + TrafficMirrorFilterRuleFieldSourcePortRange = "source-port-range" + + // TrafficMirrorFilterRuleFieldProtocol is a TrafficMirrorFilterRuleField enum value + TrafficMirrorFilterRuleFieldProtocol = "protocol" + + // TrafficMirrorFilterRuleFieldDescription is a TrafficMirrorFilterRuleField enum value + TrafficMirrorFilterRuleFieldDescription = "description" +) + +const ( + // TrafficMirrorNetworkServiceAmazonDns is a TrafficMirrorNetworkService enum value + TrafficMirrorNetworkServiceAmazonDns = "amazon-dns" +) + +const ( + // TrafficMirrorRuleActionAccept is a TrafficMirrorRuleAction enum value + TrafficMirrorRuleActionAccept = "accept" + + // TrafficMirrorRuleActionReject is a TrafficMirrorRuleAction enum value + TrafficMirrorRuleActionReject = "reject" +) + +const ( + // TrafficMirrorSessionFieldPacketLength is a TrafficMirrorSessionField enum value + TrafficMirrorSessionFieldPacketLength = "packet-length" + + // TrafficMirrorSessionFieldDescription is a TrafficMirrorSessionField enum value + TrafficMirrorSessionFieldDescription = "description" + + // TrafficMirrorSessionFieldVirtualNetworkId is a TrafficMirrorSessionField enum value + TrafficMirrorSessionFieldVirtualNetworkId = "virtual-network-id" +) + +const ( + // TrafficMirrorTargetTypeNetworkInterface is a TrafficMirrorTargetType enum value + TrafficMirrorTargetTypeNetworkInterface = "network-interface" + + // TrafficMirrorTargetTypeNetworkLoadBalancer is a TrafficMirrorTargetType enum value + TrafficMirrorTargetTypeNetworkLoadBalancer = "network-load-balancer" +) + const ( // TrafficTypeAccept is a TrafficType enum value TrafficTypeAccept = "ACCEPT" @@ -91492,6 +98005,9 @@ const ( // TransitGatewayAttachmentResourceTypeVpn is a TransitGatewayAttachmentResourceType enum value TransitGatewayAttachmentResourceTypeVpn = "vpn" + + // TransitGatewayAttachmentResourceTypeDirectConnectGateway is a TransitGatewayAttachmentResourceType enum value + TransitGatewayAttachmentResourceTypeDirectConnectGateway = "direct-connect-gateway" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/customizations.go index 7b42719d..efec8d8a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/customizations.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/customizations.go @@ -8,65 +8,32 @@ import ( "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/sdkrand" ) -type retryer struct { - client.DefaultRetryer -} - -func (d retryer) RetryRules(r *request.Request) time.Duration { - switch r.Operation.Name { - case opModifyNetworkInterfaceAttribute: - fallthrough - case opAssignPrivateIpAddresses: - return customRetryRule(r) - default: - return d.DefaultRetryer.RetryRules(r) - } -} - -func customRetryRule(r *request.Request) time.Duration { - retryTimes := []time.Duration{ - time.Second, - 3 * time.Second, - 5 * time.Second, - } - - count := r.RetryCount - if count >= len(retryTimes) { - count = len(retryTimes) - 1 - } - - minTime := int(retryTimes[count]) - return time.Duration(sdkrand.SeededRand.Intn(minTime) + minTime) -} +const ( + // customRetryerMinRetryDelay sets min retry delay + customRetryerMinRetryDelay = 1 * time.Second -func setCustomRetryer(c *client.Client) { - maxRetries := aws.IntValue(c.Config.MaxRetries) - if c.Config.MaxRetries == nil || maxRetries == aws.UseServiceDefaultRetries { - maxRetries = 3 - } - - c.Retryer = retryer{ - DefaultRetryer: client.DefaultRetryer{ - NumMaxRetries: maxRetries, - }, - } -} + // customRetryerMaxRetryDelay sets max retry delay + customRetryerMaxRetryDelay = 8 * time.Second +) func init() { - initClient = func(c *client.Client) { - if c.Config.Retryer == nil { - // Only override the retryer with a custom one if the config - // does not already contain a retryer - setCustomRetryer(c) - } - } initRequest = func(r *request.Request) { if r.Operation.Name == opCopySnapshot { // fill the PresignedURL parameter r.Handlers.Build.PushFront(fillPresignedURL) } + + // only set the retryer on request if config doesn't have a retryer + if r.Config.Retryer == nil && (r.Operation.Name == opModifyNetworkInterfaceAttribute || r.Operation.Name == opAssignPrivateIpAddresses) { + r.Retryer = client.DefaultRetryer{ + NumMaxRetries: client.DefaultRetryerMaxNumRetries, + MinRetryDelay: customRetryerMinRetryDelay, + MinThrottleDelay: customRetryerMinRetryDelay, + MaxRetryDelay: customRetryerMaxRetryDelay, + MaxThrottleDelay: customRetryerMaxRetryDelay, + } + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go index c258e0e8..31c314e0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go @@ -7,18 +7,19 @@ // capacity in the AWS cloud. Using Amazon EC2 eliminates the need to invest // in hardware up front, so you can develop and deploy applications faster. // -// To learn more about Amazon EC2, Amazon EBS, and Amazon VPC, see the following -// resources: +// To learn more, see the following resources: // -// * Amazon EC2 product page (http://aws.amazon.com/ec2) +// * Amazon EC2: AmazonEC2 product page (http://aws.amazon.com/ec2), Amazon +// EC2 documentation (http://aws.amazon.com/documentation/ec2) // -// * Amazon EC2 documentation (http://aws.amazon.com/documentation/ec2) +// * Amazon EBS: Amazon EBS product page (http://aws.amazon.com/ebs), Amazon +// EBS documentation (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html) // -// * Amazon EBS product page (http://aws.amazon.com/ebs) +// * Amazon VPC: Amazon VPC product page (http://aws.amazon.com/vpc), Amazon +// VPC documentation (http://aws.amazon.com/documentation/vpc) // -// * Amazon VPC product page (http://aws.amazon.com/vpc) -// -// * Amazon VPC documentation (http://aws.amazon.com/documentation/vpc) +// * AWS VPN: AWS VPN product page (http://aws.amazon.com/vpn), AWS VPN documentation +// (http://aws.amazon.com/documentation/vpn) // // See https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go index eac6c94d..b002302e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -3181,6 +3181,8 @@ type DescribeSecretOutput struct { // The user-provided friendly name of the secret. Name *string `min:"1" type:"string"` + OwningService *string `min:"1" type:"string"` + // Specifies whether automatic rotation is enabled for this secret. // // To enable rotation, use RotateSecret with AutomaticallyRotateAfterDays set @@ -3266,6 +3268,12 @@ func (s *DescribeSecretOutput) SetName(v string) *DescribeSecretOutput { return s } +// SetOwningService sets the OwningService field's value. +func (s *DescribeSecretOutput) SetOwningService(v string) *DescribeSecretOutput { + s.OwningService = &v + return s +} + // SetRotationEnabled sets the RotationEnabled field's value. func (s *DescribeSecretOutput) SetRotationEnabled(v bool) *DescribeSecretOutput { s.RotationEnabled = &v @@ -3419,7 +3427,7 @@ type GetRandomPasswordOutput struct { _ struct{} `type:"structure"` // A string with the generated password. - RandomPassword *string `type:"string"` + RandomPassword *string `type:"string" sensitive:"true"` } // String returns the string representation @@ -4647,6 +4655,8 @@ type SecretListEntry struct { // in the folder prod. Name *string `min:"1" type:"string"` + OwningService *string `min:"1" type:"string"` + // Indicated whether automatic, scheduled rotation is enabled for this secret. RotationEnabled *bool `type:"boolean"` @@ -4729,6 +4739,12 @@ func (s *SecretListEntry) SetName(v string) *SecretListEntry { return s } +// SetOwningService sets the OwningService field's value. +func (s *SecretListEntry) SetOwningService(v string) *SecretListEntry { + s.OwningService = &v + return s +} + // SetRotationEnabled sets the RotationEnabled field's value. func (s *SecretListEntry) SetRotationEnabled(v bool) *SecretListEntry { s.RotationEnabled = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index 56615369..4c2bb71f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -194,12 +194,9 @@ func (c *SSM) CancelCommandRequest(input *CancelCommandInput) (req *request.Requ // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -482,12 +479,9 @@ func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *requ // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -609,12 +603,9 @@ func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput) // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -736,7 +727,7 @@ func (c *SSM) CreateDocumentRequest(input *CreateDocumentInput) (req *request.Re // The content for the document is not valid. // // * ErrCodeDocumentLimitExceeded "DocumentLimitExceeded" -// You can have at most 200 active Systems Manager documents. +// You can have at most 500 active Systems Manager documents. // // * ErrCodeInvalidDocumentSchemaVersion "InvalidDocumentSchemaVersion" // The version of the document schema is not supported. @@ -853,6 +844,105 @@ func (c *SSM) CreateMaintenanceWindowWithContext(ctx aws.Context, input *CreateM return out, req.Send() } +const opCreateOpsItem = "CreateOpsItem" + +// CreateOpsItemRequest generates a "aws/request.Request" representing the +// client's request for the CreateOpsItem operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateOpsItem for more information on using the CreateOpsItem +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateOpsItemRequest method. +// req, resp := client.CreateOpsItemRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateOpsItem +func (c *SSM) CreateOpsItemRequest(input *CreateOpsItemInput) (req *request.Request, output *CreateOpsItemOutput) { + op := &request.Operation{ + Name: opCreateOpsItem, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateOpsItemInput{} + } + + output = &CreateOpsItemOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateOpsItem API operation for Amazon Simple Systems Manager (SSM). +// +// Creates a new OpsItem. You must have permission in AWS Identity and Access +// Management (IAM) to create a new OpsItem. For more information, see Getting +// Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html) +// in the AWS Systems Manager User Guide. +// +// Operations engineers and IT professionals use OpsCenter to view, investigate, +// and remediate operational issues impacting the performance and health of +// their AWS resources. For more information, see AWS Systems Manager OpsCenter +// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) +// in the AWS Systems Manager User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation CreateOpsItem for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeOpsItemAlreadyExistsException "OpsItemAlreadyExistsException" +// The OpsItem already exists. +// +// * ErrCodeOpsItemLimitExceededException "OpsItemLimitExceededException" +// The request caused OpsItems to exceed one or more limits. For information +// about OpsItem limits, see What are the resource limits for OpsCenter? (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits). +// +// * ErrCodeOpsItemInvalidParameterException "OpsItemInvalidParameterException" +// A specified parameter argument isn't valid. Verify the available arguments +// and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateOpsItem +func (c *SSM) CreateOpsItem(input *CreateOpsItemInput) (*CreateOpsItemOutput, error) { + req, out := c.CreateOpsItemRequest(input) + return out, req.Send() +} + +// CreateOpsItemWithContext is the same as CreateOpsItem with the addition of +// the ability to pass a context and additional request options. +// +// See CreateOpsItem for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) CreateOpsItemWithContext(ctx aws.Context, input *CreateOpsItemInput, opts ...request.Option) (*CreateOpsItemOutput, error) { + req, out := c.CreateOpsItemRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreatePatchBaseline = "CreatePatchBaseline" // CreatePatchBaselineRequest generates a "aws/request.Request" representing the @@ -1214,12 +1304,9 @@ func (c *SSM) DeleteAssociationRequest(input *DeleteAssociationInput) (req *requ // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -1646,8 +1733,7 @@ func (c *SSM) DeleteParametersRequest(input *DeleteParametersInput) (req *reques // DeleteParameters API operation for Amazon Simple Systems Manager (SSM). // -// Delete a list of parameters. This API is used to delete parameters by using -// the Amazon EC2 console. +// Delete a list of parameters. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1913,12 +1999,9 @@ func (c *SSM) DeregisterManagedInstanceRequest(input *DeregisterManagedInstanceI // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -2257,9 +2340,9 @@ func (c *SSM) DescribeActivationsRequest(input *DescribeActivationsInput) (req * // DescribeActivations API operation for Amazon Simple Systems Manager (SSM). // -// Details about the activation, including: the date and time the activation -// was created, the expiration date, the IAM role assigned to the instances -// in the activation, and the number of instances activated by this registration. +// Describes details about the activation, such as the date and time the activation +// was created, its expiration date, the IAM role assigned to the instances +// in the activation, and the number of instances registered by using this activation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2428,12 +2511,9 @@ func (c *SSM) DescribeAssociationRequest(input *DescribeAssociationInput) (req * // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -2859,7 +2939,7 @@ func (c *SSM) DescribeAvailablePatchesRequest(input *DescribeAvailablePatchesInp // DescribeAvailablePatches API operation for Amazon Simple Systems Manager (SSM). // -// Lists all patches that could possibly be included in a patch baseline. +// Lists all patches eligible to be included in a patch baseline. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3129,12 +3209,9 @@ func (c *SSM) DescribeEffectiveInstanceAssociationsRequest(input *DescribeEffect // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -3323,12 +3400,9 @@ func (c *SSM) DescribeInstanceAssociationsStatusRequest(input *DescribeInstanceA // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -3435,12 +3509,9 @@ func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformat // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -3758,12 +3829,9 @@ func (c *SSM) DescribeInstancePatchesRequest(input *DescribeInstancePatchesInput // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -4554,6 +4622,94 @@ func (c *SSM) DescribeMaintenanceWindowsForTargetWithContext(ctx aws.Context, in return out, req.Send() } +const opDescribeOpsItems = "DescribeOpsItems" + +// DescribeOpsItemsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeOpsItems operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeOpsItems for more information on using the DescribeOpsItems +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeOpsItemsRequest method. +// req, resp := client.DescribeOpsItemsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeOpsItems +func (c *SSM) DescribeOpsItemsRequest(input *DescribeOpsItemsInput) (req *request.Request, output *DescribeOpsItemsOutput) { + op := &request.Operation{ + Name: opDescribeOpsItems, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeOpsItemsInput{} + } + + output = &DescribeOpsItemsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeOpsItems API operation for Amazon Simple Systems Manager (SSM). +// +// Query a set of OpsItems. You must have permission in AWS Identity and Access +// Management (IAM) to query a list of OpsItems. For more information, see Getting +// Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html) +// in the AWS Systems Manager User Guide. +// +// Operations engineers and IT professionals use OpsCenter to view, investigate, +// and remediate operational issues impacting the performance and health of +// their AWS resources. For more information, see AWS Systems Manager OpsCenter +// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) +// in the AWS Systems Manager User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation DescribeOpsItems for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeOpsItems +func (c *SSM) DescribeOpsItems(input *DescribeOpsItemsInput) (*DescribeOpsItemsOutput, error) { + req, out := c.DescribeOpsItemsRequest(input) + return out, req.Send() +} + +// DescribeOpsItemsWithContext is the same as DescribeOpsItems with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeOpsItems for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) DescribeOpsItemsWithContext(ctx aws.Context, input *DescribeOpsItemsInput, opts ...request.Option) (*DescribeOpsItemsOutput, error) { + req, out := c.DescribeOpsItemsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeParameters = "DescribeParameters" // DescribeParametersRequest generates a "aws/request.Request" representing the @@ -5298,12 +5454,9 @@ func (c *SSM) GetCommandInvocationRequest(input *GetCommandInvocationInput) (req // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -5993,8 +6146,7 @@ func (c *SSM) GetMaintenanceWindowExecutionRequest(input *GetMaintenanceWindowEx // GetMaintenanceWindowExecution API operation for Amazon Simple Systems Manager (SSM). // -// Retrieves details about a specific task run as part of a maintenance window -// execution. +// Retrieves details about a specific a maintenance window execution. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6167,8 +6319,7 @@ func (c *SSM) GetMaintenanceWindowExecutionTaskInvocationRequest(input *GetMaint // GetMaintenanceWindowExecutionTaskInvocation API operation for Amazon Simple Systems Manager (SSM). // -// Retrieves a task invocation. A task invocation is a specific task running -// on a specific target. maintenance windows report status for all invocations. +// Retrieves information about a specific task running on a specific target. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6296,6 +6447,190 @@ func (c *SSM) GetMaintenanceWindowTaskWithContext(ctx aws.Context, input *GetMai return out, req.Send() } +const opGetOpsItem = "GetOpsItem" + +// GetOpsItemRequest generates a "aws/request.Request" representing the +// client's request for the GetOpsItem operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetOpsItem for more information on using the GetOpsItem +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetOpsItemRequest method. +// req, resp := client.GetOpsItemRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetOpsItem +func (c *SSM) GetOpsItemRequest(input *GetOpsItemInput) (req *request.Request, output *GetOpsItemOutput) { + op := &request.Operation{ + Name: opGetOpsItem, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetOpsItemInput{} + } + + output = &GetOpsItemOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetOpsItem API operation for Amazon Simple Systems Manager (SSM). +// +// Get information about an OpsItem by using the ID. You must have permission +// in AWS Identity and Access Management (IAM) to view information about an +// OpsItem. For more information, see Getting Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html) +// in the AWS Systems Manager User Guide. +// +// Operations engineers and IT professionals use OpsCenter to view, investigate, +// and remediate operational issues impacting the performance and health of +// their AWS resources. For more information, see AWS Systems Manager OpsCenter +// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) +// in the AWS Systems Manager User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation GetOpsItem for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeOpsItemNotFoundException "OpsItemNotFoundException" +// The specified OpsItem ID doesn't exist. Verify the ID and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetOpsItem +func (c *SSM) GetOpsItem(input *GetOpsItemInput) (*GetOpsItemOutput, error) { + req, out := c.GetOpsItemRequest(input) + return out, req.Send() +} + +// GetOpsItemWithContext is the same as GetOpsItem with the addition of +// the ability to pass a context and additional request options. +// +// See GetOpsItem for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) GetOpsItemWithContext(ctx aws.Context, input *GetOpsItemInput, opts ...request.Option) (*GetOpsItemOutput, error) { + req, out := c.GetOpsItemRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetOpsSummary = "GetOpsSummary" + +// GetOpsSummaryRequest generates a "aws/request.Request" representing the +// client's request for the GetOpsSummary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetOpsSummary for more information on using the GetOpsSummary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetOpsSummaryRequest method. +// req, resp := client.GetOpsSummaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetOpsSummary +func (c *SSM) GetOpsSummaryRequest(input *GetOpsSummaryInput) (req *request.Request, output *GetOpsSummaryOutput) { + op := &request.Operation{ + Name: opGetOpsSummary, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetOpsSummaryInput{} + } + + output = &GetOpsSummaryOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetOpsSummary API operation for Amazon Simple Systems Manager (SSM). +// +// View a summary of OpsItems based on specified filters and aggregators. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation GetOpsSummary for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeInvalidFilter "InvalidFilter" +// The filter name is not valid. Verify the you entered the correct name and +// try again. +// +// * ErrCodeInvalidNextToken "InvalidNextToken" +// The specified token is not valid. +// +// * ErrCodeInvalidTypeNameException "InvalidTypeNameException" +// The parameter type name is not valid. +// +// * ErrCodeInvalidAggregatorException "InvalidAggregatorException" +// The specified aggregator is not valid for inventory groups. Verify that the +// aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetOpsSummary +func (c *SSM) GetOpsSummary(input *GetOpsSummaryInput) (*GetOpsSummaryOutput, error) { + req, out := c.GetOpsSummaryRequest(input) + return out, req.Send() +} + +// GetOpsSummaryWithContext is the same as GetOpsSummary with the addition of +// the ability to pass a context and additional request options. +// +// See GetOpsSummary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) GetOpsSummaryWithContext(ctx aws.Context, input *GetOpsSummaryInput, opts ...request.Option) (*GetOpsSummaryOutput, error) { + req, out := c.GetOpsSummaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetParameter = "GetParameter" // GetParameterRequest generates a "aws/request.Request" representing the @@ -7461,12 +7796,9 @@ func (c *SSM) ListCommandInvocationsRequest(input *ListCommandInvocationsInput) // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -7619,12 +7951,9 @@ func (c *SSM) ListCommandsRequest(input *ListCommandsInput) (req *request.Reques // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -8180,12 +8509,9 @@ func (c *SSM) ListInventoryEntriesRequest(input *ListInventoryEntriesInput) (req // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -8562,7 +8888,7 @@ func (c *SSM) ModifyDocumentPermissionRequest(input *ModifyDocumentPermissionInp // documents. If you need to increase this limit, contact AWS Support. // // * ErrCodeDocumentLimitExceeded "DocumentLimitExceeded" -// You can have at most 200 active Systems Manager documents. +// You can have at most 500 active Systems Manager documents. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ModifyDocumentPermission func (c *SSM) ModifyDocumentPermission(input *ModifyDocumentPermissionInput) (*ModifyDocumentPermissionOutput, error) { @@ -8792,12 +9118,9 @@ func (c *SSM) PutInventoryRequest(input *PutInventoryInput) (req *request.Reques // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -9035,7 +9358,12 @@ func (c *SSM) RegisterDefaultPatchBaselineRequest(input *RegisterDefaultPatchBas // RegisterDefaultPatchBaseline API operation for Amazon Simple Systems Manager (SSM). // -// Defines the default patch baseline. +// Defines the default patch baseline for the relevant operating system. +// +// To reset the AWS predefined patch baseline as the default, specify the full +// patch baseline ARN as the baseline ID value. For example, for CentOS, specify +// arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0574b43a65ea646ed instead +// of pb-0574b43a65ea646ed. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9352,7 +9680,7 @@ func (c *SSM) RegisterTaskWithMaintenanceWindowRequest(input *RegisterTaskWithMa // Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). // // * ErrCodeFeatureNotAvailableException "FeatureNotAvailableException" -// You attempted to register a LAMBDA or STEP_FUNCTION task in a region where +// You attempted to register a LAMBDA or STEP_FUNCTIONS task in a region where // the corresponding service is not available. // // * ErrCodeInternalServerError "InternalServerError" @@ -9425,7 +9753,7 @@ func (c *SSM) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) // RemoveTagsFromResource API operation for Amazon Simple Systems Manager (SSM). // -// Removes all tags from the specified resource. +// Removes tag keys from the specified resource. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9821,12 +10149,9 @@ func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request, // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -10388,6 +10713,13 @@ func (c *SSM) UpdateAssociationRequest(input *UpdateAssociationInput) (req *requ // Updates an association. You can update the association name and version, // the document version, schedule, parameters, and Amazon S3 output. // +// In order to call this API action, your IAM user account, group, or role must +// be configured with permission to call the DescribeAssociation API action. +// If you don't have permission to call DescribeAssociation, then you receive +// the following error: An error occurred (AccessDeniedException) when calling +// the UpdateAssociation operation: User: is not authorized to perform: +// ssm:DescribeAssociation on resource: +// // When you update an association, the association immediately runs against // the specified targets. // @@ -10527,12 +10859,9 @@ func (c *SSM) UpdateAssociationStatusRequest(input *UpdateAssociationStatusInput // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -10616,7 +10945,7 @@ func (c *SSM) UpdateDocumentRequest(input *UpdateDocumentInput) (req *request.Re // UpdateDocument API operation for Amazon Simple Systems Manager (SSM). // -// The document you want to update. +// Updates one or more values for an SSM document. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -10900,21 +11229,22 @@ func (c *SSM) UpdateMaintenanceWindowTargetRequest(input *UpdateMaintenanceWindo // UpdateMaintenanceWindowTarget API operation for Amazon Simple Systems Manager (SSM). // -// Modifies the target of an existing maintenance window. You can't change the -// target type, but you can change the following: +// Modifies the target of an existing maintenance window. You can change the +// following: // -// The target from being an ID target to a Tag target, or a Tag target to an -// ID target. +// * Name // -// IDs for an ID target. +// * Description // -// Tags for a Tag target. +// * Owner // -// Owner. +// * IDs for an ID target // -// Name. +// * Tags for a Tag target // -// Description. +// * From any supported tag type to another. The three supported tag types +// are ID target, Tag target, and resource group. For more information, see +// Target. // // If a parameter is null, then the corresponding field is not modified. // @@ -11108,7 +11438,7 @@ func (c *SSM) UpdateManagedInstanceRoleRequest(input *UpdateManagedInstanceRoleI // UpdateManagedInstanceRole API operation for Amazon Simple Systems Manager (SSM). // -// Assigns or changes an Amazon Identity and Access Management (IAM) role to +// Assigns or changes an Amazon Identity and Access Management (IAM) role for // the managed instance. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -11124,12 +11454,9 @@ func (c *SSM) UpdateManagedInstanceRoleRequest(input *UpdateManagedInstanceRoleI // // You do not have permission to access the instance. // -// SSM Agent is not running. On managed instances and Linux instances, verify -// that the SSM Agent is running. On EC2 Windows instances, verify that the -// EC2Config service is running. +// SSM Agent is not running. Verify that SSM Agent is running. // -// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try -// reinstalling SSM Agent or EC2Config service. +// SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -11159,6 +11486,109 @@ func (c *SSM) UpdateManagedInstanceRoleWithContext(ctx aws.Context, input *Updat return out, req.Send() } +const opUpdateOpsItem = "UpdateOpsItem" + +// UpdateOpsItemRequest generates a "aws/request.Request" representing the +// client's request for the UpdateOpsItem operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateOpsItem for more information on using the UpdateOpsItem +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateOpsItemRequest method. +// req, resp := client.UpdateOpsItemRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateOpsItem +func (c *SSM) UpdateOpsItemRequest(input *UpdateOpsItemInput) (req *request.Request, output *UpdateOpsItemOutput) { + op := &request.Operation{ + Name: opUpdateOpsItem, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateOpsItemInput{} + } + + output = &UpdateOpsItemOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateOpsItem API operation for Amazon Simple Systems Manager (SSM). +// +// Edit or change an OpsItem. You must have permission in AWS Identity and Access +// Management (IAM) to update an OpsItem. For more information, see Getting +// Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html) +// in the AWS Systems Manager User Guide. +// +// Operations engineers and IT professionals use OpsCenter to view, investigate, +// and remediate operational issues impacting the performance and health of +// their AWS resources. For more information, see AWS Systems Manager OpsCenter +// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) +// in the AWS Systems Manager User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation UpdateOpsItem for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeOpsItemNotFoundException "OpsItemNotFoundException" +// The specified OpsItem ID doesn't exist. Verify the ID and try again. +// +// * ErrCodeOpsItemAlreadyExistsException "OpsItemAlreadyExistsException" +// The OpsItem already exists. +// +// * ErrCodeOpsItemLimitExceededException "OpsItemLimitExceededException" +// The request caused OpsItems to exceed one or more limits. For information +// about OpsItem limits, see What are the resource limits for OpsCenter? (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits). +// +// * ErrCodeOpsItemInvalidParameterException "OpsItemInvalidParameterException" +// A specified parameter argument isn't valid. Verify the available arguments +// and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateOpsItem +func (c *SSM) UpdateOpsItem(input *UpdateOpsItemInput) (*UpdateOpsItemOutput, error) { + req, out := c.UpdateOpsItemRequest(input) + return out, req.Send() +} + +// UpdateOpsItemWithContext is the same as UpdateOpsItem with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateOpsItem for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) UpdateOpsItemWithContext(ctx aws.Context, input *UpdateOpsItemInput, opts ...request.Option) (*UpdateOpsItemOutput, error) { + req, out := c.UpdateOpsItemRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdatePatchBaseline = "UpdatePatchBaseline" // UpdatePatchBaselineRequest generates a "aws/request.Request" representing the @@ -15001,6 +15431,12 @@ type CreateAssociationInput struct { DocumentVersion *string `type:"string"` // The instance ID. + // + // InstanceId has been deprecated. To specify an instance ID for an association, + // use the Targets parameter. If you use the parameter InstanceId, you cannot + // use the parameters AssociationName, DocumentVersion, MaxErrors, MaxConcurrency, + // OutputLocation, or ScheduleExpression. To use these parameters, you must + // use the Targets parameter. InstanceId *string `type:"string"` // The maximum number of targets allowed to run the association at the same @@ -15060,7 +15496,8 @@ type CreateAssociationInput struct { // A cron expression when the association will be applied to the target(s). ScheduleExpression *string `min:"1" type:"string"` - // The targets (either instances or tags) for the association. + // The targets (either instances or tags) for the association. You must specify + // a value for Targets if you don't specify a value for InstanceId. Targets []*Target `type:"list"` } @@ -15615,6 +16052,205 @@ func (s *CreateMaintenanceWindowOutput) SetWindowId(v string) *CreateMaintenance return s } +type CreateOpsItemInput struct { + _ struct{} `type:"structure"` + + // Information about the OpsItem. + // + // Description is a required field + Description *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of an SNS topic where notifications are sent + // when this OpsItem is edited or changed. + Notifications []*OpsItemNotification `type:"list"` + + // Operational data is custom data that provides useful reference details about + // the OpsItem. For example, you can specify log files, error strings, license + // keys, troubleshooting tips, or other relevant data. You enter operational + // data as key-value pairs. The key has a maximum length of 128 characters. + // The value has a maximum size of 20 KB. + // + // Operational data keys can't begin with the following: amazon, aws, amzn, + // ssm, /amazon, /aws, /amzn, /ssm. + // + // You can choose to make the data searchable by other users in the account + // or you can restrict search access. Searchable data means that all users with + // access to the OpsItem Overview page (as provided by the DescribeOpsItems + // API action) can view and search on the specified data. Operational data that + // is not searchable is only viewable by users who have access to the OpsItem + // (as provided by the GetOpsItem API action). + // + // Use the /aws/resources key in OperationalData to specify a related resource + // in the request. Use the /aws/automations key in OperationalData to associate + // an Automation runbook with the OpsItem. To view AWS CLI example commands + // that use these keys, see Creating OpsItems Manually (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems) + // in the AWS Systems Manager User Guide. + OperationalData map[string]*OpsItemDataValue `type:"map"` + + // The importance of this OpsItem in relation to other OpsItems in the system. + Priority *int64 `min:"1" type:"integer"` + + // One or more OpsItems that share something in common with the current OpsItems. + // For example, related OpsItems can include OpsItems with similar error messages, + // impacted resources, or statuses for the impacted resource. + RelatedOpsItems []*RelatedOpsItem `type:"list"` + + // The origin of the OpsItem, such as Amazon EC2 or AWS Systems Manager. + // + // Source is a required field + Source *string `min:"1" type:"string" required:"true"` + + // Optional metadata that you assign to a resource. You can restrict access + // to OpsItems by using an inline IAM policy that specifies tags. For more information, + // see Getting Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html#OpsCenter-getting-started-user-permissions) + // in the AWS Systems Manager User Guide. + // + // Tags use a key-value pair. For example: + // + // Key=Department,Value=Finance + // + // To add tags to an existing OpsItem, use the AddTagsToResource action. + Tags []*Tag `type:"list"` + + // A short heading that describes the nature of the OpsItem and the impacted + // resource. + // + // Title is a required field + Title *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateOpsItemInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateOpsItemInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateOpsItemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateOpsItemInput"} + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + if s.Description != nil && len(*s.Description) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Description", 1)) + } + if s.Priority != nil && *s.Priority < 1 { + invalidParams.Add(request.NewErrParamMinValue("Priority", 1)) + } + if s.Source == nil { + invalidParams.Add(request.NewErrParamRequired("Source")) + } + if s.Source != nil && len(*s.Source) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Source", 1)) + } + if s.Title == nil { + invalidParams.Add(request.NewErrParamRequired("Title")) + } + if s.Title != nil && len(*s.Title) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Title", 1)) + } + if s.RelatedOpsItems != nil { + for i, v := range s.RelatedOpsItems { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RelatedOpsItems", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateOpsItemInput) SetDescription(v string) *CreateOpsItemInput { + s.Description = &v + return s +} + +// SetNotifications sets the Notifications field's value. +func (s *CreateOpsItemInput) SetNotifications(v []*OpsItemNotification) *CreateOpsItemInput { + s.Notifications = v + return s +} + +// SetOperationalData sets the OperationalData field's value. +func (s *CreateOpsItemInput) SetOperationalData(v map[string]*OpsItemDataValue) *CreateOpsItemInput { + s.OperationalData = v + return s +} + +// SetPriority sets the Priority field's value. +func (s *CreateOpsItemInput) SetPriority(v int64) *CreateOpsItemInput { + s.Priority = &v + return s +} + +// SetRelatedOpsItems sets the RelatedOpsItems field's value. +func (s *CreateOpsItemInput) SetRelatedOpsItems(v []*RelatedOpsItem) *CreateOpsItemInput { + s.RelatedOpsItems = v + return s +} + +// SetSource sets the Source field's value. +func (s *CreateOpsItemInput) SetSource(v string) *CreateOpsItemInput { + s.Source = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateOpsItemInput) SetTags(v []*Tag) *CreateOpsItemInput { + s.Tags = v + return s +} + +// SetTitle sets the Title field's value. +func (s *CreateOpsItemInput) SetTitle(v string) *CreateOpsItemInput { + s.Title = &v + return s +} + +type CreateOpsItemOutput struct { + _ struct{} `type:"structure"` + + // The ID of the OpsItem. + OpsItemId *string `type:"string"` +} + +// String returns the string representation +func (s CreateOpsItemOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateOpsItemOutput) GoString() string { + return s.String() +} + +// SetOpsItemId sets the OpsItemId field's value. +func (s *CreateOpsItemOutput) SetOpsItemId(v string) *CreateOpsItemOutput { + s.OpsItemId = &v + return s +} + type CreatePatchBaselineInput struct { _ struct{} `type:"structure"` @@ -16045,10 +16681,18 @@ func (s DeleteAssociationOutput) GoString() string { type DeleteDocumentInput struct { _ struct{} `type:"structure"` + // The version of the document that you want to delete. If not provided, all + // versions of the document are deleted. + DocumentVersion *string `type:"string"` + // The name of the document. // // Name is a required field Name *string `type:"string" required:"true"` + + // The version name of the document that you want to delete. If not provided, + // all versions of the document are deleted. + VersionName *string `type:"string"` } // String returns the string representation @@ -16074,12 +16718,24 @@ func (s *DeleteDocumentInput) Validate() error { return nil } +// SetDocumentVersion sets the DocumentVersion field's value. +func (s *DeleteDocumentInput) SetDocumentVersion(v string) *DeleteDocumentInput { + s.DocumentVersion = &v + return s +} + // SetName sets the Name field's value. func (s *DeleteDocumentInput) SetName(v string) *DeleteDocumentInput { s.Name = &v return s } +// SetVersionName sets the VersionName field's value. +func (s *DeleteDocumentInput) SetVersionName(v string) *DeleteDocumentInput { + s.VersionName = &v + return s +} + type DeleteDocumentOutput struct { _ struct{} `type:"structure"` } @@ -18452,11 +19108,9 @@ func (s *DescribeInstancePatchStatesOutput) SetNextToken(v string) *DescribeInst type DescribeInstancePatchesInput struct { _ struct{} `type:"structure"` - // Each entry in the array is a structure containing: - // - // Key (string, between 1 and 128 characters) - // - // Values (array of strings, each string between 1 and 256 characters) + // An array of structures. Each entry in the array is a structure containing + // a Key, Value combination. Valid values for Key are Classification | KBId + // | Severity | State. Filters []*PatchOrchestratorFilter `type:"list"` // The ID of the instance whose patch state information should be retrieved. @@ -19652,6 +20306,134 @@ func (s *DescribeMaintenanceWindowsOutput) SetWindowIdentities(v []*MaintenanceW return s } +type DescribeOpsItemsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // A token to start the list. Use this token to get the next set of results. + NextToken *string `type:"string"` + + // One or more filters to limit the reponse. + // + // * Key: CreatedTime Operations: GreaterThan, LessThan + // + // * Key: LastModifiedBy Operations: Contains, Equals + // + // * Key: LastModifiedTime Operations: GreaterThan, LessThan + // + // * Key: Priority Operations: Equals + // + // * Key: Source Operations: Contains, Equals + // + // * Key: Status Operations: Equals + // + // * Key: Title Operations: Contains + // + // * Key: OperationalData* Operations: Equals + // + // * Key: OperationalDataKey Operations: Equals + // + // * Key: OperationalDataValue Operations: Equals, Contains + // + // * Key: OpsItemId Operations: Equals + // + // * Key: ResourceId Operations: Contains + // + // * Key: AutomationId Operations: Equals + // + // *If you filter the response by using the OperationalData operator, specify + // a key-value pair by using the following JSON format: {"key":"key_name","value":"a_value"} + OpsItemFilters []*OpsItemFilter `type:"list"` +} + +// String returns the string representation +func (s DescribeOpsItemsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeOpsItemsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeOpsItemsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeOpsItemsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.OpsItemFilters != nil { + for i, v := range s.OpsItemFilters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OpsItemFilters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeOpsItemsInput) SetMaxResults(v int64) *DescribeOpsItemsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeOpsItemsInput) SetNextToken(v string) *DescribeOpsItemsInput { + s.NextToken = &v + return s +} + +// SetOpsItemFilters sets the OpsItemFilters field's value. +func (s *DescribeOpsItemsInput) SetOpsItemFilters(v []*OpsItemFilter) *DescribeOpsItemsInput { + s.OpsItemFilters = v + return s +} + +type DescribeOpsItemsOutput struct { + _ struct{} `type:"structure"` + + // The token for the next set of items to return. Use this token to get the + // next set of results. + NextToken *string `type:"string"` + + // A list of OpsItems. + OpsItemSummaries []*OpsItemSummary `type:"list"` +} + +// String returns the string representation +func (s DescribeOpsItemsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeOpsItemsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeOpsItemsOutput) SetNextToken(v string) *DescribeOpsItemsOutput { + s.NextToken = &v + return s +} + +// SetOpsItemSummaries sets the OpsItemSummaries field's value. +func (s *DescribeOpsItemsOutput) SetOpsItemSummaries(v []*OpsItemSummary) *DescribeOpsItemsOutput { + s.OpsItemSummaries = v + return s +} + type DescribeParametersInput struct { _ struct{} `type:"structure"` @@ -22429,7 +23211,7 @@ type GetMaintenanceWindowExecutionTaskInvocationOutput struct { TaskExecutionId *string `min:"36" type:"string"` // Retrieves the task type for a maintenance window. Task types include the - // following: LAMBDA, STEP_FUNCTION, AUTOMATION, RUN_COMMAND. + // following: LAMBDA, STEP_FUNCTIONS, AUTOMATION, RUN_COMMAND. TaskType *string `type:"string" enum:"MaintenanceWindowTaskType"` // The maintenance window execution ID. @@ -22950,8 +23732,8 @@ type GetMaintenanceWindowTaskOutput struct { // The resource that the task used during execution. For RUN_COMMAND and AUTOMATION // task types, the TaskArn is the Systems Manager Document name/ARN. For LAMBDA - // tasks, the value is the function name/ARN. For STEP_FUNCTION tasks, the value - // is the state machine ARN. + // tasks, the value is the function name/ARN. For STEP_FUNCTIONS tasks, the + // value is the state machine ARN. TaskArn *string `min:"1" type:"string"` // The parameters to pass to the task when it runs. @@ -23069,6 +23851,197 @@ func (s *GetMaintenanceWindowTaskOutput) SetWindowTaskId(v string) *GetMaintenan return s } +type GetOpsItemInput struct { + _ struct{} `type:"structure"` + + // The ID of the OpsItem that you want to get. + // + // OpsItemId is a required field + OpsItemId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetOpsItemInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetOpsItemInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetOpsItemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetOpsItemInput"} + if s.OpsItemId == nil { + invalidParams.Add(request.NewErrParamRequired("OpsItemId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOpsItemId sets the OpsItemId field's value. +func (s *GetOpsItemInput) SetOpsItemId(v string) *GetOpsItemInput { + s.OpsItemId = &v + return s +} + +type GetOpsItemOutput struct { + _ struct{} `type:"structure"` + + // The OpsItem. + OpsItem *OpsItem `type:"structure"` +} + +// String returns the string representation +func (s GetOpsItemOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetOpsItemOutput) GoString() string { + return s.String() +} + +// SetOpsItem sets the OpsItem field's value. +func (s *GetOpsItemOutput) SetOpsItem(v *OpsItem) *GetOpsItemOutput { + s.OpsItem = v + return s +} + +type GetOpsSummaryInput struct { + _ struct{} `type:"structure"` + + // Optional aggregators that return counts of OpsItems based on one or more + // expressions. + // + // Aggregators is a required field + Aggregators []*OpsAggregator `min:"1" type:"list" required:"true"` + + // Optional filters used to scope down the returned OpsItems. + Filters []*OpsFilter `min:"1" type:"list"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // A token to start the list. Use this token to get the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetOpsSummaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetOpsSummaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetOpsSummaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetOpsSummaryInput"} + if s.Aggregators == nil { + invalidParams.Add(request.NewErrParamRequired("Aggregators")) + } + if s.Aggregators != nil && len(s.Aggregators) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Aggregators", 1)) + } + if s.Filters != nil && len(s.Filters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Aggregators != nil { + for i, v := range s.Aggregators { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Aggregators", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAggregators sets the Aggregators field's value. +func (s *GetOpsSummaryInput) SetAggregators(v []*OpsAggregator) *GetOpsSummaryInput { + s.Aggregators = v + return s +} + +// SetFilters sets the Filters field's value. +func (s *GetOpsSummaryInput) SetFilters(v []*OpsFilter) *GetOpsSummaryInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetOpsSummaryInput) SetMaxResults(v int64) *GetOpsSummaryInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetOpsSummaryInput) SetNextToken(v string) *GetOpsSummaryInput { + s.NextToken = &v + return s +} + +type GetOpsSummaryOutput struct { + _ struct{} `type:"structure"` + + // The list of aggregated and filtered OpsItems. + Entities []*OpsEntity `type:"list"` + + // The token for the next set of items to return. Use this token to get the + // next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetOpsSummaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetOpsSummaryOutput) GoString() string { + return s.String() +} + +// SetEntities sets the Entities field's value. +func (s *GetOpsSummaryOutput) SetEntities(v []*OpsEntity) *GetOpsSummaryOutput { + s.Entities = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetOpsSummaryOutput) SetNextToken(v string) *GetOpsSummaryOutput { + s.NextToken = &v + return s +} + type GetParameterHistoryInput struct { _ struct{} `type:"structure"` @@ -24135,10 +25108,10 @@ type InstanceInformation struct { // The instance ID. InstanceId *string `type:"string"` - // Indicates whether latest version of SSM Agent is running on your instance. - // Some older versions of Windows Server use the EC2Config service to process - // SSM requests. For this reason, this field does not indicate whether or not - // the latest version is installed on Windows managed instances. + // Indicates whether the latest version of SSM Agent is running on your Linux + // Managed Instance. This field does not indicate whether or not the latest + // version is installed on Windows managed instances, because some older versions + // of Windows Server use the EC2Config service to process SSM requests. IsLatestVersion *bool `type:"boolean"` // The date the association was last run. @@ -25409,7 +26382,7 @@ type LabelParameterVersionInput struct { // The specific version of the parameter on which you want to attach one or // more labels. If no version is specified, the system attaches the label to - // the latest version.) + // the latest version. ParameterVersion *int64 `type:"long"` } @@ -25470,6 +26443,9 @@ type LabelParameterVersionOutput struct { // label requirements, see Labeling Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html) // in the AWS Systems Manager User Guide. InvalidLabels []*string `min:"1" type:"list"` + + // The version of the parameter that has been labeled. + ParameterVersion *int64 `type:"long"` } // String returns the string representation @@ -25488,6 +26464,12 @@ func (s *LabelParameterVersionOutput) SetInvalidLabels(v []*string) *LabelParame return s } +// SetParameterVersion sets the ParameterVersion field's value. +func (s *LabelParameterVersionOutput) SetParameterVersion(v int64) *LabelParameterVersionOutput { + s.ParameterVersion = &v + return s +} + type ListAssociationVersionsInput struct { _ struct{} `type:"structure"` @@ -27650,7 +28632,7 @@ func (s *MaintenanceWindowRunCommandParameters) SetTimeoutSeconds(v int64) *Main return s } -// The parameters for a STEP_FUNCTION task. +// The parameters for a STEP_FUNCTIONS task. // // For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow // and UpdateMaintenanceWindowTask. @@ -27670,10 +28652,10 @@ func (s *MaintenanceWindowRunCommandParameters) SetTimeoutSeconds(v int64) *Main type MaintenanceWindowStepFunctionsParameters struct { _ struct{} `type:"structure"` - // The inputs for the STEP_FUNCTION task. + // The inputs for the STEP_FUNCTIONS task. Input *string `type:"string" sensitive:"true"` - // The name of the STEP_FUNCTION task. + // The name of the STEP_FUNCTIONS task. Name *string `min:"1" type:"string"` } @@ -27838,8 +28820,8 @@ type MaintenanceWindowTask struct { // The resource that the task uses during execution. For RUN_COMMAND and AUTOMATION // task types, TaskArn is the Systems Manager document name or ARN. For LAMBDA - // tasks, it's the function name or ARN. For STEP_FUNCTION tasks, it's the state - // machine ARN. + // tasks, it's the function name or ARN. For STEP_FUNCTIONS tasks, it's the + // state machine ARN. TaskArn *string `min:"1" type:"string"` // The parameters that should be passed to the task when it is run. @@ -27851,7 +28833,7 @@ type MaintenanceWindowTask struct { TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` // The type of task. The type can be one of the following: RUN_COMMAND, AUTOMATION, - // LAMBDA, or STEP_FUNCTION. + // LAMBDA, or STEP_FUNCTIONS. Type *string `type:"string" enum:"MaintenanceWindowTaskType"` // The ID of the maintenance window where the task is registered. @@ -27962,7 +28944,7 @@ type MaintenanceWindowTaskInvocationParameters struct { // The parameters for a RUN_COMMAND task type. RunCommand *MaintenanceWindowRunCommandParameters `type:"structure"` - // The parameters for a STEP_FUNCTION task type. + // The parameters for a STEP_FUNCTIONS task type. StepFunctions *MaintenanceWindowStepFunctionsParameters `type:"structure"` } @@ -28227,6 +29209,649 @@ func (s *NotificationConfig) SetNotificationType(v string) *NotificationConfig { return s } +// One or more aggregators for viewing counts of OpsItems using different dimensions +// such as Source, CreatedTime, or Source and CreatedTime, to name a few. +type OpsAggregator struct { + _ struct{} `type:"structure"` + + // Either a Range or Count aggregator for limiting an OpsItem summary. + AggregatorType *string `min:"1" type:"string"` + + // A nested aggregator for viewing counts of OpsItems. + Aggregators []*OpsAggregator `min:"1" type:"list"` + + // The name of an OpsItem attribute on which to limit the count of OpsItems. + AttributeName *string `type:"string"` + + // The aggregator filters. + Filters []*OpsFilter `min:"1" type:"list"` + + // The data type name to use for viewing counts of OpsItems. + TypeName *string `min:"1" type:"string"` + + // The aggregator value. + Values map[string]*string `type:"map"` +} + +// String returns the string representation +func (s OpsAggregator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpsAggregator) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OpsAggregator) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OpsAggregator"} + if s.AggregatorType != nil && len(*s.AggregatorType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AggregatorType", 1)) + } + if s.Aggregators != nil && len(s.Aggregators) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Aggregators", 1)) + } + if s.Filters != nil && len(s.Filters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) + } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } + if s.Aggregators != nil { + for i, v := range s.Aggregators { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Aggregators", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAggregatorType sets the AggregatorType field's value. +func (s *OpsAggregator) SetAggregatorType(v string) *OpsAggregator { + s.AggregatorType = &v + return s +} + +// SetAggregators sets the Aggregators field's value. +func (s *OpsAggregator) SetAggregators(v []*OpsAggregator) *OpsAggregator { + s.Aggregators = v + return s +} + +// SetAttributeName sets the AttributeName field's value. +func (s *OpsAggregator) SetAttributeName(v string) *OpsAggregator { + s.AttributeName = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *OpsAggregator) SetFilters(v []*OpsFilter) *OpsAggregator { + s.Filters = v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *OpsAggregator) SetTypeName(v string) *OpsAggregator { + s.TypeName = &v + return s +} + +// SetValues sets the Values field's value. +func (s *OpsAggregator) SetValues(v map[string]*string) *OpsAggregator { + s.Values = v + return s +} + +// The result of the query. +type OpsEntity struct { + _ struct{} `type:"structure"` + + // The data returned by the query. + Data map[string]*OpsEntityItem `type:"map"` + + // The query ID. + Id *string `type:"string"` +} + +// String returns the string representation +func (s OpsEntity) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpsEntity) GoString() string { + return s.String() +} + +// SetData sets the Data field's value. +func (s *OpsEntity) SetData(v map[string]*OpsEntityItem) *OpsEntity { + s.Data = v + return s +} + +// SetId sets the Id field's value. +func (s *OpsEntity) SetId(v string) *OpsEntity { + s.Id = &v + return s +} + +// The OpsItem summaries result item. +type OpsEntityItem struct { + _ struct{} `type:"structure"` + + // The detailed data content for an OpsItem summaries result item. + Content []map[string]*string `type:"list"` +} + +// String returns the string representation +func (s OpsEntityItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpsEntityItem) GoString() string { + return s.String() +} + +// SetContent sets the Content field's value. +func (s *OpsEntityItem) SetContent(v []map[string]*string) *OpsEntityItem { + s.Content = v + return s +} + +// A filter for viewing OpsItem summaries. +type OpsFilter struct { + _ struct{} `type:"structure"` + + // The name of the filter. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The type of filter. + Type *string `type:"string" enum:"OpsFilterOperatorType"` + + // The filter value. + // + // Values is a required field + Values []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s OpsFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpsFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OpsFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OpsFilter"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Values == nil { + invalidParams.Add(request.NewErrParamRequired("Values")) + } + if s.Values != nil && len(s.Values) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Values", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *OpsFilter) SetKey(v string) *OpsFilter { + s.Key = &v + return s +} + +// SetType sets the Type field's value. +func (s *OpsFilter) SetType(v string) *OpsFilter { + s.Type = &v + return s +} + +// SetValues sets the Values field's value. +func (s *OpsFilter) SetValues(v []*string) *OpsFilter { + s.Values = v + return s +} + +// Operations engineers and IT professionals use OpsCenter to view, investigate, +// and remediate operational issues impacting the performance and health of +// their AWS resources. For more information, see AWS Systems Manager OpsCenter +// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) +// in the AWS Systems Manager User Guide. +type OpsItem struct { + _ struct{} `type:"structure"` + + // The ARN of the AWS account that created the OpsItem. + CreatedBy *string `type:"string"` + + // The date and time the OpsItem was created. + CreatedTime *time.Time `type:"timestamp"` + + // The OpsItem description. + Description *string `min:"1" type:"string"` + + // The ARN of the AWS account that last updated the OpsItem. + LastModifiedBy *string `type:"string"` + + // The date and time the OpsItem was last updated. + LastModifiedTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of an SNS topic where notifications are sent + // when this OpsItem is edited or changed. + Notifications []*OpsItemNotification `type:"list"` + + // Operational data is custom data that provides useful reference details about + // the OpsItem. For example, you can specify log files, error strings, license + // keys, troubleshooting tips, or other relevant data. You enter operational + // data as key-value pairs. The key has a maximum length of 128 characters. + // The value has a maximum size of 20 KB. + // + // Operational data keys can't begin with the following: amazon, aws, amzn, + // ssm, /amazon, /aws, /amzn, /ssm. + // + // You can choose to make the data searchable by other users in the account + // or you can restrict search access. Searchable data means that all users with + // access to the OpsItem Overview page (as provided by the DescribeOpsItems + // API action) can view and search on the specified data. Operational data that + // is not searchable is only viewable by users who have access to the OpsItem + // (as provided by the GetOpsItem API action). + // + // Use the /aws/resources key in OperationalData to specify a related resource + // in the request. Use the /aws/automations key in OperationalData to associate + // an Automation runbook with the OpsItem. To view AWS CLI example commands + // that use these keys, see Creating OpsItems Manually (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems) + // in the AWS Systems Manager User Guide. + OperationalData map[string]*OpsItemDataValue `type:"map"` + + // The ID of the OpsItem. + OpsItemId *string `type:"string"` + + // The importance of this OpsItem in relation to other OpsItems in the system. + Priority *int64 `min:"1" type:"integer"` + + // One or more OpsItems that share something in common with the current OpsItem. + // For example, related OpsItems can include OpsItems with similar error messages, + // impacted resources, or statuses for the impacted resource. + RelatedOpsItems []*RelatedOpsItem `type:"list"` + + // The origin of the OpsItem, such as Amazon EC2 or AWS Systems Manager. The + // impacted resource is a subset of source. + Source *string `min:"1" type:"string"` + + // The OpsItem status. Status can be Open, In Progress, or Resolved. For more + // information, see Editing OpsItem Details (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html) + // in the AWS Systems Manager User Guide. + Status *string `type:"string" enum:"OpsItemStatus"` + + // A short heading that describes the nature of the OpsItem and the impacted + // resource. + Title *string `min:"1" type:"string"` + + // The version of this OpsItem. Each time the OpsItem is edited the version + // number increments by one. + Version *string `type:"string"` +} + +// String returns the string representation +func (s OpsItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpsItem) GoString() string { + return s.String() +} + +// SetCreatedBy sets the CreatedBy field's value. +func (s *OpsItem) SetCreatedBy(v string) *OpsItem { + s.CreatedBy = &v + return s +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *OpsItem) SetCreatedTime(v time.Time) *OpsItem { + s.CreatedTime = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *OpsItem) SetDescription(v string) *OpsItem { + s.Description = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *OpsItem) SetLastModifiedBy(v string) *OpsItem { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *OpsItem) SetLastModifiedTime(v time.Time) *OpsItem { + s.LastModifiedTime = &v + return s +} + +// SetNotifications sets the Notifications field's value. +func (s *OpsItem) SetNotifications(v []*OpsItemNotification) *OpsItem { + s.Notifications = v + return s +} + +// SetOperationalData sets the OperationalData field's value. +func (s *OpsItem) SetOperationalData(v map[string]*OpsItemDataValue) *OpsItem { + s.OperationalData = v + return s +} + +// SetOpsItemId sets the OpsItemId field's value. +func (s *OpsItem) SetOpsItemId(v string) *OpsItem { + s.OpsItemId = &v + return s +} + +// SetPriority sets the Priority field's value. +func (s *OpsItem) SetPriority(v int64) *OpsItem { + s.Priority = &v + return s +} + +// SetRelatedOpsItems sets the RelatedOpsItems field's value. +func (s *OpsItem) SetRelatedOpsItems(v []*RelatedOpsItem) *OpsItem { + s.RelatedOpsItems = v + return s +} + +// SetSource sets the Source field's value. +func (s *OpsItem) SetSource(v string) *OpsItem { + s.Source = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *OpsItem) SetStatus(v string) *OpsItem { + s.Status = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *OpsItem) SetTitle(v string) *OpsItem { + s.Title = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *OpsItem) SetVersion(v string) *OpsItem { + s.Version = &v + return s +} + +// An object that defines the value of the key and its type in the OperationalData +// map. +type OpsItemDataValue struct { + _ struct{} `type:"structure"` + + // The type of key-value pair. Valid types include SearchableString and String. + Type *string `type:"string" enum:"OpsItemDataType"` + + // The value of the OperationalData key. + Value *string `type:"string"` +} + +// String returns the string representation +func (s OpsItemDataValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpsItemDataValue) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *OpsItemDataValue) SetType(v string) *OpsItemDataValue { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *OpsItemDataValue) SetValue(v string) *OpsItemDataValue { + s.Value = &v + return s +} + +// Describes an OpsItem filter. +type OpsItemFilter struct { + _ struct{} `type:"structure"` + + // The name of the filter. + // + // Key is a required field + Key *string `type:"string" required:"true" enum:"OpsItemFilterKey"` + + // The operator used by the filter call. + // + // Operator is a required field + Operator *string `type:"string" required:"true" enum:"OpsItemFilterOperator"` + + // The filter value. + // + // Values is a required field + Values []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s OpsItemFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpsItemFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OpsItemFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OpsItemFilter"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Operator == nil { + invalidParams.Add(request.NewErrParamRequired("Operator")) + } + if s.Values == nil { + invalidParams.Add(request.NewErrParamRequired("Values")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *OpsItemFilter) SetKey(v string) *OpsItemFilter { + s.Key = &v + return s +} + +// SetOperator sets the Operator field's value. +func (s *OpsItemFilter) SetOperator(v string) *OpsItemFilter { + s.Operator = &v + return s +} + +// SetValues sets the Values field's value. +func (s *OpsItemFilter) SetValues(v []*string) *OpsItemFilter { + s.Values = v + return s +} + +// A notification about the OpsItem. +type OpsItemNotification struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of an SNS topic where notifications are sent + // when this OpsItem is edited or changed. + Arn *string `type:"string"` +} + +// String returns the string representation +func (s OpsItemNotification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpsItemNotification) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *OpsItemNotification) SetArn(v string) *OpsItemNotification { + s.Arn = &v + return s +} + +// A count of OpsItems. +type OpsItemSummary struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the IAM entity that created the OpsItem. + CreatedBy *string `type:"string"` + + // The date and time the OpsItem was created. + CreatedTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the IAM entity that created the OpsItem. + LastModifiedBy *string `type:"string"` + + // The date and time the OpsItem was last updated. + LastModifiedTime *time.Time `type:"timestamp"` + + // Operational data is custom data that provides useful reference details about + // the OpsItem. + OperationalData map[string]*OpsItemDataValue `type:"map"` + + // The ID of the OpsItem. + OpsItemId *string `type:"string"` + + // The importance of this OpsItem in relation to other OpsItems in the system. + Priority *int64 `min:"1" type:"integer"` + + // The impacted AWS resource. + Source *string `min:"1" type:"string"` + + // The OpsItem status. Status can be Open, In Progress, or Resolved. + Status *string `type:"string" enum:"OpsItemStatus"` + + // A short heading that describes the nature of the OpsItem and the impacted + // resource. + Title *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s OpsItemSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpsItemSummary) GoString() string { + return s.String() +} + +// SetCreatedBy sets the CreatedBy field's value. +func (s *OpsItemSummary) SetCreatedBy(v string) *OpsItemSummary { + s.CreatedBy = &v + return s +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *OpsItemSummary) SetCreatedTime(v time.Time) *OpsItemSummary { + s.CreatedTime = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *OpsItemSummary) SetLastModifiedBy(v string) *OpsItemSummary { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *OpsItemSummary) SetLastModifiedTime(v time.Time) *OpsItemSummary { + s.LastModifiedTime = &v + return s +} + +// SetOperationalData sets the OperationalData field's value. +func (s *OpsItemSummary) SetOperationalData(v map[string]*OpsItemDataValue) *OpsItemSummary { + s.OperationalData = v + return s +} + +// SetOpsItemId sets the OpsItemId field's value. +func (s *OpsItemSummary) SetOpsItemId(v string) *OpsItemSummary { + s.OpsItemId = &v + return s +} + +// SetPriority sets the Priority field's value. +func (s *OpsItemSummary) SetPriority(v int64) *OpsItemSummary { + s.Priority = &v + return s +} + +// SetSource sets the Source field's value. +func (s *OpsItemSummary) SetSource(v string) *OpsItemSummary { + s.Source = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *OpsItemSummary) SetStatus(v string) *OpsItemSummary { + s.Status = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *OpsItemSummary) SetTitle(v string) *OpsItemSummary { + s.Title = &v + return s +} + // Information about the source where the association execution details are // stored. type OutputSource struct { @@ -29920,29 +31545,66 @@ type PutParameterInput struct { // action. Tags []*Tag `type:"list"` + // The parameter tier to assign to a parameter. + // // Parameter Store offers a standard tier and an advanced tier for parameters. - // Standard parameters have a value limit of 4 KB and can't be configured to - // use parameter policies. You can create a maximum of 10,000 standard parameters - // per account and per Region. Standard parameters are offered at no additional - // cost. - // - // Advanced parameters have a value limit of 8 KB and can be configured to use - // parameter policies. You can create a maximum of 100,000 advanced parameters - // per account and per Region. Advanced parameters incur a charge. - // - // If you don't specify a parameter tier when you create a new parameter, the - // parameter defaults to using the standard tier. You can change a standard - // parameter to an advanced parameter at any time. But you can't revert an advanced - // parameter to a standard parameter. Reverting an advanced parameter to a standard - // parameter would result in data loss because the system would truncate the - // size of the parameter from 8 KB to 4 KB. Reverting would also remove any - // policies attached to the parameter. Lastly, advanced parameters use a different - // form of encryption than standard parameters. + // Standard parameters have a content size limit of 4 KB and can't be configured + // to use parameter policies. You can create a maximum of 10,000 standard parameters + // for each Region in an AWS account. Standard parameters are offered at no + // additional cost. + // + // Advanced parameters have a content size limit of 8 KB and can be configured + // to use parameter policies. You can create a maximum of 100,000 advanced parameters + // for each Region in an AWS account. Advanced parameters incur a charge. For + // more information, see About Advanced Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html) + // in the AWS Systems Manager User Guide. + // + // You can change a standard parameter to an advanced parameter any time. But + // you can't revert an advanced parameter to a standard parameter. Reverting + // an advanced parameter to a standard parameter would result in data loss because + // the system would truncate the size of the parameter from 8 KB to 4 KB. Reverting + // would also remove any policies attached to the parameter. Lastly, advanced + // parameters use a different form of encryption than standard parameters. // // If you no longer need an advanced parameter, or if you no longer want to // incur charges for an advanced parameter, you must delete it and recreate - // it as a new standard parameter. For more information, see About Advanced - // Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html) + // it as a new standard parameter. + // + // Using the Default Tier Configuration + // + // In PutParameter requests, you can specify the tier to create the parameter + // in. Whenever you specify a tier in the request, Parameter Store creates or + // updates the parameter according to that request. However, if you do not specify + // a tier in a request, Parameter Store assigns the tier based on the current + // Parameter Store default tier configuration. + // + // The default tier when you begin using Parameter Store is the standard-parameter + // tier. If you use the advanced-parameter tier, you can specify one of the + // following as the default: + // + // * Advanced: With this option, Parameter Store evaluates all requests as + // advanced parameters. + // + // * Intelligent-Tiering: With this option, Parameter Store evaluates each + // request to determine if the parameter is standard or advanced. If the + // request doesn't include any options that require an advanced parameter, + // the parameter is created in the standard-parameter tier. If one or more + // options requiring an advanced parameter are included in the request, Parameter + // Store create a parameter in the advanced-parameter tier. This approach + // helps control your parameter-related costs by always creating standard + // parameters unless an advanced parameter is necessary. + // + // Options that require an advanced parameter include the following: + // + // * The content size of the parameter is more than 4 KB. + // + // * The parameter uses a parameter policy. + // + // * More than 10,000 parameters already exist in your AWS account in the + // current Region. + // + // For more information about configuring the default tier option, see Specifying + // a Default Parameter Tier (http://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html) // in the AWS Systems Manager User Guide. Tier *string `type:"string" enum:"ParameterTier"` @@ -30076,6 +31738,9 @@ func (s *PutParameterInput) SetValue(v string) *PutParameterInput { type PutParameterOutput struct { _ struct{} `type:"structure"` + // The tier assigned to the parameter. + Tier *string `type:"string" enum:"ParameterTier"` + // The new version number of a parameter. If you edit a parameter value, Parameter // Store automatically creates a new version and assigns this new version a // unique ID. You can reference a parameter version ID in API actions or in @@ -30095,6 +31760,12 @@ func (s PutParameterOutput) GoString() string { return s.String() } +// SetTier sets the Tier field's value. +func (s *PutParameterOutput) SetTier(v string) *PutParameterOutput { + s.Tier = &v + return s +} + // SetVersion sets the Version field's value. func (s *PutParameterOutput) SetVersion(v int64) *PutParameterOutput { s.Version = &v @@ -30279,8 +31950,8 @@ type RegisterTargetWithMaintenanceWindowInput struct { // The targets to register with the maintenance window. In other words, the // instances to run commands on when the maintenance window runs. // - // You can specify targets using either instance IDs or tags that have been - // applied to instances. + // You can specify targets using instance IDs, resource group names, or tags + // that have been applied to instances. // // Example 1: Specify instance IDs // @@ -30294,6 +31965,19 @@ type RegisterTargetWithMaintenanceWindowInput struct { // // Key=tag-key,Values=my-tag-key-1,my-tag-key-2 // + // Example 4: Use resource group names + // + // Key=resource-groups:Name,Values=resource-group-name + // + // Example 5: Use filters for resource group types + // + // Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2 + // + // For Key=resource-groups:ResourceTypeFilters, specify resource types in the + // following format + // + // Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC + // // For more information about these examples formats, including the best use // case for each one, see Examples: Register Targets with a Maintenance Window // (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html) @@ -30485,7 +32169,7 @@ type RegisterTaskWithMaintenanceWindowInput struct { // // Specify maintenance window targets using the following format: // - // Key=,Values=, + // Key=WindowTargetIds;,Values=, // // Targets is a required field Targets []*Target `type:"list" required:"true"` @@ -30704,11 +32388,51 @@ func (s *RegisterTaskWithMaintenanceWindowOutput) SetWindowTaskId(v string) *Reg return s } +// An OpsItems that shares something in common with the current OpsItem. For +// example, related OpsItems can include OpsItems with similar error messages, +// impacted resources, or statuses for the impacted resource. +type RelatedOpsItem struct { + _ struct{} `type:"structure"` + + // The ID of an OpsItem related to the current OpsItem. + // + // OpsItemId is a required field + OpsItemId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RelatedOpsItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RelatedOpsItem) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RelatedOpsItem) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RelatedOpsItem"} + if s.OpsItemId == nil { + invalidParams.Add(request.NewErrParamRequired("OpsItemId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOpsItemId sets the OpsItemId field's value. +func (s *RelatedOpsItem) SetOpsItemId(v string) *RelatedOpsItem { + s.OpsItemId = &v + return s +} + type RemoveTagsFromResourceInput struct { _ struct{} `type:"structure"` - // The resource ID for which you want to remove tags. Use the ID of the resource. - // Here are some examples: + // The ID of the resource from which you want to remove tags. For example: // // ManagedInstance: mi-012345abcde // @@ -30719,17 +32443,17 @@ type RemoveTagsFromResourceInput struct { // For the Document and Parameter values, use the name of the resource. // // The ManagedInstance type for this API action is only for on-premises managed - // instances. You must specify the name of the managed instance in the following - // format: mi-ID_number. For example, mi-1a2b3c4d5e6f. + // instances. Specify the name of the managed instance in the following format: + // mi-ID_number. For example, mi-1a2b3c4d5e6f. // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` - // The type of resource of which you want to remove a tag. + // The type of resource from which you want to remove a tag. // // The ManagedInstance type for this API action is only for on-premises managed - // instances. You must specify the name of the managed instance in the following - // format: mi-ID_number. For example, mi-1a2b3c4d5e6f. + // instances. Specify the name of the managed instance in the following format: + // mi-ID_number. For example, mi-1a2b3c4d5e6f. // // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"` @@ -31258,7 +32982,7 @@ type ResumeSessionOutput struct { SessionId *string `min:"1" type:"string"` // A URL back to SSM Agent on the instance that the Session Manager client uses - // to send commands and receive output from the instance. Format: wss://ssm-messages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output). + // to send commands and receive output from the instance. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output). // // region represents the Region identifier for an AWS Region supported by AWS // Systems Manager, such as us-east-2 for the US East (Ohio) Region. For a list @@ -32519,7 +34243,7 @@ type StartSessionOutput struct { SessionId *string `min:"1" type:"string"` // A URL back to SSM Agent on the instance that the Session Manager client uses - // to send commands and receive output from the instance. Format: wss://ssm-messages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output) + // to send commands and receive output from the instance. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output) // // region represents the Region identifier for an AWS Region supported by AWS // Systems Manager, such as us-east-2 for the US East (Ohio) Region. For a list @@ -32975,24 +34699,46 @@ func (s *Tag) SetValue(v string) *Tag { } // An array of search criteria that targets instances using a Key,Value combination -// that you specify. Targets is required if you don't provide one or more instance -// IDs in the call. +// that you specify. +// +// Supported formats include the following. +// +// * Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3 +// +// * Key=tag:my-tag-key,Values=my-tag-value-1,my-tag-value-2 +// +// * Key=tag-key,Values=my-tag-key-1,my-tag-key-2 +// +// * (Maintenance window targets only) Key=resource-groups:Name,Values=resource-group-name +// +// * (Maintenance window targets only) Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2 +// +// For example: +// +// * Key=InstanceIds,Values=i-02573cafcfEXAMPLE,i-0471e04240EXAMPLE,i-07782c72faEXAMPLE +// +// * Key=tag:CostCenter,Values=CostCenter1,CostCenter2,CostCenter3 +// +// * Key=tag-key,Values=Name,Instance-Type,CostCenter +// +// * (Maintenance window targets only) Key=resource-groups:Name,Values=ProductionResourceGroup +// +// * (Maintenance window targets only) Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC +// +// For information about how to send commands that target instances using Key,Value +// parameters, see Using Targets and Rate Controls to Send Commands to a Fleet +// (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting) +// in the AWS Systems Manager User Guide. type Target struct { _ struct{} `type:"structure"` // User-defined criteria for sending commands that target instances that meet - // the criteria. Key can be tag: or InstanceIds. For more information - // about how to send commands that target instances using Key,Value parameters, - // see Using Targets and Rate Controls to Send Commands to a Fleet (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting) - // in the AWS Systems Manager User Guide. + // the criteria. Key *string `min:"1" type:"string"` // User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, // you could specify value:WebServer to run a command on instances that include - // Amazon EC2 tags of ServerRole,WebServer. For more information about how to - // send commands that target instances using Key,Value parameters, see Using - // Targets and Rate Controls to Send Commands to a Fleet (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) - // in the AWS Systems Manager User Guide. + // Amazon EC2 tags of ServerRole,WebServer. Values []*string `type:"list"` } @@ -33606,7 +35352,7 @@ type UpdateDocumentInput struct { // supports JSON and YAML documents. JSON is the default format. DocumentFormat *string `type:"string" enum:"DocumentFormat"` - // The version of the document that you want to update. + // (Required) The version of the document that you want to update. DocumentVersion *string `type:"string"` // The name of the document that you want to update. @@ -34650,6 +36396,179 @@ func (s UpdateManagedInstanceRoleOutput) GoString() string { return s.String() } +type UpdateOpsItemInput struct { + _ struct{} `type:"structure"` + + // Update the information about the OpsItem. Provide enough information so that + // users reading this OpsItem for the first time understand the issue. + Description *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of an SNS topic where notifications are sent + // when this OpsItem is edited or changed. + Notifications []*OpsItemNotification `type:"list"` + + // Add new keys or edit existing key-value pairs of the OperationalData map + // in the OpsItem object. + // + // Operational data is custom data that provides useful reference details about + // the OpsItem. For example, you can specify log files, error strings, license + // keys, troubleshooting tips, or other relevant data. You enter operational + // data as key-value pairs. The key has a maximum length of 128 characters. + // The value has a maximum size of 20 KB. + // + // Operational data keys can't begin with the following: amazon, aws, amzn, + // ssm, /amazon, /aws, /amzn, /ssm. + // + // You can choose to make the data searchable by other users in the account + // or you can restrict search access. Searchable data means that all users with + // access to the OpsItem Overview page (as provided by the DescribeOpsItems + // API action) can view and search on the specified data. Operational data that + // is not searchable is only viewable by users who have access to the OpsItem + // (as provided by the GetOpsItem API action). + // + // Use the /aws/resources key in OperationalData to specify a related resource + // in the request. Use the /aws/automations key in OperationalData to associate + // an Automation runbook with the OpsItem. To view AWS CLI example commands + // that use these keys, see Creating OpsItems Manually (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems) + // in the AWS Systems Manager User Guide. + OperationalData map[string]*OpsItemDataValue `type:"map"` + + // Keys that you want to remove from the OperationalData map. + OperationalDataToDelete []*string `type:"list"` + + // The ID of the OpsItem. + // + // OpsItemId is a required field + OpsItemId *string `type:"string" required:"true"` + + // The importance of this OpsItem in relation to other OpsItems in the system. + Priority *int64 `min:"1" type:"integer"` + + // One or more OpsItems that share something in common with the current OpsItems. + // For example, related OpsItems can include OpsItems with similar error messages, + // impacted resources, or statuses for the impacted resource. + RelatedOpsItems []*RelatedOpsItem `type:"list"` + + // The OpsItem status. Status can be Open, In Progress, or Resolved. For more + // information, see Editing OpsItem Details (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html) + // in the AWS Systems Manager User Guide. + Status *string `type:"string" enum:"OpsItemStatus"` + + // A short heading that describes the nature of the OpsItem and the impacted + // resource. + Title *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateOpsItemInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateOpsItemInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateOpsItemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateOpsItemInput"} + if s.Description != nil && len(*s.Description) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Description", 1)) + } + if s.OpsItemId == nil { + invalidParams.Add(request.NewErrParamRequired("OpsItemId")) + } + if s.Priority != nil && *s.Priority < 1 { + invalidParams.Add(request.NewErrParamMinValue("Priority", 1)) + } + if s.Title != nil && len(*s.Title) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Title", 1)) + } + if s.RelatedOpsItems != nil { + for i, v := range s.RelatedOpsItems { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RelatedOpsItems", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateOpsItemInput) SetDescription(v string) *UpdateOpsItemInput { + s.Description = &v + return s +} + +// SetNotifications sets the Notifications field's value. +func (s *UpdateOpsItemInput) SetNotifications(v []*OpsItemNotification) *UpdateOpsItemInput { + s.Notifications = v + return s +} + +// SetOperationalData sets the OperationalData field's value. +func (s *UpdateOpsItemInput) SetOperationalData(v map[string]*OpsItemDataValue) *UpdateOpsItemInput { + s.OperationalData = v + return s +} + +// SetOperationalDataToDelete sets the OperationalDataToDelete field's value. +func (s *UpdateOpsItemInput) SetOperationalDataToDelete(v []*string) *UpdateOpsItemInput { + s.OperationalDataToDelete = v + return s +} + +// SetOpsItemId sets the OpsItemId field's value. +func (s *UpdateOpsItemInput) SetOpsItemId(v string) *UpdateOpsItemInput { + s.OpsItemId = &v + return s +} + +// SetPriority sets the Priority field's value. +func (s *UpdateOpsItemInput) SetPriority(v int64) *UpdateOpsItemInput { + s.Priority = &v + return s +} + +// SetRelatedOpsItems sets the RelatedOpsItems field's value. +func (s *UpdateOpsItemInput) SetRelatedOpsItems(v []*RelatedOpsItem) *UpdateOpsItemInput { + s.RelatedOpsItems = v + return s +} + +// SetStatus sets the Status field's value. +func (s *UpdateOpsItemInput) SetStatus(v string) *UpdateOpsItemInput { + s.Status = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *UpdateOpsItemInput) SetTitle(v string) *UpdateOpsItemInput { + s.Title = &v + return s +} + +type UpdateOpsItemOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateOpsItemOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateOpsItemOutput) GoString() string { + return s.String() +} + type UpdatePatchBaselineInput struct { _ struct{} `type:"structure"` @@ -35588,6 +37507,9 @@ const ( const ( // MaintenanceWindowResourceTypeInstance is a MaintenanceWindowResourceType enum value MaintenanceWindowResourceTypeInstance = "INSTANCE" + + // MaintenanceWindowResourceTypeResourceGroup is a MaintenanceWindowResourceType enum value + MaintenanceWindowResourceTypeResourceGroup = "RESOURCE_GROUP" ) const ( @@ -35655,12 +37577,109 @@ const ( OperatingSystemCentos = "CENTOS" ) +const ( + // OpsFilterOperatorTypeEqual is a OpsFilterOperatorType enum value + OpsFilterOperatorTypeEqual = "Equal" + + // OpsFilterOperatorTypeNotEqual is a OpsFilterOperatorType enum value + OpsFilterOperatorTypeNotEqual = "NotEqual" + + // OpsFilterOperatorTypeBeginWith is a OpsFilterOperatorType enum value + OpsFilterOperatorTypeBeginWith = "BeginWith" + + // OpsFilterOperatorTypeLessThan is a OpsFilterOperatorType enum value + OpsFilterOperatorTypeLessThan = "LessThan" + + // OpsFilterOperatorTypeGreaterThan is a OpsFilterOperatorType enum value + OpsFilterOperatorTypeGreaterThan = "GreaterThan" + + // OpsFilterOperatorTypeExists is a OpsFilterOperatorType enum value + OpsFilterOperatorTypeExists = "Exists" +) + +const ( + // OpsItemDataTypeSearchableString is a OpsItemDataType enum value + OpsItemDataTypeSearchableString = "SearchableString" + + // OpsItemDataTypeString is a OpsItemDataType enum value + OpsItemDataTypeString = "String" +) + +const ( + // OpsItemFilterKeyStatus is a OpsItemFilterKey enum value + OpsItemFilterKeyStatus = "Status" + + // OpsItemFilterKeyCreatedBy is a OpsItemFilterKey enum value + OpsItemFilterKeyCreatedBy = "CreatedBy" + + // OpsItemFilterKeySource is a OpsItemFilterKey enum value + OpsItemFilterKeySource = "Source" + + // OpsItemFilterKeyPriority is a OpsItemFilterKey enum value + OpsItemFilterKeyPriority = "Priority" + + // OpsItemFilterKeyTitle is a OpsItemFilterKey enum value + OpsItemFilterKeyTitle = "Title" + + // OpsItemFilterKeyOpsItemId is a OpsItemFilterKey enum value + OpsItemFilterKeyOpsItemId = "OpsItemId" + + // OpsItemFilterKeyCreatedTime is a OpsItemFilterKey enum value + OpsItemFilterKeyCreatedTime = "CreatedTime" + + // OpsItemFilterKeyLastModifiedTime is a OpsItemFilterKey enum value + OpsItemFilterKeyLastModifiedTime = "LastModifiedTime" + + // OpsItemFilterKeyOperationalData is a OpsItemFilterKey enum value + OpsItemFilterKeyOperationalData = "OperationalData" + + // OpsItemFilterKeyOperationalDataKey is a OpsItemFilterKey enum value + OpsItemFilterKeyOperationalDataKey = "OperationalDataKey" + + // OpsItemFilterKeyOperationalDataValue is a OpsItemFilterKey enum value + OpsItemFilterKeyOperationalDataValue = "OperationalDataValue" + + // OpsItemFilterKeyResourceId is a OpsItemFilterKey enum value + OpsItemFilterKeyResourceId = "ResourceId" + + // OpsItemFilterKeyAutomationId is a OpsItemFilterKey enum value + OpsItemFilterKeyAutomationId = "AutomationId" +) + +const ( + // OpsItemFilterOperatorEqual is a OpsItemFilterOperator enum value + OpsItemFilterOperatorEqual = "Equal" + + // OpsItemFilterOperatorContains is a OpsItemFilterOperator enum value + OpsItemFilterOperatorContains = "Contains" + + // OpsItemFilterOperatorGreaterThan is a OpsItemFilterOperator enum value + OpsItemFilterOperatorGreaterThan = "GreaterThan" + + // OpsItemFilterOperatorLessThan is a OpsItemFilterOperator enum value + OpsItemFilterOperatorLessThan = "LessThan" +) + +const ( + // OpsItemStatusOpen is a OpsItemStatus enum value + OpsItemStatusOpen = "Open" + + // OpsItemStatusInProgress is a OpsItemStatus enum value + OpsItemStatusInProgress = "InProgress" + + // OpsItemStatusResolved is a OpsItemStatus enum value + OpsItemStatusResolved = "Resolved" +) + const ( // ParameterTierStandard is a ParameterTier enum value ParameterTierStandard = "Standard" // ParameterTierAdvanced is a ParameterTier enum value ParameterTierAdvanced = "Advanced" + + // ParameterTierIntelligentTiering is a ParameterTier enum value + ParameterTierIntelligentTiering = "Intelligent-Tiering" ) const ( @@ -35862,6 +37881,9 @@ const ( // ResourceTypeForTaggingPatchBaseline is a ResourceTypeForTagging enum value ResourceTypeForTaggingPatchBaseline = "PatchBaseline" + + // ResourceTypeForTaggingOpsItem is a ResourceTypeForTagging enum value + ResourceTypeForTaggingOpsItem = "OpsItem" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go index a9650950..90c4a777 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go @@ -105,7 +105,7 @@ const ( // ErrCodeDocumentLimitExceeded for service response error code // "DocumentLimitExceeded". // - // You can have at most 200 active Systems Manager documents. + // You can have at most 500 active Systems Manager documents. ErrCodeDocumentLimitExceeded = "DocumentLimitExceeded" // ErrCodeDocumentPermissionLimit for service response error code @@ -156,7 +156,7 @@ const ( // ErrCodeFeatureNotAvailableException for service response error code // "FeatureNotAvailableException". // - // You attempted to register a LAMBDA or STEP_FUNCTION task in a region where + // You attempted to register a LAMBDA or STEP_FUNCTIONS task in a region where // the corresponding service is not available. ErrCodeFeatureNotAvailableException = "FeatureNotAvailableException" @@ -340,12 +340,9 @@ const ( // // You do not have permission to access the instance. // - // SSM Agent is not running. On managed instances and Linux instances, verify - // that the SSM Agent is running. On EC2 Windows instances, verify that the - // EC2Config service is running. + // SSM Agent is not running. Verify that SSM Agent is running. // - // SSM Agent or EC2Config service is not registered to the SSM endpoint. Try - // reinstalling SSM Agent or EC2Config service. + // SSM Agent is not registered with the SSM endpoint. Try reinstalling SSM Agent. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -534,6 +531,32 @@ const ( // The size limit of a document is 64 KB. ErrCodeMaxDocumentSizeExceeded = "MaxDocumentSizeExceeded" + // ErrCodeOpsItemAlreadyExistsException for service response error code + // "OpsItemAlreadyExistsException". + // + // The OpsItem already exists. + ErrCodeOpsItemAlreadyExistsException = "OpsItemAlreadyExistsException" + + // ErrCodeOpsItemInvalidParameterException for service response error code + // "OpsItemInvalidParameterException". + // + // A specified parameter argument isn't valid. Verify the available arguments + // and try again. + ErrCodeOpsItemInvalidParameterException = "OpsItemInvalidParameterException" + + // ErrCodeOpsItemLimitExceededException for service response error code + // "OpsItemLimitExceededException". + // + // The request caused OpsItems to exceed one or more limits. For information + // about OpsItem limits, see What are the resource limits for OpsCenter? (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits). + ErrCodeOpsItemLimitExceededException = "OpsItemLimitExceededException" + + // ErrCodeOpsItemNotFoundException for service response error code + // "OpsItemNotFoundException". + // + // The specified OpsItem ID doesn't exist. Verify the ID and try again. + ErrCodeOpsItemNotFoundException = "OpsItemNotFoundException" + // ErrCodeParameterAlreadyExists for service response error code // "ParameterAlreadyExists". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go index 9e610591..eb0a6a41 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go @@ -702,6 +702,102 @@ func (c *STS) DecodeAuthorizationMessageWithContext(ctx aws.Context, input *Deco return out, req.Send() } +const opGetAccessKeyInfo = "GetAccessKeyInfo" + +// GetAccessKeyInfoRequest generates a "aws/request.Request" representing the +// client's request for the GetAccessKeyInfo operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetAccessKeyInfo for more information on using the GetAccessKeyInfo +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetAccessKeyInfoRequest method. +// req, resp := client.GetAccessKeyInfoRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo +func (c *STS) GetAccessKeyInfoRequest(input *GetAccessKeyInfoInput) (req *request.Request, output *GetAccessKeyInfoOutput) { + op := &request.Operation{ + Name: opGetAccessKeyInfo, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetAccessKeyInfoInput{} + } + + output = &GetAccessKeyInfoOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAccessKeyInfo API operation for AWS Security Token Service. +// +// Returns the account identifier for the specified access key ID. +// +// Access keys consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE) +// and a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). +// For more information about access keys, see Managing Access Keys for IAM +// Users (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) +// in the IAM User Guide. +// +// When you pass an access key ID to this operation, it returns the ID of the +// AWS account to which the keys belong. Access key IDs beginning with AKIA +// are long-term credentials for an IAM user or the AWS account root user. Access +// key IDs beginning with ASIA are temporary credentials that are created using +// STS operations. If the account in the response belongs to you, you can sign +// in as the root user and review your root user access keys. Then, you can +// pull a credentials report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html) +// to learn which IAM user owns the keys. To learn who requested the temporary +// credentials for an ASIA access key, view the STS events in your CloudTrail +// logs (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html). +// +// This operation does not indicate the state of the access key. The key might +// be active, inactive, or deleted. Active keys might not have permissions to +// perform an operation. Providing a deleted access key might return an error +// that the key doesn't exist. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Security Token Service's +// API operation GetAccessKeyInfo for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo +func (c *STS) GetAccessKeyInfo(input *GetAccessKeyInfoInput) (*GetAccessKeyInfoOutput, error) { + req, out := c.GetAccessKeyInfoRequest(input) + return out, req.Send() +} + +// GetAccessKeyInfoWithContext is the same as GetAccessKeyInfo with the addition of +// the ability to pass a context and additional request options. +// +// See GetAccessKeyInfo for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *STS) GetAccessKeyInfoWithContext(ctx aws.Context, input *GetAccessKeyInfoInput, opts ...request.Option) (*GetAccessKeyInfoOutput, error) { + req, out := c.GetAccessKeyInfoRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetCallerIdentity = "GetCallerIdentity" // GetCallerIdentityRequest generates a "aws/request.Request" representing the @@ -746,8 +842,15 @@ func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *requ // GetCallerIdentity API operation for AWS Security Token Service. // -// Returns details about the IAM identity whose credentials are used to call -// the API. +// Returns details about the IAM user or role whose credentials are used to +// call the operation. +// +// No permissions are required to perform this operation. If an administrator +// adds a policy to your IAM user or role that explicitly denies access to the +// sts:GetCallerIdentity action, you can still perform this operation. Permissions +// are not required because the same information is returned when an IAM user +// or role is denied access. To view an example response, see I Am Not Authorized +// to Perform: iam:DeleteVirtualMFADevice (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1129,7 +1232,7 @@ type AssumeRoleInput struct { // This parameter is optional. You can provide up to 10 managed policy ARNs. // However, the plain text that you use for both inline and managed session // policies shouldn't exceed 2048 characters. For more information about ARNs, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (general/latest/gr/aws-arns-and-namespaces.html) + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the AWS General Reference. // // The characters in this parameter count towards the 2048 character session @@ -1407,7 +1510,7 @@ type AssumeRoleWithSAMLInput struct { // This parameter is optional. You can provide up to 10 managed policy ARNs. // However, the plain text that you use for both inline and managed session // policies shouldn't exceed 2048 characters. For more information about ARNs, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (general/latest/gr/aws-arns-and-namespaces.html) + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the AWS General Reference. // // The characters in this parameter count towards the 2048 character session @@ -1702,7 +1805,7 @@ type AssumeRoleWithWebIdentityInput struct { // This parameter is optional. You can provide up to 10 managed policy ARNs. // However, the plain text that you use for both inline and managed session // policies shouldn't exceed 2048 characters. For more information about ARNs, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (general/latest/gr/aws-arns-and-namespaces.html) + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the AWS General Reference. // // The characters in this parameter count towards the 2048 character session @@ -2156,6 +2259,73 @@ func (s *FederatedUser) SetFederatedUserId(v string) *FederatedUser { return s } +type GetAccessKeyInfoInput struct { + _ struct{} `type:"structure"` + + // The identifier of an access key. + // + // This parameter allows (through its regex pattern) a string of characters + // that can consist of any upper- or lowercased letter or digit. + // + // AccessKeyId is a required field + AccessKeyId *string `min:"16" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAccessKeyInfoInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAccessKeyInfoInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAccessKeyInfoInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAccessKeyInfoInput"} + if s.AccessKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("AccessKeyId")) + } + if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 { + invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccessKeyId sets the AccessKeyId field's value. +func (s *GetAccessKeyInfoInput) SetAccessKeyId(v string) *GetAccessKeyInfoInput { + s.AccessKeyId = &v + return s +} + +type GetAccessKeyInfoOutput struct { + _ struct{} `type:"structure"` + + // The number used to identify the AWS account. + Account *string `type:"string"` +} + +// String returns the string representation +func (s GetAccessKeyInfoOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAccessKeyInfoOutput) GoString() string { + return s.String() +} + +// SetAccount sets the Account field's value. +func (s *GetAccessKeyInfoOutput) SetAccount(v string) *GetAccessKeyInfoOutput { + s.Account = &v + return s +} + type GetCallerIdentityInput struct { _ struct{} `type:"structure"` } @@ -2284,7 +2454,7 @@ type GetFederationTokenInput struct { // use as managed session policies. The plain text that you use for both inline // and managed session policies shouldn't exceed 2048 characters. You can provide // up to 10 managed policy ARNs. For more information about ARNs, see Amazon - // Resource Names (ARNs) and AWS Service Namespaces (general/latest/gr/aws-arns-and-namespaces.html) + // Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the AWS General Reference. // // This parameter is optional. However, if you do not pass any session policies, @@ -2545,7 +2715,7 @@ type PolicyDescriptorType struct { // The Amazon Resource Name (ARN) of the IAM managed policy to use as a session // policy for the role. For more information about ARNs, see Amazon Resource - // Names (ARNs) and AWS Service Namespaces (general/latest/gr/aws-arns-and-namespaces.html) + // Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the AWS General Reference. Arn *string `locationName:"arn" min:"20" type:"string"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go new file mode 100644 index 00000000..d5307fca --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go @@ -0,0 +1,11 @@ +package sts + +import "github.com/aws/aws-sdk-go/aws/request" + +func init() { + initRequest = customizeRequest +} + +func customizeRequest(r *request.Request) { + r.RetryErrorCodes = append(r.RetryErrorCodes, ErrCodeIDPCommunicationErrorException) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go new file mode 100644 index 00000000..e2e1d6ef --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go @@ -0,0 +1,96 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package stsiface provides an interface to enable mocking the AWS Security Token Service service client +// for testing your code. +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. +package stsiface + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/service/sts" +) + +// STSAPI provides an interface to enable mocking the +// sts.STS service client's API operation, +// paginators, and waiters. This make unit testing your code that calls out +// to the SDK's service client's calls easier. +// +// The best way to use this interface is so the SDK's service client's calls +// can be stubbed out for unit testing your code with the SDK without needing +// to inject custom request handlers into the SDK's request pipeline. +// +// // myFunc uses an SDK service client to make a request to +// // AWS Security Token Service. +// func myFunc(svc stsiface.STSAPI) bool { +// // Make svc.AssumeRole request +// } +// +// func main() { +// sess := session.New() +// svc := sts.New(sess) +// +// myFunc(svc) +// } +// +// In your _test.go file: +// +// // Define a mock struct to be used in your unit tests of myFunc. +// type mockSTSClient struct { +// stsiface.STSAPI +// } +// func (m *mockSTSClient) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) { +// // mock response/functionality +// } +// +// func TestMyFunc(t *testing.T) { +// // Setup Test +// mockSvc := &mockSTSClient{} +// +// myfunc(mockSvc) +// +// // Verify myFunc's functionality +// } +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. Its suggested to use the pattern above for testing, or using +// tooling to generate mocks to satisfy the interfaces. +type STSAPI interface { + AssumeRole(*sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) + AssumeRoleWithContext(aws.Context, *sts.AssumeRoleInput, ...request.Option) (*sts.AssumeRoleOutput, error) + AssumeRoleRequest(*sts.AssumeRoleInput) (*request.Request, *sts.AssumeRoleOutput) + + AssumeRoleWithSAML(*sts.AssumeRoleWithSAMLInput) (*sts.AssumeRoleWithSAMLOutput, error) + AssumeRoleWithSAMLWithContext(aws.Context, *sts.AssumeRoleWithSAMLInput, ...request.Option) (*sts.AssumeRoleWithSAMLOutput, error) + AssumeRoleWithSAMLRequest(*sts.AssumeRoleWithSAMLInput) (*request.Request, *sts.AssumeRoleWithSAMLOutput) + + AssumeRoleWithWebIdentity(*sts.AssumeRoleWithWebIdentityInput) (*sts.AssumeRoleWithWebIdentityOutput, error) + AssumeRoleWithWebIdentityWithContext(aws.Context, *sts.AssumeRoleWithWebIdentityInput, ...request.Option) (*sts.AssumeRoleWithWebIdentityOutput, error) + AssumeRoleWithWebIdentityRequest(*sts.AssumeRoleWithWebIdentityInput) (*request.Request, *sts.AssumeRoleWithWebIdentityOutput) + + DecodeAuthorizationMessage(*sts.DecodeAuthorizationMessageInput) (*sts.DecodeAuthorizationMessageOutput, error) + DecodeAuthorizationMessageWithContext(aws.Context, *sts.DecodeAuthorizationMessageInput, ...request.Option) (*sts.DecodeAuthorizationMessageOutput, error) + DecodeAuthorizationMessageRequest(*sts.DecodeAuthorizationMessageInput) (*request.Request, *sts.DecodeAuthorizationMessageOutput) + + GetAccessKeyInfo(*sts.GetAccessKeyInfoInput) (*sts.GetAccessKeyInfoOutput, error) + GetAccessKeyInfoWithContext(aws.Context, *sts.GetAccessKeyInfoInput, ...request.Option) (*sts.GetAccessKeyInfoOutput, error) + GetAccessKeyInfoRequest(*sts.GetAccessKeyInfoInput) (*request.Request, *sts.GetAccessKeyInfoOutput) + + GetCallerIdentity(*sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error) + GetCallerIdentityWithContext(aws.Context, *sts.GetCallerIdentityInput, ...request.Option) (*sts.GetCallerIdentityOutput, error) + GetCallerIdentityRequest(*sts.GetCallerIdentityInput) (*request.Request, *sts.GetCallerIdentityOutput) + + GetFederationToken(*sts.GetFederationTokenInput) (*sts.GetFederationTokenOutput, error) + GetFederationTokenWithContext(aws.Context, *sts.GetFederationTokenInput, ...request.Option) (*sts.GetFederationTokenOutput, error) + GetFederationTokenRequest(*sts.GetFederationTokenInput) (*request.Request, *sts.GetFederationTokenOutput) + + GetSessionToken(*sts.GetSessionTokenInput) (*sts.GetSessionTokenOutput, error) + GetSessionTokenWithContext(aws.Context, *sts.GetSessionTokenInput, ...request.Option) (*sts.GetSessionTokenOutput, error) + GetSessionTokenRequest(*sts.GetSessionTokenInput) (*request.Request, *sts.GetSessionTokenOutput) +} + +var _ STSAPI = (*sts.STS)(nil) diff --git a/vendor/github.com/boltdb/bolt/.gitignore b/vendor/github.com/boltdb/bolt/.gitignore new file mode 100644 index 00000000..c7bd2b7a --- /dev/null +++ b/vendor/github.com/boltdb/bolt/.gitignore @@ -0,0 +1,4 @@ +*.prof +*.test +*.swp +/bin/ diff --git a/vendor/github.com/boltdb/bolt/Makefile b/vendor/github.com/boltdb/bolt/Makefile new file mode 100644 index 00000000..e035e63a --- /dev/null +++ b/vendor/github.com/boltdb/bolt/Makefile @@ -0,0 +1,18 @@ +BRANCH=`git rev-parse --abbrev-ref HEAD` +COMMIT=`git rev-parse --short HEAD` +GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)" + +default: build + +race: + @go test -v -race -test.run="TestSimulate_(100op|1000op)" + +# go get github.com/kisielk/errcheck +errcheck: + @errcheck -ignorepkg=bytes -ignore=os:Remove github.com/boltdb/bolt + +test: + @go test -v -cover . + @go test -v ./cmd/bolt + +.PHONY: fmt test diff --git a/vendor/github.com/boltdb/bolt/README.md b/vendor/github.com/boltdb/bolt/README.md new file mode 100644 index 00000000..7d43a15b --- /dev/null +++ b/vendor/github.com/boltdb/bolt/README.md @@ -0,0 +1,916 @@ +Bolt [![Coverage Status](https://coveralls.io/repos/boltdb/bolt/badge.svg?branch=master)](https://coveralls.io/r/boltdb/bolt?branch=master) [![GoDoc](https://godoc.org/github.com/boltdb/bolt?status.svg)](https://godoc.org/github.com/boltdb/bolt) ![Version](https://img.shields.io/badge/version-1.2.1-green.svg) +==== + +Bolt is a pure Go key/value store inspired by [Howard Chu's][hyc_symas] +[LMDB project][lmdb]. The goal of the project is to provide a simple, +fast, and reliable database for projects that don't require a full database +server such as Postgres or MySQL. + +Since Bolt is meant to be used as such a low-level piece of functionality, +simplicity is key. The API will be small and only focus on getting values +and setting values. That's it. + +[hyc_symas]: https://twitter.com/hyc_symas +[lmdb]: http://symas.com/mdb/ + +## Project Status + +Bolt is stable, the API is fixed, and the file format is fixed. Full unit +test coverage and randomized black box testing are used to ensure database +consistency and thread safety. Bolt is currently used in high-load production +environments serving databases as large as 1TB. Many companies such as +Shopify and Heroku use Bolt-backed services every day. + +## Table of Contents + +- [Getting Started](#getting-started) + - [Installing](#installing) + - [Opening a database](#opening-a-database) + - [Transactions](#transactions) + - [Read-write transactions](#read-write-transactions) + - [Read-only transactions](#read-only-transactions) + - [Batch read-write transactions](#batch-read-write-transactions) + - [Managing transactions manually](#managing-transactions-manually) + - [Using buckets](#using-buckets) + - [Using key/value pairs](#using-keyvalue-pairs) + - [Autoincrementing integer for the bucket](#autoincrementing-integer-for-the-bucket) + - [Iterating over keys](#iterating-over-keys) + - [Prefix scans](#prefix-scans) + - [Range scans](#range-scans) + - [ForEach()](#foreach) + - [Nested buckets](#nested-buckets) + - [Database backups](#database-backups) + - [Statistics](#statistics) + - [Read-Only Mode](#read-only-mode) + - [Mobile Use (iOS/Android)](#mobile-use-iosandroid) +- [Resources](#resources) +- [Comparison with other databases](#comparison-with-other-databases) + - [Postgres, MySQL, & other relational databases](#postgres-mysql--other-relational-databases) + - [LevelDB, RocksDB](#leveldb-rocksdb) + - [LMDB](#lmdb) +- [Caveats & Limitations](#caveats--limitations) +- [Reading the Source](#reading-the-source) +- [Other Projects Using Bolt](#other-projects-using-bolt) + +## Getting Started + +### Installing + +To start using Bolt, install Go and run `go get`: + +```sh +$ go get github.com/boltdb/bolt/... +``` + +This will retrieve the library and install the `bolt` command line utility into +your `$GOBIN` path. + + +### Opening a database + +The top-level object in Bolt is a `DB`. It is represented as a single file on +your disk and represents a consistent snapshot of your data. + +To open your database, simply use the `bolt.Open()` function: + +```go +package main + +import ( + "log" + + "github.com/boltdb/bolt" +) + +func main() { + // Open the my.db data file in your current directory. + // It will be created if it doesn't exist. + db, err := bolt.Open("my.db", 0600, nil) + if err != nil { + log.Fatal(err) + } + defer db.Close() + + ... +} +``` + +Please note that Bolt obtains a file lock on the data file so multiple processes +cannot open the same database at the same time. Opening an already open Bolt +database will cause it to hang until the other process closes it. To prevent +an indefinite wait you can pass a timeout option to the `Open()` function: + +```go +db, err := bolt.Open("my.db", 0600, &bolt.Options{Timeout: 1 * time.Second}) +``` + + +### Transactions + +Bolt allows only one read-write transaction at a time but allows as many +read-only transactions as you want at a time. Each transaction has a consistent +view of the data as it existed when the transaction started. + +Individual transactions and all objects created from them (e.g. buckets, keys) +are not thread safe. To work with data in multiple goroutines you must start +a transaction for each one or use locking to ensure only one goroutine accesses +a transaction at a time. Creating transaction from the `DB` is thread safe. + +Read-only transactions and read-write transactions should not depend on one +another and generally shouldn't be opened simultaneously in the same goroutine. +This can cause a deadlock as the read-write transaction needs to periodically +re-map the data file but it cannot do so while a read-only transaction is open. + + +#### Read-write transactions + +To start a read-write transaction, you can use the `DB.Update()` function: + +```go +err := db.Update(func(tx *bolt.Tx) error { + ... + return nil +}) +``` + +Inside the closure, you have a consistent view of the database. You commit the +transaction by returning `nil` at the end. You can also rollback the transaction +at any point by returning an error. All database operations are allowed inside +a read-write transaction. + +Always check the return error as it will report any disk failures that can cause +your transaction to not complete. If you return an error within your closure +it will be passed through. + + +#### Read-only transactions + +To start a read-only transaction, you can use the `DB.View()` function: + +```go +err := db.View(func(tx *bolt.Tx) error { + ... + return nil +}) +``` + +You also get a consistent view of the database within this closure, however, +no mutating operations are allowed within a read-only transaction. You can only +retrieve buckets, retrieve values, and copy the database within a read-only +transaction. + + +#### Batch read-write transactions + +Each `DB.Update()` waits for disk to commit the writes. This overhead +can be minimized by combining multiple updates with the `DB.Batch()` +function: + +```go +err := db.Batch(func(tx *bolt.Tx) error { + ... + return nil +}) +``` + +Concurrent Batch calls are opportunistically combined into larger +transactions. Batch is only useful when there are multiple goroutines +calling it. + +The trade-off is that `Batch` can call the given +function multiple times, if parts of the transaction fail. The +function must be idempotent and side effects must take effect only +after a successful return from `DB.Batch()`. + +For example: don't display messages from inside the function, instead +set variables in the enclosing scope: + +```go +var id uint64 +err := db.Batch(func(tx *bolt.Tx) error { + // Find last key in bucket, decode as bigendian uint64, increment + // by one, encode back to []byte, and add new key. + ... + id = newValue + return nil +}) +if err != nil { + return ... +} +fmt.Println("Allocated ID %d", id) +``` + + +#### Managing transactions manually + +The `DB.View()` and `DB.Update()` functions are wrappers around the `DB.Begin()` +function. These helper functions will start the transaction, execute a function, +and then safely close your transaction if an error is returned. This is the +recommended way to use Bolt transactions. + +However, sometimes you may want to manually start and end your transactions. +You can use the `DB.Begin()` function directly but **please** be sure to close +the transaction. + +```go +// Start a writable transaction. +tx, err := db.Begin(true) +if err != nil { + return err +} +defer tx.Rollback() + +// Use the transaction... +_, err := tx.CreateBucket([]byte("MyBucket")) +if err != nil { + return err +} + +// Commit the transaction and check for error. +if err := tx.Commit(); err != nil { + return err +} +``` + +The first argument to `DB.Begin()` is a boolean stating if the transaction +should be writable. + + +### Using buckets + +Buckets are collections of key/value pairs within the database. All keys in a +bucket must be unique. You can create a bucket using the `DB.CreateBucket()` +function: + +```go +db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("MyBucket")) + if err != nil { + return fmt.Errorf("create bucket: %s", err) + } + return nil +}) +``` + +You can also create a bucket only if it doesn't exist by using the +`Tx.CreateBucketIfNotExists()` function. It's a common pattern to call this +function for all your top-level buckets after you open your database so you can +guarantee that they exist for future transactions. + +To delete a bucket, simply call the `Tx.DeleteBucket()` function. + + +### Using key/value pairs + +To save a key/value pair to a bucket, use the `Bucket.Put()` function: + +```go +db.Update(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("MyBucket")) + err := b.Put([]byte("answer"), []byte("42")) + return err +}) +``` + +This will set the value of the `"answer"` key to `"42"` in the `MyBucket` +bucket. To retrieve this value, we can use the `Bucket.Get()` function: + +```go +db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("MyBucket")) + v := b.Get([]byte("answer")) + fmt.Printf("The answer is: %s\n", v) + return nil +}) +``` + +The `Get()` function does not return an error because its operation is +guaranteed to work (unless there is some kind of system failure). If the key +exists then it will return its byte slice value. If it doesn't exist then it +will return `nil`. It's important to note that you can have a zero-length value +set to a key which is different than the key not existing. + +Use the `Bucket.Delete()` function to delete a key from the bucket. + +Please note that values returned from `Get()` are only valid while the +transaction is open. If you need to use a value outside of the transaction +then you must use `copy()` to copy it to another byte slice. + + +### Autoincrementing integer for the bucket +By using the `NextSequence()` function, you can let Bolt determine a sequence +which can be used as the unique identifier for your key/value pairs. See the +example below. + +```go +// CreateUser saves u to the store. The new user ID is set on u once the data is persisted. +func (s *Store) CreateUser(u *User) error { + return s.db.Update(func(tx *bolt.Tx) error { + // Retrieve the users bucket. + // This should be created when the DB is first opened. + b := tx.Bucket([]byte("users")) + + // Generate ID for the user. + // This returns an error only if the Tx is closed or not writeable. + // That can't happen in an Update() call so I ignore the error check. + id, _ := b.NextSequence() + u.ID = int(id) + + // Marshal user data into bytes. + buf, err := json.Marshal(u) + if err != nil { + return err + } + + // Persist bytes to users bucket. + return b.Put(itob(u.ID), buf) + }) +} + +// itob returns an 8-byte big endian representation of v. +func itob(v int) []byte { + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, uint64(v)) + return b +} + +type User struct { + ID int + ... +} +``` + +### Iterating over keys + +Bolt stores its keys in byte-sorted order within a bucket. This makes sequential +iteration over these keys extremely fast. To iterate over keys we'll use a +`Cursor`: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys + b := tx.Bucket([]byte("MyBucket")) + + c := b.Cursor() + + for k, v := c.First(); k != nil; k, v = c.Next() { + fmt.Printf("key=%s, value=%s\n", k, v) + } + + return nil +}) +``` + +The cursor allows you to move to a specific point in the list of keys and move +forward or backward through the keys one at a time. + +The following functions are available on the cursor: + +``` +First() Move to the first key. +Last() Move to the last key. +Seek() Move to a specific key. +Next() Move to the next key. +Prev() Move to the previous key. +``` + +Each of those functions has a return signature of `(key []byte, value []byte)`. +When you have iterated to the end of the cursor then `Next()` will return a +`nil` key. You must seek to a position using `First()`, `Last()`, or `Seek()` +before calling `Next()` or `Prev()`. If you do not seek to a position then +these functions will return a `nil` key. + +During iteration, if the key is non-`nil` but the value is `nil`, that means +the key refers to a bucket rather than a value. Use `Bucket.Bucket()` to +access the sub-bucket. + + +#### Prefix scans + +To iterate over a key prefix, you can combine `Seek()` and `bytes.HasPrefix()`: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys + c := tx.Bucket([]byte("MyBucket")).Cursor() + + prefix := []byte("1234") + for k, v := c.Seek(prefix); k != nil && bytes.HasPrefix(k, prefix); k, v = c.Next() { + fmt.Printf("key=%s, value=%s\n", k, v) + } + + return nil +}) +``` + +#### Range scans + +Another common use case is scanning over a range such as a time range. If you +use a sortable time encoding such as RFC3339 then you can query a specific +date range like this: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume our events bucket exists and has RFC3339 encoded time keys. + c := tx.Bucket([]byte("Events")).Cursor() + + // Our time range spans the 90's decade. + min := []byte("1990-01-01T00:00:00Z") + max := []byte("2000-01-01T00:00:00Z") + + // Iterate over the 90's. + for k, v := c.Seek(min); k != nil && bytes.Compare(k, max) <= 0; k, v = c.Next() { + fmt.Printf("%s: %s\n", k, v) + } + + return nil +}) +``` + +Note that, while RFC3339 is sortable, the Golang implementation of RFC3339Nano does not use a fixed number of digits after the decimal point and is therefore not sortable. + + +#### ForEach() + +You can also use the function `ForEach()` if you know you'll be iterating over +all the keys in a bucket: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys + b := tx.Bucket([]byte("MyBucket")) + + b.ForEach(func(k, v []byte) error { + fmt.Printf("key=%s, value=%s\n", k, v) + return nil + }) + return nil +}) +``` + +Please note that keys and values in `ForEach()` are only valid while +the transaction is open. If you need to use a key or value outside of +the transaction, you must use `copy()` to copy it to another byte +slice. + +### Nested buckets + +You can also store a bucket in a key to create nested buckets. The API is the +same as the bucket management API on the `DB` object: + +```go +func (*Bucket) CreateBucket(key []byte) (*Bucket, error) +func (*Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) +func (*Bucket) DeleteBucket(key []byte) error +``` + +Say you had a multi-tenant application where the root level bucket was the account bucket. Inside of this bucket was a sequence of accounts which themselves are buckets. And inside the sequence bucket you could have many buckets pertaining to the Account itself (Users, Notes, etc) isolating the information into logical groupings. + +```go + +// createUser creates a new user in the given account. +func createUser(accountID int, u *User) error { + // Start the transaction. + tx, err := db.Begin(true) + if err != nil { + return err + } + defer tx.Rollback() + + // Retrieve the root bucket for the account. + // Assume this has already been created when the account was set up. + root := tx.Bucket([]byte(strconv.FormatUint(accountID, 10))) + + // Setup the users bucket. + bkt, err := root.CreateBucketIfNotExists([]byte("USERS")) + if err != nil { + return err + } + + // Generate an ID for the new user. + userID, err := bkt.NextSequence() + if err != nil { + return err + } + u.ID = userID + + // Marshal and save the encoded user. + if buf, err := json.Marshal(u); err != nil { + return err + } else if err := bkt.Put([]byte(strconv.FormatUint(u.ID, 10)), buf); err != nil { + return err + } + + // Commit the transaction. + if err := tx.Commit(); err != nil { + return err + } + + return nil +} + +``` + + + + +### Database backups + +Bolt is a single file so it's easy to backup. You can use the `Tx.WriteTo()` +function to write a consistent view of the database to a writer. If you call +this from a read-only transaction, it will perform a hot backup and not block +your other database reads and writes. + +By default, it will use a regular file handle which will utilize the operating +system's page cache. See the [`Tx`](https://godoc.org/github.com/boltdb/bolt#Tx) +documentation for information about optimizing for larger-than-RAM datasets. + +One common use case is to backup over HTTP so you can use tools like `cURL` to +do database backups: + +```go +func BackupHandleFunc(w http.ResponseWriter, req *http.Request) { + err := db.View(func(tx *bolt.Tx) error { + w.Header().Set("Content-Type", "application/octet-stream") + w.Header().Set("Content-Disposition", `attachment; filename="my.db"`) + w.Header().Set("Content-Length", strconv.Itoa(int(tx.Size()))) + _, err := tx.WriteTo(w) + return err + }) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + } +} +``` + +Then you can backup using this command: + +```sh +$ curl http://localhost/backup > my.db +``` + +Or you can open your browser to `http://localhost/backup` and it will download +automatically. + +If you want to backup to another file you can use the `Tx.CopyFile()` helper +function. + + +### Statistics + +The database keeps a running count of many of the internal operations it +performs so you can better understand what's going on. By grabbing a snapshot +of these stats at two points in time we can see what operations were performed +in that time range. + +For example, we could start a goroutine to log stats every 10 seconds: + +```go +go func() { + // Grab the initial stats. + prev := db.Stats() + + for { + // Wait for 10s. + time.Sleep(10 * time.Second) + + // Grab the current stats and diff them. + stats := db.Stats() + diff := stats.Sub(&prev) + + // Encode stats to JSON and print to STDERR. + json.NewEncoder(os.Stderr).Encode(diff) + + // Save stats for the next loop. + prev = stats + } +}() +``` + +It's also useful to pipe these stats to a service such as statsd for monitoring +or to provide an HTTP endpoint that will perform a fixed-length sample. + + +### Read-Only Mode + +Sometimes it is useful to create a shared, read-only Bolt database. To this, +set the `Options.ReadOnly` flag when opening your database. Read-only mode +uses a shared lock to allow multiple processes to read from the database but +it will block any processes from opening the database in read-write mode. + +```go +db, err := bolt.Open("my.db", 0666, &bolt.Options{ReadOnly: true}) +if err != nil { + log.Fatal(err) +} +``` + +### Mobile Use (iOS/Android) + +Bolt is able to run on mobile devices by leveraging the binding feature of the +[gomobile](https://github.com/golang/mobile) tool. Create a struct that will +contain your database logic and a reference to a `*bolt.DB` with a initializing +constructor that takes in a filepath where the database file will be stored. +Neither Android nor iOS require extra permissions or cleanup from using this method. + +```go +func NewBoltDB(filepath string) *BoltDB { + db, err := bolt.Open(filepath+"/demo.db", 0600, nil) + if err != nil { + log.Fatal(err) + } + + return &BoltDB{db} +} + +type BoltDB struct { + db *bolt.DB + ... +} + +func (b *BoltDB) Path() string { + return b.db.Path() +} + +func (b *BoltDB) Close() { + b.db.Close() +} +``` + +Database logic should be defined as methods on this wrapper struct. + +To initialize this struct from the native language (both platforms now sync +their local storage to the cloud. These snippets disable that functionality for the +database file): + +#### Android + +```java +String path; +if (android.os.Build.VERSION.SDK_INT >=android.os.Build.VERSION_CODES.LOLLIPOP){ + path = getNoBackupFilesDir().getAbsolutePath(); +} else{ + path = getFilesDir().getAbsolutePath(); +} +Boltmobiledemo.BoltDB boltDB = Boltmobiledemo.NewBoltDB(path) +``` + +#### iOS + +```objc +- (void)demo { + NSString* path = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, + NSUserDomainMask, + YES) objectAtIndex:0]; + GoBoltmobiledemoBoltDB * demo = GoBoltmobiledemoNewBoltDB(path); + [self addSkipBackupAttributeToItemAtPath:demo.path]; + //Some DB Logic would go here + [demo close]; +} + +- (BOOL)addSkipBackupAttributeToItemAtPath:(NSString *) filePathString +{ + NSURL* URL= [NSURL fileURLWithPath: filePathString]; + assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]); + + NSError *error = nil; + BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES] + forKey: NSURLIsExcludedFromBackupKey error: &error]; + if(!success){ + NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error); + } + return success; +} + +``` + +## Resources + +For more information on getting started with Bolt, check out the following articles: + +* [Intro to BoltDB: Painless Performant Persistence](http://npf.io/2014/07/intro-to-boltdb-painless-performant-persistence/) by [Nate Finch](https://github.com/natefinch). +* [Bolt -- an embedded key/value database for Go](https://www.progville.com/go/bolt-embedded-db-golang/) by Progville + + +## Comparison with other databases + +### Postgres, MySQL, & other relational databases + +Relational databases structure data into rows and are only accessible through +the use of SQL. This approach provides flexibility in how you store and query +your data but also incurs overhead in parsing and planning SQL statements. Bolt +accesses all data by a byte slice key. This makes Bolt fast to read and write +data by key but provides no built-in support for joining values together. + +Most relational databases (with the exception of SQLite) are standalone servers +that run separately from your application. This gives your systems +flexibility to connect multiple application servers to a single database +server but also adds overhead in serializing and transporting data over the +network. Bolt runs as a library included in your application so all data access +has to go through your application's process. This brings data closer to your +application but limits multi-process access to the data. + + +### LevelDB, RocksDB + +LevelDB and its derivatives (RocksDB, HyperLevelDB) are similar to Bolt in that +they are libraries bundled into the application, however, their underlying +structure is a log-structured merge-tree (LSM tree). An LSM tree optimizes +random writes by using a write ahead log and multi-tiered, sorted files called +SSTables. Bolt uses a B+tree internally and only a single file. Both approaches +have trade-offs. + +If you require a high random write throughput (>10,000 w/sec) or you need to use +spinning disks then LevelDB could be a good choice. If your application is +read-heavy or does a lot of range scans then Bolt could be a good choice. + +One other important consideration is that LevelDB does not have transactions. +It supports batch writing of key/values pairs and it supports read snapshots +but it will not give you the ability to do a compare-and-swap operation safely. +Bolt supports fully serializable ACID transactions. + + +### LMDB + +Bolt was originally a port of LMDB so it is architecturally similar. Both use +a B+tree, have ACID semantics with fully serializable transactions, and support +lock-free MVCC using a single writer and multiple readers. + +The two projects have somewhat diverged. LMDB heavily focuses on raw performance +while Bolt has focused on simplicity and ease of use. For example, LMDB allows +several unsafe actions such as direct writes for the sake of performance. Bolt +opts to disallow actions which can leave the database in a corrupted state. The +only exception to this in Bolt is `DB.NoSync`. + +There are also a few differences in API. LMDB requires a maximum mmap size when +opening an `mdb_env` whereas Bolt will handle incremental mmap resizing +automatically. LMDB overloads the getter and setter functions with multiple +flags whereas Bolt splits these specialized cases into their own functions. + + +## Caveats & Limitations + +It's important to pick the right tool for the job and Bolt is no exception. +Here are a few things to note when evaluating and using Bolt: + +* Bolt is good for read intensive workloads. Sequential write performance is + also fast but random writes can be slow. You can use `DB.Batch()` or add a + write-ahead log to help mitigate this issue. + +* Bolt uses a B+tree internally so there can be a lot of random page access. + SSDs provide a significant performance boost over spinning disks. + +* Try to avoid long running read transactions. Bolt uses copy-on-write so + old pages cannot be reclaimed while an old transaction is using them. + +* Byte slices returned from Bolt are only valid during a transaction. Once the + transaction has been committed or rolled back then the memory they point to + can be reused by a new page or can be unmapped from virtual memory and you'll + see an `unexpected fault address` panic when accessing it. + +* Bolt uses an exclusive write lock on the database file so it cannot be + shared by multiple processes. + +* Be careful when using `Bucket.FillPercent`. Setting a high fill percent for + buckets that have random inserts will cause your database to have very poor + page utilization. + +* Use larger buckets in general. Smaller buckets causes poor page utilization + once they become larger than the page size (typically 4KB). + +* Bulk loading a lot of random writes into a new bucket can be slow as the + page will not split until the transaction is committed. Randomly inserting + more than 100,000 key/value pairs into a single new bucket in a single + transaction is not advised. + +* Bolt uses a memory-mapped file so the underlying operating system handles the + caching of the data. Typically, the OS will cache as much of the file as it + can in memory and will release memory as needed to other processes. This means + that Bolt can show very high memory usage when working with large databases. + However, this is expected and the OS will release memory as needed. Bolt can + handle databases much larger than the available physical RAM, provided its + memory-map fits in the process virtual address space. It may be problematic + on 32-bits systems. + +* The data structures in the Bolt database are memory mapped so the data file + will be endian specific. This means that you cannot copy a Bolt file from a + little endian machine to a big endian machine and have it work. For most + users this is not a concern since most modern CPUs are little endian. + +* Because of the way pages are laid out on disk, Bolt cannot truncate data files + and return free pages back to the disk. Instead, Bolt maintains a free list + of unused pages within its data file. These free pages can be reused by later + transactions. This works well for many use cases as databases generally tend + to grow. However, it's important to note that deleting large chunks of data + will not allow you to reclaim that space on disk. + + For more information on page allocation, [see this comment][page-allocation]. + +[page-allocation]: https://github.com/boltdb/bolt/issues/308#issuecomment-74811638 + + +## Reading the Source + +Bolt is a relatively small code base (<3KLOC) for an embedded, serializable, +transactional key/value database so it can be a good starting point for people +interested in how databases work. + +The best places to start are the main entry points into Bolt: + +- `Open()` - Initializes the reference to the database. It's responsible for + creating the database if it doesn't exist, obtaining an exclusive lock on the + file, reading the meta pages, & memory-mapping the file. + +- `DB.Begin()` - Starts a read-only or read-write transaction depending on the + value of the `writable` argument. This requires briefly obtaining the "meta" + lock to keep track of open transactions. Only one read-write transaction can + exist at a time so the "rwlock" is acquired during the life of a read-write + transaction. + +- `Bucket.Put()` - Writes a key/value pair into a bucket. After validating the + arguments, a cursor is used to traverse the B+tree to the page and position + where they key & value will be written. Once the position is found, the bucket + materializes the underlying page and the page's parent pages into memory as + "nodes". These nodes are where mutations occur during read-write transactions. + These changes get flushed to disk during commit. + +- `Bucket.Get()` - Retrieves a key/value pair from a bucket. This uses a cursor + to move to the page & position of a key/value pair. During a read-only + transaction, the key and value data is returned as a direct reference to the + underlying mmap file so there's no allocation overhead. For read-write + transactions, this data may reference the mmap file or one of the in-memory + node values. + +- `Cursor` - This object is simply for traversing the B+tree of on-disk pages + or in-memory nodes. It can seek to a specific key, move to the first or last + value, or it can move forward or backward. The cursor handles the movement up + and down the B+tree transparently to the end user. + +- `Tx.Commit()` - Converts the in-memory dirty nodes and the list of free pages + into pages to be written to disk. Writing to disk then occurs in two phases. + First, the dirty pages are written to disk and an `fsync()` occurs. Second, a + new meta page with an incremented transaction ID is written and another + `fsync()` occurs. This two phase write ensures that partially written data + pages are ignored in the event of a crash since the meta page pointing to them + is never written. Partially written meta pages are invalidated because they + are written with a checksum. + +If you have additional notes that could be helpful for others, please submit +them via pull request. + + +## Other Projects Using Bolt + +Below is a list of public, open source projects that use Bolt: + +* [BoltDbWeb](https://github.com/evnix/boltdbweb) - A web based GUI for BoltDB files. +* [Operation Go: A Routine Mission](http://gocode.io) - An online programming game for Golang using Bolt for user accounts and a leaderboard. +* [Bazil](https://bazil.org/) - A file system that lets your data reside where it is most convenient for it to reside. +* [DVID](https://github.com/janelia-flyem/dvid) - Added Bolt as optional storage engine and testing it against Basho-tuned leveldb. +* [Skybox Analytics](https://github.com/skybox/skybox) - A standalone funnel analysis tool for web analytics. +* [Scuttlebutt](https://github.com/benbjohnson/scuttlebutt) - Uses Bolt to store and process all Twitter mentions of GitHub projects. +* [Wiki](https://github.com/peterhellberg/wiki) - A tiny wiki using Goji, BoltDB and Blackfriday. +* [ChainStore](https://github.com/pressly/chainstore) - Simple key-value interface to a variety of storage engines organized as a chain of operations. +* [MetricBase](https://github.com/msiebuhr/MetricBase) - Single-binary version of Graphite. +* [Gitchain](https://github.com/gitchain/gitchain) - Decentralized, peer-to-peer Git repositories aka "Git meets Bitcoin". +* [event-shuttle](https://github.com/sclasen/event-shuttle) - A Unix system service to collect and reliably deliver messages to Kafka. +* [ipxed](https://github.com/kelseyhightower/ipxed) - Web interface and api for ipxed. +* [BoltStore](https://github.com/yosssi/boltstore) - Session store using Bolt. +* [photosite/session](https://godoc.org/bitbucket.org/kardianos/photosite/session) - Sessions for a photo viewing site. +* [LedisDB](https://github.com/siddontang/ledisdb) - A high performance NoSQL, using Bolt as optional storage. +* [ipLocator](https://github.com/AndreasBriese/ipLocator) - A fast ip-geo-location-server using bolt with bloom filters. +* [cayley](https://github.com/google/cayley) - Cayley is an open-source graph database using Bolt as optional backend. +* [bleve](http://www.blevesearch.com/) - A pure Go search engine similar to ElasticSearch that uses Bolt as the default storage backend. +* [tentacool](https://github.com/optiflows/tentacool) - REST api server to manage system stuff (IP, DNS, Gateway...) on a linux server. +* [Seaweed File System](https://github.com/chrislusf/seaweedfs) - Highly scalable distributed key~file system with O(1) disk read. +* [InfluxDB](https://influxdata.com) - Scalable datastore for metrics, events, and real-time analytics. +* [Freehold](http://tshannon.bitbucket.org/freehold/) - An open, secure, and lightweight platform for your files and data. +* [Prometheus Annotation Server](https://github.com/oliver006/prom_annotation_server) - Annotation server for PromDash & Prometheus service monitoring system. +* [Consul](https://github.com/hashicorp/consul) - Consul is service discovery and configuration made easy. Distributed, highly available, and datacenter-aware. +* [Kala](https://github.com/ajvb/kala) - Kala is a modern job scheduler optimized to run on a single node. It is persistent, JSON over HTTP API, ISO 8601 duration notation, and dependent jobs. +* [drive](https://github.com/odeke-em/drive) - drive is an unofficial Google Drive command line client for \*NIX operating systems. +* [stow](https://github.com/djherbis/stow) - a persistence manager for objects + backed by boltdb. +* [buckets](https://github.com/joyrexus/buckets) - a bolt wrapper streamlining + simple tx and key scans. +* [mbuckets](https://github.com/abhigupta912/mbuckets) - A Bolt wrapper that allows easy operations on multi level (nested) buckets. +* [Request Baskets](https://github.com/darklynx/request-baskets) - A web service to collect arbitrary HTTP requests and inspect them via REST API or simple web UI, similar to [RequestBin](http://requestb.in/) service +* [Go Report Card](https://goreportcard.com/) - Go code quality report cards as a (free and open source) service. +* [Boltdb Boilerplate](https://github.com/bobintornado/boltdb-boilerplate) - Boilerplate wrapper around bolt aiming to make simple calls one-liners. +* [lru](https://github.com/crowdriff/lru) - Easy to use Bolt-backed Least-Recently-Used (LRU) read-through cache with chainable remote stores. +* [Storm](https://github.com/asdine/storm) - Simple and powerful ORM for BoltDB. +* [GoWebApp](https://github.com/josephspurrier/gowebapp) - A basic MVC web application in Go using BoltDB. +* [SimpleBolt](https://github.com/xyproto/simplebolt) - A simple way to use BoltDB. Deals mainly with strings. +* [Algernon](https://github.com/xyproto/algernon) - A HTTP/2 web server with built-in support for Lua. Uses BoltDB as the default database backend. +* [MuLiFS](https://github.com/dankomiocevic/mulifs) - Music Library Filesystem creates a filesystem to organise your music files. +* [GoShort](https://github.com/pankajkhairnar/goShort) - GoShort is a URL shortener written in Golang and BoltDB for persistent key/value storage and for routing it's using high performent HTTPRouter. +* [torrent](https://github.com/anacrolix/torrent) - Full-featured BitTorrent client package and utilities in Go. BoltDB is a storage backend in development. +* [gopherpit](https://github.com/gopherpit/gopherpit) - A web service to manage Go remote import paths with custom domains +* [bolter](https://github.com/hasit/bolter) - Command-line app for viewing BoltDB file in your terminal. +* [btcwallet](https://github.com/btcsuite/btcwallet) - A bitcoin wallet. +* [dcrwallet](https://github.com/decred/dcrwallet) - A wallet for the Decred cryptocurrency. +* [Ironsmith](https://github.com/timshannon/ironsmith) - A simple, script-driven continuous integration (build - > test -> release) tool, with no external dependencies +* [BoltHold](https://github.com/timshannon/bolthold) - An embeddable NoSQL store for Go types built on BoltDB +* [Ponzu CMS](https://ponzu-cms.org) - Headless CMS + automatic JSON API with auto-HTTPS, HTTP/2 Server Push, and flexible server framework. + +If you are using Bolt in a project please send a pull request to add it to the list. diff --git a/vendor/github.com/boltdb/bolt/appveyor.yml b/vendor/github.com/boltdb/bolt/appveyor.yml new file mode 100644 index 00000000..6e26e941 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/appveyor.yml @@ -0,0 +1,18 @@ +version: "{build}" + +os: Windows Server 2012 R2 + +clone_folder: c:\gopath\src\github.com\boltdb\bolt + +environment: + GOPATH: c:\gopath + +install: + - echo %PATH% + - echo %GOPATH% + - go version + - go env + - go get -v -t ./... + +build_script: + - go test -v ./... diff --git a/vendor/github.com/docker/libkv/.travis.yml b/vendor/github.com/docker/libkv/.travis.yml new file mode 100644 index 00000000..23ef6e05 --- /dev/null +++ b/vendor/github.com/docker/libkv/.travis.yml @@ -0,0 +1,31 @@ +language: go + +go: + - 1.5.3 + +# let us have speedy Docker-based Travis workers +sudo: false + +before_install: + # Symlink below is needed for Travis CI to work correctly on personal forks of libkv + - ln -s $HOME/gopath/src/github.com/${TRAVIS_REPO_SLUG///libkv/} $HOME/gopath/src/github.com/docker + - go get golang.org/x/tools/cmd/cover + - go get github.com/mattn/goveralls + - go get github.com/golang/lint/golint + - go get github.com/GeertJohan/fgt + +before_script: + - script/travis_consul.sh 0.6.3 + - script/travis_etcd.sh 3.0.0 + - script/travis_zk.sh 3.5.1-alpha + +script: + - ./consul agent -server -bootstrap -advertise=127.0.0.1 -data-dir /tmp/consul -config-file=./config.json 1>/dev/null & + - ./etcd/etcd --listen-client-urls 'http://0.0.0.0:4001' --advertise-client-urls 'http://127.0.0.1:4001' >/dev/null 2>&1 & + - ./zk/bin/zkServer.sh start ./zk/conf/zoo.cfg 1> /dev/null + - script/validate-gofmt + - go vet ./... + - fgt golint ./... + - go test -v -race ./... + - script/coverage + - goveralls -service=travis-ci -coverprofile=goverage.report diff --git a/vendor/github.com/docker/libkv/MAINTAINERS b/vendor/github.com/docker/libkv/MAINTAINERS new file mode 100644 index 00000000..4dd59c7e --- /dev/null +++ b/vendor/github.com/docker/libkv/MAINTAINERS @@ -0,0 +1,46 @@ +# Libkv maintainers file +# +# This file describes who runs the docker/libkv project and how. +# This is a living document - if you see something out of date or missing, speak up! +# +# It is structured to be consumable by both humans and programs. +# To extract its contents programmatically, use any TOML-compliant parser. +# +# This file is compiled into the MAINTAINERS file in docker/opensource. +# +[Org] + [Org."Core maintainers"] + people = [ + "abronan", + "aluzzardi", + "sanimej", + "vieux", + ] + +[people] + +# A reference list of all people associated with the project. +# All other sections should refer to people by their canonical key +# in the people section. + + # ADD YOURSELF HERE IN ALPHABETICAL ORDER + + [people.abronan] + Name = "Alexandre Beslic" + Email = "abronan@docker.com" + GitHub = "abronan" + + [people.aluzzardi] + Name = "Andrea Luzzardi" + Email = "al@docker.com" + GitHub = "aluzzardi" + + [people.sanimej] + Name = "Santhosh Manohar" + Email = "santhosh@docker.com" + GitHub = "sanimej" + + [people.vieux] + Name = "Victor Vieux" + Email = "vieux@docker.com" + GitHub = "vieux" diff --git a/vendor/github.com/docker/libkv/README.md b/vendor/github.com/docker/libkv/README.md new file mode 100644 index 00000000..baad81b4 --- /dev/null +++ b/vendor/github.com/docker/libkv/README.md @@ -0,0 +1,107 @@ +# libkv + +[![GoDoc](https://godoc.org/github.com/docker/libkv?status.png)](https://godoc.org/github.com/docker/libkv) +[![Build Status](https://travis-ci.org/docker/libkv.svg?branch=master)](https://travis-ci.org/docker/libkv) +[![Coverage Status](https://coveralls.io/repos/docker/libkv/badge.svg)](https://coveralls.io/r/docker/libkv) +[![Go Report Card](https://goreportcard.com/badge/github.com/docker/libkv)](https://goreportcard.com/report/github.com/docker/libkv) + +`libkv` provides a `Go` native library to store metadata. + +The goal of `libkv` is to abstract common store operations for multiple distributed and/or local Key/Value store backends. + +For example, you can use it to store your metadata or for service discovery to register machines and endpoints inside your cluster. + +You can also easily implement a generic *Leader Election* on top of it (see the [docker/leadership](https://github.com/docker/leadership) repository). + +As of now, `libkv` offers support for `Consul`, `Etcd`, `Zookeeper` (**Distributed** store) and `BoltDB` (**Local** store). + +## Usage + +`libkv` is meant to be used as an abstraction layer over existing distributed Key/Value stores. It is especially useful if you plan to support `consul`, `etcd` and `zookeeper` using the same codebase. + +It is ideal if you plan for something written in Go that should support: + +- A simple metadata storage, distributed or local +- A lightweight discovery service for your nodes +- A distributed lock mechanism + +You can find examples of usage for `libkv` under in `docs/examples.go`. Optionally you can also take a look at the `docker/swarm` or `docker/libnetwork` repositories which are using `docker/libkv` for all the use cases listed above. + +## Supported versions + +`libkv` supports: +- Consul versions >= `0.5.1` because it uses Sessions with `Delete` behavior for the use of `TTLs` (mimics zookeeper's Ephemeral node support), If you don't plan to use `TTLs`: you can use Consul version `0.4.0+`. +- Etcd versions >= `2.0` because it uses the new `coreos/etcd/client`, this might change in the future as the support for `APIv3` comes along and adds more capabilities. +- Zookeeper versions >= `3.4.5`. Although this might work with previous version but this remains untested as of now. +- Boltdb, which shouldn't be subject to any version dependencies. + +## Interface + +A **storage backend** in `libkv` should implement (fully or partially) this interface: + +```go +type Store interface { + Put(key string, value []byte, options *WriteOptions) error + Get(key string) (*KVPair, error) + Delete(key string) error + Exists(key string) (bool, error) + Watch(key string, stopCh <-chan struct{}) (<-chan *KVPair, error) + WatchTree(directory string, stopCh <-chan struct{}) (<-chan []*KVPair, error) + NewLock(key string, options *LockOptions) (Locker, error) + List(directory string) ([]*KVPair, error) + DeleteTree(directory string) error + AtomicPut(key string, value []byte, previous *KVPair, options *WriteOptions) (bool, *KVPair, error) + AtomicDelete(key string, previous *KVPair) (bool, error) + Close() +} +``` + +## Compatibility matrix + +Backend drivers in `libkv` are generally divided between **local drivers** and **distributed drivers**. Distributed backends offer enhanced capabilities like `Watches` and/or distributed `Locks`. + +Local drivers are usually used in complement to the distributed drivers to store informations that only needs to be available locally. + +| Calls | Consul | Etcd | Zookeeper | BoltDB | +|-----------------------|:----------:|:------:|:-----------:|:--------:| +| Put | X | X | X | X | +| Get | X | X | X | X | +| Delete | X | X | X | X | +| Exists | X | X | X | X | +| Watch | X | X | X | | +| WatchTree | X | X | X | | +| NewLock (Lock/Unlock) | X | X | X | | +| List | X | X | X | X | +| DeleteTree | X | X | X | X | +| AtomicPut | X | X | X | X | +| Close | X | X | X | X | + +## Limitations + +Distributed Key/Value stores often have different concepts for managing and formatting keys and their associated values. Even though `libkv` tries to abstract those stores aiming for some consistency, in some cases it can't be applied easily. + +Please refer to the `docs/compatibility.md` to see what are the special cases for cross-backend compatibility. + +Other than those special cases, you should expect the same experience for basic operations like `Get`/`Put`, etc. + +Calls like `WatchTree` may return different events (or number of events) depending on the backend (for now, `Etcd` and `Consul` will likely return more events than `Zookeeper` that you should triage properly). Although you should be able to use it successfully to watch on events in an interchangeable way (see the **docker/leadership** repository or the **pkg/discovery/kv** package in **docker/docker**). + +## TLS + +Only `Consul` and `etcd` have support for TLS and you should build and provide your own `config.TLS` object to feed the client. Support is planned for `zookeeper`. + +##Roadmap + +- Make the API nicer to use (using `options`) +- Provide more options (`consistency` for example) +- Improve performance (remove extras `Get`/`List` operations) +- Better key formatting +- New backends? + +##Contributing + +Want to hack on libkv? [Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md) apply. + +##Copyright and license + +Copyright © 2014-2016 Docker, Inc. All rights reserved, except as follows. Code is released under the Apache 2.0 license. The README.md file, and files in the "docs" folder are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file "LICENSE.docs". You may obtain a duplicate copy of the same license, titled CC-BY-SA-4.0, at http://creativecommons.org/licenses/by/4.0/. diff --git a/vendor/github.com/dustin/gojson/.gitignore b/vendor/github.com/dustin/gojson/.gitignore new file mode 100644 index 00000000..4e8e42fe --- /dev/null +++ b/vendor/github.com/dustin/gojson/.gitignore @@ -0,0 +1,2 @@ +#* +*~ diff --git a/vendor/github.com/fullsailor/pkcs7/.gitignore b/vendor/github.com/fullsailor/pkcs7/.gitignore new file mode 100644 index 00000000..daf913b1 --- /dev/null +++ b/vendor/github.com/fullsailor/pkcs7/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/fullsailor/pkcs7/.travis.yml b/vendor/github.com/fullsailor/pkcs7/.travis.yml new file mode 100644 index 00000000..bc120437 --- /dev/null +++ b/vendor/github.com/fullsailor/pkcs7/.travis.yml @@ -0,0 +1,7 @@ +language: go + +go: + - 1.8 + - 1.9 + - "1.10" + - tip diff --git a/vendor/github.com/fullsailor/pkcs7/README.md b/vendor/github.com/fullsailor/pkcs7/README.md new file mode 100644 index 00000000..bfd948f3 --- /dev/null +++ b/vendor/github.com/fullsailor/pkcs7/README.md @@ -0,0 +1,8 @@ +# pkcs7 + +[![GoDoc](https://godoc.org/github.com/fullsailor/pkcs7?status.svg)](https://godoc.org/github.com/fullsailor/pkcs7) +[![Build Status](https://travis-ci.org/fullsailor/pkcs7.svg?branch=master)](https://travis-ci.org/fullsailor/pkcs7) + +pkcs7 implements parsing and creating signed and enveloped messages. + +- Documentation on [GoDoc](http://godoc.org/github.com/fullsailor/pkcs7) diff --git a/vendor/github.com/golang/snappy/.gitignore b/vendor/github.com/golang/snappy/.gitignore new file mode 100644 index 00000000..042091d9 --- /dev/null +++ b/vendor/github.com/golang/snappy/.gitignore @@ -0,0 +1,16 @@ +cmd/snappytool/snappytool +testdata/bench + +# These explicitly listed benchmark data files are for an obsolete version of +# snappy_test.go. +testdata/alice29.txt +testdata/asyoulik.txt +testdata/fireworks.jpeg +testdata/geo.protodata +testdata/html +testdata/html_x_4 +testdata/kppkn.gtb +testdata/lcet10.txt +testdata/paper-100k.pdf +testdata/plrabn12.txt +testdata/urls.10K diff --git a/vendor/github.com/golang/snappy/README b/vendor/github.com/golang/snappy/README new file mode 100644 index 00000000..cea12879 --- /dev/null +++ b/vendor/github.com/golang/snappy/README @@ -0,0 +1,107 @@ +The Snappy compression format in the Go programming language. + +To download and install from source: +$ go get github.com/golang/snappy + +Unless otherwise noted, the Snappy-Go source files are distributed +under the BSD-style license found in the LICENSE file. + + + +Benchmarks. + +The golang/snappy benchmarks include compressing (Z) and decompressing (U) ten +or so files, the same set used by the C++ Snappy code (github.com/google/snappy +and note the "google", not "golang"). On an "Intel(R) Core(TM) i7-3770 CPU @ +3.40GHz", Go's GOARCH=amd64 numbers as of 2016-05-29: + +"go test -test.bench=." + +_UFlat0-8 2.19GB/s ± 0% html +_UFlat1-8 1.41GB/s ± 0% urls +_UFlat2-8 23.5GB/s ± 2% jpg +_UFlat3-8 1.91GB/s ± 0% jpg_200 +_UFlat4-8 14.0GB/s ± 1% pdf +_UFlat5-8 1.97GB/s ± 0% html4 +_UFlat6-8 814MB/s ± 0% txt1 +_UFlat7-8 785MB/s ± 0% txt2 +_UFlat8-8 857MB/s ± 0% txt3 +_UFlat9-8 719MB/s ± 1% txt4 +_UFlat10-8 2.84GB/s ± 0% pb +_UFlat11-8 1.05GB/s ± 0% gaviota + +_ZFlat0-8 1.04GB/s ± 0% html +_ZFlat1-8 534MB/s ± 0% urls +_ZFlat2-8 15.7GB/s ± 1% jpg +_ZFlat3-8 740MB/s ± 3% jpg_200 +_ZFlat4-8 9.20GB/s ± 1% pdf +_ZFlat5-8 991MB/s ± 0% html4 +_ZFlat6-8 379MB/s ± 0% txt1 +_ZFlat7-8 352MB/s ± 0% txt2 +_ZFlat8-8 396MB/s ± 1% txt3 +_ZFlat9-8 327MB/s ± 1% txt4 +_ZFlat10-8 1.33GB/s ± 1% pb +_ZFlat11-8 605MB/s ± 1% gaviota + + + +"go test -test.bench=. -tags=noasm" + +_UFlat0-8 621MB/s ± 2% html +_UFlat1-8 494MB/s ± 1% urls +_UFlat2-8 23.2GB/s ± 1% jpg +_UFlat3-8 1.12GB/s ± 1% jpg_200 +_UFlat4-8 4.35GB/s ± 1% pdf +_UFlat5-8 609MB/s ± 0% html4 +_UFlat6-8 296MB/s ± 0% txt1 +_UFlat7-8 288MB/s ± 0% txt2 +_UFlat8-8 309MB/s ± 1% txt3 +_UFlat9-8 280MB/s ± 1% txt4 +_UFlat10-8 753MB/s ± 0% pb +_UFlat11-8 400MB/s ± 0% gaviota + +_ZFlat0-8 409MB/s ± 1% html +_ZFlat1-8 250MB/s ± 1% urls +_ZFlat2-8 12.3GB/s ± 1% jpg +_ZFlat3-8 132MB/s ± 0% jpg_200 +_ZFlat4-8 2.92GB/s ± 0% pdf +_ZFlat5-8 405MB/s ± 1% html4 +_ZFlat6-8 179MB/s ± 1% txt1 +_ZFlat7-8 170MB/s ± 1% txt2 +_ZFlat8-8 189MB/s ± 1% txt3 +_ZFlat9-8 164MB/s ± 1% txt4 +_ZFlat10-8 479MB/s ± 1% pb +_ZFlat11-8 270MB/s ± 1% gaviota + + + +For comparison (Go's encoded output is byte-for-byte identical to C++'s), here +are the numbers from C++ Snappy's + +make CXXFLAGS="-O2 -DNDEBUG -g" clean snappy_unittest.log && cat snappy_unittest.log + +BM_UFlat/0 2.4GB/s html +BM_UFlat/1 1.4GB/s urls +BM_UFlat/2 21.8GB/s jpg +BM_UFlat/3 1.5GB/s jpg_200 +BM_UFlat/4 13.3GB/s pdf +BM_UFlat/5 2.1GB/s html4 +BM_UFlat/6 1.0GB/s txt1 +BM_UFlat/7 959.4MB/s txt2 +BM_UFlat/8 1.0GB/s txt3 +BM_UFlat/9 864.5MB/s txt4 +BM_UFlat/10 2.9GB/s pb +BM_UFlat/11 1.2GB/s gaviota + +BM_ZFlat/0 944.3MB/s html (22.31 %) +BM_ZFlat/1 501.6MB/s urls (47.78 %) +BM_ZFlat/2 14.3GB/s jpg (99.95 %) +BM_ZFlat/3 538.3MB/s jpg_200 (73.00 %) +BM_ZFlat/4 8.3GB/s pdf (83.30 %) +BM_ZFlat/5 903.5MB/s html4 (22.52 %) +BM_ZFlat/6 336.0MB/s txt1 (57.88 %) +BM_ZFlat/7 312.3MB/s txt2 (61.91 %) +BM_ZFlat/8 353.1MB/s txt3 (54.99 %) +BM_ZFlat/9 289.9MB/s txt4 (66.26 %) +BM_ZFlat/10 1.2GB/s pb (19.68 %) +BM_ZFlat/11 527.4MB/s gaviota (37.72 %) diff --git a/vendor/github.com/golang/snappy/go.mod b/vendor/github.com/golang/snappy/go.mod new file mode 100644 index 00000000..f6406bb2 --- /dev/null +++ b/vendor/github.com/golang/snappy/go.mod @@ -0,0 +1 @@ +module github.com/golang/snappy diff --git a/vendor/github.com/google/go-cmp/cmp/compare.go b/vendor/github.com/google/go-cmp/cmp/compare.go index 7e215f22..2133562b 100644 --- a/vendor/github.com/google/go-cmp/cmp/compare.go +++ b/vendor/github.com/google/go-cmp/cmp/compare.go @@ -29,26 +29,17 @@ package cmp import ( "fmt" "reflect" + "strings" "github.com/google/go-cmp/cmp/internal/diff" + "github.com/google/go-cmp/cmp/internal/flags" "github.com/google/go-cmp/cmp/internal/function" "github.com/google/go-cmp/cmp/internal/value" ) -// BUG(dsnet): Maps with keys containing NaN values cannot be properly compared due to -// the reflection package's inability to retrieve such entries. Equal will panic -// anytime it comes across a NaN key, but this behavior may change. -// -// See https://golang.org/issue/11104 for more details. - -var nothing = reflect.Value{} - // Equal reports whether x and y are equal by recursively applying the // following rules in the given order to x and y and all of their sub-values: // -// • If two values are not of the same type, then they are never equal -// and the overall result is false. -// // • Let S be the set of all Ignore, Transformer, and Comparer options that // remain after applying all path filters, value filters, and type filters. // If at least one Ignore exists in S, then the comparison is ignored. @@ -61,43 +52,79 @@ var nothing = reflect.Value{} // // • If the values have an Equal method of the form "(T) Equal(T) bool" or // "(T) Equal(I) bool" where T is assignable to I, then use the result of -// x.Equal(y) even if x or y is nil. -// Otherwise, no such method exists and evaluation proceeds to the next rule. +// x.Equal(y) even if x or y is nil. Otherwise, no such method exists and +// evaluation proceeds to the next rule. // // • Lastly, try to compare x and y based on their basic kinds. // Simple kinds like booleans, integers, floats, complex numbers, strings, and // channels are compared using the equivalent of the == operator in Go. // Functions are only equal if they are both nil, otherwise they are unequal. -// Pointers are equal if the underlying values they point to are also equal. -// Interfaces are equal if their underlying concrete values are also equal. // -// Structs are equal if all of their fields are equal. If a struct contains -// unexported fields, Equal panics unless the AllowUnexported option is used or -// an Ignore option (e.g., cmpopts.IgnoreUnexported) ignores that field. +// Structs are equal if recursively calling Equal on all fields report equal. +// If a struct contains unexported fields, Equal panics unless an Ignore option +// (e.g., cmpopts.IgnoreUnexported) ignores that field or the AllowUnexported +// option explicitly permits comparing the unexported field. +// +// Slices are equal if they are both nil or both non-nil, where recursively +// calling Equal on all non-ignored slice or array elements report equal. +// Empty non-nil slices and nil slices are not equal; to equate empty slices, +// consider using cmpopts.EquateEmpty. // -// Arrays, slices, and maps are equal if they are both nil or both non-nil -// with the same length and the elements at each index or key are equal. -// Note that a non-nil empty slice and a nil slice are not equal. -// To equate empty slices and maps, consider using cmpopts.EquateEmpty. +// Maps are equal if they are both nil or both non-nil, where recursively +// calling Equal on all non-ignored map entries report equal. // Map keys are equal according to the == operator. // To use custom comparisons for map keys, consider using cmpopts.SortMaps. +// Empty non-nil maps and nil maps are not equal; to equate empty maps, +// consider using cmpopts.EquateEmpty. +// +// Pointers and interfaces are equal if they are both nil or both non-nil, +// where they have the same underlying concrete type and recursively +// calling Equal on the underlying values reports equal. func Equal(x, y interface{}, opts ...Option) bool { + vx := reflect.ValueOf(x) + vy := reflect.ValueOf(y) + + // If the inputs are different types, auto-wrap them in an empty interface + // so that they have the same parent type. + var t reflect.Type + if !vx.IsValid() || !vy.IsValid() || vx.Type() != vy.Type() { + t = reflect.TypeOf((*interface{})(nil)).Elem() + if vx.IsValid() { + vvx := reflect.New(t).Elem() + vvx.Set(vx) + vx = vvx + } + if vy.IsValid() { + vvy := reflect.New(t).Elem() + vvy.Set(vy) + vy = vvy + } + } else { + t = vx.Type() + } + s := newState(opts) - s.compareAny(reflect.ValueOf(x), reflect.ValueOf(y)) + s.compareAny(&pathStep{t, vx, vy}) return s.result.Equal() } // Diff returns a human-readable report of the differences between two values. // It returns an empty string if and only if Equal returns true for the same -// input values and options. The output string will use the "-" symbol to -// indicate elements removed from x, and the "+" symbol to indicate elements -// added to y. +// input values and options. +// +// The output is displayed as a literal in pseudo-Go syntax. +// At the start of each line, a "-" prefix indicates an element removed from x, +// a "+" prefix to indicates an element added to y, and the lack of a prefix +// indicates an element common to both x and y. If possible, the output +// uses fmt.Stringer.String or error.Error methods to produce more humanly +// readable outputs. In such cases, the string is prefixed with either an +// 's' or 'e' character, respectively, to indicate that the method was called. // -// Do not depend on this output being stable. +// Do not depend on this output being stable. If you need the ability to +// programmatically interpret the difference, consider using a custom Reporter. func Diff(x, y interface{}, opts ...Option) string { r := new(defaultReporter) - opts = Options{Options(opts), r} - eq := Equal(x, y, opts...) + eq := Equal(x, y, Options(opts), Reporter(r)) d := r.String() if (d == "") != eq { panic("inconsistent difference and equality results") @@ -108,9 +135,13 @@ func Diff(x, y interface{}, opts ...Option) string { type state struct { // These fields represent the "comparison state". // Calling statelessCompare must not result in observable changes to these. - result diff.Result // The current result of comparison - curPath Path // The current path in the value tree - reporter reporter // Optional reporter used for difference formatting + result diff.Result // The current result of comparison + curPath Path // The current path in the value tree + reporters []reporter // Optional reporters + + // recChecker checks for infinite cycles applying the same set of + // transformers upon the output of itself. + recChecker recChecker // dynChecker triggers pseudo-random checks for option correctness. // It is safe for statelessCompare to mutate this value. @@ -122,10 +153,9 @@ type state struct { } func newState(opts []Option) *state { - s := new(state) - for _, opt := range opts { - s.processOption(opt) - } + // Always ensure a validator option exists to validate the inputs. + s := &state{opts: Options{validator{}}} + s.processOption(Options(opts)) return s } @@ -152,10 +182,7 @@ func (s *state) processOption(opt Option) { s.exporters[t] = true } case reporter: - if s.reporter != nil { - panic("difference reporter already registered") - } - s.reporter = opt + s.reporters = append(s.reporters, opt) default: panic(fmt.Sprintf("unknown option %T", opt)) } @@ -164,153 +191,88 @@ func (s *state) processOption(opt Option) { // statelessCompare compares two values and returns the result. // This function is stateless in that it does not alter the current result, // or output to any registered reporters. -func (s *state) statelessCompare(vx, vy reflect.Value) diff.Result { +func (s *state) statelessCompare(step PathStep) diff.Result { // We do not save and restore the curPath because all of the compareX // methods should properly push and pop from the path. // It is an implementation bug if the contents of curPath differs from // when calling this function to when returning from it. - oldResult, oldReporter := s.result, s.reporter + oldResult, oldReporters := s.result, s.reporters s.result = diff.Result{} // Reset result - s.reporter = nil // Remove reporter to avoid spurious printouts - s.compareAny(vx, vy) + s.reporters = nil // Remove reporters to avoid spurious printouts + s.compareAny(step) res := s.result - s.result, s.reporter = oldResult, oldReporter + s.result, s.reporters = oldResult, oldReporters return res } -func (s *state) compareAny(vx, vy reflect.Value) { - // TODO: Support cyclic data structures. - - // Rule 0: Differing types are never equal. - if !vx.IsValid() || !vy.IsValid() { - s.report(vx.IsValid() == vy.IsValid(), vx, vy) - return - } - if vx.Type() != vy.Type() { - s.report(false, vx, vy) // Possible for path to be empty - return - } - t := vx.Type() - if len(s.curPath) == 0 { - s.curPath.push(&pathStep{typ: t}) - defer s.curPath.pop() +func (s *state) compareAny(step PathStep) { + // Update the path stack. + s.curPath.push(step) + defer s.curPath.pop() + for _, r := range s.reporters { + r.PushStep(step) + defer r.PopStep() } - vx, vy = s.tryExporting(vx, vy) + s.recChecker.Check(s.curPath) + + // Obtain the current type and values. + t := step.Type() + vx, vy := step.Values() // Rule 1: Check whether an option applies on this node in the value tree. - if s.tryOptions(vx, vy, t) { + if s.tryOptions(t, vx, vy) { return } // Rule 2: Check whether the type has a valid Equal method. - if s.tryMethod(vx, vy, t) { + if s.tryMethod(t, vx, vy) { return } - // Rule 3: Recursively descend into each value's underlying kind. + // Rule 3: Compare based on the underlying kind. switch t.Kind() { case reflect.Bool: - s.report(vx.Bool() == vy.Bool(), vx, vy) - return + s.report(vx.Bool() == vy.Bool(), 0) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - s.report(vx.Int() == vy.Int(), vx, vy) - return + s.report(vx.Int() == vy.Int(), 0) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - s.report(vx.Uint() == vy.Uint(), vx, vy) - return + s.report(vx.Uint() == vy.Uint(), 0) case reflect.Float32, reflect.Float64: - s.report(vx.Float() == vy.Float(), vx, vy) - return + s.report(vx.Float() == vy.Float(), 0) case reflect.Complex64, reflect.Complex128: - s.report(vx.Complex() == vy.Complex(), vx, vy) - return + s.report(vx.Complex() == vy.Complex(), 0) case reflect.String: - s.report(vx.String() == vy.String(), vx, vy) - return + s.report(vx.String() == vy.String(), 0) case reflect.Chan, reflect.UnsafePointer: - s.report(vx.Pointer() == vy.Pointer(), vx, vy) - return + s.report(vx.Pointer() == vy.Pointer(), 0) case reflect.Func: - s.report(vx.IsNil() && vy.IsNil(), vx, vy) - return + s.report(vx.IsNil() && vy.IsNil(), 0) + case reflect.Struct: + s.compareStruct(t, vx, vy) + case reflect.Slice, reflect.Array: + s.compareSlice(t, vx, vy) + case reflect.Map: + s.compareMap(t, vx, vy) case reflect.Ptr: - if vx.IsNil() || vy.IsNil() { - s.report(vx.IsNil() && vy.IsNil(), vx, vy) - return - } - s.curPath.push(&indirect{pathStep{t.Elem()}}) - defer s.curPath.pop() - s.compareAny(vx.Elem(), vy.Elem()) - return + s.comparePtr(t, vx, vy) case reflect.Interface: - if vx.IsNil() || vy.IsNil() { - s.report(vx.IsNil() && vy.IsNil(), vx, vy) - return - } - if vx.Elem().Type() != vy.Elem().Type() { - s.report(false, vx.Elem(), vy.Elem()) - return - } - s.curPath.push(&typeAssertion{pathStep{vx.Elem().Type()}}) - defer s.curPath.pop() - s.compareAny(vx.Elem(), vy.Elem()) - return - case reflect.Slice: - if vx.IsNil() || vy.IsNil() { - s.report(vx.IsNil() && vy.IsNil(), vx, vy) - return - } - fallthrough - case reflect.Array: - s.compareArray(vx, vy, t) - return - case reflect.Map: - s.compareMap(vx, vy, t) - return - case reflect.Struct: - s.compareStruct(vx, vy, t) - return + s.compareInterface(t, vx, vy) default: panic(fmt.Sprintf("%v kind not handled", t.Kind())) } } -func (s *state) tryExporting(vx, vy reflect.Value) (reflect.Value, reflect.Value) { - if sf, ok := s.curPath[len(s.curPath)-1].(*structField); ok && sf.unexported { - if sf.force { - // Use unsafe pointer arithmetic to get read-write access to an - // unexported field in the struct. - vx = unsafeRetrieveField(sf.pvx, sf.field) - vy = unsafeRetrieveField(sf.pvy, sf.field) - } else { - // We are not allowed to export the value, so invalidate them - // so that tryOptions can panic later if not explicitly ignored. - vx = nothing - vy = nothing - } - } - return vx, vy -} - -func (s *state) tryOptions(vx, vy reflect.Value, t reflect.Type) bool { - // If there were no FilterValues, we will not detect invalid inputs, - // so manually check for them and append invalid if necessary. - // We still evaluate the options since an ignore can override invalid. - opts := s.opts - if !vx.IsValid() || !vy.IsValid() { - opts = Options{opts, invalid{}} - } - +func (s *state) tryOptions(t reflect.Type, vx, vy reflect.Value) bool { // Evaluate all filters and apply the remaining options. - if opt := opts.filter(s, vx, vy, t); opt != nil { + if opt := s.opts.filter(s, t, vx, vy); opt != nil { opt.apply(s, vx, vy) return true } return false } -func (s *state) tryMethod(vx, vy reflect.Value, t reflect.Type) bool { +func (s *state) tryMethod(t reflect.Type, vx, vy reflect.Value) bool { // Check if this type even has an Equal method. m, ok := t.MethodByName("Equal") if !ok || !function.IsType(m.Type, function.EqualAssignable) { @@ -318,11 +280,11 @@ func (s *state) tryMethod(vx, vy reflect.Value, t reflect.Type) bool { } eq := s.callTTBFunc(m.Func, vx, vy) - s.report(eq, vx, vy) + s.report(eq, reportByMethod) return true } -func (s *state) callTRFunc(f, v reflect.Value) reflect.Value { +func (s *state) callTRFunc(f, v reflect.Value, step Transform) reflect.Value { v = sanitizeValue(v, f.Type().In(0)) if !s.dynChecker.Next() { return f.Call([]reflect.Value{v})[0] @@ -333,15 +295,15 @@ func (s *state) callTRFunc(f, v reflect.Value) reflect.Value { // unsafe mutations to the input. c := make(chan reflect.Value) go detectRaces(c, f, v) + got := <-c want := f.Call([]reflect.Value{v})[0] - if got := <-c; !s.statelessCompare(got, want).Equal() { + if step.vx, step.vy = got, want; !s.statelessCompare(step).Equal() { // To avoid false-positives with non-reflexive equality operations, // we sanity check whether a value is equal to itself. - if !s.statelessCompare(want, want).Equal() { + if step.vx, step.vy = want, want; !s.statelessCompare(step).Equal() { return want } - fn := getFuncName(f.Pointer()) - panic(fmt.Sprintf("non-deterministic function detected: %s", fn)) + panic(fmt.Sprintf("non-deterministic function detected: %s", function.NameOf(f))) } return want } @@ -359,10 +321,10 @@ func (s *state) callTTBFunc(f, x, y reflect.Value) bool { // unsafe mutations to the input. c := make(chan reflect.Value) go detectRaces(c, f, y, x) + got := <-c want := f.Call([]reflect.Value{x, y})[0].Bool() - if got := <-c; !got.IsValid() || got.Bool() != want { - fn := getFuncName(f.Pointer()) - panic(fmt.Sprintf("non-deterministic or non-symmetric function detected: %s", fn)) + if !got.IsValid() || got.Bool() != want { + panic(fmt.Sprintf("non-deterministic or non-symmetric function detected: %s", function.NameOf(f))) } return want } @@ -380,140 +342,241 @@ func detectRaces(c chan<- reflect.Value, f reflect.Value, vs ...reflect.Value) { // assuming that T is assignable to R. // Otherwise, it returns the input value as is. func sanitizeValue(v reflect.Value, t reflect.Type) reflect.Value { - // TODO(dsnet): Remove this hacky workaround. - // See https://golang.org/issue/22143 - if v.Kind() == reflect.Interface && v.IsNil() && v.Type() != t { - return reflect.New(t).Elem() + // TODO(dsnet): Workaround for reflect bug (https://golang.org/issue/22143). + if !flags.AtLeastGo110 { + if v.Kind() == reflect.Interface && v.IsNil() && v.Type() != t { + return reflect.New(t).Elem() + } } return v } -func (s *state) compareArray(vx, vy reflect.Value, t reflect.Type) { - step := &sliceIndex{pathStep{t.Elem()}, 0, 0} - s.curPath.push(step) +func (s *state) compareStruct(t reflect.Type, vx, vy reflect.Value) { + var vax, vay reflect.Value // Addressable versions of vx and vy - // Compute an edit-script for slices vx and vy. - es := diff.Difference(vx.Len(), vy.Len(), func(ix, iy int) diff.Result { - step.xkey, step.ykey = ix, iy - return s.statelessCompare(vx.Index(ix), vy.Index(iy)) - }) + step := StructField{&structField{}} + for i := 0; i < t.NumField(); i++ { + step.typ = t.Field(i).Type + step.vx = vx.Field(i) + step.vy = vy.Field(i) + step.name = t.Field(i).Name + step.idx = i + step.unexported = !isExported(step.name) + if step.unexported { + if step.name == "_" { + continue + } + // Defer checking of unexported fields until later to give an + // Ignore a chance to ignore the field. + if !vax.IsValid() || !vay.IsValid() { + // For retrieveUnexportedField to work, the parent struct must + // be addressable. Create a new copy of the values if + // necessary to make them addressable. + vax = makeAddressable(vx) + vay = makeAddressable(vy) + } + step.mayForce = s.exporters[t] + step.pvx = vax + step.pvy = vay + step.field = t.Field(i) + } + s.compareAny(step) + } +} - // Report the entire slice as is if the arrays are of primitive kind, - // and the arrays are different enough. - isPrimitive := false - switch t.Elem().Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, - reflect.Bool, reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128: - isPrimitive = true - } - if isPrimitive && es.Dist() > (vx.Len()+vy.Len())/4 { - s.curPath.pop() // Pop first since we are reporting the whole slice - s.report(false, vx, vy) +func (s *state) compareSlice(t reflect.Type, vx, vy reflect.Value) { + isSlice := t.Kind() == reflect.Slice + if isSlice && (vx.IsNil() || vy.IsNil()) { + s.report(vx.IsNil() && vy.IsNil(), 0) return } - // Replay the edit-script. + // TODO: Support cyclic data structures. + + step := SliceIndex{&sliceIndex{pathStep: pathStep{typ: t.Elem()}}} + withIndexes := func(ix, iy int) SliceIndex { + if ix >= 0 { + step.vx, step.xkey = vx.Index(ix), ix + } else { + step.vx, step.xkey = reflect.Value{}, -1 + } + if iy >= 0 { + step.vy, step.ykey = vy.Index(iy), iy + } else { + step.vy, step.ykey = reflect.Value{}, -1 + } + return step + } + + // Ignore options are able to ignore missing elements in a slice. + // However, detecting these reliably requires an optimal differencing + // algorithm, for which diff.Difference is not. + // + // Instead, we first iterate through both slices to detect which elements + // would be ignored if standing alone. The index of non-discarded elements + // are stored in a separate slice, which diffing is then performed on. + var indexesX, indexesY []int + var ignoredX, ignoredY []bool + for ix := 0; ix < vx.Len(); ix++ { + ignored := s.statelessCompare(withIndexes(ix, -1)).NumDiff == 0 + if !ignored { + indexesX = append(indexesX, ix) + } + ignoredX = append(ignoredX, ignored) + } + for iy := 0; iy < vy.Len(); iy++ { + ignored := s.statelessCompare(withIndexes(-1, iy)).NumDiff == 0 + if !ignored { + indexesY = append(indexesY, iy) + } + ignoredY = append(ignoredY, ignored) + } + + // Compute an edit-script for slices vx and vy (excluding ignored elements). + edits := diff.Difference(len(indexesX), len(indexesY), func(ix, iy int) diff.Result { + return s.statelessCompare(withIndexes(indexesX[ix], indexesY[iy])) + }) + + // Replay the ignore-scripts and the edit-script. var ix, iy int - for _, e := range es { + for ix < vx.Len() || iy < vy.Len() { + var e diff.EditType + switch { + case ix < len(ignoredX) && ignoredX[ix]: + e = diff.UniqueX + case iy < len(ignoredY) && ignoredY[iy]: + e = diff.UniqueY + default: + e, edits = edits[0], edits[1:] + } switch e { case diff.UniqueX: - step.xkey, step.ykey = ix, -1 - s.report(false, vx.Index(ix), nothing) + s.compareAny(withIndexes(ix, -1)) ix++ case diff.UniqueY: - step.xkey, step.ykey = -1, iy - s.report(false, nothing, vy.Index(iy)) + s.compareAny(withIndexes(-1, iy)) iy++ default: - step.xkey, step.ykey = ix, iy - if e == diff.Identity { - s.report(true, vx.Index(ix), vy.Index(iy)) - } else { - s.compareAny(vx.Index(ix), vy.Index(iy)) - } + s.compareAny(withIndexes(ix, iy)) ix++ iy++ } } - s.curPath.pop() - return } -func (s *state) compareMap(vx, vy reflect.Value, t reflect.Type) { +func (s *state) compareMap(t reflect.Type, vx, vy reflect.Value) { if vx.IsNil() || vy.IsNil() { - s.report(vx.IsNil() && vy.IsNil(), vx, vy) + s.report(vx.IsNil() && vy.IsNil(), 0) return } + // TODO: Support cyclic data structures. + // We combine and sort the two map keys so that we can perform the // comparisons in a deterministic order. - step := &mapIndex{pathStep: pathStep{t.Elem()}} - s.curPath.push(step) - defer s.curPath.pop() + step := MapIndex{&mapIndex{pathStep: pathStep{typ: t.Elem()}}} for _, k := range value.SortKeys(append(vx.MapKeys(), vy.MapKeys()...)) { + step.vx = vx.MapIndex(k) + step.vy = vy.MapIndex(k) step.key = k - vvx := vx.MapIndex(k) - vvy := vy.MapIndex(k) - switch { - case vvx.IsValid() && vvy.IsValid(): - s.compareAny(vvx, vvy) - case vvx.IsValid() && !vvy.IsValid(): - s.report(false, vvx, nothing) - case !vvx.IsValid() && vvy.IsValid(): - s.report(false, nothing, vvy) - default: - // It is possible for both vvx and vvy to be invalid if the - // key contained a NaN value in it. There is no way in - // reflection to be able to retrieve these values. - // See https://golang.org/issue/11104 - panic(fmt.Sprintf("%#v has map key with NaNs", s.curPath)) + if !step.vx.IsValid() && !step.vy.IsValid() { + // It is possible for both vx and vy to be invalid if the + // key contained a NaN value in it. + // + // Even with the ability to retrieve NaN keys in Go 1.12, + // there still isn't a sensible way to compare the values since + // a NaN key may map to multiple unordered values. + // The most reasonable way to compare NaNs would be to compare the + // set of values. However, this is impossible to do efficiently + // since set equality is provably an O(n^2) operation given only + // an Equal function. If we had a Less function or Hash function, + // this could be done in O(n*log(n)) or O(n), respectively. + // + // Rather than adding complex logic to deal with NaNs, make it + // the user's responsibility to compare such obscure maps. + const help = "consider providing a Comparer to compare the map" + panic(fmt.Sprintf("%#v has map key with NaNs\n%s", s.curPath, help)) } + s.compareAny(step) } } -func (s *state) compareStruct(vx, vy reflect.Value, t reflect.Type) { - var vax, vay reflect.Value // Addressable versions of vx and vy +func (s *state) comparePtr(t reflect.Type, vx, vy reflect.Value) { + if vx.IsNil() || vy.IsNil() { + s.report(vx.IsNil() && vy.IsNil(), 0) + return + } - step := &structField{} - s.curPath.push(step) - defer s.curPath.pop() - for i := 0; i < t.NumField(); i++ { - vvx := vx.Field(i) - vvy := vy.Field(i) - step.typ = t.Field(i).Type - step.name = t.Field(i).Name - step.idx = i - step.unexported = !isExported(step.name) - if step.unexported { - // Defer checking of unexported fields until later to give an - // Ignore a chance to ignore the field. - if !vax.IsValid() || !vay.IsValid() { - // For unsafeRetrieveField to work, the parent struct must - // be addressable. Create a new copy of the values if - // necessary to make them addressable. - vax = makeAddressable(vx) - vay = makeAddressable(vy) - } - step.force = s.exporters[t] - step.pvx = vax - step.pvy = vay - step.field = t.Field(i) + // TODO: Support cyclic data structures. + + vx, vy = vx.Elem(), vy.Elem() + s.compareAny(Indirect{&indirect{pathStep{t.Elem(), vx, vy}}}) +} + +func (s *state) compareInterface(t reflect.Type, vx, vy reflect.Value) { + if vx.IsNil() || vy.IsNil() { + s.report(vx.IsNil() && vy.IsNil(), 0) + return + } + vx, vy = vx.Elem(), vy.Elem() + if vx.Type() != vy.Type() { + s.report(false, 0) + return + } + s.compareAny(TypeAssertion{&typeAssertion{pathStep{vx.Type(), vx, vy}}}) +} + +func (s *state) report(eq bool, rf resultFlags) { + if rf&reportByIgnore == 0 { + if eq { + s.result.NumSame++ + rf |= reportEqual + } else { + s.result.NumDiff++ + rf |= reportUnequal } - s.compareAny(vvx, vvy) + } + for _, r := range s.reporters { + r.Report(Result{flags: rf}) } } -// report records the result of a single comparison. -// It also calls Report if any reporter is registered. -func (s *state) report(eq bool, vx, vy reflect.Value) { - if eq { - s.result.NSame++ - } else { - s.result.NDiff++ +// recChecker tracks the state needed to periodically perform checks that +// user provided transformers are not stuck in an infinitely recursive cycle. +type recChecker struct{ next int } + +// Check scans the Path for any recursive transformers and panics when any +// recursive transformers are detected. Note that the presence of a +// recursive Transformer does not necessarily imply an infinite cycle. +// As such, this check only activates after some minimal number of path steps. +func (rc *recChecker) Check(p Path) { + const minLen = 1 << 16 + if rc.next == 0 { + rc.next = minLen + } + if len(p) < rc.next { + return + } + rc.next <<= 1 + + // Check whether the same transformer has appeared at least twice. + var ss []string + m := map[Option]int{} + for _, ps := range p { + if t, ok := ps.(Transform); ok { + t := t.Option() + if m[t] == 1 { // Transformer was used exactly once before + tf := t.(*transformer).fnc.Type() + ss = append(ss, fmt.Sprintf("%v: %v => %v", t, tf.In(0), tf.Out(0))) + } + m[t]++ + } } - if s.reporter != nil { - s.reporter.Report(vx, vy, eq, s.curPath) + if len(ss) > 0 { + const warning = "recursive set of Transformers detected" + const help = "consider using cmpopts.AcyclicTransformer" + set := strings.Join(ss, "\n\t") + panic(fmt.Sprintf("%s:\n\t%s\n%s", warning, set, help)) } } diff --git a/vendor/github.com/google/go-cmp/cmp/export_panic.go b/vendor/github.com/google/go-cmp/cmp/export_panic.go new file mode 100644 index 00000000..abc3a1c3 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/export_panic.go @@ -0,0 +1,15 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +// +build purego + +package cmp + +import "reflect" + +const supportAllowUnexported = false + +func retrieveUnexportedField(reflect.Value, reflect.StructField) reflect.Value { + panic("retrieveUnexportedField is not implemented") +} diff --git a/vendor/github.com/google/go-cmp/cmp/export_unsafe.go b/vendor/github.com/google/go-cmp/cmp/export_unsafe.go new file mode 100644 index 00000000..59d4ee91 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/export_unsafe.go @@ -0,0 +1,23 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +// +build !purego + +package cmp + +import ( + "reflect" + "unsafe" +) + +const supportAllowUnexported = true + +// retrieveUnexportedField uses unsafe to forcibly retrieve any field from +// a struct such that the value has read-write permissions. +// +// The parent struct, v, must be addressable, while f must be a StructField +// describing the field to retrieve. +func retrieveUnexportedField(v reflect.Value, f reflect.StructField) reflect.Value { + return reflect.NewAt(f.Type, unsafe.Pointer(v.UnsafeAddr()+f.Offset)).Elem() +} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go b/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go index 42afa496..fe98dcc6 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE.md file. -// +build !debug +// +build !cmp_debug package diff diff --git a/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go b/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go index fd9f7f17..597b6ae5 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE.md file. -// +build debug +// +build cmp_debug package diff @@ -14,7 +14,7 @@ import ( ) // The algorithm can be seen running in real-time by enabling debugging: -// go test -tags=debug -v +// go test -tags=cmp_debug -v // // Example output: // === RUN TestDifference/#34 diff --git a/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go b/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go index 260befea..3d2e4266 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go @@ -85,22 +85,31 @@ func (es EditScript) LenY() int { return len(es) - es.stats().NX } type EqualFunc func(ix int, iy int) Result // Result is the result of comparison. -// NSame is the number of sub-elements that are equal. -// NDiff is the number of sub-elements that are not equal. -type Result struct{ NSame, NDiff int } +// NumSame is the number of sub-elements that are equal. +// NumDiff is the number of sub-elements that are not equal. +type Result struct{ NumSame, NumDiff int } + +// BoolResult returns a Result that is either Equal or not Equal. +func BoolResult(b bool) Result { + if b { + return Result{NumSame: 1} // Equal, Similar + } else { + return Result{NumDiff: 2} // Not Equal, not Similar + } +} // Equal indicates whether the symbols are equal. Two symbols are equal -// if and only if NDiff == 0. If Equal, then they are also Similar. -func (r Result) Equal() bool { return r.NDiff == 0 } +// if and only if NumDiff == 0. If Equal, then they are also Similar. +func (r Result) Equal() bool { return r.NumDiff == 0 } // Similar indicates whether two symbols are similar and may be represented // by using the Modified type. As a special case, we consider binary comparisons // (i.e., those that return Result{1, 0} or Result{0, 1}) to be similar. // -// The exact ratio of NSame to NDiff to determine similarity may change. +// The exact ratio of NumSame to NumDiff to determine similarity may change. func (r Result) Similar() bool { - // Use NSame+1 to offset NSame so that binary comparisons are similar. - return r.NSame+1 >= r.NDiff + // Use NumSame+1 to offset NumSame so that binary comparisons are similar. + return r.NumSame+1 >= r.NumDiff } // Difference reports whether two lists of lengths nx and ny are equal @@ -191,9 +200,9 @@ func Difference(nx, ny int, f EqualFunc) (es EditScript) { // that two lists commonly differ because elements were added to the front // or end of the other list. // - // Running the tests with the "debug" build tag prints a visualization of - // the algorithm running in real-time. This is educational for understanding - // how the algorithm works. See debug_enable.go. + // Running the tests with the "cmp_debug" build tag prints a visualization + // of the algorithm running in real-time. This is educational for + // understanding how the algorithm works. See debug_enable.go. f = debug.Begin(nx, ny, f, &fwdPath.es, &revPath.es) for { // Forward search from the beginning. diff --git a/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go b/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go new file mode 100644 index 00000000..a9e7fc0b --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go @@ -0,0 +1,9 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +package flags + +// Deterministic controls whether the output of Diff should be deterministic. +// This is only used for testing. +var Deterministic bool diff --git a/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go b/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go new file mode 100644 index 00000000..01aed0a1 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go @@ -0,0 +1,10 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +// +build !go1.10 + +package flags + +// AtLeastGo110 reports whether the Go toolchain is at least Go 1.10. +const AtLeastGo110 = false diff --git a/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go b/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go new file mode 100644 index 00000000..c0b667f5 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go @@ -0,0 +1,10 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +// +build go1.10 + +package flags + +// AtLeastGo110 reports whether the Go toolchain is at least Go 1.10. +const AtLeastGo110 = true diff --git a/vendor/github.com/google/go-cmp/cmp/internal/function/func.go b/vendor/github.com/google/go-cmp/cmp/internal/function/func.go index 4c35ff11..ace1dbe8 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/function/func.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/function/func.go @@ -2,25 +2,34 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE.md file. -// Package function identifies function types. +// Package function provides functionality for identifying function types. package function -import "reflect" +import ( + "reflect" + "regexp" + "runtime" + "strings" +) type funcType int const ( _ funcType = iota + tbFunc // func(T) bool ttbFunc // func(T, T) bool + trbFunc // func(T, R) bool tibFunc // func(T, I) bool trFunc // func(T) R - Equal = ttbFunc // func(T, T) bool - EqualAssignable = tibFunc // func(T, I) bool; encapsulates func(T, T) bool - Transformer = trFunc // func(T) R - ValueFilter = ttbFunc // func(T, T) bool - Less = ttbFunc // func(T, T) bool + Equal = ttbFunc // func(T, T) bool + EqualAssignable = tibFunc // func(T, I) bool; encapsulates func(T, T) bool + Transformer = trFunc // func(T) R + ValueFilter = ttbFunc // func(T, T) bool + Less = ttbFunc // func(T, T) bool + ValuePredicate = tbFunc // func(T) bool + KeyValuePredicate = trbFunc // func(T, R) bool ) var boolType = reflect.TypeOf(true) @@ -32,10 +41,18 @@ func IsType(t reflect.Type, ft funcType) bool { } ni, no := t.NumIn(), t.NumOut() switch ft { + case tbFunc: // func(T) bool + if ni == 1 && no == 1 && t.Out(0) == boolType { + return true + } case ttbFunc: // func(T, T) bool if ni == 2 && no == 1 && t.In(0) == t.In(1) && t.Out(0) == boolType { return true } + case trbFunc: // func(T, R) bool + if ni == 2 && no == 1 && t.Out(0) == boolType { + return true + } case tibFunc: // func(T, I) bool if ni == 2 && no == 1 && t.In(0).AssignableTo(t.In(1)) && t.Out(0) == boolType { return true @@ -47,3 +64,36 @@ func IsType(t reflect.Type, ft funcType) bool { } return false } + +var lastIdentRx = regexp.MustCompile(`[_\p{L}][_\p{L}\p{N}]*$`) + +// NameOf returns the name of the function value. +func NameOf(v reflect.Value) string { + fnc := runtime.FuncForPC(v.Pointer()) + if fnc == nil { + return "" + } + fullName := fnc.Name() // e.g., "long/path/name/mypkg.(*MyType).(long/path/name/mypkg.myMethod)-fm" + + // Method closures have a "-fm" suffix. + fullName = strings.TrimSuffix(fullName, "-fm") + + var name string + for len(fullName) > 0 { + inParen := strings.HasSuffix(fullName, ")") + fullName = strings.TrimSuffix(fullName, ")") + + s := lastIdentRx.FindString(fullName) + if s == "" { + break + } + name = s + "." + name + fullName = strings.TrimSuffix(fullName, s) + + if i := strings.LastIndexByte(fullName, '('); inParen && i >= 0 { + fullName = fullName[:i] + } + fullName = strings.TrimSuffix(fullName, ".") + } + return strings.TrimSuffix(name, ".") +} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/format.go b/vendor/github.com/google/go-cmp/cmp/internal/value/format.go deleted file mode 100644 index 657e5087..00000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/format.go +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright 2017, The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. - -// Package value provides functionality for reflect.Value types. -package value - -import ( - "fmt" - "reflect" - "strconv" - "strings" - "unicode" -) - -var stringerIface = reflect.TypeOf((*fmt.Stringer)(nil)).Elem() - -// Format formats the value v as a string. -// -// This is similar to fmt.Sprintf("%+v", v) except this: -// * Prints the type unless it can be elided -// * Avoids printing struct fields that are zero -// * Prints a nil-slice as being nil, not empty -// * Prints map entries in deterministic order -func Format(v reflect.Value, conf FormatConfig) string { - conf.printType = true - conf.followPointers = true - conf.realPointers = true - return formatAny(v, conf, nil) -} - -type FormatConfig struct { - UseStringer bool // Should the String method be used if available? - printType bool // Should we print the type before the value? - PrintPrimitiveType bool // Should we print the type of primitives? - followPointers bool // Should we recursively follow pointers? - realPointers bool // Should we print the real address of pointers? -} - -func formatAny(v reflect.Value, conf FormatConfig, visited map[uintptr]bool) string { - // TODO: Should this be a multi-line printout in certain situations? - - if !v.IsValid() { - return "" - } - if conf.UseStringer && v.Type().Implements(stringerIface) && v.CanInterface() { - if (v.Kind() == reflect.Ptr || v.Kind() == reflect.Interface) && v.IsNil() { - return "" - } - - const stringerPrefix = "s" // Indicates that the String method was used - s := v.Interface().(fmt.Stringer).String() - return stringerPrefix + formatString(s) - } - - switch v.Kind() { - case reflect.Bool: - return formatPrimitive(v.Type(), v.Bool(), conf) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return formatPrimitive(v.Type(), v.Int(), conf) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - if v.Type().PkgPath() == "" || v.Kind() == reflect.Uintptr { - // Unnamed uints are usually bytes or words, so use hexadecimal. - return formatPrimitive(v.Type(), formatHex(v.Uint()), conf) - } - return formatPrimitive(v.Type(), v.Uint(), conf) - case reflect.Float32, reflect.Float64: - return formatPrimitive(v.Type(), v.Float(), conf) - case reflect.Complex64, reflect.Complex128: - return formatPrimitive(v.Type(), v.Complex(), conf) - case reflect.String: - return formatPrimitive(v.Type(), formatString(v.String()), conf) - case reflect.UnsafePointer, reflect.Chan, reflect.Func: - return formatPointer(v, conf) - case reflect.Ptr: - if v.IsNil() { - if conf.printType { - return fmt.Sprintf("(%v)(nil)", v.Type()) - } - return "" - } - if visited[v.Pointer()] || !conf.followPointers { - return formatPointer(v, conf) - } - visited = insertPointer(visited, v.Pointer()) - return "&" + formatAny(v.Elem(), conf, visited) - case reflect.Interface: - if v.IsNil() { - if conf.printType { - return fmt.Sprintf("%v(nil)", v.Type()) - } - return "" - } - return formatAny(v.Elem(), conf, visited) - case reflect.Slice: - if v.IsNil() { - if conf.printType { - return fmt.Sprintf("%v(nil)", v.Type()) - } - return "" - } - if visited[v.Pointer()] { - return formatPointer(v, conf) - } - visited = insertPointer(visited, v.Pointer()) - fallthrough - case reflect.Array: - var ss []string - subConf := conf - subConf.printType = v.Type().Elem().Kind() == reflect.Interface - for i := 0; i < v.Len(); i++ { - s := formatAny(v.Index(i), subConf, visited) - ss = append(ss, s) - } - s := fmt.Sprintf("{%s}", strings.Join(ss, ", ")) - if conf.printType { - return v.Type().String() + s - } - return s - case reflect.Map: - if v.IsNil() { - if conf.printType { - return fmt.Sprintf("%v(nil)", v.Type()) - } - return "" - } - if visited[v.Pointer()] { - return formatPointer(v, conf) - } - visited = insertPointer(visited, v.Pointer()) - - var ss []string - keyConf, valConf := conf, conf - keyConf.printType = v.Type().Key().Kind() == reflect.Interface - keyConf.followPointers = false - valConf.printType = v.Type().Elem().Kind() == reflect.Interface - for _, k := range SortKeys(v.MapKeys()) { - sk := formatAny(k, keyConf, visited) - sv := formatAny(v.MapIndex(k), valConf, visited) - ss = append(ss, fmt.Sprintf("%s: %s", sk, sv)) - } - s := fmt.Sprintf("{%s}", strings.Join(ss, ", ")) - if conf.printType { - return v.Type().String() + s - } - return s - case reflect.Struct: - var ss []string - subConf := conf - subConf.printType = true - for i := 0; i < v.NumField(); i++ { - vv := v.Field(i) - if isZero(vv) { - continue // Elide zero value fields - } - name := v.Type().Field(i).Name - subConf.UseStringer = conf.UseStringer - s := formatAny(vv, subConf, visited) - ss = append(ss, fmt.Sprintf("%s: %s", name, s)) - } - s := fmt.Sprintf("{%s}", strings.Join(ss, ", ")) - if conf.printType { - return v.Type().String() + s - } - return s - default: - panic(fmt.Sprintf("%v kind not handled", v.Kind())) - } -} - -func formatString(s string) string { - // Use quoted string if it the same length as a raw string literal. - // Otherwise, attempt to use the raw string form. - qs := strconv.Quote(s) - if len(qs) == 1+len(s)+1 { - return qs - } - - // Disallow newlines to ensure output is a single line. - // Only allow printable runes for readability purposes. - rawInvalid := func(r rune) bool { - return r == '`' || r == '\n' || !unicode.IsPrint(r) - } - if strings.IndexFunc(s, rawInvalid) < 0 { - return "`" + s + "`" - } - return qs -} - -func formatPrimitive(t reflect.Type, v interface{}, conf FormatConfig) string { - if conf.printType && (conf.PrintPrimitiveType || t.PkgPath() != "") { - return fmt.Sprintf("%v(%v)", t, v) - } - return fmt.Sprintf("%v", v) -} - -func formatPointer(v reflect.Value, conf FormatConfig) string { - p := v.Pointer() - if !conf.realPointers { - p = 0 // For deterministic printing purposes - } - s := formatHex(uint64(p)) - if conf.printType { - return fmt.Sprintf("(%v)(%s)", v.Type(), s) - } - return s -} - -func formatHex(u uint64) string { - var f string - switch { - case u <= 0xff: - f = "0x%02x" - case u <= 0xffff: - f = "0x%04x" - case u <= 0xffffff: - f = "0x%06x" - case u <= 0xffffffff: - f = "0x%08x" - case u <= 0xffffffffff: - f = "0x%010x" - case u <= 0xffffffffffff: - f = "0x%012x" - case u <= 0xffffffffffffff: - f = "0x%014x" - case u <= 0xffffffffffffffff: - f = "0x%016x" - } - return fmt.Sprintf(f, u) -} - -// insertPointer insert p into m, allocating m if necessary. -func insertPointer(m map[uintptr]bool, p uintptr) map[uintptr]bool { - if m == nil { - m = make(map[uintptr]bool) - } - m[p] = true - return m -} - -// isZero reports whether v is the zero value. -// This does not rely on Interface and so can be used on unexported fields. -func isZero(v reflect.Value) bool { - switch v.Kind() { - case reflect.Bool: - return v.Bool() == false - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Complex64, reflect.Complex128: - return v.Complex() == 0 - case reflect.String: - return v.String() == "" - case reflect.UnsafePointer: - return v.Pointer() == 0 - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice: - return v.IsNil() - case reflect.Array: - for i := 0; i < v.Len(); i++ { - if !isZero(v.Index(i)) { - return false - } - } - return true - case reflect.Struct: - for i := 0; i < v.NumField(); i++ { - if !isZero(v.Field(i)) { - return false - } - } - return true - } - return false -} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go new file mode 100644 index 00000000..0a01c479 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go @@ -0,0 +1,23 @@ +// Copyright 2018, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +// +build purego + +package value + +import "reflect" + +// Pointer is an opaque typed pointer and is guaranteed to be comparable. +type Pointer struct { + p uintptr + t reflect.Type +} + +// PointerOf returns a Pointer from v, which must be a +// reflect.Ptr, reflect.Slice, or reflect.Map. +func PointerOf(v reflect.Value) Pointer { + // NOTE: Storing a pointer as an uintptr is technically incorrect as it + // assumes that the GC implementation does not use a moving collector. + return Pointer{v.Pointer(), v.Type()} +} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go new file mode 100644 index 00000000..da134ae2 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go @@ -0,0 +1,26 @@ +// Copyright 2018, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +// +build !purego + +package value + +import ( + "reflect" + "unsafe" +) + +// Pointer is an opaque typed pointer and is guaranteed to be comparable. +type Pointer struct { + p unsafe.Pointer + t reflect.Type +} + +// PointerOf returns a Pointer from v, which must be a +// reflect.Ptr, reflect.Slice, or reflect.Map. +func PointerOf(v reflect.Value) Pointer { + // The proper representation of a pointer is unsafe.Pointer, + // which is necessary if the GC ever uses a moving collector. + return Pointer{unsafe.Pointer(v.Pointer()), v.Type()} +} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go b/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go index fe8aa27a..24fbae6e 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go @@ -19,7 +19,7 @@ func SortKeys(vs []reflect.Value) []reflect.Value { } // Sort the map keys. - sort.Sort(valueSorter(vs)) + sort.SliceStable(vs, func(i, j int) bool { return isLess(vs[i], vs[j]) }) // Deduplicate keys (fails for NaNs). vs2 := vs[:1] @@ -31,13 +31,6 @@ func SortKeys(vs []reflect.Value) []reflect.Value { return vs2 } -// TODO: Use sort.Slice once Google AppEngine is on Go1.8 or above. -type valueSorter []reflect.Value - -func (vs valueSorter) Len() int { return len(vs) } -func (vs valueSorter) Less(i, j int) bool { return isLess(vs[i], vs[j]) } -func (vs valueSorter) Swap(i, j int) { vs[i], vs[j] = vs[j], vs[i] } - // isLess is a generic function for sorting arbitrary map keys. // The inputs must be of the same type and must be comparable. func isLess(x, y reflect.Value) bool { @@ -49,6 +42,8 @@ func isLess(x, y reflect.Value) bool { case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: return x.Uint() < y.Uint() case reflect.Float32, reflect.Float64: + // NOTE: This does not sort -0 as less than +0 + // since Go maps treat -0 and +0 as equal keys. fx, fy := x.Float(), y.Float() return fx < fy || math.IsNaN(fx) && !math.IsNaN(fy) case reflect.Complex64, reflect.Complex128: diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/zero.go b/vendor/github.com/google/go-cmp/cmp/internal/value/zero.go new file mode 100644 index 00000000..06a8ffd0 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/zero.go @@ -0,0 +1,48 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +package value + +import ( + "math" + "reflect" +) + +// IsZero reports whether v is the zero value. +// This does not rely on Interface and so can be used on unexported fields. +func IsZero(v reflect.Value) bool { + switch v.Kind() { + case reflect.Bool: + return v.Bool() == false + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return math.Float64bits(v.Float()) == 0 + case reflect.Complex64, reflect.Complex128: + return math.Float64bits(real(v.Complex())) == 0 && math.Float64bits(imag(v.Complex())) == 0 + case reflect.String: + return v.String() == "" + case reflect.UnsafePointer: + return v.Pointer() == 0 + case reflect.Chan, reflect.Func, reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice: + return v.IsNil() + case reflect.Array: + for i := 0; i < v.Len(); i++ { + if !IsZero(v.Index(i)) { + return false + } + } + return true + case reflect.Struct: + for i := 0; i < v.NumField(); i++ { + if !IsZero(v.Field(i)) { + return false + } + } + return true + } + return false +} diff --git a/vendor/github.com/google/go-cmp/cmp/options.go b/vendor/github.com/google/go-cmp/cmp/options.go index 91d4b066..79344816 100644 --- a/vendor/github.com/google/go-cmp/cmp/options.go +++ b/vendor/github.com/google/go-cmp/cmp/options.go @@ -7,7 +7,7 @@ package cmp import ( "fmt" "reflect" - "runtime" + "regexp" "strings" "github.com/google/go-cmp/cmp/internal/function" @@ -29,11 +29,11 @@ type Option interface { // An Options is returned only if multiple comparers or transformers // can apply simultaneously and will only contain values of those types // or sub-Options containing values of those types. - filter(s *state, vx, vy reflect.Value, t reflect.Type) applicableOption + filter(s *state, t reflect.Type, vx, vy reflect.Value) applicableOption } // applicableOption represents the following types: -// Fundamental: ignore | invalid | *comparer | *transformer +// Fundamental: ignore | validator | *comparer | *transformer // Grouping: Options type applicableOption interface { Option @@ -43,7 +43,7 @@ type applicableOption interface { } // coreOption represents the following types: -// Fundamental: ignore | invalid | *comparer | *transformer +// Fundamental: ignore | validator | *comparer | *transformer // Filters: *pathFilter | *valuesFilter type coreOption interface { Option @@ -63,19 +63,19 @@ func (core) isCore() {} // on all individual options held within. type Options []Option -func (opts Options) filter(s *state, vx, vy reflect.Value, t reflect.Type) (out applicableOption) { +func (opts Options) filter(s *state, t reflect.Type, vx, vy reflect.Value) (out applicableOption) { for _, opt := range opts { - switch opt := opt.filter(s, vx, vy, t); opt.(type) { + switch opt := opt.filter(s, t, vx, vy); opt.(type) { case ignore: return ignore{} // Only ignore can short-circuit evaluation - case invalid: - out = invalid{} // Takes precedence over comparer or transformer + case validator: + out = validator{} // Takes precedence over comparer or transformer case *comparer, *transformer, Options: switch out.(type) { case nil: out = opt - case invalid: - // Keep invalid + case validator: + // Keep validator case *comparer, *transformer, Options: out = Options{out, opt} // Conflicting comparers or transformers } @@ -106,6 +106,11 @@ func (opts Options) String() string { // FilterPath returns a new Option where opt is only evaluated if filter f // returns true for the current Path in the value tree. // +// This filter is called even if a slice element or map entry is missing and +// provides an opportunity to ignore such cases. The filter function must be +// symmetric such that the filter result is identical regardless of whether the +// missing value is from x or y. +// // The option passed in may be an Ignore, Transformer, Comparer, Options, or // a previously filtered Option. func FilterPath(f func(Path) bool, opt Option) Option { @@ -124,22 +129,22 @@ type pathFilter struct { opt Option } -func (f pathFilter) filter(s *state, vx, vy reflect.Value, t reflect.Type) applicableOption { +func (f pathFilter) filter(s *state, t reflect.Type, vx, vy reflect.Value) applicableOption { if f.fnc(s.curPath) { - return f.opt.filter(s, vx, vy, t) + return f.opt.filter(s, t, vx, vy) } return nil } func (f pathFilter) String() string { - fn := getFuncName(reflect.ValueOf(f.fnc).Pointer()) - return fmt.Sprintf("FilterPath(%s, %v)", fn, f.opt) + return fmt.Sprintf("FilterPath(%s, %v)", function.NameOf(reflect.ValueOf(f.fnc)), f.opt) } // FilterValues returns a new Option where opt is only evaluated if filter f, // which is a function of the form "func(T, T) bool", returns true for the -// current pair of values being compared. If the type of the values is not -// assignable to T, then this filter implicitly returns false. +// current pair of values being compared. If either value is invalid or +// the type of the values is not assignable to T, then this filter implicitly +// returns false. // // The filter function must be // symmetric (i.e., agnostic to the order of the inputs) and @@ -171,19 +176,18 @@ type valuesFilter struct { opt Option } -func (f valuesFilter) filter(s *state, vx, vy reflect.Value, t reflect.Type) applicableOption { - if !vx.IsValid() || !vy.IsValid() { - return invalid{} +func (f valuesFilter) filter(s *state, t reflect.Type, vx, vy reflect.Value) applicableOption { + if !vx.IsValid() || !vx.CanInterface() || !vy.IsValid() || !vy.CanInterface() { + return nil } if (f.typ == nil || t.AssignableTo(f.typ)) && s.callTTBFunc(f.fnc, vx, vy) { - return f.opt.filter(s, vx, vy, t) + return f.opt.filter(s, t, vx, vy) } return nil } func (f valuesFilter) String() string { - fn := getFuncName(f.fnc.Pointer()) - return fmt.Sprintf("FilterValues(%s, %v)", fn, f.opt) + return fmt.Sprintf("FilterValues(%s, %v)", function.NameOf(f.fnc), f.opt) } // Ignore is an Option that causes all comparisons to be ignored. @@ -194,20 +198,45 @@ func Ignore() Option { return ignore{} } type ignore struct{ core } func (ignore) isFiltered() bool { return false } -func (ignore) filter(_ *state, _, _ reflect.Value, _ reflect.Type) applicableOption { return ignore{} } -func (ignore) apply(_ *state, _, _ reflect.Value) { return } +func (ignore) filter(_ *state, _ reflect.Type, _, _ reflect.Value) applicableOption { return ignore{} } +func (ignore) apply(s *state, _, _ reflect.Value) { s.report(true, reportByIgnore) } func (ignore) String() string { return "Ignore()" } -// invalid is a sentinel Option type to indicate that some options could not -// be evaluated due to unexported fields. -type invalid struct{ core } +// validator is a sentinel Option type to indicate that some options could not +// be evaluated due to unexported fields, missing slice elements, or +// missing map entries. Both values are validator only for unexported fields. +type validator struct{ core } + +func (validator) filter(_ *state, _ reflect.Type, vx, vy reflect.Value) applicableOption { + if !vx.IsValid() || !vy.IsValid() { + return validator{} + } + if !vx.CanInterface() || !vy.CanInterface() { + return validator{} + } + return nil +} +func (validator) apply(s *state, vx, vy reflect.Value) { + // Implies missing slice element or map entry. + if !vx.IsValid() || !vy.IsValid() { + s.report(vx.IsValid() == vy.IsValid(), 0) + return + } + + // Unable to Interface implies unexported field without visibility access. + if !vx.CanInterface() || !vy.CanInterface() { + const help = "consider using a custom Comparer; if you control the implementation of type, you can also consider AllowUnexported or cmpopts.IgnoreUnexported" + panic(fmt.Sprintf("cannot handle unexported field: %#v\n%s", s.curPath, help)) + } -func (invalid) filter(_ *state, _, _ reflect.Value, _ reflect.Type) applicableOption { return invalid{} } -func (invalid) apply(s *state, _, _ reflect.Value) { - const help = "consider using AllowUnexported or cmpopts.IgnoreUnexported" - panic(fmt.Sprintf("cannot handle unexported field: %#v\n%s", s.curPath, help)) + panic("not reachable") } +// identRx represents a valid identifier according to the Go specification. +const identRx = `[_\p{L}][_\p{L}\p{N}]*` + +var identsRx = regexp.MustCompile(`^` + identRx + `(\.` + identRx + `)*$`) + // Transformer returns an Option that applies a transformation function that // converts values of a certain type into that of another. // @@ -220,18 +249,25 @@ func (invalid) apply(s *state, _, _ reflect.Value) { // input and output types are the same), an implicit filter is added such that // a transformer is applicable only if that exact transformer is not already // in the tail of the Path since the last non-Transform step. +// For situations where the implicit filter is still insufficient, +// consider using cmpopts.AcyclicTransformer, which adds a filter +// to prevent the transformer from being recursively applied upon itself. // // The name is a user provided label that is used as the Transform.Name in the -// transformation PathStep. If empty, an arbitrary name is used. +// transformation PathStep (and eventually shown in the Diff output). +// The name must be a valid identifier or qualified identifier in Go syntax. +// If empty, an arbitrary name is used. func Transformer(name string, f interface{}) Option { v := reflect.ValueOf(f) if !function.IsType(v.Type(), function.Transformer) || v.IsNil() { panic(fmt.Sprintf("invalid transformer function: %T", f)) } if name == "" { - name = "λ" // Lambda-symbol as place-holder for anonymous transformer - } - if !isValid(name) { + name = function.NameOf(v) + if !identsRx.MatchString(name) { + name = "λ" // Lambda-symbol as placeholder name + } + } else if !identsRx.MatchString(name) { panic(fmt.Sprintf("invalid name: %q", name)) } tr := &transformer{name: name, fnc: reflect.ValueOf(f)} @@ -250,9 +286,9 @@ type transformer struct { func (tr *transformer) isFiltered() bool { return tr.typ != nil } -func (tr *transformer) filter(s *state, _, _ reflect.Value, t reflect.Type) applicableOption { +func (tr *transformer) filter(s *state, t reflect.Type, _, _ reflect.Value) applicableOption { for i := len(s.curPath) - 1; i >= 0; i-- { - if t, ok := s.curPath[i].(*transform); !ok { + if t, ok := s.curPath[i].(Transform); !ok { break // Hit most recent non-Transform step } else if tr == t.trans { return nil // Cannot directly use same Transform @@ -265,18 +301,15 @@ func (tr *transformer) filter(s *state, _, _ reflect.Value, t reflect.Type) appl } func (tr *transformer) apply(s *state, vx, vy reflect.Value) { - // Update path before calling the Transformer so that dynamic checks - // will use the updated path. - s.curPath.push(&transform{pathStep{tr.fnc.Type().Out(0)}, tr}) - defer s.curPath.pop() - - vx = s.callTRFunc(tr.fnc, vx) - vy = s.callTRFunc(tr.fnc, vy) - s.compareAny(vx, vy) + step := Transform{&transform{pathStep{typ: tr.fnc.Type().Out(0)}, tr}} + vvx := s.callTRFunc(tr.fnc, vx, step) + vvy := s.callTRFunc(tr.fnc, vy, step) + step.vx, step.vy = vvx, vvy + s.compareAny(step) } func (tr transformer) String() string { - return fmt.Sprintf("Transformer(%s, %s)", tr.name, getFuncName(tr.fnc.Pointer())) + return fmt.Sprintf("Transformer(%s, %s)", tr.name, function.NameOf(tr.fnc)) } // Comparer returns an Option that determines whether two values are equal @@ -311,7 +344,7 @@ type comparer struct { func (cm *comparer) isFiltered() bool { return cm.typ != nil } -func (cm *comparer) filter(_ *state, _, _ reflect.Value, t reflect.Type) applicableOption { +func (cm *comparer) filter(_ *state, t reflect.Type, _, _ reflect.Value) applicableOption { if cm.typ == nil || t.AssignableTo(cm.typ) { return cm } @@ -320,11 +353,11 @@ func (cm *comparer) filter(_ *state, _, _ reflect.Value, t reflect.Type) applica func (cm *comparer) apply(s *state, vx, vy reflect.Value) { eq := s.callTTBFunc(cm.fnc, vx, vy) - s.report(eq, vx, vy) + s.report(eq, reportByFunc) } func (cm comparer) String() string { - return fmt.Sprintf("Comparer(%s)", getFuncName(cm.fnc.Pointer())) + return fmt.Sprintf("Comparer(%s)", function.NameOf(cm.fnc)) } // AllowUnexported returns an Option that forcibly allows operations on @@ -338,7 +371,7 @@ func (cm comparer) String() string { // defined in an internal package where the semantic meaning of an unexported // field is in the control of the user. // -// For some cases, a custom Comparer should be used instead that defines +// In many cases, a custom Comparer should be used instead that defines // equality as a function of the public API of a type rather than the underlying // unexported implementation. // @@ -370,27 +403,92 @@ func AllowUnexported(types ...interface{}) Option { type visibleStructs map[reflect.Type]bool -func (visibleStructs) filter(_ *state, _, _ reflect.Value, _ reflect.Type) applicableOption { +func (visibleStructs) filter(_ *state, _ reflect.Type, _, _ reflect.Value) applicableOption { panic("not implemented") } -// reporter is an Option that configures how differences are reported. -type reporter interface { - // TODO: Not exported yet. +// Result represents the comparison result for a single node and +// is provided by cmp when calling Result (see Reporter). +type Result struct { + _ [0]func() // Make Result incomparable + flags resultFlags +} + +// Equal reports whether the node was determined to be equal or not. +// As a special case, ignored nodes are considered equal. +func (r Result) Equal() bool { + return r.flags&(reportEqual|reportByIgnore) != 0 +} + +// ByIgnore reports whether the node is equal because it was ignored. +// This never reports true if Equal reports false. +func (r Result) ByIgnore() bool { + return r.flags&reportByIgnore != 0 +} + +// ByMethod reports whether the Equal method determined equality. +func (r Result) ByMethod() bool { + return r.flags&reportByMethod != 0 +} + +// ByFunc reports whether a Comparer function determined equality. +func (r Result) ByFunc() bool { + return r.flags&reportByFunc != 0 +} + +type resultFlags uint + +const ( + _ resultFlags = (1 << iota) / 2 + + reportEqual + reportUnequal + reportByIgnore + reportByMethod + reportByFunc +) + +// Reporter is an Option that can be passed to Equal. When Equal traverses +// the value trees, it calls PushStep as it descends into each node in the +// tree and PopStep as it ascend out of the node. The leaves of the tree are +// either compared (determined to be equal or not equal) or ignored and reported +// as such by calling the Report method. +func Reporter(r interface { + // PushStep is called when a tree-traversal operation is performed. + // The PathStep itself is only valid until the step is popped. + // The PathStep.Values are valid for the duration of the entire traversal + // and must not be mutated. + // + // Equal always calls PushStep at the start to provide an operation-less + // PathStep used to report the root values. // - // Perhaps add PushStep and PopStep and change Report to only accept - // a PathStep instead of the full-path? Adding a PushStep and PopStep makes - // it clear that we are traversing the value tree in a depth-first-search - // manner, which has an effect on how values are printed. + // Within a slice, the exact set of inserted, removed, or modified elements + // is unspecified and may change in future implementations. + // The entries of a map are iterated through in an unspecified order. + PushStep(PathStep) + + // Report is called exactly once on leaf nodes to report whether the + // comparison identified the node as equal, unequal, or ignored. + // A leaf node is one that is immediately preceded by and followed by + // a pair of PushStep and PopStep calls. + Report(Result) + + // PopStep ascends back up the value tree. + // There is always a matching pop call for every push call. + PopStep() +}) Option { + return reporter{r} +} - Option +type reporter struct{ reporterIface } +type reporterIface interface { + PushStep(PathStep) + Report(Result) + PopStep() +} - // Report is called for every comparison made and will be provided with - // the two values being compared, the equality result, and the - // current path in the value tree. It is possible for x or y to be an - // invalid reflect.Value if one of the values is non-existent; - // which is possible with maps and slices. - Report(x, y reflect.Value, eq bool, p Path) +func (reporter) filter(_ *state, _ reflect.Type, _, _ reflect.Value) applicableOption { + panic("not implemented") } // normalizeOption normalizes the input options such that all Options groups @@ -424,30 +522,3 @@ func flattenOptions(dst, src Options) Options { } return dst } - -// getFuncName returns a short function name from the pointer. -// The string parsing logic works up until Go1.9. -func getFuncName(p uintptr) string { - fnc := runtime.FuncForPC(p) - if fnc == nil { - return "" - } - name := fnc.Name() // E.g., "long/path/name/mypkg.(mytype).(long/path/name/mypkg.myfunc)-fm" - if strings.HasSuffix(name, ")-fm") || strings.HasSuffix(name, ")·fm") { - // Strip the package name from method name. - name = strings.TrimSuffix(name, ")-fm") - name = strings.TrimSuffix(name, ")·fm") - if i := strings.LastIndexByte(name, '('); i >= 0 { - methodName := name[i+1:] // E.g., "long/path/name/mypkg.myfunc" - if j := strings.LastIndexByte(methodName, '.'); j >= 0 { - methodName = methodName[j+1:] // E.g., "myfunc" - } - name = name[:i] + methodName // E.g., "long/path/name/mypkg.(mytype)." + "myfunc" - } - } - if i := strings.LastIndexByte(name, '/'); i >= 0 { - // Strip the package name. - name = name[i+1:] // E.g., "mypkg.(mytype).myfunc" - } - return name -} diff --git a/vendor/github.com/google/go-cmp/cmp/path.go b/vendor/github.com/google/go-cmp/cmp/path.go index c08a3cf8..96fffd29 100644 --- a/vendor/github.com/google/go-cmp/cmp/path.go +++ b/vendor/github.com/google/go-cmp/cmp/path.go @@ -12,80 +12,52 @@ import ( "unicode/utf8" ) -type ( - // Path is a list of PathSteps describing the sequence of operations to get - // from some root type to the current position in the value tree. - // The first Path element is always an operation-less PathStep that exists - // simply to identify the initial type. - // - // When traversing structs with embedded structs, the embedded struct will - // always be accessed as a field before traversing the fields of the - // embedded struct themselves. That is, an exported field from the - // embedded struct will never be accessed directly from the parent struct. - Path []PathStep - - // PathStep is a union-type for specific operations to traverse - // a value's tree structure. Users of this package never need to implement - // these types as values of this type will be returned by this package. - PathStep interface { - String() string - Type() reflect.Type // Resulting type after performing the path step - isPathStep() - } +// Path is a list of PathSteps describing the sequence of operations to get +// from some root type to the current position in the value tree. +// The first Path element is always an operation-less PathStep that exists +// simply to identify the initial type. +// +// When traversing structs with embedded structs, the embedded struct will +// always be accessed as a field before traversing the fields of the +// embedded struct themselves. That is, an exported field from the +// embedded struct will never be accessed directly from the parent struct. +type Path []PathStep - // SliceIndex is an index operation on a slice or array at some index Key. - SliceIndex interface { - PathStep - Key() int // May return -1 if in a split state - - // SplitKeys returns the indexes for indexing into slices in the - // x and y values, respectively. These indexes may differ due to the - // insertion or removal of an element in one of the slices, causing - // all of the indexes to be shifted. If an index is -1, then that - // indicates that the element does not exist in the associated slice. - // - // Key is guaranteed to return -1 if and only if the indexes returned - // by SplitKeys are not the same. SplitKeys will never return -1 for - // both indexes. - SplitKeys() (x int, y int) - - isSliceIndex() - } - // MapIndex is an index operation on a map at some index Key. - MapIndex interface { - PathStep - Key() reflect.Value - isMapIndex() - } - // TypeAssertion represents a type assertion on an interface. - TypeAssertion interface { - PathStep - isTypeAssertion() - } - // StructField represents a struct field access on a field called Name. - StructField interface { - PathStep - Name() string - Index() int - isStructField() - } - // Indirect represents pointer indirection on the parent type. - Indirect interface { - PathStep - isIndirect() - } - // Transform is a transformation from the parent type to the current type. - Transform interface { - PathStep - Name() string - Func() reflect.Value +// PathStep is a union-type for specific operations to traverse +// a value's tree structure. Users of this package never need to implement +// these types as values of this type will be returned by this package. +// +// Implementations of this interface are +// StructField, SliceIndex, MapIndex, Indirect, TypeAssertion, and Transform. +type PathStep interface { + String() string - // Option returns the originally constructed Transformer option. - // The == operator can be used to detect the exact option used. - Option() Option + // Type is the resulting type after performing the path step. + Type() reflect.Type - isTransform() - } + // Values is the resulting values after performing the path step. + // The type of each valid value is guaranteed to be identical to Type. + // + // In some cases, one or both may be invalid or have restrictions: + // • For StructField, both are not interface-able if the current field + // is unexported and the struct type is not explicitly permitted by + // AllowUnexported to traverse unexported fields. + // • For SliceIndex, one may be invalid if an element is missing from + // either the x or y slice. + // • For MapIndex, one may be invalid if an entry is missing from + // either the x or y map. + // + // The provided values must not be mutated. + Values() (vx, vy reflect.Value) +} + +var ( + _ PathStep = StructField{} + _ PathStep = SliceIndex{} + _ PathStep = MapIndex{} + _ PathStep = Indirect{} + _ PathStep = TypeAssertion{} + _ PathStep = Transform{} ) func (pa *Path) push(s PathStep) { @@ -124,7 +96,7 @@ func (pa Path) Index(i int) PathStep { func (pa Path) String() string { var ss []string for _, s := range pa { - if _, ok := s.(*structField); ok { + if _, ok := s.(StructField); ok { ss = append(ss, s.String()) } } @@ -144,13 +116,13 @@ func (pa Path) GoString() string { nextStep = pa[i+1] } switch s := s.(type) { - case *indirect: + case Indirect: numIndirect++ pPre, pPost := "(", ")" switch nextStep.(type) { - case *indirect: + case Indirect: continue // Next step is indirection, so let them batch up - case *structField: + case StructField: numIndirect-- // Automatic indirection on struct fields case nil: pPre, pPost = "", "" // Last step; no need for parenthesis @@ -161,19 +133,10 @@ func (pa Path) GoString() string { } numIndirect = 0 continue - case *transform: + case Transform: ssPre = append(ssPre, s.trans.name+"(") ssPost = append(ssPost, ")") continue - case *typeAssertion: - // As a special-case, elide type assertions on anonymous types - // since they are typically generated dynamically and can be very - // verbose. For example, some transforms return interface{} because - // of Go's lack of generics, but typically take in and return the - // exact same concrete type. - if s.Type().PkgPath() == "" { - continue - } } ssPost = append(ssPost, s.String()) } @@ -183,44 +146,13 @@ func (pa Path) GoString() string { return strings.Join(ssPre, "") + strings.Join(ssPost, "") } -type ( - pathStep struct { - typ reflect.Type - } - - sliceIndex struct { - pathStep - xkey, ykey int - } - mapIndex struct { - pathStep - key reflect.Value - } - typeAssertion struct { - pathStep - } - structField struct { - pathStep - name string - idx int - - // These fields are used for forcibly accessing an unexported field. - // pvx, pvy, and field are only valid if unexported is true. - unexported bool - force bool // Forcibly allow visibility - pvx, pvy reflect.Value // Parent values - field reflect.StructField // Field information - } - indirect struct { - pathStep - } - transform struct { - pathStep - trans *transformer - } -) +type pathStep struct { + typ reflect.Type + vx, vy reflect.Value +} -func (ps pathStep) Type() reflect.Type { return ps.typ } +func (ps pathStep) Type() reflect.Type { return ps.typ } +func (ps pathStep) Values() (vx, vy reflect.Value) { return ps.vx, ps.vy } func (ps pathStep) String() string { if ps.typ == nil { return "" @@ -232,7 +164,54 @@ func (ps pathStep) String() string { return fmt.Sprintf("{%s}", s) } -func (si sliceIndex) String() string { +// StructField represents a struct field access on a field called Name. +type StructField struct{ *structField } +type structField struct { + pathStep + name string + idx int + + // These fields are used for forcibly accessing an unexported field. + // pvx, pvy, and field are only valid if unexported is true. + unexported bool + mayForce bool // Forcibly allow visibility + pvx, pvy reflect.Value // Parent values + field reflect.StructField // Field information +} + +func (sf StructField) Type() reflect.Type { return sf.typ } +func (sf StructField) Values() (vx, vy reflect.Value) { + if !sf.unexported { + return sf.vx, sf.vy // CanInterface reports true + } + + // Forcibly obtain read-write access to an unexported struct field. + if sf.mayForce { + vx = retrieveUnexportedField(sf.pvx, sf.field) + vy = retrieveUnexportedField(sf.pvy, sf.field) + return vx, vy // CanInterface reports true + } + return sf.vx, sf.vy // CanInterface reports false +} +func (sf StructField) String() string { return fmt.Sprintf(".%s", sf.name) } + +// Name is the field name. +func (sf StructField) Name() string { return sf.name } + +// Index is the index of the field in the parent struct type. +// See reflect.Type.Field. +func (sf StructField) Index() int { return sf.idx } + +// SliceIndex is an index operation on a slice or array at some index Key. +type SliceIndex struct{ *sliceIndex } +type sliceIndex struct { + pathStep + xkey, ykey int +} + +func (si SliceIndex) Type() reflect.Type { return si.typ } +func (si SliceIndex) Values() (vx, vy reflect.Value) { return si.vx, si.vy } +func (si SliceIndex) String() string { switch { case si.xkey == si.ykey: return fmt.Sprintf("[%d]", si.xkey) @@ -247,63 +226,83 @@ func (si sliceIndex) String() string { return fmt.Sprintf("[%d->%d]", si.xkey, si.ykey) } } -func (mi mapIndex) String() string { return fmt.Sprintf("[%#v]", mi.key) } -func (ta typeAssertion) String() string { return fmt.Sprintf(".(%v)", ta.typ) } -func (sf structField) String() string { return fmt.Sprintf(".%s", sf.name) } -func (in indirect) String() string { return "*" } -func (tf transform) String() string { return fmt.Sprintf("%s()", tf.trans.name) } -func (si sliceIndex) Key() int { +// Key is the index key; it may return -1 if in a split state +func (si SliceIndex) Key() int { if si.xkey != si.ykey { return -1 } return si.xkey } -func (si sliceIndex) SplitKeys() (x, y int) { return si.xkey, si.ykey } -func (mi mapIndex) Key() reflect.Value { return mi.key } -func (sf structField) Name() string { return sf.name } -func (sf structField) Index() int { return sf.idx } -func (tf transform) Name() string { return tf.trans.name } -func (tf transform) Func() reflect.Value { return tf.trans.fnc } -func (tf transform) Option() Option { return tf.trans } - -func (pathStep) isPathStep() {} -func (sliceIndex) isSliceIndex() {} -func (mapIndex) isMapIndex() {} -func (typeAssertion) isTypeAssertion() {} -func (structField) isStructField() {} -func (indirect) isIndirect() {} -func (transform) isTransform() {} -var ( - _ SliceIndex = sliceIndex{} - _ MapIndex = mapIndex{} - _ TypeAssertion = typeAssertion{} - _ StructField = structField{} - _ Indirect = indirect{} - _ Transform = transform{} - - _ PathStep = sliceIndex{} - _ PathStep = mapIndex{} - _ PathStep = typeAssertion{} - _ PathStep = structField{} - _ PathStep = indirect{} - _ PathStep = transform{} -) +// SplitKeys are the indexes for indexing into slices in the +// x and y values, respectively. These indexes may differ due to the +// insertion or removal of an element in one of the slices, causing +// all of the indexes to be shifted. If an index is -1, then that +// indicates that the element does not exist in the associated slice. +// +// Key is guaranteed to return -1 if and only if the indexes returned +// by SplitKeys are not the same. SplitKeys will never return -1 for +// both indexes. +func (si SliceIndex) SplitKeys() (ix, iy int) { return si.xkey, si.ykey } + +// MapIndex is an index operation on a map at some index Key. +type MapIndex struct{ *mapIndex } +type mapIndex struct { + pathStep + key reflect.Value +} + +func (mi MapIndex) Type() reflect.Type { return mi.typ } +func (mi MapIndex) Values() (vx, vy reflect.Value) { return mi.vx, mi.vy } +func (mi MapIndex) String() string { return fmt.Sprintf("[%#v]", mi.key) } + +// Key is the value of the map key. +func (mi MapIndex) Key() reflect.Value { return mi.key } + +// Indirect represents pointer indirection on the parent type. +type Indirect struct{ *indirect } +type indirect struct { + pathStep +} + +func (in Indirect) Type() reflect.Type { return in.typ } +func (in Indirect) Values() (vx, vy reflect.Value) { return in.vx, in.vy } +func (in Indirect) String() string { return "*" } + +// TypeAssertion represents a type assertion on an interface. +type TypeAssertion struct{ *typeAssertion } +type typeAssertion struct { + pathStep +} + +func (ta TypeAssertion) Type() reflect.Type { return ta.typ } +func (ta TypeAssertion) Values() (vx, vy reflect.Value) { return ta.vx, ta.vy } +func (ta TypeAssertion) String() string { return fmt.Sprintf(".(%v)", ta.typ) } + +// Transform is a transformation from the parent type to the current type. +type Transform struct{ *transform } +type transform struct { + pathStep + trans *transformer +} + +func (tf Transform) Type() reflect.Type { return tf.typ } +func (tf Transform) Values() (vx, vy reflect.Value) { return tf.vx, tf.vy } +func (tf Transform) String() string { return fmt.Sprintf("%s()", tf.trans.name) } + +// Name is the name of the Transformer. +func (tf Transform) Name() string { return tf.trans.name } + +// Func is the function pointer to the transformer function. +func (tf Transform) Func() reflect.Value { return tf.trans.fnc } + +// Option returns the originally constructed Transformer option. +// The == operator can be used to detect the exact option used. +func (tf Transform) Option() Option { return tf.trans } // isExported reports whether the identifier is exported. func isExported(id string) bool { r, _ := utf8.DecodeRuneInString(id) return unicode.IsUpper(r) } - -// isValid reports whether the identifier is valid. -// Empty and underscore-only strings are not valid. -func isValid(id string) bool { - ok := id != "" && id != "_" - for j, c := range id { - ok = ok && (j > 0 || !unicode.IsDigit(c)) - ok = ok && (c == '_' || unicode.IsLetter(c) || unicode.IsDigit(c)) - } - return ok -} diff --git a/vendor/github.com/google/go-cmp/cmp/report.go b/vendor/github.com/google/go-cmp/cmp/report.go new file mode 100644 index 00000000..6ddf2999 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report.go @@ -0,0 +1,51 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +package cmp + +// defaultReporter implements the reporter interface. +// +// As Equal serially calls the PushStep, Report, and PopStep methods, the +// defaultReporter constructs a tree-based representation of the compared value +// and the result of each comparison (see valueNode). +// +// When the String method is called, the FormatDiff method transforms the +// valueNode tree into a textNode tree, which is a tree-based representation +// of the textual output (see textNode). +// +// Lastly, the textNode.String method produces the final report as a string. +type defaultReporter struct { + root *valueNode + curr *valueNode +} + +func (r *defaultReporter) PushStep(ps PathStep) { + r.curr = r.curr.PushStep(ps) + if r.root == nil { + r.root = r.curr + } +} +func (r *defaultReporter) Report(rs Result) { + r.curr.Report(rs) +} +func (r *defaultReporter) PopStep() { + r.curr = r.curr.PopStep() +} + +// String provides a full report of the differences detected as a structured +// literal in pseudo-Go syntax. String may only be called after the entire tree +// has been traversed. +func (r *defaultReporter) String() string { + assert(r.root != nil && r.curr == nil) + if r.root.NumDiff == 0 { + return "" + } + return formatOptions{}.FormatDiff(r.root).String() +} + +func assert(ok bool) { + if !ok { + panic("assertion failure") + } +} diff --git a/vendor/github.com/google/go-cmp/cmp/report_compare.go b/vendor/github.com/google/go-cmp/cmp/report_compare.go new file mode 100644 index 00000000..17a05eed --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report_compare.go @@ -0,0 +1,296 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +package cmp + +import ( + "fmt" + "reflect" + + "github.com/google/go-cmp/cmp/internal/value" +) + +// TODO: Enforce limits? +// * Enforce maximum number of records to print per node? +// * Enforce maximum size in bytes allowed? +// * As a heuristic, use less verbosity for equal nodes than unequal nodes. +// TODO: Enforce unique outputs? +// * Avoid Stringer methods if it results in same output? +// * Print pointer address if outputs still equal? + +// numContextRecords is the number of surrounding equal records to print. +const numContextRecords = 2 + +type diffMode byte + +const ( + diffUnknown diffMode = 0 + diffIdentical diffMode = ' ' + diffRemoved diffMode = '-' + diffInserted diffMode = '+' +) + +type typeMode int + +const ( + // emitType always prints the type. + emitType typeMode = iota + // elideType never prints the type. + elideType + // autoType prints the type only for composite kinds + // (i.e., structs, slices, arrays, and maps). + autoType +) + +type formatOptions struct { + // DiffMode controls the output mode of FormatDiff. + // + // If diffUnknown, then produce a diff of the x and y values. + // If diffIdentical, then emit values as if they were equal. + // If diffRemoved, then only emit x values (ignoring y values). + // If diffInserted, then only emit y values (ignoring x values). + DiffMode diffMode + + // TypeMode controls whether to print the type for the current node. + // + // As a general rule of thumb, we always print the type of the next node + // after an interface, and always elide the type of the next node after + // a slice or map node. + TypeMode typeMode + + // formatValueOptions are options specific to printing reflect.Values. + formatValueOptions +} + +func (opts formatOptions) WithDiffMode(d diffMode) formatOptions { + opts.DiffMode = d + return opts +} +func (opts formatOptions) WithTypeMode(t typeMode) formatOptions { + opts.TypeMode = t + return opts +} + +// FormatDiff converts a valueNode tree into a textNode tree, where the later +// is a textual representation of the differences detected in the former. +func (opts formatOptions) FormatDiff(v *valueNode) textNode { + // Check whether we have specialized formatting for this node. + // This is not necessary, but helpful for producing more readable outputs. + if opts.CanFormatDiffSlice(v) { + return opts.FormatDiffSlice(v) + } + + // For leaf nodes, format the value based on the reflect.Values alone. + if v.MaxDepth == 0 { + switch opts.DiffMode { + case diffUnknown, diffIdentical: + // Format Equal. + if v.NumDiff == 0 { + outx := opts.FormatValue(v.ValueX, visitedPointers{}) + outy := opts.FormatValue(v.ValueY, visitedPointers{}) + if v.NumIgnored > 0 && v.NumSame == 0 { + return textEllipsis + } else if outx.Len() < outy.Len() { + return outx + } else { + return outy + } + } + + // Format unequal. + assert(opts.DiffMode == diffUnknown) + var list textList + outx := opts.WithTypeMode(elideType).FormatValue(v.ValueX, visitedPointers{}) + outy := opts.WithTypeMode(elideType).FormatValue(v.ValueY, visitedPointers{}) + if outx != nil { + list = append(list, textRecord{Diff: '-', Value: outx}) + } + if outy != nil { + list = append(list, textRecord{Diff: '+', Value: outy}) + } + return opts.WithTypeMode(emitType).FormatType(v.Type, list) + case diffRemoved: + return opts.FormatValue(v.ValueX, visitedPointers{}) + case diffInserted: + return opts.FormatValue(v.ValueY, visitedPointers{}) + default: + panic("invalid diff mode") + } + } + + // Descend into the child value node. + if v.TransformerName != "" { + out := opts.WithTypeMode(emitType).FormatDiff(v.Value) + out = textWrap{"Inverse(" + v.TransformerName + ", ", out, ")"} + return opts.FormatType(v.Type, out) + } else { + switch k := v.Type.Kind(); k { + case reflect.Struct, reflect.Array, reflect.Slice, reflect.Map: + return opts.FormatType(v.Type, opts.formatDiffList(v.Records, k)) + case reflect.Ptr: + return textWrap{"&", opts.FormatDiff(v.Value), ""} + case reflect.Interface: + return opts.WithTypeMode(emitType).FormatDiff(v.Value) + default: + panic(fmt.Sprintf("%v cannot have children", k)) + } + } +} + +func (opts formatOptions) formatDiffList(recs []reportRecord, k reflect.Kind) textNode { + // Derive record name based on the data structure kind. + var name string + var formatKey func(reflect.Value) string + switch k { + case reflect.Struct: + name = "field" + opts = opts.WithTypeMode(autoType) + formatKey = func(v reflect.Value) string { return v.String() } + case reflect.Slice, reflect.Array: + name = "element" + opts = opts.WithTypeMode(elideType) + formatKey = func(reflect.Value) string { return "" } + case reflect.Map: + name = "entry" + opts = opts.WithTypeMode(elideType) + formatKey = formatMapKey + } + + // Handle unification. + switch opts.DiffMode { + case diffIdentical, diffRemoved, diffInserted: + var list textList + var deferredEllipsis bool // Add final "..." to indicate records were dropped + for _, r := range recs { + // Elide struct fields that are zero value. + if k == reflect.Struct { + var isZero bool + switch opts.DiffMode { + case diffIdentical: + isZero = value.IsZero(r.Value.ValueX) || value.IsZero(r.Value.ValueY) + case diffRemoved: + isZero = value.IsZero(r.Value.ValueX) + case diffInserted: + isZero = value.IsZero(r.Value.ValueY) + } + if isZero { + continue + } + } + // Elide ignored nodes. + if r.Value.NumIgnored > 0 && r.Value.NumSame+r.Value.NumDiff == 0 { + deferredEllipsis = !(k == reflect.Slice || k == reflect.Array) + if !deferredEllipsis { + list.AppendEllipsis(diffStats{}) + } + continue + } + if out := opts.FormatDiff(r.Value); out != nil { + list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + } + } + if deferredEllipsis { + list.AppendEllipsis(diffStats{}) + } + return textWrap{"{", list, "}"} + case diffUnknown: + default: + panic("invalid diff mode") + } + + // Handle differencing. + var list textList + groups := coalesceAdjacentRecords(name, recs) + for i, ds := range groups { + // Handle equal records. + if ds.NumDiff() == 0 { + // Compute the number of leading and trailing records to print. + var numLo, numHi int + numEqual := ds.NumIgnored + ds.NumIdentical + for numLo < numContextRecords && numLo+numHi < numEqual && i != 0 { + if r := recs[numLo].Value; r.NumIgnored > 0 && r.NumSame+r.NumDiff == 0 { + break + } + numLo++ + } + for numHi < numContextRecords && numLo+numHi < numEqual && i != len(groups)-1 { + if r := recs[numEqual-numHi-1].Value; r.NumIgnored > 0 && r.NumSame+r.NumDiff == 0 { + break + } + numHi++ + } + if numEqual-(numLo+numHi) == 1 && ds.NumIgnored == 0 { + numHi++ // Avoid pointless coalescing of a single equal record + } + + // Format the equal values. + for _, r := range recs[:numLo] { + out := opts.WithDiffMode(diffIdentical).FormatDiff(r.Value) + list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + } + if numEqual > numLo+numHi { + ds.NumIdentical -= numLo + numHi + list.AppendEllipsis(ds) + } + for _, r := range recs[numEqual-numHi : numEqual] { + out := opts.WithDiffMode(diffIdentical).FormatDiff(r.Value) + list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + } + recs = recs[numEqual:] + continue + } + + // Handle unequal records. + for _, r := range recs[:ds.NumDiff()] { + switch { + case opts.CanFormatDiffSlice(r.Value): + out := opts.FormatDiffSlice(r.Value) + list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + case r.Value.NumChildren == r.Value.MaxDepth: + outx := opts.WithDiffMode(diffRemoved).FormatDiff(r.Value) + outy := opts.WithDiffMode(diffInserted).FormatDiff(r.Value) + if outx != nil { + list = append(list, textRecord{Diff: diffRemoved, Key: formatKey(r.Key), Value: outx}) + } + if outy != nil { + list = append(list, textRecord{Diff: diffInserted, Key: formatKey(r.Key), Value: outy}) + } + default: + out := opts.FormatDiff(r.Value) + list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + } + } + recs = recs[ds.NumDiff():] + } + assert(len(recs) == 0) + return textWrap{"{", list, "}"} +} + +// coalesceAdjacentRecords coalesces the list of records into groups of +// adjacent equal, or unequal counts. +func coalesceAdjacentRecords(name string, recs []reportRecord) (groups []diffStats) { + var prevCase int // Arbitrary index into which case last occurred + lastStats := func(i int) *diffStats { + if prevCase != i { + groups = append(groups, diffStats{Name: name}) + prevCase = i + } + return &groups[len(groups)-1] + } + for _, r := range recs { + switch rv := r.Value; { + case rv.NumIgnored > 0 && rv.NumSame+rv.NumDiff == 0: + lastStats(1).NumIgnored++ + case rv.NumDiff == 0: + lastStats(1).NumIdentical++ + case rv.NumDiff > 0 && !rv.ValueY.IsValid(): + lastStats(2).NumRemoved++ + case rv.NumDiff > 0 && !rv.ValueX.IsValid(): + lastStats(2).NumInserted++ + default: + lastStats(2).NumModified++ + } + } + return groups +} diff --git a/vendor/github.com/google/go-cmp/cmp/report_reflect.go b/vendor/github.com/google/go-cmp/cmp/report_reflect.go new file mode 100644 index 00000000..2761b628 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report_reflect.go @@ -0,0 +1,278 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +package cmp + +import ( + "fmt" + "reflect" + "strconv" + "strings" + "unicode" + + "github.com/google/go-cmp/cmp/internal/flags" + "github.com/google/go-cmp/cmp/internal/value" +) + +type formatValueOptions struct { + // AvoidStringer controls whether to avoid calling custom stringer + // methods like error.Error or fmt.Stringer.String. + AvoidStringer bool + + // ShallowPointers controls whether to avoid descending into pointers. + // Useful when printing map keys, where pointer comparison is performed + // on the pointer address rather than the pointed-at value. + ShallowPointers bool + + // PrintAddresses controls whether to print the address of all pointers, + // slice elements, and maps. + PrintAddresses bool +} + +// FormatType prints the type as if it were wrapping s. +// This may return s as-is depending on the current type and TypeMode mode. +func (opts formatOptions) FormatType(t reflect.Type, s textNode) textNode { + // Check whether to emit the type or not. + switch opts.TypeMode { + case autoType: + switch t.Kind() { + case reflect.Struct, reflect.Slice, reflect.Array, reflect.Map: + if s.Equal(textNil) { + return s + } + default: + return s + } + case elideType: + return s + } + + // Determine the type label, applying special handling for unnamed types. + typeName := t.String() + if t.Name() == "" { + // According to Go grammar, certain type literals contain symbols that + // do not strongly bind to the next lexicographical token (e.g., *T). + switch t.Kind() { + case reflect.Chan, reflect.Func, reflect.Ptr: + typeName = "(" + typeName + ")" + } + typeName = strings.Replace(typeName, "struct {", "struct{", -1) + typeName = strings.Replace(typeName, "interface {", "interface{", -1) + } + + // Avoid wrap the value in parenthesis if unnecessary. + if s, ok := s.(textWrap); ok { + hasParens := strings.HasPrefix(s.Prefix, "(") && strings.HasSuffix(s.Suffix, ")") + hasBraces := strings.HasPrefix(s.Prefix, "{") && strings.HasSuffix(s.Suffix, "}") + if hasParens || hasBraces { + return textWrap{typeName, s, ""} + } + } + return textWrap{typeName + "(", s, ")"} +} + +// FormatValue prints the reflect.Value, taking extra care to avoid descending +// into pointers already in m. As pointers are visited, m is also updated. +func (opts formatOptions) FormatValue(v reflect.Value, m visitedPointers) (out textNode) { + if !v.IsValid() { + return nil + } + t := v.Type() + + // Check whether there is an Error or String method to call. + if !opts.AvoidStringer && v.CanInterface() { + // Avoid calling Error or String methods on nil receivers since many + // implementations crash when doing so. + if (t.Kind() != reflect.Ptr && t.Kind() != reflect.Interface) || !v.IsNil() { + switch v := v.Interface().(type) { + case error: + return textLine("e" + formatString(v.Error())) + case fmt.Stringer: + return textLine("s" + formatString(v.String())) + } + } + } + + // Check whether to explicitly wrap the result with the type. + var skipType bool + defer func() { + if !skipType { + out = opts.FormatType(t, out) + } + }() + + var ptr string + switch t.Kind() { + case reflect.Bool: + return textLine(fmt.Sprint(v.Bool())) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return textLine(fmt.Sprint(v.Int())) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + // Unnamed uints are usually bytes or words, so use hexadecimal. + if t.PkgPath() == "" || t.Kind() == reflect.Uintptr { + return textLine(formatHex(v.Uint())) + } + return textLine(fmt.Sprint(v.Uint())) + case reflect.Float32, reflect.Float64: + return textLine(fmt.Sprint(v.Float())) + case reflect.Complex64, reflect.Complex128: + return textLine(fmt.Sprint(v.Complex())) + case reflect.String: + return textLine(formatString(v.String())) + case reflect.UnsafePointer, reflect.Chan, reflect.Func: + return textLine(formatPointer(v)) + case reflect.Struct: + var list textList + for i := 0; i < v.NumField(); i++ { + vv := v.Field(i) + if value.IsZero(vv) { + continue // Elide fields with zero values + } + s := opts.WithTypeMode(autoType).FormatValue(vv, m) + list = append(list, textRecord{Key: t.Field(i).Name, Value: s}) + } + return textWrap{"{", list, "}"} + case reflect.Slice: + if v.IsNil() { + return textNil + } + if opts.PrintAddresses { + ptr = formatPointer(v) + } + fallthrough + case reflect.Array: + var list textList + for i := 0; i < v.Len(); i++ { + vi := v.Index(i) + if vi.CanAddr() { // Check for cyclic elements + p := vi.Addr() + if m.Visit(p) { + var out textNode + out = textLine(formatPointer(p)) + out = opts.WithTypeMode(emitType).FormatType(p.Type(), out) + out = textWrap{"*", out, ""} + list = append(list, textRecord{Value: out}) + continue + } + } + s := opts.WithTypeMode(elideType).FormatValue(vi, m) + list = append(list, textRecord{Value: s}) + } + return textWrap{ptr + "{", list, "}"} + case reflect.Map: + if v.IsNil() { + return textNil + } + if m.Visit(v) { + return textLine(formatPointer(v)) + } + + var list textList + for _, k := range value.SortKeys(v.MapKeys()) { + sk := formatMapKey(k) + sv := opts.WithTypeMode(elideType).FormatValue(v.MapIndex(k), m) + list = append(list, textRecord{Key: sk, Value: sv}) + } + if opts.PrintAddresses { + ptr = formatPointer(v) + } + return textWrap{ptr + "{", list, "}"} + case reflect.Ptr: + if v.IsNil() { + return textNil + } + if m.Visit(v) || opts.ShallowPointers { + return textLine(formatPointer(v)) + } + if opts.PrintAddresses { + ptr = formatPointer(v) + } + skipType = true // Let the underlying value print the type instead + return textWrap{"&" + ptr, opts.FormatValue(v.Elem(), m), ""} + case reflect.Interface: + if v.IsNil() { + return textNil + } + // Interfaces accept different concrete types, + // so configure the underlying value to explicitly print the type. + skipType = true // Print the concrete type instead + return opts.WithTypeMode(emitType).FormatValue(v.Elem(), m) + default: + panic(fmt.Sprintf("%v kind not handled", v.Kind())) + } +} + +// formatMapKey formats v as if it were a map key. +// The result is guaranteed to be a single line. +func formatMapKey(v reflect.Value) string { + var opts formatOptions + opts.TypeMode = elideType + opts.ShallowPointers = true + s := opts.FormatValue(v, visitedPointers{}).String() + return strings.TrimSpace(s) +} + +// formatString prints s as a double-quoted or backtick-quoted string. +func formatString(s string) string { + // Use quoted string if it the same length as a raw string literal. + // Otherwise, attempt to use the raw string form. + qs := strconv.Quote(s) + if len(qs) == 1+len(s)+1 { + return qs + } + + // Disallow newlines to ensure output is a single line. + // Only allow printable runes for readability purposes. + rawInvalid := func(r rune) bool { + return r == '`' || r == '\n' || !(unicode.IsPrint(r) || r == '\t') + } + if strings.IndexFunc(s, rawInvalid) < 0 { + return "`" + s + "`" + } + return qs +} + +// formatHex prints u as a hexadecimal integer in Go notation. +func formatHex(u uint64) string { + var f string + switch { + case u <= 0xff: + f = "0x%02x" + case u <= 0xffff: + f = "0x%04x" + case u <= 0xffffff: + f = "0x%06x" + case u <= 0xffffffff: + f = "0x%08x" + case u <= 0xffffffffff: + f = "0x%010x" + case u <= 0xffffffffffff: + f = "0x%012x" + case u <= 0xffffffffffffff: + f = "0x%014x" + case u <= 0xffffffffffffffff: + f = "0x%016x" + } + return fmt.Sprintf(f, u) +} + +// formatPointer prints the address of the pointer. +func formatPointer(v reflect.Value) string { + p := v.Pointer() + if flags.Deterministic { + p = 0xdeadf00f // Only used for stable testing purposes + } + return fmt.Sprintf("⟪0x%x⟫", p) +} + +type visitedPointers map[value.Pointer]struct{} + +// Visit inserts pointer v into the visited map and reports whether it had +// already been visited before. +func (m visitedPointers) Visit(v reflect.Value) bool { + p := value.PointerOf(v) + _, visited := m[p] + m[p] = struct{}{} + return visited +} diff --git a/vendor/github.com/google/go-cmp/cmp/report_slices.go b/vendor/github.com/google/go-cmp/cmp/report_slices.go new file mode 100644 index 00000000..eafcf2e4 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report_slices.go @@ -0,0 +1,333 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +package cmp + +import ( + "bytes" + "fmt" + "reflect" + "strings" + "unicode" + "unicode/utf8" + + "github.com/google/go-cmp/cmp/internal/diff" +) + +// CanFormatDiffSlice reports whether we support custom formatting for nodes +// that are slices of primitive kinds or strings. +func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { + switch { + case opts.DiffMode != diffUnknown: + return false // Must be formatting in diff mode + case v.NumDiff == 0: + return false // No differences detected + case v.NumIgnored+v.NumCompared+v.NumTransformed > 0: + // TODO: Handle the case where someone uses bytes.Equal on a large slice. + return false // Some custom option was used to determined equality + case !v.ValueX.IsValid() || !v.ValueY.IsValid(): + return false // Both values must be valid + } + + switch t := v.Type; t.Kind() { + case reflect.String: + case reflect.Array, reflect.Slice: + // Only slices of primitive types have specialized handling. + switch t.Elem().Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, + reflect.Bool, reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128: + default: + return false + } + + // If a sufficient number of elements already differ, + // use specialized formatting even if length requirement is not met. + if v.NumDiff > v.NumSame { + return true + } + default: + return false + } + + // Use specialized string diffing for longer slices or strings. + const minLength = 64 + return v.ValueX.Len() >= minLength && v.ValueY.Len() >= minLength +} + +// FormatDiffSlice prints a diff for the slices (or strings) represented by v. +// This provides custom-tailored logic to make printing of differences in +// textual strings and slices of primitive kinds more readable. +func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { + assert(opts.DiffMode == diffUnknown) + t, vx, vy := v.Type, v.ValueX, v.ValueY + + // Auto-detect the type of the data. + var isLinedText, isText, isBinary bool + var sx, sy string + switch { + case t.Kind() == reflect.String: + sx, sy = vx.String(), vy.String() + isText = true // Initial estimate, verify later + case t.Kind() == reflect.Slice && t.Elem() == reflect.TypeOf(byte(0)): + sx, sy = string(vx.Bytes()), string(vy.Bytes()) + isBinary = true // Initial estimate, verify later + case t.Kind() == reflect.Array: + // Arrays need to be addressable for slice operations to work. + vx2, vy2 := reflect.New(t).Elem(), reflect.New(t).Elem() + vx2.Set(vx) + vy2.Set(vy) + vx, vy = vx2, vy2 + } + if isText || isBinary { + var numLines, lastLineIdx, maxLineLen int + isBinary = false + for i, r := range sx + sy { + if !(unicode.IsPrint(r) || unicode.IsSpace(r)) || r == utf8.RuneError { + isBinary = true + break + } + if r == '\n' { + if maxLineLen < i-lastLineIdx { + maxLineLen = i - lastLineIdx + } + lastLineIdx = i + 1 + numLines++ + } + } + isText = !isBinary + isLinedText = isText && numLines >= 4 && maxLineLen <= 256 + } + + // Format the string into printable records. + var list textList + var delim string + switch { + // If the text appears to be multi-lined text, + // then perform differencing across individual lines. + case isLinedText: + ssx := strings.Split(sx, "\n") + ssy := strings.Split(sy, "\n") + list = opts.formatDiffSlice( + reflect.ValueOf(ssx), reflect.ValueOf(ssy), 1, "line", + func(v reflect.Value, d diffMode) textRecord { + s := formatString(v.Index(0).String()) + return textRecord{Diff: d, Value: textLine(s)} + }, + ) + delim = "\n" + // If the text appears to be single-lined text, + // then perform differencing in approximately fixed-sized chunks. + // The output is printed as quoted strings. + case isText: + list = opts.formatDiffSlice( + reflect.ValueOf(sx), reflect.ValueOf(sy), 64, "byte", + func(v reflect.Value, d diffMode) textRecord { + s := formatString(v.String()) + return textRecord{Diff: d, Value: textLine(s)} + }, + ) + delim = "" + // If the text appears to be binary data, + // then perform differencing in approximately fixed-sized chunks. + // The output is inspired by hexdump. + case isBinary: + list = opts.formatDiffSlice( + reflect.ValueOf(sx), reflect.ValueOf(sy), 16, "byte", + func(v reflect.Value, d diffMode) textRecord { + var ss []string + for i := 0; i < v.Len(); i++ { + ss = append(ss, formatHex(v.Index(i).Uint())) + } + s := strings.Join(ss, ", ") + comment := commentString(fmt.Sprintf("%c|%v|", d, formatASCII(v.String()))) + return textRecord{Diff: d, Value: textLine(s), Comment: comment} + }, + ) + // For all other slices of primitive types, + // then perform differencing in approximately fixed-sized chunks. + // The size of each chunk depends on the width of the element kind. + default: + var chunkSize int + if t.Elem().Kind() == reflect.Bool { + chunkSize = 16 + } else { + switch t.Elem().Bits() { + case 8: + chunkSize = 16 + case 16: + chunkSize = 12 + case 32: + chunkSize = 8 + default: + chunkSize = 8 + } + } + list = opts.formatDiffSlice( + vx, vy, chunkSize, t.Elem().Kind().String(), + func(v reflect.Value, d diffMode) textRecord { + var ss []string + for i := 0; i < v.Len(); i++ { + switch t.Elem().Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + ss = append(ss, fmt.Sprint(v.Index(i).Int())) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + ss = append(ss, formatHex(v.Index(i).Uint())) + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128: + ss = append(ss, fmt.Sprint(v.Index(i).Interface())) + } + } + s := strings.Join(ss, ", ") + return textRecord{Diff: d, Value: textLine(s)} + }, + ) + } + + // Wrap the output with appropriate type information. + var out textNode = textWrap{"{", list, "}"} + if !isText { + // The "{...}" byte-sequence literal is not valid Go syntax for strings. + // Emit the type for extra clarity (e.g. "string{...}"). + if t.Kind() == reflect.String { + opts = opts.WithTypeMode(emitType) + } + return opts.FormatType(t, out) + } + switch t.Kind() { + case reflect.String: + out = textWrap{"strings.Join(", out, fmt.Sprintf(", %q)", delim)} + if t != reflect.TypeOf(string("")) { + out = opts.FormatType(t, out) + } + case reflect.Slice: + out = textWrap{"bytes.Join(", out, fmt.Sprintf(", %q)", delim)} + if t != reflect.TypeOf([]byte(nil)) { + out = opts.FormatType(t, out) + } + } + return out +} + +// formatASCII formats s as an ASCII string. +// This is useful for printing binary strings in a semi-legible way. +func formatASCII(s string) string { + b := bytes.Repeat([]byte{'.'}, len(s)) + for i := 0; i < len(s); i++ { + if ' ' <= s[i] && s[i] <= '~' { + b[i] = s[i] + } + } + return string(b) +} + +func (opts formatOptions) formatDiffSlice( + vx, vy reflect.Value, chunkSize int, name string, + makeRec func(reflect.Value, diffMode) textRecord, +) (list textList) { + es := diff.Difference(vx.Len(), vy.Len(), func(ix int, iy int) diff.Result { + return diff.BoolResult(vx.Index(ix).Interface() == vy.Index(iy).Interface()) + }) + + appendChunks := func(v reflect.Value, d diffMode) int { + n0 := v.Len() + for v.Len() > 0 { + n := chunkSize + if n > v.Len() { + n = v.Len() + } + list = append(list, makeRec(v.Slice(0, n), d)) + v = v.Slice(n, v.Len()) + } + return n0 - v.Len() + } + + groups := coalesceAdjacentEdits(name, es) + groups = coalesceInterveningIdentical(groups, chunkSize/4) + for i, ds := range groups { + // Print equal. + if ds.NumDiff() == 0 { + // Compute the number of leading and trailing equal bytes to print. + var numLo, numHi int + numEqual := ds.NumIgnored + ds.NumIdentical + for numLo < chunkSize*numContextRecords && numLo+numHi < numEqual && i != 0 { + numLo++ + } + for numHi < chunkSize*numContextRecords && numLo+numHi < numEqual && i != len(groups)-1 { + numHi++ + } + if numEqual-(numLo+numHi) <= chunkSize && ds.NumIgnored == 0 { + numHi = numEqual - numLo // Avoid pointless coalescing of single equal row + } + + // Print the equal bytes. + appendChunks(vx.Slice(0, numLo), diffIdentical) + if numEqual > numLo+numHi { + ds.NumIdentical -= numLo + numHi + list.AppendEllipsis(ds) + } + appendChunks(vx.Slice(numEqual-numHi, numEqual), diffIdentical) + vx = vx.Slice(numEqual, vx.Len()) + vy = vy.Slice(numEqual, vy.Len()) + continue + } + + // Print unequal. + nx := appendChunks(vx.Slice(0, ds.NumIdentical+ds.NumRemoved+ds.NumModified), diffRemoved) + vx = vx.Slice(nx, vx.Len()) + ny := appendChunks(vy.Slice(0, ds.NumIdentical+ds.NumInserted+ds.NumModified), diffInserted) + vy = vy.Slice(ny, vy.Len()) + } + assert(vx.Len() == 0 && vy.Len() == 0) + return list +} + +// coalesceAdjacentEdits coalesces the list of edits into groups of adjacent +// equal or unequal counts. +func coalesceAdjacentEdits(name string, es diff.EditScript) (groups []diffStats) { + var prevCase int // Arbitrary index into which case last occurred + lastStats := func(i int) *diffStats { + if prevCase != i { + groups = append(groups, diffStats{Name: name}) + prevCase = i + } + return &groups[len(groups)-1] + } + for _, e := range es { + switch e { + case diff.Identity: + lastStats(1).NumIdentical++ + case diff.UniqueX: + lastStats(2).NumRemoved++ + case diff.UniqueY: + lastStats(2).NumInserted++ + case diff.Modified: + lastStats(2).NumModified++ + } + } + return groups +} + +// coalesceInterveningIdentical coalesces sufficiently short (<= windowSize) +// equal groups into adjacent unequal groups that currently result in a +// dual inserted/removed printout. This acts as a high-pass filter to smooth +// out high-frequency changes within the windowSize. +func coalesceInterveningIdentical(groups []diffStats, windowSize int) []diffStats { + groups, groupsOrig := groups[:0], groups + for i, ds := range groupsOrig { + if len(groups) >= 2 && ds.NumDiff() > 0 { + prev := &groups[len(groups)-2] // Unequal group + curr := &groups[len(groups)-1] // Equal group + next := &groupsOrig[i] // Unequal group + hadX, hadY := prev.NumRemoved > 0, prev.NumInserted > 0 + hasX, hasY := next.NumRemoved > 0, next.NumInserted > 0 + if ((hadX || hasX) && (hadY || hasY)) && curr.NumIdentical <= windowSize { + *prev = prev.Append(*curr).Append(*next) + groups = groups[:len(groups)-1] // Truncate off equal group + continue + } + } + groups = append(groups, ds) + } + return groups +} diff --git a/vendor/github.com/google/go-cmp/cmp/report_text.go b/vendor/github.com/google/go-cmp/cmp/report_text.go new file mode 100644 index 00000000..8b8fcab7 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report_text.go @@ -0,0 +1,387 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +package cmp + +import ( + "bytes" + "fmt" + "math/rand" + "strings" + "time" + + "github.com/google/go-cmp/cmp/internal/flags" +) + +var randBool = rand.New(rand.NewSource(time.Now().Unix())).Intn(2) == 0 + +type indentMode int + +func (n indentMode) appendIndent(b []byte, d diffMode) []byte { + // The output of Diff is documented as being unstable to provide future + // flexibility in changing the output for more humanly readable reports. + // This logic intentionally introduces instability to the exact output + // so that users can detect accidental reliance on stability early on, + // rather than much later when an actual change to the format occurs. + if flags.Deterministic || randBool { + // Use regular spaces (U+0020). + switch d { + case diffUnknown, diffIdentical: + b = append(b, " "...) + case diffRemoved: + b = append(b, "- "...) + case diffInserted: + b = append(b, "+ "...) + } + } else { + // Use non-breaking spaces (U+00a0). + switch d { + case diffUnknown, diffIdentical: + b = append(b, "  "...) + case diffRemoved: + b = append(b, "- "...) + case diffInserted: + b = append(b, "+ "...) + } + } + return repeatCount(n).appendChar(b, '\t') +} + +type repeatCount int + +func (n repeatCount) appendChar(b []byte, c byte) []byte { + for ; n > 0; n-- { + b = append(b, c) + } + return b +} + +// textNode is a simplified tree-based representation of structured text. +// Possible node types are textWrap, textList, or textLine. +type textNode interface { + // Len reports the length in bytes of a single-line version of the tree. + // Nested textRecord.Diff and textRecord.Comment fields are ignored. + Len() int + // Equal reports whether the two trees are structurally identical. + // Nested textRecord.Diff and textRecord.Comment fields are compared. + Equal(textNode) bool + // String returns the string representation of the text tree. + // It is not guaranteed that len(x.String()) == x.Len(), + // nor that x.String() == y.String() implies that x.Equal(y). + String() string + + // formatCompactTo formats the contents of the tree as a single-line string + // to the provided buffer. Any nested textRecord.Diff and textRecord.Comment + // fields are ignored. + // + // However, not all nodes in the tree should be collapsed as a single-line. + // If a node can be collapsed as a single-line, it is replaced by a textLine + // node. Since the top-level node cannot replace itself, this also returns + // the current node itself. + // + // This does not mutate the receiver. + formatCompactTo([]byte, diffMode) ([]byte, textNode) + // formatExpandedTo formats the contents of the tree as a multi-line string + // to the provided buffer. In order for column alignment to operate well, + // formatCompactTo must be called before calling formatExpandedTo. + formatExpandedTo([]byte, diffMode, indentMode) []byte +} + +// textWrap is a wrapper that concatenates a prefix and/or a suffix +// to the underlying node. +type textWrap struct { + Prefix string // e.g., "bytes.Buffer{" + Value textNode // textWrap | textList | textLine + Suffix string // e.g., "}" +} + +func (s textWrap) Len() int { + return len(s.Prefix) + s.Value.Len() + len(s.Suffix) +} +func (s1 textWrap) Equal(s2 textNode) bool { + if s2, ok := s2.(textWrap); ok { + return s1.Prefix == s2.Prefix && s1.Value.Equal(s2.Value) && s1.Suffix == s2.Suffix + } + return false +} +func (s textWrap) String() string { + var d diffMode + var n indentMode + _, s2 := s.formatCompactTo(nil, d) + b := n.appendIndent(nil, d) // Leading indent + b = s2.formatExpandedTo(b, d, n) // Main body + b = append(b, '\n') // Trailing newline + return string(b) +} +func (s textWrap) formatCompactTo(b []byte, d diffMode) ([]byte, textNode) { + n0 := len(b) // Original buffer length + b = append(b, s.Prefix...) + b, s.Value = s.Value.formatCompactTo(b, d) + b = append(b, s.Suffix...) + if _, ok := s.Value.(textLine); ok { + return b, textLine(b[n0:]) + } + return b, s +} +func (s textWrap) formatExpandedTo(b []byte, d diffMode, n indentMode) []byte { + b = append(b, s.Prefix...) + b = s.Value.formatExpandedTo(b, d, n) + b = append(b, s.Suffix...) + return b +} + +// textList is a comma-separated list of textWrap or textLine nodes. +// The list may be formatted as multi-lines or single-line at the discretion +// of the textList.formatCompactTo method. +type textList []textRecord +type textRecord struct { + Diff diffMode // e.g., 0 or '-' or '+' + Key string // e.g., "MyField" + Value textNode // textWrap | textLine + Comment fmt.Stringer // e.g., "6 identical fields" +} + +// AppendEllipsis appends a new ellipsis node to the list if none already +// exists at the end. If cs is non-zero it coalesces the statistics with the +// previous diffStats. +func (s *textList) AppendEllipsis(ds diffStats) { + hasStats := ds != diffStats{} + if len(*s) == 0 || !(*s)[len(*s)-1].Value.Equal(textEllipsis) { + if hasStats { + *s = append(*s, textRecord{Value: textEllipsis, Comment: ds}) + } else { + *s = append(*s, textRecord{Value: textEllipsis}) + } + return + } + if hasStats { + (*s)[len(*s)-1].Comment = (*s)[len(*s)-1].Comment.(diffStats).Append(ds) + } +} + +func (s textList) Len() (n int) { + for i, r := range s { + n += len(r.Key) + if r.Key != "" { + n += len(": ") + } + n += r.Value.Len() + if i < len(s)-1 { + n += len(", ") + } + } + return n +} + +func (s1 textList) Equal(s2 textNode) bool { + if s2, ok := s2.(textList); ok { + if len(s1) != len(s2) { + return false + } + for i := range s1 { + r1, r2 := s1[i], s2[i] + if !(r1.Diff == r2.Diff && r1.Key == r2.Key && r1.Value.Equal(r2.Value) && r1.Comment == r2.Comment) { + return false + } + } + return true + } + return false +} + +func (s textList) String() string { + return textWrap{"{", s, "}"}.String() +} + +func (s textList) formatCompactTo(b []byte, d diffMode) ([]byte, textNode) { + s = append(textList(nil), s...) // Avoid mutating original + + // Determine whether we can collapse this list as a single line. + n0 := len(b) // Original buffer length + var multiLine bool + for i, r := range s { + if r.Diff == diffInserted || r.Diff == diffRemoved { + multiLine = true + } + b = append(b, r.Key...) + if r.Key != "" { + b = append(b, ": "...) + } + b, s[i].Value = r.Value.formatCompactTo(b, d|r.Diff) + if _, ok := s[i].Value.(textLine); !ok { + multiLine = true + } + if r.Comment != nil { + multiLine = true + } + if i < len(s)-1 { + b = append(b, ", "...) + } + } + // Force multi-lined output when printing a removed/inserted node that + // is sufficiently long. + if (d == diffInserted || d == diffRemoved) && len(b[n0:]) > 80 { + multiLine = true + } + if !multiLine { + return b, textLine(b[n0:]) + } + return b, s +} + +func (s textList) formatExpandedTo(b []byte, d diffMode, n indentMode) []byte { + alignKeyLens := s.alignLens( + func(r textRecord) bool { + _, isLine := r.Value.(textLine) + return r.Key == "" || !isLine + }, + func(r textRecord) int { return len(r.Key) }, + ) + alignValueLens := s.alignLens( + func(r textRecord) bool { + _, isLine := r.Value.(textLine) + return !isLine || r.Value.Equal(textEllipsis) || r.Comment == nil + }, + func(r textRecord) int { return len(r.Value.(textLine)) }, + ) + + // Format the list as a multi-lined output. + n++ + for i, r := range s { + b = n.appendIndent(append(b, '\n'), d|r.Diff) + if r.Key != "" { + b = append(b, r.Key+": "...) + } + b = alignKeyLens[i].appendChar(b, ' ') + + b = r.Value.formatExpandedTo(b, d|r.Diff, n) + if !r.Value.Equal(textEllipsis) { + b = append(b, ',') + } + b = alignValueLens[i].appendChar(b, ' ') + + if r.Comment != nil { + b = append(b, " // "+r.Comment.String()...) + } + } + n-- + + return n.appendIndent(append(b, '\n'), d) +} + +func (s textList) alignLens( + skipFunc func(textRecord) bool, + lenFunc func(textRecord) int, +) []repeatCount { + var startIdx, endIdx, maxLen int + lens := make([]repeatCount, len(s)) + for i, r := range s { + if skipFunc(r) { + for j := startIdx; j < endIdx && j < len(s); j++ { + lens[j] = repeatCount(maxLen - lenFunc(s[j])) + } + startIdx, endIdx, maxLen = i+1, i+1, 0 + } else { + if maxLen < lenFunc(r) { + maxLen = lenFunc(r) + } + endIdx = i + 1 + } + } + for j := startIdx; j < endIdx && j < len(s); j++ { + lens[j] = repeatCount(maxLen - lenFunc(s[j])) + } + return lens +} + +// textLine is a single-line segment of text and is always a leaf node +// in the textNode tree. +type textLine []byte + +var ( + textNil = textLine("nil") + textEllipsis = textLine("...") +) + +func (s textLine) Len() int { + return len(s) +} +func (s1 textLine) Equal(s2 textNode) bool { + if s2, ok := s2.(textLine); ok { + return bytes.Equal([]byte(s1), []byte(s2)) + } + return false +} +func (s textLine) String() string { + return string(s) +} +func (s textLine) formatCompactTo(b []byte, d diffMode) ([]byte, textNode) { + return append(b, s...), s +} +func (s textLine) formatExpandedTo(b []byte, _ diffMode, _ indentMode) []byte { + return append(b, s...) +} + +type diffStats struct { + Name string + NumIgnored int + NumIdentical int + NumRemoved int + NumInserted int + NumModified int +} + +func (s diffStats) NumDiff() int { + return s.NumRemoved + s.NumInserted + s.NumModified +} + +func (s diffStats) Append(ds diffStats) diffStats { + assert(s.Name == ds.Name) + s.NumIgnored += ds.NumIgnored + s.NumIdentical += ds.NumIdentical + s.NumRemoved += ds.NumRemoved + s.NumInserted += ds.NumInserted + s.NumModified += ds.NumModified + return s +} + +// String prints a humanly-readable summary of coalesced records. +// +// Example: +// diffStats{Name: "Field", NumIgnored: 5}.String() => "5 ignored fields" +func (s diffStats) String() string { + var ss []string + var sum int + labels := [...]string{"ignored", "identical", "removed", "inserted", "modified"} + counts := [...]int{s.NumIgnored, s.NumIdentical, s.NumRemoved, s.NumInserted, s.NumModified} + for i, n := range counts { + if n > 0 { + ss = append(ss, fmt.Sprintf("%d %v", n, labels[i])) + } + sum += n + } + + // Pluralize the name (adjusting for some obscure English grammar rules). + name := s.Name + if sum > 1 { + name += "s" + if strings.HasSuffix(name, "ys") { + name = name[:len(name)-2] + "ies" // e.g., "entrys" => "entries" + } + } + + // Format the list according to English grammar (with Oxford comma). + switch n := len(ss); n { + case 0: + return "" + case 1, 2: + return strings.Join(ss, " and ") + " " + name + default: + return strings.Join(ss[:n-1], ", ") + ", and " + ss[n-1] + " " + name + } +} + +type commentString string + +func (s commentString) String() string { return string(s) } diff --git a/vendor/github.com/google/go-cmp/cmp/report_value.go b/vendor/github.com/google/go-cmp/cmp/report_value.go new file mode 100644 index 00000000..83031a7f --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report_value.go @@ -0,0 +1,121 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +package cmp + +import "reflect" + +// valueNode represents a single node within a report, which is a +// structured representation of the value tree, containing information +// regarding which nodes are equal or not. +type valueNode struct { + parent *valueNode + + Type reflect.Type + ValueX reflect.Value + ValueY reflect.Value + + // NumSame is the number of leaf nodes that are equal. + // All descendants are equal only if NumDiff is 0. + NumSame int + // NumDiff is the number of leaf nodes that are not equal. + NumDiff int + // NumIgnored is the number of leaf nodes that are ignored. + NumIgnored int + // NumCompared is the number of leaf nodes that were compared + // using an Equal method or Comparer function. + NumCompared int + // NumTransformed is the number of non-leaf nodes that were transformed. + NumTransformed int + // NumChildren is the number of transitive descendants of this node. + // This counts from zero; thus, leaf nodes have no descendants. + NumChildren int + // MaxDepth is the maximum depth of the tree. This counts from zero; + // thus, leaf nodes have a depth of zero. + MaxDepth int + + // Records is a list of struct fields, slice elements, or map entries. + Records []reportRecord // If populated, implies Value is not populated + + // Value is the result of a transformation, pointer indirect, of + // type assertion. + Value *valueNode // If populated, implies Records is not populated + + // TransformerName is the name of the transformer. + TransformerName string // If non-empty, implies Value is populated +} +type reportRecord struct { + Key reflect.Value // Invalid for slice element + Value *valueNode +} + +func (parent *valueNode) PushStep(ps PathStep) (child *valueNode) { + vx, vy := ps.Values() + child = &valueNode{parent: parent, Type: ps.Type(), ValueX: vx, ValueY: vy} + switch s := ps.(type) { + case StructField: + assert(parent.Value == nil) + parent.Records = append(parent.Records, reportRecord{Key: reflect.ValueOf(s.Name()), Value: child}) + case SliceIndex: + assert(parent.Value == nil) + parent.Records = append(parent.Records, reportRecord{Value: child}) + case MapIndex: + assert(parent.Value == nil) + parent.Records = append(parent.Records, reportRecord{Key: s.Key(), Value: child}) + case Indirect: + assert(parent.Value == nil && parent.Records == nil) + parent.Value = child + case TypeAssertion: + assert(parent.Value == nil && parent.Records == nil) + parent.Value = child + case Transform: + assert(parent.Value == nil && parent.Records == nil) + parent.Value = child + parent.TransformerName = s.Name() + parent.NumTransformed++ + default: + assert(parent == nil) // Must be the root step + } + return child +} + +func (r *valueNode) Report(rs Result) { + assert(r.MaxDepth == 0) // May only be called on leaf nodes + + if rs.ByIgnore() { + r.NumIgnored++ + } else { + if rs.Equal() { + r.NumSame++ + } else { + r.NumDiff++ + } + } + assert(r.NumSame+r.NumDiff+r.NumIgnored == 1) + + if rs.ByMethod() { + r.NumCompared++ + } + if rs.ByFunc() { + r.NumCompared++ + } + assert(r.NumCompared <= 1) +} + +func (child *valueNode) PopStep() (parent *valueNode) { + if child.parent == nil { + return nil + } + parent = child.parent + parent.NumSame += child.NumSame + parent.NumDiff += child.NumDiff + parent.NumIgnored += child.NumIgnored + parent.NumCompared += child.NumCompared + parent.NumTransformed += child.NumTransformed + parent.NumChildren += child.NumChildren + 1 + if parent.MaxDepth < child.MaxDepth+1 { + parent.MaxDepth = child.MaxDepth + 1 + } + return parent +} diff --git a/vendor/github.com/google/go-cmp/cmp/reporter.go b/vendor/github.com/google/go-cmp/cmp/reporter.go deleted file mode 100644 index 20e9f18e..00000000 --- a/vendor/github.com/google/go-cmp/cmp/reporter.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2017, The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. - -package cmp - -import ( - "fmt" - "reflect" - "strings" - - "github.com/google/go-cmp/cmp/internal/value" -) - -type defaultReporter struct { - Option - diffs []string // List of differences, possibly truncated - ndiffs int // Total number of differences - nbytes int // Number of bytes in diffs - nlines int // Number of lines in diffs -} - -var _ reporter = (*defaultReporter)(nil) - -func (r *defaultReporter) Report(x, y reflect.Value, eq bool, p Path) { - if eq { - return // Ignore equal results - } - const maxBytes = 4096 - const maxLines = 256 - r.ndiffs++ - if r.nbytes < maxBytes && r.nlines < maxLines { - sx := value.Format(x, value.FormatConfig{UseStringer: true}) - sy := value.Format(y, value.FormatConfig{UseStringer: true}) - if sx == sy { - // Unhelpful output, so use more exact formatting. - sx = value.Format(x, value.FormatConfig{PrintPrimitiveType: true}) - sy = value.Format(y, value.FormatConfig{PrintPrimitiveType: true}) - } - s := fmt.Sprintf("%#v:\n\t-: %s\n\t+: %s\n", p, sx, sy) - r.diffs = append(r.diffs, s) - r.nbytes += len(s) - r.nlines += strings.Count(s, "\n") - } -} - -func (r *defaultReporter) String() string { - s := strings.Join(r.diffs, "") - if r.ndiffs == len(r.diffs) { - return s - } - return fmt.Sprintf("%s... %d more differences ...", s, r.ndiffs-len(r.diffs)) -} diff --git a/vendor/github.com/google/go-cmp/cmp/unsafe_panic.go b/vendor/github.com/google/go-cmp/cmp/unsafe_panic.go deleted file mode 100644 index d1518eb3..00000000 --- a/vendor/github.com/google/go-cmp/cmp/unsafe_panic.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2017, The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. - -// +build purego appengine js - -package cmp - -import "reflect" - -const supportAllowUnexported = false - -func unsafeRetrieveField(reflect.Value, reflect.StructField) reflect.Value { - panic("unsafeRetrieveField is not implemented") -} diff --git a/vendor/github.com/google/go-cmp/cmp/unsafe_reflect.go b/vendor/github.com/google/go-cmp/cmp/unsafe_reflect.go deleted file mode 100644 index 579b6550..00000000 --- a/vendor/github.com/google/go-cmp/cmp/unsafe_reflect.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2017, The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. - -// +build !purego,!appengine,!js - -package cmp - -import ( - "reflect" - "unsafe" -) - -const supportAllowUnexported = true - -// unsafeRetrieveField uses unsafe to forcibly retrieve any field from a struct -// such that the value has read-write permissions. -// -// The parent struct, v, must be addressable, while f must be a StructField -// describing the field to retrieve. -func unsafeRetrieveField(v reflect.Value, f reflect.StructField) reflect.Value { - return reflect.NewAt(f.Type, unsafe.Pointer(v.UnsafeAddr()+f.Offset)).Elem() -} diff --git a/vendor/github.com/google/uuid/.travis.yml b/vendor/github.com/google/uuid/.travis.yml new file mode 100644 index 00000000..d8156a60 --- /dev/null +++ b/vendor/github.com/google/uuid/.travis.yml @@ -0,0 +1,9 @@ +language: go + +go: + - 1.4.3 + - 1.5.3 + - tip + +script: + - go test -v ./... diff --git a/vendor/github.com/google/uuid/CONTRIBUTING.md b/vendor/github.com/google/uuid/CONTRIBUTING.md new file mode 100644 index 00000000..04fdf09f --- /dev/null +++ b/vendor/github.com/google/uuid/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# How to contribute + +We definitely welcome patches and contribution to this project! + +### Legal requirements + +In order to protect both you and ourselves, you will need to sign the +[Contributor License Agreement](https://cla.developers.google.com/clas). + +You may have already signed it for other Google projects. diff --git a/vendor/github.com/google/uuid/README.md b/vendor/github.com/google/uuid/README.md new file mode 100644 index 00000000..9d92c11f --- /dev/null +++ b/vendor/github.com/google/uuid/README.md @@ -0,0 +1,19 @@ +# uuid ![build status](https://travis-ci.org/google/uuid.svg?branch=master) +The uuid package generates and inspects UUIDs based on +[RFC 4122](http://tools.ietf.org/html/rfc4122) +and DCE 1.1: Authentication and Security Services. + +This package is based on the github.com/pborman/uuid package (previously named +code.google.com/p/go-uuid). It differs from these earlier packages in that +a UUID is a 16 byte array rather than a byte slice. One loss due to this +change is the ability to represent an invalid UUID (vs a NIL UUID). + +###### Install +`go get github.com/google/uuid` + +###### Documentation +[![GoDoc](https://godoc.org/github.com/google/uuid?status.svg)](http://godoc.org/github.com/google/uuid) + +Full `go doc` style documentation for the package can be viewed online without +installing this package by using the GoDoc site here: +http://godoc.org/github.com/google/uuid diff --git a/vendor/github.com/google/uuid/go.mod b/vendor/github.com/google/uuid/go.mod new file mode 100644 index 00000000..fc84cd79 --- /dev/null +++ b/vendor/github.com/google/uuid/go.mod @@ -0,0 +1 @@ +module github.com/google/uuid diff --git a/vendor/github.com/gosimple/slug/.gitignore b/vendor/github.com/gosimple/slug/.gitignore new file mode 100644 index 00000000..25d190e2 --- /dev/null +++ b/vendor/github.com/gosimple/slug/.gitignore @@ -0,0 +1,2 @@ +_* +cover*.out diff --git a/vendor/github.com/gosimple/slug/.travis.yml b/vendor/github.com/gosimple/slug/.travis.yml new file mode 100644 index 00000000..eb6d09ee --- /dev/null +++ b/vendor/github.com/gosimple/slug/.travis.yml @@ -0,0 +1,20 @@ +language: go + +go: + - "1.x" + - master +matrix: + allow_failures: + - go: master + fast_finish: true + +before_script: + - go get -t -v ./... + - go get -v golang.org/x/lint/golint + - go get -v honnef.co/go/tools/cmd/staticcheck + - go vet ./... +script: + # run all our tests with race detector + - go test -v -race ./... + # "go vet on steroids" + linter + - staticcheck ./... diff --git a/vendor/github.com/gosimple/slug/README.md b/vendor/github.com/gosimple/slug/README.md new file mode 100644 index 00000000..3745bf99 --- /dev/null +++ b/vendor/github.com/gosimple/slug/README.md @@ -0,0 +1,62 @@ +slug +==== + +Package `slug` generate slug from unicode string, URL-friendly slugify with +multiple languages support. + +[![GoDoc](https://godoc.org/github.com/gosimple/slug?status.png)](https://godoc.org/github.com/gosimple/slug) +[![Build Status](https://travis-ci.com/gosimple/slug.svg?branch=master)](https://travis-ci.com/gosimple/slug) + +[Documentation online](http://godoc.org/github.com/gosimple/slug) + +## Example + +```go +package main + +import ( + "fmt" + "github.com/gosimple/slug" +) + +func main() { + text := slug.Make("Hellö Wörld хелло ворлд") + fmt.Println(text) // Will print: "hello-world-khello-vorld" + + someText := slug.Make("影師") + fmt.Println(someText) // Will print: "ying-shi" + + enText := slug.MakeLang("This & that", "en") + fmt.Println(enText) // Will print: "this-and-that" + + deText := slug.MakeLang("Diese & Dass", "de") + fmt.Println(deText) // Will print: "diese-und-dass" + + slug.Lowercase = false // Keep uppercase characters + deUppercaseText := slug.MakeLang("Diese & Dass", "de") + fmt.Println(deUppercaseText) // Will print: "Diese-und-Dass" + + slug.CustomSub = map[string]string{ + "water": "sand", + } + textSub := slug.Make("water is hot") + fmt.Println(textSub) // Will print: "sand-is-hot" +} + +``` + +### Requests or bugs? + + +## Installation +```sh +go get -u github.com/gosimple/slug +``` + +## License + +The source files are distributed under the +[Mozilla Public License, version 2.0](http://mozilla.org/MPL/2.0/), +unless otherwise noted. +Please read the [FAQ](http://www.mozilla.org/MPL/2.0/FAQ.html) +if you have further questions regarding the license. diff --git a/vendor/github.com/gosimple/slug/doc.go b/vendor/github.com/gosimple/slug/doc.go index ffbe2c22..f6f764e6 100644 --- a/vendor/github.com/gosimple/slug/doc.go +++ b/vendor/github.com/gosimple/slug/doc.go @@ -18,22 +18,26 @@ Example: func main () { text := slug.Make("Hellö Wörld хелло ворлд") - fmt.Println(text) // Will print hello-world-khello-vorld + fmt.Println(text) // Will print: "hello-world-khello-vorld" someText := slug.Make("影師") - fmt.Println(someText) // Will print: ying-shi + fmt.Println(someText) // Will print: "ying-shi" enText := slug.MakeLang("This & that", "en") - fmt.Println(enText) // Will print 'this-and-that' + fmt.Println(enText) // Will print: "this-and-that" deText := slug.MakeLang("Diese & Dass", "de") - fmt.Println(deText) // Will print 'diese-und-dass' + fmt.Println(deText) // Will print: "diese-und-dass" + + slug.Lowercase = false // Keep uppercase characters + deUppercaseText := slug.MakeLang("Diese & Dass", "de") + fmt.Println(deUppercaseText) // Will print: "Diese-und-Dass" slug.CustomSub = map[string]string{ "water": "sand", } textSub := slug.Make("water is hot") - fmt.Println(textSub) // Will print 'sand-is-hot' + fmt.Println(textSub) // Will print: "sand-is-hot" } Requests or bugs? diff --git a/vendor/github.com/gosimple/slug/languages_substitution.go b/vendor/github.com/gosimple/slug/languages_substitution.go index 1b6cf4d0..2e4d914a 100644 --- a/vendor/github.com/gosimple/slug/languages_substitution.go +++ b/vendor/github.com/gosimple/slug/languages_substitution.go @@ -30,11 +30,11 @@ var deSub = map[rune]string{ '&': "und", '@': "an", 'ä': "ae", - 'Ä': "ae", + 'Ä': "Ae", 'ö': "oe", - 'Ö': "oe", + 'Ö': "Oe", 'ü': "ue", - 'Ü': "ue", + 'Ü': "Ue", } var enSub = map[rune]string{ @@ -83,15 +83,15 @@ var trSub = map[rune]string{ '&': "ve", '@': "et", 'ş': "s", - 'Ş': "s", + 'Ş': "S", 'ü': "u", - 'Ü': "u", + 'Ü': "U", 'ö': "o", - 'Ö': "o", - 'İ': "i", + 'Ö': "O", + 'İ': "I", 'ı': "i", 'ğ': "g", - 'Ğ': "g", + 'Ğ': "G", 'ç': "c", - 'Ç': "c", + 'Ç': "C", } diff --git a/vendor/github.com/gosimple/slug/slug.go b/vendor/github.com/gosimple/slug/slug.go index 289cbc0a..22637e74 100644 --- a/vendor/github.com/gosimple/slug/slug.go +++ b/vendor/github.com/gosimple/slug/slug.go @@ -28,7 +28,11 @@ var ( // after MaxLength. MaxLength int - regexpNonAuthorizedChars = regexp.MustCompile("[^a-z0-9-_]") + // Lowercase defines if the resulting slug is transformed to lowercase. + // Default is true. + Lowercase = true + + regexpNonAuthorizedChars = regexp.MustCompile("[^a-zA-Z0-9-_]") regexpMultipleDashes = regexp.MustCompile("-+") ) @@ -50,23 +54,24 @@ func MakeLang(s string, lang string) (slug string) { slug = SubstituteRune(slug, CustomRuneSub) slug = Substitute(slug, CustomSub) - // Process string with selected substitution language - switch lang { - case "de": + // Process string with selected substitution language. + // Catch ISO 3166-1, ISO 639-1:2002 and ISO 639-3:2007. + switch strings.ToLower(lang) { + case "de", "deu": slug = SubstituteRune(slug, deSub) - case "en": + case "en", "eng": slug = SubstituteRune(slug, enSub) - case "es": + case "es", "spa": slug = SubstituteRune(slug, esSub) - case "fi": + case "fi", "fin": slug = SubstituteRune(slug, fiSub) - case "gr": + case "gr", "el", "ell": slug = SubstituteRune(slug, grSub) - case "nl": + case "nl", "nld": slug = SubstituteRune(slug, nlSub) - case "pl": + case "pl", "pol": slug = SubstituteRune(slug, plSub) - case "tr": + case "tr", "tur": slug = SubstituteRune(slug, trSub) default: // fallback to "en" if lang not found slug = SubstituteRune(slug, enSub) @@ -75,7 +80,9 @@ func MakeLang(s string, lang string) (slug string) { // Process all non ASCII symbols slug = unidecode.Unidecode(slug) - slug = strings.ToLower(slug) + if Lowercase { + slug = strings.ToLower(slug) + } // Process all remaining symbols slug = regexpNonAuthorizedChars.ReplaceAllString(slug, "-") diff --git a/vendor/github.com/gotestyourself/gotestyourself/LICENSE b/vendor/github.com/gotestyourself/gotestyourself/LICENSE deleted file mode 100644 index d6456956..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/gotestyourself/gotestyourself/assert/assert.go b/vendor/github.com/gotestyourself/gotestyourself/assert/assert.go deleted file mode 100644 index c53c062b..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/assert/assert.go +++ /dev/null @@ -1,301 +0,0 @@ -/*Package assert provides assertions for comparing expected values to actual -values. When an assertion fails a helpful error message is printed. - -Assert and Check - -Assert() and Check() both accept a Comparison, and fail the test when the -comparison fails. The one difference is that Assert() will end the test execution -immediately (using t.FailNow()) whereas Check() will fail the test (using t.Fail()), -return the value of the comparison, then proceed with the rest of the test case. - -Example usage - -The example below shows assert used with some common types. - - - import ( - "testing" - - "github.com/gotestyourself/gotestyourself/assert" - is "github.com/gotestyourself/gotestyourself/assert/cmp" - ) - - func TestEverything(t *testing.T) { - // booleans - assert.Assert(t, ok) - assert.Assert(t, !missing) - - // primitives - assert.Equal(t, count, 1) - assert.Equal(t, msg, "the message") - assert.Assert(t, total != 10) // NotEqual - - // errors - assert.NilError(t, closer.Close()) - assert.Error(t, err, "the exact error message") - assert.ErrorContains(t, err, "includes this") - assert.ErrorType(t, err, os.IsNotExist) - - // complex types - assert.DeepEqual(t, result, myStruct{Name: "title"}) - assert.Assert(t, is.Len(items, 3)) - assert.Assert(t, len(sequence) != 0) // NotEmpty - assert.Assert(t, is.Contains(mapping, "key")) - - // pointers and interface - assert.Assert(t, is.Nil(ref)) - assert.Assert(t, ref != nil) // NotNil - } - -Comparisons - -Package assert/cmp (http://bit.do/assert-cmp) provides -many common comparisons. Additional comparisons can be written to compare -values in other ways. See the example Assert (CustomComparison). - -Automated migration from testify - -gty-migrate-from-testify is a binary which can update source code which uses -testify assertions to use the assertions provided by this package. - -See http://bit.do/cmd-gty-migrate-from-testify. - - -*/ -package assert - -import ( - "fmt" - "go/ast" - "go/token" - - gocmp "github.com/google/go-cmp/cmp" - "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/internal/format" - "github.com/gotestyourself/gotestyourself/internal/source" -) - -// BoolOrComparison can be a bool, or cmp.Comparison. See Assert() for usage. -type BoolOrComparison interface{} - -// TestingT is the subset of testing.T used by the assert package. -type TestingT interface { - FailNow() - Fail() - Log(args ...interface{}) -} - -type helperT interface { - Helper() -} - -const failureMessage = "assertion failed: " - -// nolint: gocyclo -func assert( - t TestingT, - failer func(), - argSelector argSelector, - comparison BoolOrComparison, - msgAndArgs ...interface{}, -) bool { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - var success bool - switch check := comparison.(type) { - case bool: - if check { - return true - } - logFailureFromBool(t, msgAndArgs...) - - // Undocumented legacy comparison without Result type - case func() (success bool, message string): - success = runCompareFunc(t, check, msgAndArgs...) - - case nil: - return true - - case error: - msg := "error is not nil: " - t.Log(format.WithCustomMessage(failureMessage+msg+check.Error(), msgAndArgs...)) - - case cmp.Comparison: - success = runComparison(t, argSelector, check, msgAndArgs...) - - case func() cmp.Result: - success = runComparison(t, argSelector, check, msgAndArgs...) - - default: - t.Log(fmt.Sprintf("invalid Comparison: %v (%T)", check, check)) - } - - if success { - return true - } - failer() - return false -} - -func runCompareFunc( - t TestingT, - f func() (success bool, message string), - msgAndArgs ...interface{}, -) bool { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - if success, message := f(); !success { - t.Log(format.WithCustomMessage(failureMessage+message, msgAndArgs...)) - return false - } - return true -} - -func logFailureFromBool(t TestingT, msgAndArgs ...interface{}) { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - const stackIndex = 3 // Assert()/Check(), assert(), formatFailureFromBool() - const comparisonArgPos = 1 - args, err := source.CallExprArgs(stackIndex) - if err != nil { - t.Log(err.Error()) - return - } - - msg, err := boolFailureMessage(args[comparisonArgPos]) - if err != nil { - t.Log(err.Error()) - msg = "expression is false" - } - - t.Log(format.WithCustomMessage(failureMessage+msg, msgAndArgs...)) -} - -func boolFailureMessage(expr ast.Expr) (string, error) { - if binaryExpr, ok := expr.(*ast.BinaryExpr); ok && binaryExpr.Op == token.NEQ { - x, err := source.FormatNode(binaryExpr.X) - if err != nil { - return "", err - } - y, err := source.FormatNode(binaryExpr.Y) - if err != nil { - return "", err - } - return x + " is " + y, nil - } - - if unaryExpr, ok := expr.(*ast.UnaryExpr); ok && unaryExpr.Op == token.NOT { - x, err := source.FormatNode(unaryExpr.X) - if err != nil { - return "", err - } - return x + " is true", nil - } - - formatted, err := source.FormatNode(expr) - if err != nil { - return "", err - } - return "expression is false: " + formatted, nil -} - -// Assert performs a comparison. If the comparison fails the test is marked as -// failed, a failure message is logged, and execution is stopped immediately. -// -// The comparison argument may be one of three types: bool, cmp.Comparison or -// error. -// When called with a bool the failure message will contain the literal source -// code of the expression. -// When called with a cmp.Comparison the comparison is responsible for producing -// a helpful failure message. -// When called with an error a nil value is considered success. A non-nil error -// is a failure, and Error() is used as the failure message. -func Assert(t TestingT, comparison BoolOrComparison, msgAndArgs ...interface{}) { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - assert(t, t.FailNow, argsFromComparisonCall, comparison, msgAndArgs...) -} - -// Check performs a comparison. If the comparison fails the test is marked as -// failed, a failure message is logged, and Check returns false. Otherwise returns -// true. -// -// See Assert for details about the comparison arg and failure messages. -func Check(t TestingT, comparison BoolOrComparison, msgAndArgs ...interface{}) bool { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - return assert(t, t.Fail, argsFromComparisonCall, comparison, msgAndArgs...) -} - -// NilError fails the test immediately if err is not nil. -// This is equivalent to Assert(t, err) -func NilError(t TestingT, err error, msgAndArgs ...interface{}) { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - assert(t, t.FailNow, argsAfterT, err, msgAndArgs...) -} - -// Equal uses the == operator to assert two values are equal and fails the test -// if they are not equal. This is equivalent to Assert(t, cmp.Equal(x, y)). -func Equal(t TestingT, x, y interface{}, msgAndArgs ...interface{}) { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - assert(t, t.FailNow, argsAfterT, cmp.Equal(x, y), msgAndArgs...) -} - -// DeepEqual uses google/go-cmp (http://bit.do/go-cmp) to assert two values are -// equal and fails the test if they are not equal. -// -// Package assert/opt (http://bit.do/t-assert-opt) provides some additional -// commonly used Options. -// -// This is equivalent to Assert(t, cmp.DeepEqual(x, y)). -func DeepEqual(t TestingT, x, y interface{}, opts ...gocmp.Option) { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - assert(t, t.FailNow, argsAfterT, cmp.DeepEqual(x, y, opts...)) -} - -// Error fails the test if err is nil, or the error message is not the expected -// message. -// Equivalent to Assert(t, cmp.Error(err, message)). -func Error(t TestingT, err error, message string, msgAndArgs ...interface{}) { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - assert(t, t.FailNow, argsAfterT, cmp.Error(err, message), msgAndArgs...) -} - -// ErrorContains fails the test if err is nil, or the error message does not -// contain the expected substring. -// Equivalent to Assert(t, cmp.ErrorContains(err, substring)). -func ErrorContains(t TestingT, err error, substring string, msgAndArgs ...interface{}) { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - assert(t, t.FailNow, argsAfterT, cmp.ErrorContains(err, substring), msgAndArgs...) -} - -// ErrorType fails the test if err is nil, or err is not the expected type. -// -// Expected can be one of: -// a func(error) bool which returns true if the error is the expected type, -// an instance of (or a pointer to) a struct of the expected type, -// a pointer to an interface the error is expected to implement, -// a reflect.Type of the expected struct or interface. -// -// Equivalent to Assert(t, cmp.ErrorType(err, expected)). -func ErrorType(t TestingT, err error, expected interface{}, msgAndArgs ...interface{}) { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - assert(t, t.FailNow, argsAfterT, cmp.ErrorType(err, expected), msgAndArgs...) -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/assert/cmp/compare.go b/vendor/github.com/gotestyourself/gotestyourself/assert/cmp/compare.go deleted file mode 100644 index 7d6bfcb5..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/assert/cmp/compare.go +++ /dev/null @@ -1,312 +0,0 @@ -/*Package cmp provides Comparisons for Assert and Check*/ -package cmp - -import ( - "fmt" - "reflect" - "strings" - - "github.com/google/go-cmp/cmp" - "github.com/gotestyourself/gotestyourself/internal/format" -) - -// Comparison is a function which compares values and returns ResultSuccess if -// the actual value matches the expected value. If the values do not match the -// Result will contain a message about why it failed. -type Comparison func() Result - -// DeepEqual compares two values using google/go-cmp (http://bit.do/go-cmp) -// and succeeds if the values are equal. -// -// The comparison can be customized using comparison Options. -// Package assert/opt (http://bit.do/t-assert-opt) provides some additional -// commonly used Options. -func DeepEqual(x, y interface{}, opts ...cmp.Option) Comparison { - return func() (result Result) { - defer func() { - if panicmsg, handled := handleCmpPanic(recover()); handled { - result = ResultFailure(panicmsg) - } - }() - diff := cmp.Diff(x, y, opts...) - if diff == "" { - return ResultSuccess - } - return multiLineDiffResult(diff) - } -} - -func handleCmpPanic(r interface{}) (string, bool) { - if r == nil { - return "", false - } - panicmsg, ok := r.(string) - if !ok { - panic(r) - } - switch { - case strings.HasPrefix(panicmsg, "cannot handle unexported field"): - return panicmsg, true - } - panic(r) -} - -func toResult(success bool, msg string) Result { - if success { - return ResultSuccess - } - return ResultFailure(msg) -} - -// Equal succeeds if x == y. -func Equal(x, y interface{}) Comparison { - return func() Result { - switch { - case x == y: - return ResultSuccess - case isMultiLineStringCompare(x, y): - diff := format.UnifiedDiff(format.DiffConfig{A: x.(string), B: y.(string)}) - return multiLineDiffResult(diff) - } - return ResultFailureTemplate(` - {{- .Data.x}} ( - {{- with callArg 0 }}{{ formatNode . }} {{end -}} - {{- printf "%T" .Data.x -}} - ) != {{ .Data.y}} ( - {{- with callArg 1 }}{{ formatNode . }} {{end -}} - {{- printf "%T" .Data.y -}} - )`, - map[string]interface{}{"x": x, "y": y}) - } -} - -func isMultiLineStringCompare(x, y interface{}) bool { - strX, ok := x.(string) - if !ok { - return false - } - strY, ok := y.(string) - if !ok { - return false - } - return strings.Contains(strX, "\n") || strings.Contains(strY, "\n") -} - -func multiLineDiffResult(diff string) Result { - return ResultFailureTemplate(` ---- {{ with callArg 0 }}{{ formatNode . }}{{else}}←{{end}} -+++ {{ with callArg 1 }}{{ formatNode . }}{{else}}→{{end}} -{{ .Data.diff }}`, - map[string]interface{}{"diff": diff}) -} - -// Len succeeds if the sequence has the expected length. -func Len(seq interface{}, expected int) Comparison { - return func() (result Result) { - defer func() { - if e := recover(); e != nil { - result = ResultFailure(fmt.Sprintf("type %T does not have a length", seq)) - } - }() - value := reflect.ValueOf(seq) - length := value.Len() - if length == expected { - return ResultSuccess - } - msg := fmt.Sprintf("expected %s (length %d) to have length %d", seq, length, expected) - return ResultFailure(msg) - } -} - -// Contains succeeds if item is in collection. Collection may be a string, map, -// slice, or array. -// -// If collection is a string, item must also be a string, and is compared using -// strings.Contains(). -// If collection is a Map, contains will succeed if item is a key in the map. -// If collection is a slice or array, item is compared to each item in the -// sequence using reflect.DeepEqual(). -func Contains(collection interface{}, item interface{}) Comparison { - return func() Result { - colValue := reflect.ValueOf(collection) - if !colValue.IsValid() { - return ResultFailure(fmt.Sprintf("nil does not contain items")) - } - msg := fmt.Sprintf("%v does not contain %v", collection, item) - - itemValue := reflect.ValueOf(item) - switch colValue.Type().Kind() { - case reflect.String: - if itemValue.Type().Kind() != reflect.String { - return ResultFailure("string may only contain strings") - } - return toResult( - strings.Contains(colValue.String(), itemValue.String()), - fmt.Sprintf("string %q does not contain %q", collection, item)) - - case reflect.Map: - if itemValue.Type() != colValue.Type().Key() { - return ResultFailure(fmt.Sprintf( - "%v can not contain a %v key", colValue.Type(), itemValue.Type())) - } - return toResult(colValue.MapIndex(itemValue).IsValid(), msg) - - case reflect.Slice, reflect.Array: - for i := 0; i < colValue.Len(); i++ { - if reflect.DeepEqual(colValue.Index(i).Interface(), item) { - return ResultSuccess - } - } - return ResultFailure(msg) - default: - return ResultFailure(fmt.Sprintf("type %T does not contain items", collection)) - } - } -} - -// Panics succeeds if f() panics. -func Panics(f func()) Comparison { - return func() (result Result) { - defer func() { - if err := recover(); err != nil { - result = ResultSuccess - } - }() - f() - return ResultFailure("did not panic") - } -} - -// Error succeeds if err is a non-nil error, and the error message equals the -// expected message. -func Error(err error, message string) Comparison { - return func() Result { - switch { - case err == nil: - return ResultFailure("expected an error, got nil") - case err.Error() != message: - return ResultFailure(fmt.Sprintf( - "expected error %q, got %+v", message, err)) - } - return ResultSuccess - } -} - -// ErrorContains succeeds if err is a non-nil error, and the error message contains -// the expected substring. -func ErrorContains(err error, substring string) Comparison { - return func() Result { - switch { - case err == nil: - return ResultFailure("expected an error, got nil") - case !strings.Contains(err.Error(), substring): - return ResultFailure(fmt.Sprintf( - "expected error to contain %q, got %+v", substring, err)) - } - return ResultSuccess - } -} - -// Nil succeeds if obj is a nil interface, pointer, or function. -// -// Use NilError() for comparing errors. Use Len(obj, 0) for comparing slices, -// maps, and channels. -func Nil(obj interface{}) Comparison { - msgFunc := func(value reflect.Value) string { - return fmt.Sprintf("%v (type %s) is not nil", reflect.Indirect(value), value.Type()) - } - return isNil(obj, msgFunc) -} - -func isNil(obj interface{}, msgFunc func(reflect.Value) string) Comparison { - return func() Result { - if obj == nil { - return ResultSuccess - } - value := reflect.ValueOf(obj) - kind := value.Type().Kind() - if kind >= reflect.Chan && kind <= reflect.Slice { - if value.IsNil() { - return ResultSuccess - } - return ResultFailure(msgFunc(value)) - } - - return ResultFailure(fmt.Sprintf("%v (type %s) can not be nil", value, value.Type())) - } -} - -// ErrorType succeeds if err is not nil and is of the expected type. -// -// Expected can be one of: -// a func(error) bool which returns true if the error is the expected type, -// an instance of (or a pointer to) a struct of the expected type, -// a pointer to an interface the error is expected to implement, -// a reflect.Type of the expected struct or interface. -func ErrorType(err error, expected interface{}) Comparison { - return func() Result { - switch expectedType := expected.(type) { - case func(error) bool: - return cmpErrorTypeFunc(err, expectedType) - case reflect.Type: - if expectedType.Kind() == reflect.Interface { - return cmpErrorTypeImplementsType(err, expectedType) - } - return cmpErrorTypeEqualType(err, expectedType) - case nil: - return ResultFailure(fmt.Sprintf("invalid type for expected: nil")) - } - - expectedType := reflect.TypeOf(expected) - switch { - case expectedType.Kind() == reflect.Struct, isPtrToStruct(expectedType): - return cmpErrorTypeEqualType(err, expectedType) - case isPtrToInterface(expectedType): - return cmpErrorTypeImplementsType(err, expectedType.Elem()) - } - return ResultFailure(fmt.Sprintf("invalid type for expected: %T", expected)) - } -} - -func cmpErrorTypeFunc(err error, f func(error) bool) Result { - if f(err) { - return ResultSuccess - } - actual := "nil" - if err != nil { - actual = fmt.Sprintf("%s (%T)", err, err) - } - return ResultFailureTemplate(`error is {{ .Data.actual }} - {{- with callArg 1 }}, not {{ formatNode . }}{{end -}}`, - map[string]interface{}{"actual": actual}) -} - -func cmpErrorTypeEqualType(err error, expectedType reflect.Type) Result { - if err == nil { - return ResultFailure(fmt.Sprintf("error is nil, not %s", expectedType)) - } - errValue := reflect.ValueOf(err) - if errValue.Type() == expectedType { - return ResultSuccess - } - return ResultFailure(fmt.Sprintf("error is %s (%T), not %s", err, err, expectedType)) -} - -func cmpErrorTypeImplementsType(err error, expectedType reflect.Type) Result { - if err == nil { - return ResultFailure(fmt.Sprintf("error is nil, not %s", expectedType)) - } - errValue := reflect.ValueOf(err) - if errValue.Type().Implements(expectedType) { - return ResultSuccess - } - return ResultFailure(fmt.Sprintf("error is %s (%T), not %s", err, err, expectedType)) -} - -func isPtrToInterface(typ reflect.Type) bool { - return typ.Kind() == reflect.Ptr && typ.Elem().Kind() == reflect.Interface -} - -func isPtrToStruct(typ reflect.Type) bool { - return typ.Kind() == reflect.Ptr && typ.Elem().Kind() == reflect.Struct -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/assert/cmp/result.go b/vendor/github.com/gotestyourself/gotestyourself/assert/cmp/result.go deleted file mode 100644 index 99f39eeb..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/assert/cmp/result.go +++ /dev/null @@ -1,94 +0,0 @@ -package cmp - -import ( - "bytes" - "fmt" - "go/ast" - "text/template" - - "github.com/gotestyourself/gotestyourself/internal/source" -) - -// Result of a Comparison. -type Result interface { - Success() bool -} - -type result struct { - success bool - message string -} - -func (r result) Success() bool { - return r.success -} - -func (r result) FailureMessage() string { - return r.message -} - -// ResultSuccess is a constant which is returned by a ComparisonWithResult to -// indicate success. -var ResultSuccess = result{success: true} - -// ResultFailure returns a failed Result with a failure message. -func ResultFailure(message string) Result { - return result{message: message} -} - -// ResultFromError returns ResultSuccess if err is nil. Otherwise ResultFailure -// is returned with the error message as the failure message. -func ResultFromError(err error) Result { - if err == nil { - return ResultSuccess - } - return ResultFailure(err.Error()) -} - -type templatedResult struct { - success bool - template string - data map[string]interface{} -} - -func (r templatedResult) Success() bool { - return r.success -} - -func (r templatedResult) FailureMessage(args []ast.Expr) string { - msg, err := renderMessage(r, args) - if err != nil { - return fmt.Sprintf("failed to render failure message: %s", err) - } - return msg -} - -// ResultFailureTemplate returns a Result with a template string and data which -// can be used to format a failure message. The template may access data from .Data, -// the comparison args with the callArg function, and the formatNode function may -// be used to format the call args. -func ResultFailureTemplate(template string, data map[string]interface{}) Result { - return templatedResult{template: template, data: data} -} - -func renderMessage(result templatedResult, args []ast.Expr) (string, error) { - tmpl := template.New("failure").Funcs(template.FuncMap{ - "formatNode": source.FormatNode, - "callArg": func(index int) ast.Expr { - if index >= len(args) { - return nil - } - return args[index] - }, - }) - var err error - tmpl, err = tmpl.Parse(result.template) - if err != nil { - return "", err - } - buf := new(bytes.Buffer) - err = tmpl.Execute(buf, map[string]interface{}{ - "Data": result.data, - }) - return buf.String(), err -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/assert/result.go b/vendor/github.com/gotestyourself/gotestyourself/assert/result.go deleted file mode 100644 index b685b7f3..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/assert/result.go +++ /dev/null @@ -1,107 +0,0 @@ -package assert - -import ( - "fmt" - "go/ast" - - "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/internal/format" - "github.com/gotestyourself/gotestyourself/internal/source" -) - -func runComparison( - t TestingT, - argSelector argSelector, - f cmp.Comparison, - msgAndArgs ...interface{}, -) bool { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - result := f() - if result.Success() { - return true - } - - var message string - switch typed := result.(type) { - case resultWithComparisonArgs: - const stackIndex = 3 // Assert/Check, assert, runComparison - args, err := source.CallExprArgs(stackIndex) - if err != nil { - t.Log(err.Error()) - } - message = typed.FailureMessage(filterPrintableExpr(argSelector(args))) - case resultBasic: - message = typed.FailureMessage() - default: - message = fmt.Sprintf("comparison returned invalid Result type: %T", result) - } - - t.Log(format.WithCustomMessage(failureMessage+message, msgAndArgs...)) - return false -} - -type resultWithComparisonArgs interface { - FailureMessage(args []ast.Expr) string -} - -type resultBasic interface { - FailureMessage() string -} - -// filterPrintableExpr filters the ast.Expr slice to only include Expr that are -// easy to read when printed and contain relevant information to an assertion. -// -// Ident and SelectorExpr are included because they print nicely and the variable -// names may provide additional context to their values. -// BasicLit and CompositeLit are excluded because their source is equivalent to -// their value, which is already available. -// Other types are ignored for now, but could be added if they are relevant. -func filterPrintableExpr(args []ast.Expr) []ast.Expr { - result := make([]ast.Expr, len(args)) - for i, arg := range args { - if isShortPrintableExpr(arg) { - result[i] = arg - continue - } - - if starExpr, ok := arg.(*ast.StarExpr); ok { - result[i] = starExpr.X - continue - } - result[i] = nil - } - return result -} - -func isShortPrintableExpr(expr ast.Expr) bool { - switch expr.(type) { - case *ast.Ident, *ast.SelectorExpr, *ast.IndexExpr, *ast.SliceExpr: - return true - case *ast.BinaryExpr, *ast.UnaryExpr: - return true - default: - // CallExpr, ParenExpr, TypeAssertExpr, KeyValueExpr, StarExpr - return false - } -} - -type argSelector func([]ast.Expr) []ast.Expr - -func argsAfterT(args []ast.Expr) []ast.Expr { - if len(args) < 1 { - return nil - } - return args[1:] -} - -func argsFromComparisonCall(args []ast.Expr) []ast.Expr { - if len(args) < 1 { - return nil - } - if callExpr, ok := args[1].(*ast.CallExpr); ok { - return callExpr.Args - } - return nil -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/fs/file.go b/vendor/github.com/gotestyourself/gotestyourself/fs/file.go deleted file mode 100644 index cf71fa2c..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/fs/file.go +++ /dev/null @@ -1,106 +0,0 @@ -/*Package fs provides tools for creating temporary files, and testing the -contents and structure of a directory. -*/ -package fs - -import ( - "io/ioutil" - "os" - "path/filepath" - - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/x/subtest" -) - -// Path objects return their filesystem path. Path may be implemented by a -// real filesystem object (such as File and Dir) or by a type which updates -// entries in a Manifest. -type Path interface { - Path() string - Remove() -} - -var ( - _ Path = &Dir{} - _ Path = &File{} -) - -// File is a temporary file on the filesystem -type File struct { - path string -} - -type helperT interface { - Helper() -} - -// NewFile creates a new file in a temporary directory using prefix as part of -// the filename. The PathOps are applied to the before returning the File. -func NewFile(t assert.TestingT, prefix string, ops ...PathOp) *File { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - tempfile, err := ioutil.TempFile("", prefix+"-") - assert.NilError(t, err) - file := &File{path: tempfile.Name()} - assert.NilError(t, tempfile.Close()) - - for _, op := range ops { - assert.NilError(t, op(file)) - } - if tc, ok := t.(subtest.TestContext); ok { - tc.AddCleanup(file.Remove) - } - return file -} - -// Path returns the full path to the file -func (f *File) Path() string { - return f.path -} - -// Remove the file -func (f *File) Remove() { - // nolint: errcheck - os.Remove(f.path) -} - -// Dir is a temporary directory -type Dir struct { - path string -} - -// NewDir returns a new temporary directory using prefix as part of the directory -// name. The PathOps are applied before returning the Dir. -func NewDir(t assert.TestingT, prefix string, ops ...PathOp) *Dir { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - path, err := ioutil.TempDir("", prefix+"-") - assert.NilError(t, err) - dir := &Dir{path: path} - - for _, op := range ops { - assert.NilError(t, op(dir)) - } - if tc, ok := t.(subtest.TestContext); ok { - tc.AddCleanup(dir.Remove) - } - return dir -} - -// Path returns the full path to the directory -func (d *Dir) Path() string { - return d.path -} - -// Remove the directory -func (d *Dir) Remove() { - // nolint: errcheck - os.RemoveAll(d.path) -} - -// Join returns a new path with this directory as the base of the path -func (d *Dir) Join(parts ...string) string { - return filepath.Join(append([]string{d.Path()}, parts...)...) -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/fs/manifest.go b/vendor/github.com/gotestyourself/gotestyourself/fs/manifest.go deleted file mode 100644 index 15cf2ce3..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/fs/manifest.go +++ /dev/null @@ -1,129 +0,0 @@ -package fs - -import ( - "io" - "io/ioutil" - "os" - "path/filepath" - - "github.com/gotestyourself/gotestyourself/assert" - "github.com/pkg/errors" -) - -// Manifest stores the expected structure and properties of files and directories -// in a filesystem. -type Manifest struct { - root *directory -} - -type resource struct { - mode os.FileMode - uid uint32 - gid uint32 -} - -type file struct { - resource - content io.ReadCloser -} - -func (f *file) Type() string { - return "file" -} - -type symlink struct { - resource - target string -} - -func (f *symlink) Type() string { - return "symlink" -} - -type directory struct { - resource - items map[string]dirEntry -} - -func (f *directory) Type() string { - return "directory" -} - -type dirEntry interface { - Type() string -} - -// ManifestFromDir creates a Manifest by reading the directory at path. The -// manifest stores the structure and properties of files in the directory. -// ManifestFromDir can be used with Equal to compare two directories. -func ManifestFromDir(t assert.TestingT, path string) Manifest { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - - manifest, err := manifestFromDir(path) - assert.NilError(t, err) - return manifest -} - -func manifestFromDir(path string) (Manifest, error) { - info, err := os.Stat(path) - switch { - case err != nil: - return Manifest{}, err - case !info.IsDir(): - return Manifest{}, errors.Errorf("path %s must be a directory", path) - } - - directory, err := newDirectory(path, info) - return Manifest{root: directory}, err -} - -func newDirectory(path string, info os.FileInfo) (*directory, error) { - items := make(map[string]dirEntry) - children, err := ioutil.ReadDir(path) - if err != nil { - return nil, err - } - for _, child := range children { - fullPath := filepath.Join(path, child.Name()) - items[child.Name()], err = getTypedResource(fullPath, child) - if err != nil { - return nil, err - } - } - - return &directory{ - resource: newResourceFromInfo(info), - items: items, - }, nil -} - -func getTypedResource(path string, info os.FileInfo) (dirEntry, error) { - switch { - case info.IsDir(): - return newDirectory(path, info) - case info.Mode()&os.ModeSymlink != 0: - return newSymlink(path, info) - // TODO: devices, pipes? - default: - return newFile(path, info) - } -} - -func newSymlink(path string, info os.FileInfo) (*symlink, error) { - target, err := os.Readlink(path) - return &symlink{ - resource: newResourceFromInfo(info), - target: target, - }, err -} - -func newFile(path string, info os.FileInfo) (*file, error) { - // TODO: defer file opening to reduce number of open FDs? - readCloser, err := os.Open(path) - return &file{ - resource: newResourceFromInfo(info), - content: readCloser, - }, err -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/fs/manifest_unix.go b/vendor/github.com/gotestyourself/gotestyourself/fs/manifest_unix.go deleted file mode 100644 index bba2fcd9..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/fs/manifest_unix.go +++ /dev/null @@ -1,30 +0,0 @@ -// +build !windows - -package fs - -import ( - "os" - "syscall" -) - -const ( - defaultRootDirMode = os.ModeDir | 0700 - defaultSymlinkMode = os.ModeSymlink | 0777 -) - -func newResourceFromInfo(info os.FileInfo) resource { - statT := info.Sys().(*syscall.Stat_t) - return resource{ - mode: info.Mode(), - uid: statT.Uid, - gid: statT.Gid, - } -} - -func (p *filePath) SetMode(mode os.FileMode) { - p.file.mode = mode -} - -func (p *directoryPath) SetMode(mode os.FileMode) { - p.directory.mode = mode | os.ModeDir -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/fs/manifest_windows.go b/vendor/github.com/gotestyourself/gotestyourself/fs/manifest_windows.go deleted file mode 100644 index 1c1a0936..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/fs/manifest_windows.go +++ /dev/null @@ -1,22 +0,0 @@ -package fs - -import "os" - -const ( - defaultRootDirMode = os.ModeDir | 0777 - defaultSymlinkMode = os.ModeSymlink | 0666 -) - -func newResourceFromInfo(info os.FileInfo) resource { - return resource{mode: info.Mode()} -} - -func (p *filePath) SetMode(mode os.FileMode) { - bits := mode & 0600 - p.file.mode = bits + bits/010 + bits/0100 -} - -// TODO: is mode ignored on windows? -func (p *directoryPath) SetMode(mode os.FileMode) { - p.directory.mode = defaultRootDirMode -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/fs/ops.go b/vendor/github.com/gotestyourself/gotestyourself/fs/ops.go deleted file mode 100644 index ec9d11c1..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/fs/ops.go +++ /dev/null @@ -1,237 +0,0 @@ -package fs - -import ( - "bytes" - "io" - "io/ioutil" - "os" - "path/filepath" - "strings" - "time" - - "github.com/pkg/errors" -) - -const defaultFileMode = 0644 - -// PathOp is a function which accepts a Path and performs an operation on that -// path. When called with real filesystem objects (File or Dir) a PathOp modifies -// the filesystem at the path. When used with a Manifest object a PathOp updates -// the manifest to expect a value. -type PathOp func(path Path) error - -type manifestResource interface { - SetMode(mode os.FileMode) - SetUID(uid uint32) - SetGID(gid uint32) -} - -type manifestFile interface { - manifestResource - SetContent(content io.ReadCloser) -} - -type manifestDirectory interface { - manifestResource - AddSymlink(path, target string) error - AddFile(path string, ops ...PathOp) error - AddDirectory(path string, ops ...PathOp) error -} - -// WithContent writes content to a file at Path -func WithContent(content string) PathOp { - return func(path Path) error { - if m, ok := path.(manifestFile); ok { - m.SetContent(ioutil.NopCloser(strings.NewReader(content))) - return nil - } - return ioutil.WriteFile(path.Path(), []byte(content), defaultFileMode) - } -} - -// WithBytes write bytes to a file at Path -func WithBytes(raw []byte) PathOp { - return func(path Path) error { - if m, ok := path.(manifestFile); ok { - m.SetContent(ioutil.NopCloser(bytes.NewReader(raw))) - return nil - } - return ioutil.WriteFile(path.Path(), raw, defaultFileMode) - } -} - -// AsUser changes ownership of the file system object at Path -func AsUser(uid, gid int) PathOp { - return func(path Path) error { - if m, ok := path.(manifestResource); ok { - m.SetUID(uint32(uid)) - m.SetGID(uint32(gid)) - return nil - } - return os.Chown(path.Path(), uid, gid) - } -} - -// WithFile creates a file in the directory at path with content -func WithFile(filename, content string, ops ...PathOp) PathOp { - return func(path Path) error { - if m, ok := path.(manifestDirectory); ok { - ops = append([]PathOp{WithContent(content), WithMode(defaultFileMode)}, ops...) - return m.AddFile(filename, ops...) - } - - fullpath := filepath.Join(path.Path(), filepath.FromSlash(filename)) - if err := createFile(fullpath, content); err != nil { - return err - } - return applyPathOps(&File{path: fullpath}, ops) - } -} - -func createFile(fullpath string, content string) error { - return ioutil.WriteFile(fullpath, []byte(content), defaultFileMode) -} - -// WithFiles creates all the files in the directory at path with their content -func WithFiles(files map[string]string) PathOp { - return func(path Path) error { - if m, ok := path.(manifestDirectory); ok { - for filename, content := range files { - // TODO: remove duplication with WithFile - if err := m.AddFile(filename, WithContent(content), WithMode(defaultFileMode)); err != nil { - return err - } - } - return nil - } - - for filename, content := range files { - fullpath := filepath.Join(path.Path(), filepath.FromSlash(filename)) - if err := createFile(fullpath, content); err != nil { - return err - } - } - return nil - } -} - -// FromDir copies the directory tree from the source path into the new Dir -func FromDir(source string) PathOp { - return func(path Path) error { - if _, ok := path.(manifestDirectory); ok { - return errors.New("use manifest.FromDir") - } - return copyDirectory(source, path.Path()) - } -} - -// WithDir creates a subdirectory in the directory at path. Additional PathOp -// can be used to modify the subdirectory -func WithDir(name string, ops ...PathOp) PathOp { - const defaultMode = 0755 - return func(path Path) error { - if m, ok := path.(manifestDirectory); ok { - ops = append([]PathOp{WithMode(defaultMode)}, ops...) - return m.AddDirectory(name, ops...) - } - - fullpath := filepath.Join(path.Path(), filepath.FromSlash(name)) - err := os.MkdirAll(fullpath, defaultMode) - if err != nil { - return err - } - return applyPathOps(&Dir{path: fullpath}, ops) - } -} - -func applyPathOps(path Path, ops []PathOp) error { - for _, op := range ops { - if err := op(path); err != nil { - return err - } - } - return nil -} - -// WithMode sets the file mode on the directory or file at path -func WithMode(mode os.FileMode) PathOp { - return func(path Path) error { - if m, ok := path.(manifestResource); ok { - m.SetMode(mode) - return nil - } - return os.Chmod(path.Path(), mode) - } -} - -func copyDirectory(source, dest string) error { - entries, err := ioutil.ReadDir(source) - if err != nil { - return err - } - for _, entry := range entries { - sourcePath := filepath.Join(source, entry.Name()) - destPath := filepath.Join(dest, entry.Name()) - if entry.IsDir() { - if err := os.Mkdir(destPath, 0755); err != nil { - return err - } - if err := copyDirectory(sourcePath, destPath); err != nil { - return err - } - continue - } - // TODO: handle symlinks - if err := copyFile(sourcePath, destPath); err != nil { - return err - } - } - return nil -} - -func copyFile(source, dest string) error { - content, err := ioutil.ReadFile(source) - if err != nil { - return err - } - return ioutil.WriteFile(dest, content, 0644) -} - -// WithSymlink creates a symlink in the directory which links to target. -// Target must be a path relative to the directory. -// -// Note: the argument order is the inverse of os.Symlink to be consistent with -// the other functions in this package. -func WithSymlink(path, target string) PathOp { - return func(root Path) error { - if v, ok := root.(manifestDirectory); ok { - return v.AddSymlink(path, target) - } - return os.Symlink(filepath.Join(root.Path(), target), filepath.Join(root.Path(), path)) - } -} - -// WithHardlink creates a link in the directory which links to target. -// Target must be a path relative to the directory. -// -// Note: the argument order is the inverse of os.Link to be consistent with -// the other functions in this package. -func WithHardlink(path, target string) PathOp { - return func(root Path) error { - if _, ok := root.(manifestDirectory); ok { - return errors.New("WithHardlink yet implemented for manifests") - } - return os.Link(filepath.Join(root.Path(), target), filepath.Join(root.Path(), path)) - } -} - -// WithTimestamps sets the access and modification times of the file system object -// at path. -func WithTimestamps(atime, mtime time.Time) PathOp { - return func(root Path) error { - if _, ok := root.(manifestDirectory); ok { - return errors.New("WithTimestamp yet implemented for manifests") - } - return os.Chtimes(root.Path(), atime, mtime) - } -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/fs/path.go b/vendor/github.com/gotestyourself/gotestyourself/fs/path.go deleted file mode 100644 index 660ec178..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/fs/path.go +++ /dev/null @@ -1,139 +0,0 @@ -package fs - -import ( - "bytes" - "io" - "io/ioutil" - "os" - - "github.com/gotestyourself/gotestyourself/assert" -) - -// resourcePath is an adaptor for resources so they can be used as a Path -// with PathOps. -type resourcePath struct{} - -func (p *resourcePath) Path() string { - return "manifest: not a filesystem path" -} - -func (p *resourcePath) Remove() {} - -type filePath struct { - resourcePath - file *file -} - -func (p *filePath) SetContent(content io.ReadCloser) { - p.file.content = content -} - -func (p *filePath) SetUID(uid uint32) { - p.file.uid = uid -} - -func (p *filePath) SetGID(gid uint32) { - p.file.gid = gid -} - -type directoryPath struct { - resourcePath - directory *directory -} - -func (p *directoryPath) SetUID(uid uint32) { - p.directory.uid = uid -} - -func (p *directoryPath) SetGID(gid uint32) { - p.directory.gid = gid -} - -func (p *directoryPath) AddSymlink(path, target string) error { - p.directory.items[path] = &symlink{ - resource: newResource(defaultSymlinkMode), - target: target, - } - return nil -} - -func (p *directoryPath) AddFile(path string, ops ...PathOp) error { - newFile := &file{resource: newResource(0)} - p.directory.items[path] = newFile - exp := &filePath{file: newFile} - return applyPathOps(exp, ops) -} - -func (p *directoryPath) AddDirectory(path string, ops ...PathOp) error { - newDir := newDirectoryWithDefaults() - p.directory.items[path] = newDir - exp := &directoryPath{directory: newDir} - return applyPathOps(exp, ops) -} - -// Expected returns a Manifest with a directory structured created by ops. The -// PathOp operations are applied to the manifest as expectations of the -// filesystem structure and properties. -func Expected(t assert.TestingT, ops ...PathOp) Manifest { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - - newDir := newDirectoryWithDefaults() - e := &directoryPath{directory: newDir} - assert.NilError(t, applyPathOps(e, ops)) - return Manifest{root: newDir} -} - -func newDirectoryWithDefaults() *directory { - return &directory{ - resource: newResource(defaultRootDirMode), - items: make(map[string]dirEntry), - } -} - -func newResource(mode os.FileMode) resource { - return resource{ - mode: mode, - uid: currentUID(), - gid: currentGID(), - } -} - -func currentUID() uint32 { - return normalizeID(os.Getuid()) -} - -func currentGID() uint32 { - return normalizeID(os.Getgid()) -} - -func normalizeID(id int) uint32 { - // ids will be -1 on windows - if id < 0 { - return 0 - } - return uint32(id) -} - -var anyFileContent = ioutil.NopCloser(bytes.NewReader(nil)) - -// MatchAnyFileContent is a PathOp that updates a Manifest so that the file -// at path may contain any content. -func MatchAnyFileContent(path Path) error { - if m, ok := path.(*filePath); ok { - m.SetContent(anyFileContent) - } - return nil -} - -const anyFile = "*" - -// MatchExtraFiles is a PathOp that updates a Manifest to allow a directory -// to contain unspecified files. -func MatchExtraFiles(path Path) error { - if m, ok := path.(*directoryPath); ok { - m.AddFile(anyFile) - } - return nil -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/fs/report.go b/vendor/github.com/gotestyourself/gotestyourself/fs/report.go deleted file mode 100644 index 669c42ab..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/fs/report.go +++ /dev/null @@ -1,215 +0,0 @@ -package fs - -import ( - "bytes" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "sort" - "strings" - - "github.com/gotestyourself/gotestyourself/assert/cmp" - "github.com/gotestyourself/gotestyourself/internal/format" -) - -// Equal compares a directory to the expected structured described by a manifest -// and returns success if they match. If they do not match the failure message -// will contain all the differences between the directory structure and the -// expected structure defined by the Manifest. -// -// Equal is a cmp.Comparison which can be used with assert.Assert(). -func Equal(path string, expected Manifest) cmp.Comparison { - return func() cmp.Result { - actual, err := manifestFromDir(path) - if err != nil { - return cmp.ResultFromError(err) - } - failures := eqDirectory(string(os.PathSeparator), expected.root, actual.root) - if len(failures) == 0 { - return cmp.ResultSuccess - } - msg := fmt.Sprintf("directory %s does not match expected:\n", path) - return cmp.ResultFailure(msg + formatFailures(failures)) - } -} - -type failure struct { - path string - problems []problem -} - -type problem string - -func notEqual(property string, x, y interface{}) problem { - return problem(fmt.Sprintf("%s: expected %s got %s", property, x, y)) -} - -func errProblem(reason string, err error) problem { - return problem(fmt.Sprintf("%s: %s", reason, err)) -} - -func existenceProblem(filename, reason string, args ...interface{}) problem { - return problem(filename + ": " + fmt.Sprintf(reason, args...)) -} - -func eqResource(x, y resource) []problem { - var p []problem - if x.uid != y.uid { - p = append(p, notEqual("uid", x.uid, y.uid)) - } - if x.gid != y.gid { - p = append(p, notEqual("gid", x.gid, y.gid)) - } - if x.mode != y.mode { - p = append(p, notEqual("mode", x.mode, y.mode)) - } - return p -} - -func eqFile(x, y *file) []problem { - p := eqResource(x.resource, y.resource) - - switch { - case x.content == nil: - p = append(p, existenceProblem("content", "expected content is nil")) - return p - case x.content == anyFileContent: - return p - case y.content == nil: - p = append(p, existenceProblem("content", "actual content is nil")) - return p - } - - xContent, xErr := ioutil.ReadAll(x.content) - defer x.content.Close() - yContent, yErr := ioutil.ReadAll(y.content) - defer y.content.Close() - - if xErr != nil { - p = append(p, errProblem("failed to read expected content", xErr)) - } - if yErr != nil { - p = append(p, errProblem("failed to read actual content", xErr)) - } - if xErr != nil || yErr != nil { - return p - } - - if !bytes.Equal(xContent, yContent) { - p = append(p, diffContent(xContent, yContent)) - } - return p -} - -func diffContent(x, y []byte) problem { - diff := format.UnifiedDiff(format.DiffConfig{ - A: string(x), - B: string(y), - From: "expected", - To: "actual", - }) - // Remove the trailing newline in the diff. A trailing newline is always - // added to a problem by formatFailures. - diff = strings.TrimSuffix(diff, "\n") - return problem("content:\n" + indent(diff, " ")) -} - -func indent(s, prefix string) string { - buf := new(bytes.Buffer) - lines := strings.SplitAfter(s, "\n") - for _, line := range lines { - buf.WriteString(prefix + line) - } - return buf.String() -} - -func eqSymlink(x, y *symlink) []problem { - p := eqResource(x.resource, y.resource) - if x.target != y.target { - p = append(p, notEqual("target", x.target, y.target)) - } - return p -} - -func eqDirectory(path string, x, y *directory) []failure { - p := eqResource(x.resource, y.resource) - var f []failure - - for _, name := range sortedKeys(x.items) { - if name == anyFile { - continue - } - xEntry := x.items[name] - yEntry, ok := y.items[name] - if !ok { - p = append(p, existenceProblem(name, "expected %s to exist", xEntry.Type())) - continue - } - - if xEntry.Type() != yEntry.Type() { - p = append(p, notEqual(name, xEntry.Type(), yEntry.Type())) - continue - } - - f = append(f, eqEntry(filepath.Join(path, name), xEntry, yEntry)...) - } - - if _, ok := x.items[anyFile]; !ok { - for _, name := range sortedKeys(y.items) { - if _, ok := x.items[name]; !ok { - yEntry := y.items[name] - p = append(p, existenceProblem(name, "unexpected %s", yEntry.Type())) - } - } - } - - if len(p) > 0 { - f = append(f, failure{path: path, problems: p}) - } - return f -} - -func sortedKeys(items map[string]dirEntry) []string { - var keys []string - for key := range items { - keys = append(keys, key) - } - sort.Strings(keys) - return keys -} - -// eqEntry assumes x and y to be the same type -func eqEntry(path string, x, y dirEntry) []failure { - resp := func(problems []problem) []failure { - if len(problems) == 0 { - return nil - } - return []failure{{path: path, problems: problems}} - } - - switch typed := x.(type) { - case *file: - return resp(eqFile(typed, y.(*file))) - case *symlink: - return resp(eqSymlink(typed, y.(*symlink))) - case *directory: - return eqDirectory(path, typed, y.(*directory)) - } - return nil -} - -func formatFailures(failures []failure) string { - sort.Slice(failures, func(i, j int) bool { - return failures[i].path < failures[j].path - }) - - buf := new(bytes.Buffer) - for _, failure := range failures { - buf.WriteString(failure.path + "\n") - for _, problem := range failure.problems { - buf.WriteString(" " + string(problem) + "\n") - } - } - return buf.String() -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/icmd/command.go b/vendor/github.com/gotestyourself/gotestyourself/icmd/command.go deleted file mode 100644 index c5dcbf3c..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/icmd/command.go +++ /dev/null @@ -1,284 +0,0 @@ -/*Package icmd executes binaries and provides convenient assertions for testing the results. - */ -package icmd - -import ( - "bytes" - "fmt" - "io" - "os/exec" - "strings" - "sync" - "time" - - "github.com/gotestyourself/gotestyourself/assert" - "github.com/gotestyourself/gotestyourself/assert/cmp" -) - -type helperT interface { - Helper() -} - -// None is a token to inform Result.Assert that the output should be empty -const None = "[NOTHING]" - -type lockedBuffer struct { - m sync.RWMutex - buf bytes.Buffer -} - -func (buf *lockedBuffer) Write(b []byte) (int, error) { - buf.m.Lock() - defer buf.m.Unlock() - return buf.buf.Write(b) -} - -func (buf *lockedBuffer) String() string { - buf.m.RLock() - defer buf.m.RUnlock() - return buf.buf.String() -} - -// Result stores the result of running a command -type Result struct { - Cmd *exec.Cmd - ExitCode int - Error error - // Timeout is true if the command was killed because it ran for too long - Timeout bool - outBuffer *lockedBuffer - errBuffer *lockedBuffer -} - -// Assert compares the Result against the Expected struct, and fails the test if -// any of the expectations are not met. -// -// This function is equivalent to assert.Assert(t, result.Equal(exp)). -func (r *Result) Assert(t assert.TestingT, exp Expected) *Result { - if ht, ok := t.(helperT); ok { - ht.Helper() - } - assert.Assert(t, r.Equal(exp)) - return r -} - -// Equal compares the result to Expected. If the result doesn't match expected -// returns a formatted failure message with the command, stdout, stderr, exit code, -// and any failed expectations. -func (r *Result) Equal(exp Expected) cmp.Comparison { - return func() cmp.Result { - return cmp.ResultFromError(r.match(exp)) - } -} - -// Compare the result to Expected and return an error if they do not match. -func (r *Result) Compare(exp Expected) error { - return r.match(exp) -} - -// nolint: gocyclo -func (r *Result) match(exp Expected) error { - errors := []string{} - add := func(format string, args ...interface{}) { - errors = append(errors, fmt.Sprintf(format, args...)) - } - - if exp.ExitCode != r.ExitCode { - add("ExitCode was %d expected %d", r.ExitCode, exp.ExitCode) - } - if exp.Timeout != r.Timeout { - if exp.Timeout { - add("Expected command to timeout") - } else { - add("Expected command to finish, but it hit the timeout") - } - } - if !matchOutput(exp.Out, r.Stdout()) { - add("Expected stdout to contain %q", exp.Out) - } - if !matchOutput(exp.Err, r.Stderr()) { - add("Expected stderr to contain %q", exp.Err) - } - switch { - // If a non-zero exit code is expected there is going to be an error. - // Don't require an error message as well as an exit code because the - // error message is going to be "exit status which is not useful - case exp.Error == "" && exp.ExitCode != 0: - case exp.Error == "" && r.Error != nil: - add("Expected no error") - case exp.Error != "" && r.Error == nil: - add("Expected error to contain %q, but there was no error", exp.Error) - case exp.Error != "" && !strings.Contains(r.Error.Error(), exp.Error): - add("Expected error to contain %q", exp.Error) - } - - if len(errors) == 0 { - return nil - } - return fmt.Errorf("%s\nFailures:\n%s", r, strings.Join(errors, "\n")) -} - -func matchOutput(expected string, actual string) bool { - switch expected { - case None: - return actual == "" - default: - return strings.Contains(actual, expected) - } -} - -func (r *Result) String() string { - var timeout string - if r.Timeout { - timeout = " (timeout)" - } - - return fmt.Sprintf(` -Command: %s -ExitCode: %d%s -Error: %v -Stdout: %v -Stderr: %v -`, - strings.Join(r.Cmd.Args, " "), - r.ExitCode, - timeout, - r.Error, - r.Stdout(), - r.Stderr()) -} - -// Expected is the expected output from a Command. This struct is compared to a -// Result struct by Result.Assert(). -type Expected struct { - ExitCode int - Timeout bool - Error string - Out string - Err string -} - -// Success is the default expected result. A Success result is one with a 0 -// ExitCode. -var Success = Expected{} - -// Stdout returns the stdout of the process as a string -func (r *Result) Stdout() string { - return r.outBuffer.String() -} - -// Stderr returns the stderr of the process as a string -func (r *Result) Stderr() string { - return r.errBuffer.String() -} - -// Combined returns the stdout and stderr combined into a single string -func (r *Result) Combined() string { - return r.outBuffer.String() + r.errBuffer.String() -} - -func (r *Result) setExitError(err error) { - if err == nil { - return - } - r.Error = err - r.ExitCode = processExitCode(err) -} - -// Cmd contains the arguments and options for a process to run as part of a test -// suite. -type Cmd struct { - Command []string - Timeout time.Duration - Stdin io.Reader - Stdout io.Writer - Dir string - Env []string -} - -// Command create a simple Cmd with the specified command and arguments -func Command(command string, args ...string) Cmd { - return Cmd{Command: append([]string{command}, args...)} -} - -// RunCmd runs a command and returns a Result -func RunCmd(cmd Cmd, cmdOperators ...CmdOp) *Result { - for _, op := range cmdOperators { - op(&cmd) - } - result := StartCmd(cmd) - if result.Error != nil { - return result - } - return WaitOnCmd(cmd.Timeout, result) -} - -// RunCommand runs a command with default options, and returns a result -func RunCommand(command string, args ...string) *Result { - return RunCmd(Command(command, args...)) -} - -// StartCmd starts a command, but doesn't wait for it to finish -func StartCmd(cmd Cmd) *Result { - result := buildCmd(cmd) - if result.Error != nil { - return result - } - result.setExitError(result.Cmd.Start()) - return result -} - -// TODO: support exec.CommandContext -func buildCmd(cmd Cmd) *Result { - var execCmd *exec.Cmd - switch len(cmd.Command) { - case 1: - execCmd = exec.Command(cmd.Command[0]) - default: - execCmd = exec.Command(cmd.Command[0], cmd.Command[1:]...) - } - outBuffer := new(lockedBuffer) - errBuffer := new(lockedBuffer) - - execCmd.Stdin = cmd.Stdin - execCmd.Dir = cmd.Dir - execCmd.Env = cmd.Env - if cmd.Stdout != nil { - execCmd.Stdout = io.MultiWriter(outBuffer, cmd.Stdout) - } else { - execCmd.Stdout = outBuffer - } - execCmd.Stderr = errBuffer - return &Result{ - Cmd: execCmd, - outBuffer: outBuffer, - errBuffer: errBuffer, - } -} - -// WaitOnCmd waits for a command to complete. If timeout is non-nil then -// only wait until the timeout. -func WaitOnCmd(timeout time.Duration, result *Result) *Result { - if timeout == time.Duration(0) { - result.setExitError(result.Cmd.Wait()) - return result - } - - done := make(chan error, 1) - // Wait for command to exit in a goroutine - go func() { - done <- result.Cmd.Wait() - }() - - select { - case <-time.After(timeout): - killErr := result.Cmd.Process.Kill() - if killErr != nil { - fmt.Printf("failed to kill (pid=%d): %v\n", result.Cmd.Process.Pid, killErr) - } - result.Timeout = true - case err := <-done: - result.setExitError(err) - } - return result -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/icmd/exitcode.go b/vendor/github.com/gotestyourself/gotestyourself/icmd/exitcode.go deleted file mode 100644 index 9356dbcd..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/icmd/exitcode.go +++ /dev/null @@ -1,32 +0,0 @@ -package icmd - -import ( - "os/exec" - "syscall" - - "github.com/pkg/errors" -) - -// getExitCode returns the ExitStatus of a process from the error returned by -// exec.Run(). If the exit status could not be parsed an error is returned. -func getExitCode(err error) (int, error) { - if exiterr, ok := err.(*exec.ExitError); ok { - if procExit, ok := exiterr.Sys().(syscall.WaitStatus); ok { - return procExit.ExitStatus(), nil - } - } - return 0, errors.Wrap(err, "failed to get exit code") -} - -func processExitCode(err error) (exitCode int) { - if err == nil { - return 0 - } - exitCode, exiterr := getExitCode(err) - if exiterr != nil { - // TODO: Fix this so we check the error's text. - // we've failed to retrieve exit code, so we set it to 127 - return 127 - } - return exitCode -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/icmd/ops.go b/vendor/github.com/gotestyourself/gotestyourself/icmd/ops.go deleted file mode 100644 index 02b1d840..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/icmd/ops.go +++ /dev/null @@ -1,4 +0,0 @@ -package icmd - -// CmdOp is an operation which modified a Cmd structure used to execute commands -type CmdOp func(*Cmd) diff --git a/vendor/github.com/gotestyourself/gotestyourself/internal/difflib/LICENSE b/vendor/github.com/gotestyourself/gotestyourself/internal/difflib/LICENSE deleted file mode 100644 index c67dad61..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/internal/difflib/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013, Patrick Mezard -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - The names of its contributors may not be used to endorse or promote -products derived from this software without specific prior written -permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/gotestyourself/gotestyourself/internal/difflib/difflib.go b/vendor/github.com/gotestyourself/gotestyourself/internal/difflib/difflib.go deleted file mode 100644 index 94ca07c2..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/internal/difflib/difflib.go +++ /dev/null @@ -1,420 +0,0 @@ -/* Package difflib is a partial port of Python difflib module. - -Original source: https://github.com/pmezard/go-difflib - -This file is trimmed to only the parts used by this repository. -*/ -package difflib - -func min(a, b int) int { - if a < b { - return a - } - return b -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} - -type Match struct { - A int - B int - Size int -} - -type OpCode struct { - Tag byte - I1 int - I2 int - J1 int - J2 int -} - -// SequenceMatcher compares sequence of strings. The basic -// algorithm predates, and is a little fancier than, an algorithm -// published in the late 1980's by Ratcliff and Obershelp under the -// hyperbolic name "gestalt pattern matching". The basic idea is to find -// the longest contiguous matching subsequence that contains no "junk" -// elements (R-O doesn't address junk). The same idea is then applied -// recursively to the pieces of the sequences to the left and to the right -// of the matching subsequence. This does not yield minimal edit -// sequences, but does tend to yield matches that "look right" to people. -// -// SequenceMatcher tries to compute a "human-friendly diff" between two -// sequences. Unlike e.g. UNIX(tm) diff, the fundamental notion is the -// longest *contiguous* & junk-free matching subsequence. That's what -// catches peoples' eyes. The Windows(tm) windiff has another interesting -// notion, pairing up elements that appear uniquely in each sequence. -// That, and the method here, appear to yield more intuitive difference -// reports than does diff. This method appears to be the least vulnerable -// to synching up on blocks of "junk lines", though (like blank lines in -// ordinary text files, or maybe "

" lines in HTML files). That may be -// because this is the only method of the 3 that has a *concept* of -// "junk" . -// -// Timing: Basic R-O is cubic time worst case and quadratic time expected -// case. SequenceMatcher is quadratic time for the worst case and has -// expected-case behavior dependent in a complicated way on how many -// elements the sequences have in common; best case time is linear. -type SequenceMatcher struct { - a []string - b []string - b2j map[string][]int - IsJunk func(string) bool - autoJunk bool - bJunk map[string]struct{} - matchingBlocks []Match - fullBCount map[string]int - bPopular map[string]struct{} - opCodes []OpCode -} - -func NewMatcher(a, b []string) *SequenceMatcher { - m := SequenceMatcher{autoJunk: true} - m.SetSeqs(a, b) - return &m -} - -// Set two sequences to be compared. -func (m *SequenceMatcher) SetSeqs(a, b []string) { - m.SetSeq1(a) - m.SetSeq2(b) -} - -// Set the first sequence to be compared. The second sequence to be compared is -// not changed. -// -// SequenceMatcher computes and caches detailed information about the second -// sequence, so if you want to compare one sequence S against many sequences, -// use .SetSeq2(s) once and call .SetSeq1(x) repeatedly for each of the other -// sequences. -// -// See also SetSeqs() and SetSeq2(). -func (m *SequenceMatcher) SetSeq1(a []string) { - if &a == &m.a { - return - } - m.a = a - m.matchingBlocks = nil - m.opCodes = nil -} - -// Set the second sequence to be compared. The first sequence to be compared is -// not changed. -func (m *SequenceMatcher) SetSeq2(b []string) { - if &b == &m.b { - return - } - m.b = b - m.matchingBlocks = nil - m.opCodes = nil - m.fullBCount = nil - m.chainB() -} - -func (m *SequenceMatcher) chainB() { - // Populate line -> index mapping - b2j := map[string][]int{} - for i, s := range m.b { - indices := b2j[s] - indices = append(indices, i) - b2j[s] = indices - } - - // Purge junk elements - m.bJunk = map[string]struct{}{} - if m.IsJunk != nil { - junk := m.bJunk - for s, _ := range b2j { - if m.IsJunk(s) { - junk[s] = struct{}{} - } - } - for s, _ := range junk { - delete(b2j, s) - } - } - - // Purge remaining popular elements - popular := map[string]struct{}{} - n := len(m.b) - if m.autoJunk && n >= 200 { - ntest := n/100 + 1 - for s, indices := range b2j { - if len(indices) > ntest { - popular[s] = struct{}{} - } - } - for s, _ := range popular { - delete(b2j, s) - } - } - m.bPopular = popular - m.b2j = b2j -} - -func (m *SequenceMatcher) isBJunk(s string) bool { - _, ok := m.bJunk[s] - return ok -} - -// Find longest matching block in a[alo:ahi] and b[blo:bhi]. -// -// If IsJunk is not defined: -// -// Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where -// alo <= i <= i+k <= ahi -// blo <= j <= j+k <= bhi -// and for all (i',j',k') meeting those conditions, -// k >= k' -// i <= i' -// and if i == i', j <= j' -// -// In other words, of all maximal matching blocks, return one that -// starts earliest in a, and of all those maximal matching blocks that -// start earliest in a, return the one that starts earliest in b. -// -// If IsJunk is defined, first the longest matching block is -// determined as above, but with the additional restriction that no -// junk element appears in the block. Then that block is extended as -// far as possible by matching (only) junk elements on both sides. So -// the resulting block never matches on junk except as identical junk -// happens to be adjacent to an "interesting" match. -// -// If no blocks match, return (alo, blo, 0). -func (m *SequenceMatcher) findLongestMatch(alo, ahi, blo, bhi int) Match { - // CAUTION: stripping common prefix or suffix would be incorrect. - // E.g., - // ab - // acab - // Longest matching block is "ab", but if common prefix is - // stripped, it's "a" (tied with "b"). UNIX(tm) diff does so - // strip, so ends up claiming that ab is changed to acab by - // inserting "ca" in the middle. That's minimal but unintuitive: - // "it's obvious" that someone inserted "ac" at the front. - // Windiff ends up at the same place as diff, but by pairing up - // the unique 'b's and then matching the first two 'a's. - besti, bestj, bestsize := alo, blo, 0 - - // find longest junk-free match - // during an iteration of the loop, j2len[j] = length of longest - // junk-free match ending with a[i-1] and b[j] - j2len := map[int]int{} - for i := alo; i != ahi; i++ { - // look at all instances of a[i] in b; note that because - // b2j has no junk keys, the loop is skipped if a[i] is junk - newj2len := map[int]int{} - for _, j := range m.b2j[m.a[i]] { - // a[i] matches b[j] - if j < blo { - continue - } - if j >= bhi { - break - } - k := j2len[j-1] + 1 - newj2len[j] = k - if k > bestsize { - besti, bestj, bestsize = i-k+1, j-k+1, k - } - } - j2len = newj2len - } - - // Extend the best by non-junk elements on each end. In particular, - // "popular" non-junk elements aren't in b2j, which greatly speeds - // the inner loop above, but also means "the best" match so far - // doesn't contain any junk *or* popular non-junk elements. - for besti > alo && bestj > blo && !m.isBJunk(m.b[bestj-1]) && - m.a[besti-1] == m.b[bestj-1] { - besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 - } - for besti+bestsize < ahi && bestj+bestsize < bhi && - !m.isBJunk(m.b[bestj+bestsize]) && - m.a[besti+bestsize] == m.b[bestj+bestsize] { - bestsize += 1 - } - - // Now that we have a wholly interesting match (albeit possibly - // empty!), we may as well suck up the matching junk on each - // side of it too. Can't think of a good reason not to, and it - // saves post-processing the (possibly considerable) expense of - // figuring out what to do with it. In the case of an empty - // interesting match, this is clearly the right thing to do, - // because no other kind of match is possible in the regions. - for besti > alo && bestj > blo && m.isBJunk(m.b[bestj-1]) && - m.a[besti-1] == m.b[bestj-1] { - besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 - } - for besti+bestsize < ahi && bestj+bestsize < bhi && - m.isBJunk(m.b[bestj+bestsize]) && - m.a[besti+bestsize] == m.b[bestj+bestsize] { - bestsize += 1 - } - - return Match{A: besti, B: bestj, Size: bestsize} -} - -// Return list of triples describing matching subsequences. -// -// Each triple is of the form (i, j, n), and means that -// a[i:i+n] == b[j:j+n]. The triples are monotonically increasing in -// i and in j. It's also guaranteed that if (i, j, n) and (i', j', n') are -// adjacent triples in the list, and the second is not the last triple in the -// list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe -// adjacent equal blocks. -// -// The last triple is a dummy, (len(a), len(b), 0), and is the only -// triple with n==0. -func (m *SequenceMatcher) GetMatchingBlocks() []Match { - if m.matchingBlocks != nil { - return m.matchingBlocks - } - - var matchBlocks func(alo, ahi, blo, bhi int, matched []Match) []Match - matchBlocks = func(alo, ahi, blo, bhi int, matched []Match) []Match { - match := m.findLongestMatch(alo, ahi, blo, bhi) - i, j, k := match.A, match.B, match.Size - if match.Size > 0 { - if alo < i && blo < j { - matched = matchBlocks(alo, i, blo, j, matched) - } - matched = append(matched, match) - if i+k < ahi && j+k < bhi { - matched = matchBlocks(i+k, ahi, j+k, bhi, matched) - } - } - return matched - } - matched := matchBlocks(0, len(m.a), 0, len(m.b), nil) - - // It's possible that we have adjacent equal blocks in the - // matching_blocks list now. - nonAdjacent := []Match{} - i1, j1, k1 := 0, 0, 0 - for _, b := range matched { - // Is this block adjacent to i1, j1, k1? - i2, j2, k2 := b.A, b.B, b.Size - if i1+k1 == i2 && j1+k1 == j2 { - // Yes, so collapse them -- this just increases the length of - // the first block by the length of the second, and the first - // block so lengthened remains the block to compare against. - k1 += k2 - } else { - // Not adjacent. Remember the first block (k1==0 means it's - // the dummy we started with), and make the second block the - // new block to compare against. - if k1 > 0 { - nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) - } - i1, j1, k1 = i2, j2, k2 - } - } - if k1 > 0 { - nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) - } - - nonAdjacent = append(nonAdjacent, Match{len(m.a), len(m.b), 0}) - m.matchingBlocks = nonAdjacent - return m.matchingBlocks -} - -// Return list of 5-tuples describing how to turn a into b. -// -// Each tuple is of the form (tag, i1, i2, j1, j2). The first tuple -// has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the -// tuple preceding it, and likewise for j1 == the previous j2. -// -// The tags are characters, with these meanings: -// -// 'r' (replace): a[i1:i2] should be replaced by b[j1:j2] -// -// 'd' (delete): a[i1:i2] should be deleted, j1==j2 in this case. -// -// 'i' (insert): b[j1:j2] should be inserted at a[i1:i1], i1==i2 in this case. -// -// 'e' (equal): a[i1:i2] == b[j1:j2] -func (m *SequenceMatcher) GetOpCodes() []OpCode { - if m.opCodes != nil { - return m.opCodes - } - i, j := 0, 0 - matching := m.GetMatchingBlocks() - opCodes := make([]OpCode, 0, len(matching)) - for _, m := range matching { - // invariant: we've pumped out correct diffs to change - // a[:i] into b[:j], and the next matching block is - // a[ai:ai+size] == b[bj:bj+size]. So we need to pump - // out a diff to change a[i:ai] into b[j:bj], pump out - // the matching block, and move (i,j) beyond the match - ai, bj, size := m.A, m.B, m.Size - tag := byte(0) - if i < ai && j < bj { - tag = 'r' - } else if i < ai { - tag = 'd' - } else if j < bj { - tag = 'i' - } - if tag > 0 { - opCodes = append(opCodes, OpCode{tag, i, ai, j, bj}) - } - i, j = ai+size, bj+size - // the list of matching blocks is terminated by a - // sentinel with size 0 - if size > 0 { - opCodes = append(opCodes, OpCode{'e', ai, i, bj, j}) - } - } - m.opCodes = opCodes - return m.opCodes -} - -// Isolate change clusters by eliminating ranges with no changes. -// -// Return a generator of groups with up to n lines of context. -// Each group is in the same format as returned by GetOpCodes(). -func (m *SequenceMatcher) GetGroupedOpCodes(n int) [][]OpCode { - if n < 0 { - n = 3 - } - codes := m.GetOpCodes() - if len(codes) == 0 { - codes = []OpCode{OpCode{'e', 0, 1, 0, 1}} - } - // Fixup leading and trailing groups if they show no changes. - if codes[0].Tag == 'e' { - c := codes[0] - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - codes[0] = OpCode{c.Tag, max(i1, i2-n), i2, max(j1, j2-n), j2} - } - if codes[len(codes)-1].Tag == 'e' { - c := codes[len(codes)-1] - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - codes[len(codes)-1] = OpCode{c.Tag, i1, min(i2, i1+n), j1, min(j2, j1+n)} - } - nn := n + n - groups := [][]OpCode{} - group := []OpCode{} - for _, c := range codes { - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - // End the current group and start a new one whenever - // there is a large range with no changes. - if c.Tag == 'e' && i2-i1 > nn { - group = append(group, OpCode{c.Tag, i1, min(i2, i1+n), - j1, min(j2, j1+n)}) - groups = append(groups, group) - group = []OpCode{} - i1, j1 = max(i1, i2-n), max(j1, j2-n) - } - group = append(group, OpCode{c.Tag, i1, i2, j1, j2}) - } - if len(group) > 0 && !(len(group) == 1 && group[0].Tag == 'e') { - groups = append(groups, group) - } - return groups -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/internal/format/diff.go b/vendor/github.com/gotestyourself/gotestyourself/internal/format/diff.go deleted file mode 100644 index 38d66fb5..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/internal/format/diff.go +++ /dev/null @@ -1,161 +0,0 @@ -package format - -import ( - "bytes" - "fmt" - "strings" - "unicode" - - "github.com/gotestyourself/gotestyourself/internal/difflib" -) - -const ( - contextLines = 2 -) - -// DiffConfig for a unified diff -type DiffConfig struct { - A string - B string - From string - To string -} - -// UnifiedDiff is a modified version of difflib.WriteUnifiedDiff with better -// support for showing the whitespace differences. -func UnifiedDiff(conf DiffConfig) string { - a := strings.SplitAfter(conf.A, "\n") - b := strings.SplitAfter(conf.B, "\n") - groups := difflib.NewMatcher(a, b).GetGroupedOpCodes(contextLines) - if len(groups) == 0 { - return "" - } - - buf := new(bytes.Buffer) - writeFormat := func(format string, args ...interface{}) { - buf.WriteString(fmt.Sprintf(format, args...)) - } - writeLine := func(prefix string, s string) { - buf.WriteString(prefix + s) - } - if hasWhitespaceDiffLines(groups, a, b) { - writeLine = visibleWhitespaceLine(writeLine) - } - formatHeader(writeFormat, conf) - for _, group := range groups { - formatRangeLine(writeFormat, group) - for _, opCode := range group { - in, out := a[opCode.I1:opCode.I2], b[opCode.J1:opCode.J2] - switch opCode.Tag { - case 'e': - formatLines(writeLine, " ", in) - case 'r': - formatLines(writeLine, "-", in) - formatLines(writeLine, "+", out) - case 'd': - formatLines(writeLine, "-", in) - case 'i': - formatLines(writeLine, "+", out) - } - } - } - return buf.String() -} - -// hasWhitespaceDiffLines returns true if any diff groups is only different -// because of whitespace characters. -func hasWhitespaceDiffLines(groups [][]difflib.OpCode, a, b []string) bool { - for _, group := range groups { - in, out := new(bytes.Buffer), new(bytes.Buffer) - for _, opCode := range group { - if opCode.Tag == 'e' { - continue - } - for _, line := range a[opCode.I1:opCode.I2] { - in.WriteString(line) - } - for _, line := range b[opCode.J1:opCode.J2] { - out.WriteString(line) - } - } - if removeWhitespace(in.String()) == removeWhitespace(out.String()) { - return true - } - } - return false -} - -func removeWhitespace(s string) string { - var result []rune - for _, r := range s { - if !unicode.IsSpace(r) { - result = append(result, r) - } - } - return string(result) -} - -func visibleWhitespaceLine(ws func(string, string)) func(string, string) { - mapToVisibleSpace := func(r rune) rune { - switch r { - case '\n': - case ' ': - return '·' - case '\t': - return '▷' - case '\v': - return '▽' - case '\r': - return '↵' - case '\f': - return '↓' - default: - if unicode.IsSpace(r) { - return '�' - } - } - return r - } - return func(prefix, s string) { - ws(prefix, strings.Map(mapToVisibleSpace, s)) - } -} - -func formatHeader(wf func(string, ...interface{}), conf DiffConfig) { - if conf.From != "" || conf.To != "" { - wf("--- %s\n", conf.From) - wf("+++ %s\n", conf.To) - } -} - -func formatRangeLine(wf func(string, ...interface{}), group []difflib.OpCode) { - first, last := group[0], group[len(group)-1] - range1 := formatRangeUnified(first.I1, last.I2) - range2 := formatRangeUnified(first.J1, last.J2) - wf("@@ -%s +%s @@\n", range1, range2) -} - -// Convert range to the "ed" format -func formatRangeUnified(start, stop int) string { - // Per the diff spec at http://www.unix.org/single_unix_specification/ - beginning := start + 1 // lines start numbering with one - length := stop - start - if length == 1 { - return fmt.Sprintf("%d", beginning) - } - if length == 0 { - beginning-- // empty ranges begin at line just before the range - } - return fmt.Sprintf("%d,%d", beginning, length) -} - -func formatLines(writeLine func(string, string), prefix string, lines []string) { - for _, line := range lines { - writeLine(prefix, line) - } - // Add a newline if the last line is missing one so that the diff displays - // properly. - if !strings.HasSuffix(lines[len(lines)-1], "\n") { - writeLine("", "\n") - } -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/internal/format/format.go b/vendor/github.com/gotestyourself/gotestyourself/internal/format/format.go deleted file mode 100644 index 6961ffe6..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/internal/format/format.go +++ /dev/null @@ -1,27 +0,0 @@ -package format - -import "fmt" - -// Message accepts a msgAndArgs varargs and formats it using fmt.Sprintf -func Message(msgAndArgs ...interface{}) string { - switch len(msgAndArgs) { - case 0: - return "" - case 1: - return fmt.Sprintf("%v", msgAndArgs[0]) - default: - return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...) - } -} - -// WithCustomMessage accepts one or two messages and formats them appropriately -func WithCustomMessage(source string, msgAndArgs ...interface{}) string { - custom := Message(msgAndArgs...) - switch { - case custom == "": - return source - case source == "": - return custom - } - return fmt.Sprintf("%s: %s", source, custom) -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/internal/source/source.go b/vendor/github.com/gotestyourself/gotestyourself/internal/source/source.go deleted file mode 100644 index f71c5129..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/internal/source/source.go +++ /dev/null @@ -1,163 +0,0 @@ -package source - -import ( - "bytes" - "fmt" - "go/ast" - "go/format" - "go/parser" - "go/token" - "os" - "runtime" - "strconv" - "strings" - - "github.com/pkg/errors" -) - -const baseStackIndex = 1 - -// FormattedCallExprArg returns the argument from an ast.CallExpr at the -// index in the call stack. The argument is formatted using FormatNode. -func FormattedCallExprArg(stackIndex int, argPos int) (string, error) { - args, err := CallExprArgs(stackIndex + 1) - if err != nil { - return "", err - } - return FormatNode(args[argPos]) -} - -func getNodeAtLine(filename string, lineNum int) (ast.Node, error) { - fileset := token.NewFileSet() - astFile, err := parser.ParseFile(fileset, filename, nil, parser.AllErrors) - if err != nil { - return nil, errors.Wrapf(err, "failed to parse source file: %s", filename) - } - - node := scanToLine(fileset, astFile, lineNum) - if node == nil { - return nil, errors.Errorf( - "failed to find an expression on line %d in %s", lineNum, filename) - } - return node, nil -} - -func scanToLine(fileset *token.FileSet, node ast.Node, lineNum int) ast.Node { - v := &scanToLineVisitor{lineNum: lineNum, fileset: fileset} - ast.Walk(v, node) - return v.matchedNode -} - -type scanToLineVisitor struct { - lineNum int - matchedNode ast.Node - fileset *token.FileSet -} - -func (v *scanToLineVisitor) Visit(node ast.Node) ast.Visitor { - if node == nil || v.matchedNode != nil { - return nil - } - if v.nodePosition(node).Line == v.lineNum { - v.matchedNode = node - return nil - } - return v -} - -// In golang 1.9 the line number changed from being the line where the statement -// ended to the line where the statement began. -func (v *scanToLineVisitor) nodePosition(node ast.Node) token.Position { - if goVersionBefore19 { - return v.fileset.Position(node.End()) - } - return v.fileset.Position(node.Pos()) -} - -var goVersionBefore19 = isGOVersionBefore19() - -func isGOVersionBefore19() bool { - version := runtime.Version() - // not a release version - if !strings.HasPrefix(version, "go") { - return false - } - version = strings.TrimPrefix(version, "go") - parts := strings.Split(version, ".") - if len(parts) < 2 { - return false - } - minor, err := strconv.ParseInt(parts[1], 10, 32) - return err == nil && parts[0] == "1" && minor < 9 -} - -func getCallExprArgs(node ast.Node) ([]ast.Expr, error) { - visitor := &callExprVisitor{} - ast.Walk(visitor, node) - if visitor.expr == nil { - return nil, errors.New("failed to find call expression") - } - return visitor.expr.Args, nil -} - -type callExprVisitor struct { - expr *ast.CallExpr -} - -func (v *callExprVisitor) Visit(node ast.Node) ast.Visitor { - if v.expr != nil || node == nil { - return nil - } - debug("visit (%T): %s", node, debugFormatNode{node}) - - if callExpr, ok := node.(*ast.CallExpr); ok { - v.expr = callExpr - return nil - } - return v -} - -// FormatNode using go/format.Node and return the result as a string -func FormatNode(node ast.Node) (string, error) { - buf := new(bytes.Buffer) - err := format.Node(buf, token.NewFileSet(), node) - return buf.String(), err -} - -// CallExprArgs returns the ast.Expr slice for the args of an ast.CallExpr at -// the index in the call stack. -func CallExprArgs(stackIndex int) ([]ast.Expr, error) { - _, filename, lineNum, ok := runtime.Caller(baseStackIndex + stackIndex) - if !ok { - return nil, errors.New("failed to get call stack") - } - debug("call stack position: %s:%d", filename, lineNum) - - node, err := getNodeAtLine(filename, lineNum) - if err != nil { - return nil, err - } - debug("found node (%T): %s", node, debugFormatNode{node}) - - return getCallExprArgs(node) -} - -var debugEnabled = os.Getenv("GOTESTYOURSELF_DEBUG") != "" - -func debug(format string, args ...interface{}) { - if debugEnabled { - fmt.Fprintf(os.Stderr, "DEBUG: "+format+"\n", args...) - } -} - -type debugFormatNode struct { - ast.Node -} - -func (n debugFormatNode) String() string { - out, err := FormatNode(n.Node) - if err != nil { - return fmt.Sprintf("failed to format %s: %s", n.Node, err) - } - return out -} diff --git a/vendor/github.com/gotestyourself/gotestyourself/x/subtest/context.go b/vendor/github.com/gotestyourself/gotestyourself/x/subtest/context.go deleted file mode 100644 index d11c96fb..00000000 --- a/vendor/github.com/gotestyourself/gotestyourself/x/subtest/context.go +++ /dev/null @@ -1,81 +0,0 @@ -/*Package subtest provides a TestContext to subtests which handles cleanup, and -provides a testing.TB, and context.Context. - -This package was inspired by github.com/frankban/quicktest. -*/ -package subtest - -import ( - "context" - "testing" -) - -type testcase struct { - testing.TB - ctx context.Context - cleanupFuncs []cleanupFunc -} - -type cleanupFunc func() - -func (tc *testcase) Ctx() context.Context { - if tc.ctx == nil { - var cancel func() - tc.ctx, cancel = context.WithCancel(context.Background()) - tc.AddCleanup(cancel) - } - return tc.ctx -} - -// Cleanup runs all cleanup functions. Functions are run in the opposite order -// in which they were added. Cleanup is called automatically before Run exits. -func (tc *testcase) Cleanup() { - for _, f := range tc.cleanupFuncs { - // Defer all cleanup functions so they all run even if one calls - // t.FailNow() or panics. Deferring them also runs them in reverse order. - defer f() - } - tc.cleanupFuncs = nil -} - -func (tc *testcase) AddCleanup(f func()) { - tc.cleanupFuncs = append(tc.cleanupFuncs, f) -} - -func (tc *testcase) Parallel() { - tp, ok := tc.TB.(parallel) - if !ok { - panic("Parallel called with a testing.B") - } - tp.Parallel() -} - -type parallel interface { - Parallel() -} - -// Run a subtest. When subtest exits, every cleanup function added with -// TestContext.AddCleanup will be run. -func Run(t *testing.T, name string, subtest func(t TestContext)) bool { - return t.Run(name, func(t *testing.T) { - tc := &testcase{TB: t} - defer tc.Cleanup() - subtest(tc) - }) -} - -// TestContext provides a testing.TB and a context.Context for a test case. -type TestContext interface { - testing.TB - // AddCleanup function which will be run when before Run returns. - AddCleanup(f func()) - // Ctx returns a context for the test case. Multiple calls from the same subtest - // will return the same context. The context is cancelled when Run - // returns. - Ctx() context.Context - // Parallel calls t.Parallel on the testing.TB. Panics if testing.TB does - // not implement Parallel. - Parallel() -} - -var _ TestContext = &testcase{} diff --git a/vendor/github.com/hairyhenderson/toml/.gitignore b/vendor/github.com/hairyhenderson/toml/.gitignore new file mode 100644 index 00000000..0cd38003 --- /dev/null +++ b/vendor/github.com/hairyhenderson/toml/.gitignore @@ -0,0 +1,5 @@ +TAGS +tags +.*.swp +tomlcheck/tomlcheck +toml.test diff --git a/vendor/github.com/hairyhenderson/toml/.travis.yml b/vendor/github.com/hairyhenderson/toml/.travis.yml new file mode 100644 index 00000000..8b8afc4f --- /dev/null +++ b/vendor/github.com/hairyhenderson/toml/.travis.yml @@ -0,0 +1,15 @@ +language: go +go: + - 1.1 + - 1.2 + - 1.3 + - 1.4 + - 1.5 + - 1.6 + - tip +install: + - go install ./... + - go get github.com/BurntSushi/toml-test +script: + - export PATH="$PATH:$HOME/gopath/bin" + - make test diff --git a/vendor/github.com/hairyhenderson/toml/COMPATIBLE b/vendor/github.com/hairyhenderson/toml/COMPATIBLE new file mode 100644 index 00000000..6efcfd0c --- /dev/null +++ b/vendor/github.com/hairyhenderson/toml/COMPATIBLE @@ -0,0 +1,3 @@ +Compatible with TOML version +[v0.4.0](https://github.com/toml-lang/toml/blob/v0.4.0/versions/en/toml-v0.4.0.md) + diff --git a/vendor/github.com/hairyhenderson/toml/Makefile b/vendor/github.com/hairyhenderson/toml/Makefile new file mode 100644 index 00000000..3600848d --- /dev/null +++ b/vendor/github.com/hairyhenderson/toml/Makefile @@ -0,0 +1,19 @@ +install: + go install ./... + +test: install + go test -v + toml-test toml-test-decoder + toml-test -encoder toml-test-encoder + +fmt: + gofmt -w *.go */*.go + colcheck *.go */*.go + +tags: + find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS + +push: + git push origin master + git push github master + diff --git a/vendor/github.com/hairyhenderson/toml/README.md b/vendor/github.com/hairyhenderson/toml/README.md new file mode 100644 index 00000000..7c1b37ec --- /dev/null +++ b/vendor/github.com/hairyhenderson/toml/README.md @@ -0,0 +1,218 @@ +## TOML parser and encoder for Go with reflection + +TOML stands for Tom's Obvious, Minimal Language. This Go package provides a +reflection interface similar to Go's standard library `json` and `xml` +packages. This package also supports the `encoding.TextUnmarshaler` and +`encoding.TextMarshaler` interfaces so that you can define custom data +representations. (There is an example of this below.) + +Spec: https://github.com/toml-lang/toml + +Compatible with TOML version +[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md) + +Documentation: https://godoc.org/github.com/BurntSushi/toml + +Installation: + +```bash +go get github.com/BurntSushi/toml +``` + +Try the toml validator: + +```bash +go get github.com/BurntSushi/toml/cmd/tomlv +tomlv some-toml-file.toml +``` + +[![Build Status](https://travis-ci.org/BurntSushi/toml.svg?branch=master)](https://travis-ci.org/BurntSushi/toml) [![GoDoc](https://godoc.org/github.com/BurntSushi/toml?status.svg)](https://godoc.org/github.com/BurntSushi/toml) + +### Testing + +This package passes all tests in +[toml-test](https://github.com/BurntSushi/toml-test) for both the decoder +and the encoder. + +### Examples + +This package works similarly to how the Go standard library handles `XML` +and `JSON`. Namely, data is loaded into Go values via reflection. + +For the simplest example, consider some TOML file as just a list of keys +and values: + +```toml +Age = 25 +Cats = [ "Cauchy", "Plato" ] +Pi = 3.14 +Perfection = [ 6, 28, 496, 8128 ] +DOB = 1987-07-05T05:45:00Z +``` + +Which could be defined in Go as: + +```go +type Config struct { + Age int + Cats []string + Pi float64 + Perfection []int + DOB time.Time // requires `import time` +} +``` + +And then decoded with: + +```go +var conf Config +if _, err := toml.Decode(tomlData, &conf); err != nil { + // handle error +} +``` + +You can also use struct tags if your struct field name doesn't map to a TOML +key value directly: + +```toml +some_key_NAME = "wat" +``` + +```go +type TOML struct { + ObscureKey string `toml:"some_key_NAME"` +} +``` + +### Using the `encoding.TextUnmarshaler` interface + +Here's an example that automatically parses duration strings into +`time.Duration` values: + +```toml +[[song]] +name = "Thunder Road" +duration = "4m49s" + +[[song]] +name = "Stairway to Heaven" +duration = "8m03s" +``` + +Which can be decoded with: + +```go +type song struct { + Name string + Duration duration +} +type songs struct { + Song []song +} +var favorites songs +if _, err := toml.Decode(blob, &favorites); err != nil { + log.Fatal(err) +} + +for _, s := range favorites.Song { + fmt.Printf("%s (%s)\n", s.Name, s.Duration) +} +``` + +And you'll also need a `duration` type that satisfies the +`encoding.TextUnmarshaler` interface: + +```go +type duration struct { + time.Duration +} + +func (d *duration) UnmarshalText(text []byte) error { + var err error + d.Duration, err = time.ParseDuration(string(text)) + return err +} +``` + +### More complex usage + +Here's an example of how to load the example from the official spec page: + +```toml +# This is a TOML document. Boom. + +title = "TOML Example" + +[owner] +name = "Tom Preston-Werner" +organization = "GitHub" +bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." +dob = 1979-05-27T07:32:00Z # First class dates? Why not? + +[database] +server = "192.168.1.1" +ports = [ 8001, 8001, 8002 ] +connection_max = 5000 +enabled = true + +[servers] + + # You can indent as you please. Tabs or spaces. TOML don't care. + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + [servers.beta] + ip = "10.0.0.2" + dc = "eqdc10" + +[clients] +data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it + +# Line breaks are OK when inside arrays +hosts = [ + "alpha", + "omega" +] +``` + +And the corresponding Go types are: + +```go +type tomlConfig struct { + Title string + Owner ownerInfo + DB database `toml:"database"` + Servers map[string]server + Clients clients +} + +type ownerInfo struct { + Name string + Org string `toml:"organization"` + Bio string + DOB time.Time +} + +type database struct { + Server string + Ports []int + ConnMax int `toml:"connection_max"` + Enabled bool +} + +type server struct { + IP string + DC string +} + +type clients struct { + Data [][]interface{} + Hosts []string +} +``` + +Note that a case insensitive match will be tried if an exact match can't be +found. + +A working example of the above can be found in `_examples/example.{go,toml}`. diff --git a/vendor/github.com/hairyhenderson/toml/cmd/toml-test-decoder/COPYING b/vendor/github.com/hairyhenderson/toml/cmd/toml-test-decoder/COPYING deleted file mode 100644 index 5a8e3325..00000000 --- a/vendor/github.com/hairyhenderson/toml/cmd/toml-test-decoder/COPYING +++ /dev/null @@ -1,14 +0,0 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - diff --git a/vendor/github.com/hairyhenderson/toml/cmd/toml-test-encoder/COPYING b/vendor/github.com/hairyhenderson/toml/cmd/toml-test-encoder/COPYING deleted file mode 100644 index 5a8e3325..00000000 --- a/vendor/github.com/hairyhenderson/toml/cmd/toml-test-encoder/COPYING +++ /dev/null @@ -1,14 +0,0 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - diff --git a/vendor/github.com/hairyhenderson/toml/cmd/tomlv/COPYING b/vendor/github.com/hairyhenderson/toml/cmd/tomlv/COPYING deleted file mode 100644 index 5a8e3325..00000000 --- a/vendor/github.com/hairyhenderson/toml/cmd/tomlv/COPYING +++ /dev/null @@ -1,14 +0,0 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - diff --git a/vendor/github.com/hairyhenderson/toml/session.vim b/vendor/github.com/hairyhenderson/toml/session.vim new file mode 100644 index 00000000..562164be --- /dev/null +++ b/vendor/github.com/hairyhenderson/toml/session.vim @@ -0,0 +1 @@ +au BufWritePost *.go silent!make tags > /dev/null 2>&1 diff --git a/vendor/github.com/hashicorp/consul/LICENSE b/vendor/github.com/hashicorp/consul/LICENSE deleted file mode 100644 index c33dcc7c..00000000 --- a/vendor/github.com/hashicorp/consul/LICENSE +++ /dev/null @@ -1,354 +0,0 @@ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. “Contributor” - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. “Contributor Version” - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor’s Contribution. - -1.3. “Contribution” - - means Covered Software of a particular Contributor. - -1.4. “Covered Software” - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. “Incompatible With Secondary Licenses” - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of version - 1.1 or earlier of the License, but not also under the terms of a - Secondary License. - -1.6. “Executable Form” - - means any form of the work other than Source Code Form. - -1.7. “Larger Work” - - means a work that combines Covered Software with other material, in a separate - file or files, that is not Covered Software. - -1.8. “License” - - means this document. - -1.9. “Licensable” - - means having the right to grant, to the maximum extent possible, whether at the - time of the initial grant or subsequently, any and all of the rights conveyed by - this License. - -1.10. “Modifications” - - means any of the following: - - a. any file in Source Code Form that results from an addition to, deletion - from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. “Patent Claims” of a Contributor - - means any patent claim(s), including without limitation, method, process, - and apparatus claims, in any patent Licensable by such Contributor that - would be infringed, but for the grant of the License, by the making, - using, selling, offering for sale, having made, import, or transfer of - either its Contributions or its Contributor Version. - -1.12. “Secondary License” - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. “Source Code Form” - - means the form of the work preferred for making modifications. - -1.14. “You” (or “Your”) - - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, “control” means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or as - part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its Contributions - or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution become - effective for each Contribution on the date the Contributor first distributes - such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under this - License. No additional rights or licenses will be implied from the distribution - or licensing of Covered Software under this License. Notwithstanding Section - 2.1(b) above, no patent license is granted by a Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party’s - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of its - Contributions. - - This License does not grant any rights in the trademarks, service marks, or - logos of any Contributor (except as may be necessary to comply with the - notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this License - (see Section 10.2) or under the terms of a Secondary License (if permitted - under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its Contributions - are its original creation(s) or it has sufficient rights to grant the - rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under applicable - copyright doctrines of fair use, fair dealing, or other equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under the - terms of this License. You must inform recipients that the Source Code Form - of the Covered Software is governed by the terms of this License, and how - they can obtain a copy of this License. You may not attempt to alter or - restrict the recipients’ rights in the Source Code Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this License, - or sublicense it under different terms, provided that the license for - the Executable Form does not attempt to limit or alter the recipients’ - rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for the - Covered Software. If the Larger Work is a combination of Covered Software - with a work governed by one or more Secondary Licenses, and the Covered - Software is not Incompatible With Secondary Licenses, this License permits - You to additionally distribute such Covered Software under the terms of - such Secondary License(s), so that the recipient of the Larger Work may, at - their option, further distribute the Covered Software under the terms of - either this License or such Secondary License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices (including - copyright notices, patent notices, disclaimers of warranty, or limitations - of liability) contained within the Source Code Form of the Covered - Software, except that You may alter any license notices to the extent - required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on behalf - of any Contributor. You must make it absolutely clear that any such - warranty, support, indemnity, or liability obligation is offered by You - alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, judicial - order, or regulation then You must: (a) comply with the terms of this License - to the maximum extent possible; and (b) describe the limitations and the code - they affect. Such description must be placed in a text file included with all - distributions of the Covered Software under this License. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing basis, - if such Contributor fails to notify You of the non-compliance by some - reasonable means prior to 60 days after You have come back into compliance. - Moreover, Your grants from a particular Contributor are reinstated on an - ongoing basis if such Contributor notifies You of the non-compliance by - some reasonable means, this is the first time You have received notice of - non-compliance with this License from such Contributor, and You become - compliant prior to 30 days after Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, counter-claims, - and cross-claims) alleging that a Contributor Version directly or - indirectly infringes any patent, then the rights granted to You by any and - all Contributors for the Covered Software under Section 2.1 of this License - shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an “as is” basis, without - warranty of any kind, either expressed, implied, or statutory, including, - without limitation, warranties that the Covered Software is free of defects, - merchantable, fit for a particular purpose or non-infringing. The entire - risk as to the quality and performance of the Covered Software is with You. - Should any Covered Software prove defective in any respect, You (not any - Contributor) assume the cost of any necessary servicing, repair, or - correction. This disclaimer of warranty constitutes an essential part of this - License. No use of any Covered Software is authorized under this License - except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from such - party’s negligence to the extent applicable law prohibits such limitation. - Some jurisdictions do not allow the exclusion or limitation of incidental or - consequential damages, so this exclusion and limitation may not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts of - a jurisdiction where the defendant maintains its principal place of business - and such litigation shall be governed by laws of that jurisdiction, without - reference to its conflict-of-law provisions. Nothing in this Section shall - prevent a party’s ability to bring cross-claims or counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject matter - hereof. If any provision of this License is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. Any law or regulation which provides that the language of a - contract shall be construed against the drafter shall not be used to construe - this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version of - the License under which You originally received the Covered Software, or - under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a modified - version of this License if you rename the license and remove any - references to the name of the license steward (except to note that such - modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - If You choose to distribute Source Code Form that is Incompatible With - Secondary Licenses under the terms of this version of the License, the - notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, then -You may include the notice in a location (such as a LICENSE file in a relevant -directory) where a recipient would be likely to look for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is “Incompatible - With Secondary Licenses”, as defined by - the Mozilla Public License, v. 2.0. - diff --git a/vendor/github.com/hashicorp/consul/NOTICE.md b/vendor/github.com/hashicorp/consul/NOTICE.md deleted file mode 100644 index fe34b5e5..00000000 --- a/vendor/github.com/hashicorp/consul/NOTICE.md +++ /dev/null @@ -1,3 +0,0 @@ -Copyright © 2014-2018 HashiCorp, Inc. - -This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this project, you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/vendor/github.com/hashicorp/consul/api/LICENSE b/vendor/github.com/hashicorp/consul/api/LICENSE new file mode 100644 index 00000000..c33dcc7c --- /dev/null +++ b/vendor/github.com/hashicorp/consul/api/LICENSE @@ -0,0 +1,354 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. “Contributor” + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. “Contributor Version” + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor’s Contribution. + +1.3. “Contribution” + + means Covered Software of a particular Contributor. + +1.4. “Covered Software” + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. “Incompatible With Secondary Licenses” + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of version + 1.1 or earlier of the License, but not also under the terms of a + Secondary License. + +1.6. “Executable Form” + + means any form of the work other than Source Code Form. + +1.7. “Larger Work” + + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. + +1.8. “License” + + means this document. + +1.9. “Licensable” + + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed by + this License. + +1.10. “Modifications” + + means any of the following: + + a. any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. “Patent Claims” of a Contributor + + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License, by the making, + using, selling, offering for sale, having made, import, or transfer of + either its Contributions or its Contributor Version. + +1.12. “Secondary License” + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. “Source Code Form” + + means the form of the work preferred for making modifications. + +1.14. “You” (or “Your”) + + means an individual or a legal entity exercising rights under this + License. For legal entities, “You” includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, “control” means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or as + part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its Contributions + or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution become + effective for each Contribution on the date the Contributor first distributes + such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under this + License. No additional rights or licenses will be implied from the distribution + or licensing of Covered Software under this License. Notwithstanding Section + 2.1(b) above, no patent license is granted by a Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party’s + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of its + Contributions. + + This License does not grant any rights in the trademarks, service marks, or + logos of any Contributor (except as may be necessary to comply with the + notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this License + (see Section 10.2) or under the terms of a Secondary License (if permitted + under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its Contributions + are its original creation(s) or it has sufficient rights to grant the + rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under applicable + copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under the + terms of this License. You must inform recipients that the Source Code Form + of the Covered Software is governed by the terms of this License, and how + they can obtain a copy of this License. You may not attempt to alter or + restrict the recipients’ rights in the Source Code Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this License, + or sublicense it under different terms, provided that the license for + the Executable Form does not attempt to limit or alter the recipients’ + rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for the + Covered Software. If the Larger Work is a combination of Covered Software + with a work governed by one or more Secondary Licenses, and the Covered + Software is not Incompatible With Secondary Licenses, this License permits + You to additionally distribute such Covered Software under the terms of + such Secondary License(s), so that the recipient of the Larger Work may, at + their option, further distribute the Covered Software under the terms of + either this License or such Secondary License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices (including + copyright notices, patent notices, disclaimers of warranty, or limitations + of liability) contained within the Source Code Form of the Covered + Software, except that You may alter any license notices to the extent + required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on behalf + of any Contributor. You must make it absolutely clear that any such + warranty, support, indemnity, or liability obligation is offered by You + alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, judicial + order, or regulation then You must: (a) comply with the terms of this License + to the maximum extent possible; and (b) describe the limitations and the code + they affect. Such description must be placed in a text file included with all + distributions of the Covered Software under this License. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing basis, + if such Contributor fails to notify You of the non-compliance by some + reasonable means prior to 60 days after You have come back into compliance. + Moreover, Your grants from a particular Contributor are reinstated on an + ongoing basis if such Contributor notifies You of the non-compliance by + some reasonable means, this is the first time You have received notice of + non-compliance with this License from such Contributor, and You become + compliant prior to 30 days after Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, counter-claims, + and cross-claims) alleging that a Contributor Version directly or + indirectly infringes any patent, then the rights granted to You by any and + all Contributors for the Covered Software under Section 2.1 of this License + shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an “as is” basis, without + warranty of any kind, either expressed, implied, or statutory, including, + without limitation, warranties that the Covered Software is free of defects, + merchantable, fit for a particular purpose or non-infringing. The entire + risk as to the quality and performance of the Covered Software is with You. + Should any Covered Software prove defective in any respect, You (not any + Contributor) assume the cost of any necessary servicing, repair, or + correction. This disclaimer of warranty constitutes an essential part of this + License. No use of any Covered Software is authorized under this License + except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from such + party’s negligence to the extent applicable law prohibits such limitation. + Some jurisdictions do not allow the exclusion or limitation of incidental or + consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts of + a jurisdiction where the defendant maintains its principal place of business + and such litigation shall be governed by laws of that jurisdiction, without + reference to its conflict-of-law provisions. Nothing in this Section shall + prevent a party’s ability to bring cross-claims or counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. Any law or regulation which provides that the language of a + contract shall be construed against the drafter shall not be used to construe + this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version of + the License under which You originally received the Covered Software, or + under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a modified + version of this License if you rename the license and remove any + references to the name of the license steward (except to note that such + modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - “Incompatible With Secondary Licenses” Notice + + This Source Code Form is “Incompatible + With Secondary Licenses”, as defined by + the Mozilla Public License, v. 2.0. + diff --git a/vendor/github.com/hashicorp/consul/api/README.md b/vendor/github.com/hashicorp/consul/api/README.md new file mode 100644 index 00000000..3255cbb2 --- /dev/null +++ b/vendor/github.com/hashicorp/consul/api/README.md @@ -0,0 +1,67 @@ +Consul API client +================= + +This package provides the `api` package which attempts to +provide programmatic access to the full Consul API. + +Currently, all of the Consul APIs included in version 0.6.0 are supported. + +Documentation +============= + +The full documentation is available on [Godoc](https://godoc.org/github.com/hashicorp/consul/api) + +Usage +===== + +Below is an example of using the Consul client: + +```go +package main + +import "github.com/hashicorp/consul/api" +import "fmt" + +func main() { + // Get a new client + client, err := api.NewClient(api.DefaultConfig()) + if err != nil { + panic(err) + } + + // Get a handle to the KV API + kv := client.KV() + + // PUT a new KV pair + p := &api.KVPair{Key: "REDIS_MAXCLIENTS", Value: []byte("1000")} + _, err = kv.Put(p, nil) + if err != nil { + panic(err) + } + + // Lookup the pair + pair, _, err := kv.Get("REDIS_MAXCLIENTS", nil) + if err != nil { + panic(err) + } + fmt.Printf("KV: %v %s\n", pair.Key, pair.Value) +} +``` + +To run this example, start a Consul server: + +```bash +consul agent -dev +``` + +Copy the code above into a file such as `main.go`. + +Install and run. You'll see a key (`REDIS_MAXCLIENTS`) and value (`1000`) printed. + +```bash +$ go get +$ go run main.go +KV: REDIS_MAXCLIENTS 1000 +``` + +After running the code, you can also view the values in the Consul UI on your local machine at http://localhost:8500/ui/dc1/kv diff --git a/vendor/github.com/hashicorp/consul/api/agent.go b/vendor/github.com/hashicorp/consul/api/agent.go index 04043ba8..1ef33124 100644 --- a/vendor/github.com/hashicorp/consul/api/agent.go +++ b/vendor/github.com/hashicorp/consul/api/agent.go @@ -23,23 +23,11 @@ const ( // service proxies another service within Consul and speaks the connect // protocol. ServiceKindConnectProxy ServiceKind = "connect-proxy" -) - -// ProxyExecMode is the execution mode for a managed Connect proxy. -type ProxyExecMode string -const ( - // ProxyExecModeDaemon indicates that the proxy command should be long-running - // and should be started and supervised by the agent until it's target service - // is deregistered. - ProxyExecModeDaemon ProxyExecMode = "daemon" - - // ProxyExecModeScript indicates that the proxy command should be invoke to - // completion on each change to the configuration of lifecycle event. The - // script typically fetches the config and certificates from the agent API and - // then configures an externally managed daemon, perhaps starting and stopping - // it if necessary. - ProxyExecModeScript ProxyExecMode = "script" + // ServiceKindMeshGateway is a Mesh Gateway for the Connect feature. This + // service will proxy connections based off the SNI header set by other + // connect proxies + ServiceKindMeshGateway ServiceKind = "mesh-gateway" ) // UpstreamDestType is the type of upstream discovery mechanism. @@ -82,15 +70,14 @@ type AgentService struct { Meta map[string]string Port int Address string + TaggedAddresses map[string]ServiceAddress `json:",omitempty"` Weights AgentWeights EnableTagOverride bool - CreateIndex uint64 `json:",omitempty" bexpr:"-"` - ModifyIndex uint64 `json:",omitempty" bexpr:"-"` - ContentHash string `json:",omitempty" bexpr:"-"` - // DEPRECATED (ProxyDestination) - remove this field - ProxyDestination string `json:",omitempty" bexpr:"-"` - Proxy *AgentServiceConnectProxyConfig `json:",omitempty"` - Connect *AgentServiceConnect `json:",omitempty"` + CreateIndex uint64 `json:",omitempty" bexpr:"-"` + ModifyIndex uint64 `json:",omitempty" bexpr:"-"` + ContentHash string `json:",omitempty" bexpr:"-"` + Proxy *AgentServiceConnectProxyConfig `json:",omitempty"` + Connect *AgentServiceConnect `json:",omitempty"` } // AgentServiceChecksInfo returns information about a Service and its checks @@ -103,28 +90,19 @@ type AgentServiceChecksInfo struct { // AgentServiceConnect represents the Connect configuration of a service. type AgentServiceConnect struct { Native bool `json:",omitempty"` - Proxy *AgentServiceConnectProxy `json:",omitempty" bexpr:"-"` SidecarService *AgentServiceRegistration `json:",omitempty" bexpr:"-"` } -// AgentServiceConnectProxy represents the Connect Proxy configuration of a -// service. -type AgentServiceConnectProxy struct { - ExecMode ProxyExecMode `json:",omitempty"` - Command []string `json:",omitempty"` - Config map[string]interface{} `json:",omitempty" bexpr:"-"` - Upstreams []Upstream `json:",omitempty"` -} - // AgentServiceConnectProxyConfig is the proxy configuration in a connect-proxy // ServiceDefinition or response. type AgentServiceConnectProxyConfig struct { - DestinationServiceName string + DestinationServiceName string `json:",omitempty"` DestinationServiceID string `json:",omitempty"` LocalServiceAddress string `json:",omitempty"` LocalServicePort int `json:",omitempty"` Config map[string]interface{} `json:",omitempty" bexpr:"-"` - Upstreams []Upstream + Upstreams []Upstream `json:",omitempty"` + MeshGateway MeshGatewayConfig `json:",omitempty"` } // AgentMember represents a cluster member known to the agent @@ -157,21 +135,20 @@ type MembersOpts struct { // AgentServiceRegistration is used to register a new service type AgentServiceRegistration struct { - Kind ServiceKind `json:",omitempty"` - ID string `json:",omitempty"` - Name string `json:",omitempty"` - Tags []string `json:",omitempty"` - Port int `json:",omitempty"` - Address string `json:",omitempty"` - EnableTagOverride bool `json:",omitempty"` - Meta map[string]string `json:",omitempty"` - Weights *AgentWeights `json:",omitempty"` + Kind ServiceKind `json:",omitempty"` + ID string `json:",omitempty"` + Name string `json:",omitempty"` + Tags []string `json:",omitempty"` + Port int `json:",omitempty"` + Address string `json:",omitempty"` + TaggedAddresses map[string]ServiceAddress `json:",omitempty"` + EnableTagOverride bool `json:",omitempty"` + Meta map[string]string `json:",omitempty"` + Weights *AgentWeights `json:",omitempty"` Check *AgentServiceCheck Checks AgentServiceChecks - // DEPRECATED (ProxyDestination) - remove this field - ProxyDestination string `json:",omitempty"` - Proxy *AgentServiceConnectProxyConfig `json:",omitempty"` - Connect *AgentServiceConnect `json:",omitempty"` + Proxy *AgentServiceConnectProxyConfig `json:",omitempty"` + Connect *AgentServiceConnect `json:",omitempty"` } // AgentCheckRegistration is used to register a new check @@ -276,12 +253,8 @@ type ConnectProxyConfig struct { TargetServiceID string TargetServiceName string ContentHash string - // DEPRECATED(managed-proxies) - this struct is re-used for sidecar configs - // but they don't need ExecMode or Command - ExecMode ProxyExecMode `json:",omitempty"` - Command []string `json:",omitempty"` - Config map[string]interface{} `bexpr:"-"` - Upstreams []Upstream + Config map[string]interface{} `bexpr:"-"` + Upstreams []Upstream } // Upstream is the response structure for a proxy upstream configuration. @@ -293,6 +266,7 @@ type Upstream struct { LocalBindAddress string `json:",omitempty"` LocalBindPort int `json:",omitempty"` Config map[string]interface{} `json:",omitempty" bexpr:"-"` + MeshGateway MeshGatewayConfig `json:",omitempty"` } // Agent can be used to query the Agent endpoints @@ -815,31 +789,6 @@ func (a *Agent) ConnectCALeaf(serviceID string, q *QueryOptions) (*LeafCert, *Qu return &out, qm, nil } -// ConnectProxyConfig gets the configuration for a local managed proxy instance. -// -// Note that this uses an unconventional blocking mechanism since it's -// agent-local state. That means there is no persistent raft index so we block -// based on object hash instead. -func (a *Agent) ConnectProxyConfig(proxyServiceID string, q *QueryOptions) (*ConnectProxyConfig, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/agent/connect/proxy/"+proxyServiceID) - r.setQueryOptions(q) - rtt, resp, err := requireOK(a.c.doRequest(r)) - if err != nil { - return nil, nil, err - } - defer resp.Body.Close() - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out ConnectProxyConfig - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, qm, nil -} - // EnableServiceMaintenance toggles service maintenance mode on // for the given service ID. func (a *Agent) EnableServiceMaintenance(serviceID, reason string) error { diff --git a/vendor/github.com/hashicorp/consul/api/api.go b/vendor/github.com/hashicorp/consul/api/api.go index 4b17ff6c..b624b3cc 100644 --- a/vendor/github.com/hashicorp/consul/api/api.go +++ b/vendor/github.com/hashicorp/consul/api/api.go @@ -89,7 +89,7 @@ type QueryOptions struct { RequireConsistent bool // UseCache requests that the agent cache results locally. See - // https://www.consul.io/api/index.html#agent-caching for more details on the + // https://www.consul.io/api/features/caching.html for more details on the // semantics. UseCache bool @@ -99,14 +99,14 @@ type QueryOptions struct { // returned. Clients that wish to allow for stale results on error can set // StaleIfError to a longer duration to change this behavior. It is ignored // if the endpoint supports background refresh caching. See - // https://www.consul.io/api/index.html#agent-caching for more details. + // https://www.consul.io/api/features/caching.html for more details. MaxAge time.Duration // StaleIfError specifies how stale the client will accept a cached response // if the servers are unavailable to fetch a fresh one. Only makes sense when // UseCache is true and MaxAge is set to a lower, non-zero value. It is // ignored if the endpoint supports background refresh caching. See - // https://www.consul.io/api/index.html#agent-caching for more details. + // https://www.consul.io/api/features/caching.html for more details. StaleIfError time.Duration // WaitIndex is used to enable a blocking query. Waits @@ -143,6 +143,10 @@ type QueryOptions struct { // a value from 0 to 5 (inclusive). RelayFactor uint8 + // LocalOnly is used in keyring list operation to force the keyring + // query to only hit local servers (no WAN traffic). + LocalOnly bool + // Connect filters prepared query execution to only include Connect-capable // services. This currently affects prepared query execution. Connect bool @@ -655,6 +659,9 @@ func (r *request) setQueryOptions(q *QueryOptions) { if q.RelayFactor != 0 { r.params.Set("relay-factor", strconv.Itoa(int(q.RelayFactor))) } + if q.LocalOnly { + r.params.Set("local-only", fmt.Sprintf("%t", q.LocalOnly)) + } if q.Connect { r.params.Set("connect", "true") } diff --git a/vendor/github.com/hashicorp/consul/api/catalog.go b/vendor/github.com/hashicorp/consul/api/catalog.go index c175c3ff..3fb05534 100644 --- a/vendor/github.com/hashicorp/consul/api/catalog.go +++ b/vendor/github.com/hashicorp/consul/api/catalog.go @@ -1,5 +1,10 @@ package api +import ( + "net" + "strconv" +) + type Weights struct { Passing int Warning int @@ -16,6 +21,11 @@ type Node struct { ModifyIndex uint64 } +type ServiceAddress struct { + Address string + Port int +} + type CatalogService struct { ID string Node string @@ -26,17 +36,16 @@ type CatalogService struct { ServiceID string ServiceName string ServiceAddress string + ServiceTaggedAddresses map[string]ServiceAddress ServiceTags []string ServiceMeta map[string]string ServicePort int ServiceWeights Weights ServiceEnableTagOverride bool - // DEPRECATED (ProxyDestination) - remove the next comment! - // We forgot to ever add ServiceProxyDestination here so no need to deprecate! - ServiceProxy *AgentServiceConnectProxyConfig - CreateIndex uint64 - Checks HealthChecks - ModifyIndex uint64 + ServiceProxy *AgentServiceConnectProxyConfig + CreateIndex uint64 + Checks HealthChecks + ModifyIndex uint64 } type CatalogNode struct { @@ -242,3 +251,12 @@ func (c *Catalog) Node(node string, q *QueryOptions) (*CatalogNode, *QueryMeta, } return out, qm, nil } + +func ParseServiceAddr(addrPort string) (ServiceAddress, error) { + port := 0 + host, portStr, err := net.SplitHostPort(addrPort) + if err == nil { + port, err = strconv.Atoi(portStr) + } + return ServiceAddress{Address: host, Port: port}, err +} diff --git a/vendor/github.com/hashicorp/consul/api/config_entry.go b/vendor/github.com/hashicorp/consul/api/config_entry.go index 0c18963f..1588f2ee 100644 --- a/vendor/github.com/hashicorp/consul/api/config_entry.go +++ b/vendor/github.com/hashicorp/consul/api/config_entry.go @@ -12,8 +12,12 @@ import ( ) const ( - ServiceDefaults string = "service-defaults" - ProxyDefaults string = "proxy-defaults" + ServiceDefaults string = "service-defaults" + ProxyDefaults string = "proxy-defaults" + ServiceRouter string = "service-router" + ServiceSplitter string = "service-splitter" + ServiceResolver string = "service-resolver" + ProxyConfigGlobal string = "global" ) @@ -24,10 +28,40 @@ type ConfigEntry interface { GetModifyIndex() uint64 } +type MeshGatewayMode string + +const ( + // MeshGatewayModeDefault represents no specific mode and should + // be used to indicate that a different layer of the configuration + // chain should take precedence + MeshGatewayModeDefault MeshGatewayMode = "" + + // MeshGatewayModeNone represents that the Upstream Connect connections + // should be direct and not flow through a mesh gateway. + MeshGatewayModeNone MeshGatewayMode = "none" + + // MeshGatewayModeLocal represents that the Upstrea Connect connections + // should be made to a mesh gateway in the local datacenter. This is + MeshGatewayModeLocal MeshGatewayMode = "local" + + // MeshGatewayModeRemote represents that the Upstream Connect connections + // should be made to a mesh gateway in a remote datacenter. + MeshGatewayModeRemote MeshGatewayMode = "remote" +) + +// MeshGatewayConfig controls how Mesh Gateways are used for upstream Connect +// services +type MeshGatewayConfig struct { + // Mode is the mode that should be used for the upstream connection. + Mode MeshGatewayMode `json:",omitempty"` +} + type ServiceConfigEntry struct { Kind string Name string - Protocol string + Protocol string `json:",omitempty"` + MeshGateway MeshGatewayConfig `json:",omitempty"` + ExternalSNI string `json:",omitempty"` CreateIndex uint64 ModifyIndex uint64 } @@ -51,7 +85,8 @@ func (s *ServiceConfigEntry) GetModifyIndex() uint64 { type ProxyConfigEntry struct { Kind string Name string - Config map[string]interface{} + Config map[string]interface{} `json:",omitempty"` + MeshGateway MeshGatewayConfig `json:",omitempty"` CreateIndex uint64 ModifyIndex uint64 } @@ -80,14 +115,35 @@ type rawEntryListResponse struct { func makeConfigEntry(kind, name string) (ConfigEntry, error) { switch kind { case ServiceDefaults: - return &ServiceConfigEntry{Name: name}, nil + return &ServiceConfigEntry{Kind: kind, Name: name}, nil case ProxyDefaults: - return &ProxyConfigEntry{Name: name}, nil + return &ProxyConfigEntry{Kind: kind, Name: name}, nil + case ServiceRouter: + return &ServiceRouterConfigEntry{Kind: kind, Name: name}, nil + case ServiceSplitter: + return &ServiceSplitterConfigEntry{Kind: kind, Name: name}, nil + case ServiceResolver: + return &ServiceResolverConfigEntry{Kind: kind, Name: name}, nil default: return nil, fmt.Errorf("invalid config entry kind: %s", kind) } } +func MakeConfigEntry(kind, name string) (ConfigEntry, error) { + return makeConfigEntry(kind, name) +} + +// DecodeConfigEntry will decode the result of using json.Unmarshal of a config +// entry into a map[string]interface{}. +// +// Important caveats: +// +// - This will NOT work if the map[string]interface{} was produced using HCL +// decoding as that requires more extensive parsing to work around the issues +// with map[string][]interface{} that arise. +// +// - This will only decode fields using their camel case json field +// representations. func DecodeConfigEntry(raw map[string]interface{}) (ConfigEntry, error) { var entry ConfigEntry @@ -132,7 +188,19 @@ func DecodeConfigEntryFromJSON(data []byte) (ConfigEntry, error) { return DecodeConfigEntry(raw) } -// Config can be used to query the Config endpoints +func decodeConfigEntrySlice(raw []map[string]interface{}) ([]ConfigEntry, error) { + var entries []ConfigEntry + for _, rawEntry := range raw { + entry, err := DecodeConfigEntry(rawEntry) + if err != nil { + return nil, err + } + entries = append(entries, entry) + } + return entries, nil +} + +// ConfigEntries can be used to query the Config endpoints type ConfigEntries struct { c *Client } @@ -195,13 +263,9 @@ func (conf *ConfigEntries) List(kind string, q *QueryOptions) ([]ConfigEntry, *Q return nil, nil, err } - var entries []ConfigEntry - for _, rawEntry := range raw { - entry, err := DecodeConfigEntry(rawEntry) - if err != nil { - return nil, nil, err - } - entries = append(entries, entry) + entries, err := decodeConfigEntrySlice(raw) + if err != nil { + return nil, nil, err } return entries, qm, nil diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_discoverychain.go b/vendor/github.com/hashicorp/consul/api/config_entry_discoverychain.go new file mode 100644 index 00000000..77acfbdd --- /dev/null +++ b/vendor/github.com/hashicorp/consul/api/config_entry_discoverychain.go @@ -0,0 +1,200 @@ +package api + +import ( + "encoding/json" + "time" +) + +type ServiceRouterConfigEntry struct { + Kind string + Name string + + Routes []ServiceRoute `json:",omitempty"` + + CreateIndex uint64 + ModifyIndex uint64 +} + +func (e *ServiceRouterConfigEntry) GetKind() string { return e.Kind } +func (e *ServiceRouterConfigEntry) GetName() string { return e.Name } +func (e *ServiceRouterConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex } +func (e *ServiceRouterConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex } + +type ServiceRoute struct { + Match *ServiceRouteMatch `json:",omitempty"` + Destination *ServiceRouteDestination `json:",omitempty"` +} + +type ServiceRouteMatch struct { + HTTP *ServiceRouteHTTPMatch `json:",omitempty"` +} + +type ServiceRouteHTTPMatch struct { + PathExact string `json:",omitempty"` + PathPrefix string `json:",omitempty"` + PathRegex string `json:",omitempty"` + + Header []ServiceRouteHTTPMatchHeader `json:",omitempty"` + QueryParam []ServiceRouteHTTPMatchQueryParam `json:",omitempty"` + Methods []string `json:",omitempty"` +} + +type ServiceRouteHTTPMatchHeader struct { + Name string + Present bool `json:",omitempty"` + Exact string `json:",omitempty"` + Prefix string `json:",omitempty"` + Suffix string `json:",omitempty"` + Regex string `json:",omitempty"` + Invert bool `json:",omitempty"` +} + +type ServiceRouteHTTPMatchQueryParam struct { + Name string + Present bool `json:",omitempty"` + Exact string `json:",omitempty"` + Regex string `json:",omitempty"` +} + +type ServiceRouteDestination struct { + Service string `json:",omitempty"` + ServiceSubset string `json:",omitempty"` + Namespace string `json:",omitempty"` + PrefixRewrite string `json:",omitempty"` + RequestTimeout time.Duration `json:",omitempty"` + NumRetries uint32 `json:",omitempty"` + RetryOnConnectFailure bool `json:",omitempty"` + RetryOnStatusCodes []uint32 `json:",omitempty"` +} + +func (e *ServiceRouteDestination) MarshalJSON() ([]byte, error) { + type Alias ServiceRouteDestination + exported := &struct { + RequestTimeout string `json:",omitempty"` + *Alias + }{ + RequestTimeout: e.RequestTimeout.String(), + Alias: (*Alias)(e), + } + if e.RequestTimeout == 0 { + exported.RequestTimeout = "" + } + + return json.Marshal(exported) +} + +func (e *ServiceRouteDestination) UnmarshalJSON(data []byte) error { + type Alias ServiceRouteDestination + aux := &struct { + RequestTimeout string + *Alias + }{ + Alias: (*Alias)(e), + } + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + var err error + if aux.RequestTimeout != "" { + if e.RequestTimeout, err = time.ParseDuration(aux.RequestTimeout); err != nil { + return err + } + } + return nil +} + +type ServiceSplitterConfigEntry struct { + Kind string + Name string + + Splits []ServiceSplit `json:",omitempty"` + + CreateIndex uint64 + ModifyIndex uint64 +} + +func (e *ServiceSplitterConfigEntry) GetKind() string { return e.Kind } +func (e *ServiceSplitterConfigEntry) GetName() string { return e.Name } +func (e *ServiceSplitterConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex } +func (e *ServiceSplitterConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex } + +type ServiceSplit struct { + Weight float32 + Service string `json:",omitempty"` + ServiceSubset string `json:",omitempty"` + Namespace string `json:",omitempty"` +} + +type ServiceResolverConfigEntry struct { + Kind string + Name string + + DefaultSubset string `json:",omitempty"` + Subsets map[string]ServiceResolverSubset `json:",omitempty"` + Redirect *ServiceResolverRedirect `json:",omitempty"` + Failover map[string]ServiceResolverFailover `json:",omitempty"` + ConnectTimeout time.Duration `json:",omitempty"` + + CreateIndex uint64 + ModifyIndex uint64 +} + +func (e *ServiceResolverConfigEntry) MarshalJSON() ([]byte, error) { + type Alias ServiceResolverConfigEntry + exported := &struct { + ConnectTimeout string `json:",omitempty"` + *Alias + }{ + ConnectTimeout: e.ConnectTimeout.String(), + Alias: (*Alias)(e), + } + if e.ConnectTimeout == 0 { + exported.ConnectTimeout = "" + } + + return json.Marshal(exported) +} + +func (e *ServiceResolverConfigEntry) UnmarshalJSON(data []byte) error { + type Alias ServiceResolverConfigEntry + aux := &struct { + ConnectTimeout string + *Alias + }{ + Alias: (*Alias)(e), + } + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + var err error + if aux.ConnectTimeout != "" { + if e.ConnectTimeout, err = time.ParseDuration(aux.ConnectTimeout); err != nil { + return err + } + } + return nil +} + +func (e *ServiceResolverConfigEntry) GetKind() string { return e.Kind } +func (e *ServiceResolverConfigEntry) GetName() string { return e.Name } +func (e *ServiceResolverConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex } +func (e *ServiceResolverConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex } + +type ServiceResolverSubset struct { + Filter string `json:",omitempty"` + OnlyPassing bool `json:",omitempty"` +} + +type ServiceResolverRedirect struct { + Service string `json:",omitempty"` + ServiceSubset string `json:",omitempty"` + Namespace string `json:",omitempty"` + Datacenter string `json:",omitempty"` +} + +type ServiceResolverFailover struct { + Service string `json:",omitempty"` + ServiceSubset string `json:",omitempty"` + Namespace string `json:",omitempty"` + Datacenters []string `json:",omitempty"` +} diff --git a/vendor/github.com/hashicorp/consul/api/connect_intention.go b/vendor/github.com/hashicorp/consul/api/connect_intention.go index a996c03e..d25cb844 100644 --- a/vendor/github.com/hashicorp/consul/api/connect_intention.go +++ b/vendor/github.com/hashicorp/consul/api/connect_intention.go @@ -54,6 +54,13 @@ type Intention struct { // or modified. CreatedAt, UpdatedAt time.Time + // Hash of the contents of the intention + // + // This is needed mainly for replication purposes. When replicating from + // one DC to another keeping the content Hash will allow us to detect + // content changes more efficiently than checking every single field + Hash []byte + CreateIndex uint64 ModifyIndex uint64 } diff --git a/vendor/github.com/hashicorp/consul/api/discovery_chain.go b/vendor/github.com/hashicorp/consul/api/discovery_chain.go new file mode 100644 index 00000000..407a3b08 --- /dev/null +++ b/vendor/github.com/hashicorp/consul/api/discovery_chain.go @@ -0,0 +1,230 @@ +package api + +import ( + "encoding/json" + "fmt" + "time" +) + +// DiscoveryChain can be used to query the discovery-chain endpoints +type DiscoveryChain struct { + c *Client +} + +// DiscoveryChain returns a handle to the discovery-chain endpoints +func (c *Client) DiscoveryChain() *DiscoveryChain { + return &DiscoveryChain{c} +} + +func (d *DiscoveryChain) Get(name string, opts *DiscoveryChainOptions, q *QueryOptions) (*DiscoveryChainResponse, *QueryMeta, error) { + if name == "" { + return nil, nil, fmt.Errorf("Name parameter must not be empty") + } + + method := "GET" + if opts != nil && opts.requiresPOST() { + method = "POST" + } + + r := d.c.newRequest(method, fmt.Sprintf("/v1/discovery-chain/%s", name)) + r.setQueryOptions(q) + + if opts != nil { + if opts.EvaluateInDatacenter != "" { + r.params.Set("compile-dc", opts.EvaluateInDatacenter) + } + // TODO(namespaces): handle possible EvaluateInNamespace here + } + + if method == "POST" { + r.obj = opts + } + + rtt, resp, err := requireOK(d.c.doRequest(r)) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + + qm := &QueryMeta{} + parseQueryMeta(resp, qm) + qm.RequestTime = rtt + + var out DiscoveryChainResponse + + if err := decodeBody(resp, &out); err != nil { + return nil, nil, err + } + + return &out, qm, nil +} + +type DiscoveryChainOptions struct { + EvaluateInDatacenter string `json:"-"` + + // OverrideMeshGateway allows for the mesh gateway setting to be overridden + // for any resolver in the compiled chain. + OverrideMeshGateway MeshGatewayConfig `json:",omitempty"` + + // OverrideProtocol allows for the final protocol for the chain to be + // altered. + // + // - If the chain ordinarily would be TCP and an L7 protocol is passed here + // the chain will not include Routers or Splitters. + // + // - If the chain ordinarily would be L7 and TCP is passed here the chain + // will not include Routers or Splitters. + OverrideProtocol string `json:",omitempty"` + + // OverrideConnectTimeout allows for the ConnectTimeout setting to be + // overridden for any resolver in the compiled chain. + OverrideConnectTimeout time.Duration `json:",omitempty"` +} + +func (o *DiscoveryChainOptions) requiresPOST() bool { + if o == nil { + return false + } + return o.OverrideMeshGateway.Mode != "" || + o.OverrideProtocol != "" || + o.OverrideConnectTimeout != 0 +} + +type DiscoveryChainResponse struct { + Chain *CompiledDiscoveryChain +} + +type CompiledDiscoveryChain struct { + ServiceName string + Namespace string + Datacenter string + + // CustomizationHash is a unique hash of any data that affects the + // compilation of the discovery chain other than config entries or the + // name/namespace/datacenter evaluation criteria. + // + // If set, this value should be used to prefix/suffix any generated load + // balancer data plane objects to avoid sharing customized and + // non-customized versions. + CustomizationHash string + + // Protocol is the overall protocol shared by everything in the chain. + Protocol string + + // StartNode is the first key into the Nodes map that should be followed + // when walking the discovery chain. + StartNode string + + // Nodes contains all nodes available for traversal in the chain keyed by a + // unique name. You can walk this by starting with StartNode. + // + // NOTE: The names should be treated as opaque values and are only + // guaranteed to be consistent within a single compilation. + Nodes map[string]*DiscoveryGraphNode + + // Targets is a list of all targets used in this chain. + // + // NOTE: The names should be treated as opaque values and are only + // guaranteed to be consistent within a single compilation. + Targets map[string]*DiscoveryTarget +} + +const ( + DiscoveryGraphNodeTypeRouter = "router" + DiscoveryGraphNodeTypeSplitter = "splitter" + DiscoveryGraphNodeTypeResolver = "resolver" +) + +// DiscoveryGraphNode is a single node in the compiled discovery chain. +type DiscoveryGraphNode struct { + Type string + Name string // this is NOT necessarily a service + + // fields for Type==router + Routes []*DiscoveryRoute + + // fields for Type==splitter + Splits []*DiscoverySplit + + // fields for Type==resolver + Resolver *DiscoveryResolver +} + +// compiled form of ServiceRoute +type DiscoveryRoute struct { + Definition *ServiceRoute + NextNode string +} + +// compiled form of ServiceSplit +type DiscoverySplit struct { + Weight float32 + NextNode string +} + +// compiled form of ServiceResolverConfigEntry +type DiscoveryResolver struct { + Default bool + ConnectTimeout time.Duration + Target string + Failover *DiscoveryFailover +} + +func (r *DiscoveryResolver) MarshalJSON() ([]byte, error) { + type Alias DiscoveryResolver + exported := &struct { + ConnectTimeout string `json:",omitempty"` + *Alias + }{ + ConnectTimeout: r.ConnectTimeout.String(), + Alias: (*Alias)(r), + } + if r.ConnectTimeout == 0 { + exported.ConnectTimeout = "" + } + + return json.Marshal(exported) +} + +func (r *DiscoveryResolver) UnmarshalJSON(data []byte) error { + type Alias DiscoveryResolver + aux := &struct { + ConnectTimeout string + *Alias + }{ + Alias: (*Alias)(r), + } + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + var err error + if aux.ConnectTimeout != "" { + if r.ConnectTimeout, err = time.ParseDuration(aux.ConnectTimeout); err != nil { + return err + } + } + return nil +} + +// compiled form of ServiceResolverFailover +type DiscoveryFailover struct { + Targets []string +} + +// DiscoveryTarget represents all of the inputs necessary to use a resolver +// config entry to execute a catalog query to generate a list of service +// instances during discovery. +type DiscoveryTarget struct { + ID string + + Service string + ServiceSubset string + Namespace string + Datacenter string + + MeshGateway MeshGatewayConfig + Subset ServiceResolverSubset + External bool + SNI string + Name string +} diff --git a/vendor/github.com/hashicorp/consul/api/go.mod b/vendor/github.com/hashicorp/consul/api/go.mod new file mode 100644 index 00000000..78fe8a3a --- /dev/null +++ b/vendor/github.com/hashicorp/consul/api/go.mod @@ -0,0 +1,16 @@ +module github.com/hashicorp/consul/api + +go 1.12 + +replace github.com/hashicorp/consul/sdk => ../sdk + +require ( + github.com/hashicorp/consul/sdk v0.2.0 + github.com/hashicorp/go-cleanhttp v0.5.1 + github.com/hashicorp/go-rootcerts v1.0.0 + github.com/hashicorp/go-uuid v1.0.1 + github.com/hashicorp/serf v0.8.2 + github.com/mitchellh/mapstructure v1.1.2 + github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c + github.com/stretchr/testify v1.3.0 +) diff --git a/vendor/github.com/hashicorp/consul/api/go.sum b/vendor/github.com/hashicorp/consul/api/go.sum new file mode 100644 index 00000000..01591f9d --- /dev/null +++ b/vendor/github.com/hashicorp/consul/api/go.sum @@ -0,0 +1,78 @@ +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/hashicorp/consul/sdk v0.2.0 h1:GWFYFmry/k4b1hEoy7kSkmU8e30GAyI4VZHk0fRxeL4= +github.com/hashicorp/consul/sdk v0.2.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3 h1:KYQXGkl6vs02hK7pK4eIbw0NpNPedieTSTEiJ//bwGs= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsqD5/3mLDhx2NcNqyW+0= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5 h1:x6r4Jo0KNzOOzYd8lbcRsqjuqEASK6ob3auvWYM4/8U= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/hashicorp/consul/api/operator_license.go b/vendor/github.com/hashicorp/consul/api/operator_license.go new file mode 100644 index 00000000..25aa702e --- /dev/null +++ b/vendor/github.com/hashicorp/consul/api/operator_license.go @@ -0,0 +1,111 @@ +package api + +import ( + "io/ioutil" + "strings" + "time" +) + +type License struct { + // The unique identifier of the license + LicenseID string `json:"license_id"` + + // The customer ID associated with the license + CustomerID string `json:"customer_id"` + + // If set, an identifier that should be used to lock the license to a + // particular site, cluster, etc. + InstallationID string `json:"installation_id"` + + // The time at which the license was issued + IssueTime time.Time `json:"issue_time"` + + // The time at which the license starts being valid + StartTime time.Time `json:"start_time"` + + // The time after which the license expires + ExpirationTime time.Time `json:"expiration_time"` + + // The time at which the license ceases to function and can + // no longer be used in any capacity + TerminationTime time.Time `json:"termination_time"` + + // The product the license is valid for + Product string `json:"product"` + + // License Specific Flags + Flags map[string]interface{} `json:"flags"` + + // List of features enabled by the license + Features []string `json:"features"` +} + +type LicenseReply struct { + Valid bool + License *License + Warnings []string +} + +func (op *Operator) LicenseGet(q *QueryOptions) (*LicenseReply, error) { + var reply LicenseReply + if _, err := op.c.query("/v1/operator/license", &reply, q); err != nil { + return nil, err + } else { + return &reply, nil + } +} + +func (op *Operator) LicenseGetSigned(q *QueryOptions) (string, error) { + r := op.c.newRequest("GET", "/v1/operator/license") + r.params.Set("signed", "1") + r.setQueryOptions(q) + _, resp, err := requireOK(op.c.doRequest(r)) + if err != nil { + return "", err + } + defer resp.Body.Close() + + data, err := ioutil.ReadAll(resp.Body) + if err != nil { + return "", err + } + + return string(data), nil +} + +// LicenseReset will reset the license to the builtin one if it is still valid. +// If the builtin license is invalid, the current license stays active. +func (op *Operator) LicenseReset(opts *WriteOptions) (*LicenseReply, error) { + var reply LicenseReply + r := op.c.newRequest("DELETE", "/v1/operator/license") + r.setWriteOptions(opts) + _, resp, err := requireOK(op.c.doRequest(r)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + if err := decodeBody(resp, &reply); err != nil { + return nil, err + } + + return &reply, nil +} + +func (op *Operator) LicensePut(license string, opts *WriteOptions) (*LicenseReply, error) { + var reply LicenseReply + r := op.c.newRequest("PUT", "/v1/operator/license") + r.setWriteOptions(opts) + r.body = strings.NewReader(license) + _, resp, err := requireOK(op.c.doRequest(r)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + if err := decodeBody(resp, &reply); err != nil { + return nil, err + } + + return &reply, nil +} diff --git a/vendor/github.com/hashicorp/consul/ui-v2/app/styles/components/notice.scss b/vendor/github.com/hashicorp/consul/ui-v2/app/styles/components/notice.scss deleted file mode 100644 index 3d0a22d2..00000000 --- a/vendor/github.com/hashicorp/consul/ui-v2/app/styles/components/notice.scss +++ /dev/null @@ -1,10 +0,0 @@ -@import './notice/index'; -.notice.warning { - @extend %notice-warning; -} -.notice.info { - @extend %notice-info; -} -.notice.policy-management { - @extend %notice-highlight; -} diff --git a/vendor/github.com/hashicorp/consul/ui-v2/app/utils/dom/event-target/event-target-shim/LICENSE b/vendor/github.com/hashicorp/consul/ui-v2/app/utils/dom/event-target/event-target-shim/LICENSE deleted file mode 100644 index c39e6949..00000000 --- a/vendor/github.com/hashicorp/consul/ui-v2/app/utils/dom/event-target/event-target-shim/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Toru Nagashima - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/vendor/github.com/hashicorp/consul/ui-v2/lib/block-slots/LICENSE.md b/vendor/github.com/hashicorp/consul/ui-v2/lib/block-slots/LICENSE.md deleted file mode 100644 index c75ad2a1..00000000 --- a/vendor/github.com/hashicorp/consul/ui-v2/lib/block-slots/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Ciena Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/hashicorp/consul/website/LICENSE.md b/vendor/github.com/hashicorp/consul/website/LICENSE.md deleted file mode 100644 index 3189f43a..00000000 --- a/vendor/github.com/hashicorp/consul/website/LICENSE.md +++ /dev/null @@ -1,10 +0,0 @@ -# Proprietary License - -This license is temporary while a more official one is drafted. However, -this should make it clear: - -The text contents of this website are MPL 2.0 licensed. - -The design contents of this website are proprietary and may not be reproduced -or reused in any way other than to run the website locally. The license for -the design is owned solely by HashiCorp, Inc. diff --git a/vendor/github.com/hashicorp/consul/website/source/api/operator/license.html.md b/vendor/github.com/hashicorp/consul/website/source/api/operator/license.html.md deleted file mode 100644 index 1110ec9b..00000000 --- a/vendor/github.com/hashicorp/consul/website/source/api/operator/license.html.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -layout: api -page_title: License - Operator - HTTP API -sidebar_current: api-operator-license -description: |- - The /operator/license endpoints allow for setting and retrieving the Consul - Enterprise License. ---- - -# License - Operator HTTP API - -~> **Enterprise Only!** This API endpoint and functionality only exists in -Consul Enterprise. This is not present in the open source version of Consul. - -The licensing functionality described here is available only in -[Consul Enterprise](https://www.hashicorp.com/products/consul/) version 1.1.0 and later. - -## Getting the Consul License - -This endpoint gets information about the current license. - -| Method | Path | Produces | -| ------ | ---------------------------- | -------------------------- | -| `GET` | `/operator/license` | `application/json` | - -The table below shows this endpoint's support for -[blocking queries](/api/features/blocking.html), -[consistency modes](/api/features/consistency.html), -[agent caching](/api/features/caching.html), and -[required ACLs](/api/index.html#authentication). - -| Blocking Queries | Consistency Modes | Agent Caching | ACL Required | -| ---------------- | ----------------- | ------------- | ---------------- | -| `NO` | `all` | `none` | `none` | - -### Parameters - -- `dc` `(string: "")` - Specifies the datacenter whose license should be retrieved. - This will default to the datacenter of the agent serving the HTTP request. - This is specified as a URL query parameter. - -### Sample Request - -```text -$ curl \ - http://127.0.0.1:8500/v1/operator/license -``` - -### Sample Response - -```json -{ - "Valid": true, - "License": { - "license_id": "2afbf681-0d1a-0649-cb6c-333ec9f0989c", - "customer_id": "0259271d-8ffc-e85e-0830-c0822c1f5f2b", - "installation_id": "*", - "issue_time": "2018-05-21T20:03:35.911567355Z", - "start_time": "2018-05-21T04:00:00Z", - "expiration_time": "2019-05-22T03:59:59.999Z", - "product": "consul", - "flags": { - "package": "premium" - }, - "features": [ - "Automated Backups", - "Automated Upgrades", - "Enhanced Read Scalability", - "Network Segments", - "Redundancy Zone", - "Advanced Network Federation" - ], - "temporary": false - }, - "Warnings": [] -} -``` - -## Updating the Consul License - -This endpoint updates the Consul license and returns some of the -license contents as well as any warning messages regarding its validity. - -| Method | Path | Produces | -| ------ | ---------------------------- | -------------------------- | -| `PUT` | `/operator/license` | `application/json` | - -The table below shows this endpoint's support for -[blocking queries](/api/features/blocking.html), -[consistency modes](/api/features/consistency.html), -[agent caching](/api/features/caching.html), and -[required ACLs](/api/index.html#authentication). - -| Blocking Queries | Consistency Modes | Agent Caching | ACL Required | -| ---------------- | ----------------- | ------------- | ---------------- | -| `NO` | `none` | `none` | `operator:write` | - -### Parameters - -- `dc` `(string: "")` - Specifies the datacenter whose license should be updated. - This will default to the datacenter of the agent serving the HTTP request. - This is specified as a URL query parameter. - -### Sample Payload - -The payload is the raw license blob. - -### Sample Request - -```text -$ curl \ - --request PUT \ - --data @consul.license \ - http://127.0.0.1:8500/v1/operator/license -``` - -### Sample Response - -```json -{ - "Valid": true, - "License": { - "license_id": "2afbf681-0d1a-0649-cb6c-333ec9f0989c", - "customer_id": "0259271d-8ffc-e85e-0830-c0822c1f5f2b", - "installation_id": "*", - "issue_time": "2018-05-21T20:03:35.911567355Z", - "start_time": "2018-05-21T04:00:00Z", - "expiration_time": "2019-05-22T03:59:59.999Z", - "product": "consul", - "flags": { - "package": "premium" - }, - "features": [ - "Automated Backups", - "Automated Upgrades", - "Enhanced Read Scalability", - "Network Segments", - "Redundancy Zone", - "Advanced Network Federation" - ], - "temporary": false - }, - "Warnings": [] -} -``` diff --git a/vendor/github.com/hashicorp/consul/website/source/docs/commands/license.html.markdown.erb b/vendor/github.com/hashicorp/consul/website/source/docs/commands/license.html.markdown.erb deleted file mode 100644 index e397a134..00000000 --- a/vendor/github.com/hashicorp/consul/website/source/docs/commands/license.html.markdown.erb +++ /dev/null @@ -1,109 +0,0 @@ ---- -layout: "docs" -page_title: "Commands: License" -sidebar_current: "docs-commands-license" -description: > - The license command provides datacenter-level management of the Consul Enterprise license. ---- - -# Consul License - -Command: `consul license` - -<%= enterprise_alert :consul %> - -The `license` command provides datacenter-level management of the Consul Enterprise license. This was added in Consul 1.1.0. - -If ACLs are enabled then a token with operator privileges may be required in -order to use this command. Requests are forwarded internally to the leader -if required, so this can be run from any Consul node in a cluster. See the -[ACL Guide](https://learn.hashicorp.com/consul/security-networking/production-acls) for more information. - - -```text -Usage: consul license [options] [args] - - This command has subcommands for managing the Consul Enterprise license - Here are some simple examples, and more detailed examples are - available in the subcommands or the documentation. - - Install a new license from a file: - - $ consul license put @consul.license - - Install a new license from stdin: - - $ consul license put - - - Install a new license from a string: - - $ consul license put "" - - Retrieve the current license: - - $ consul license get - - For more examples, ask for subcommand help or view the documentation. - -Subcommands: - get Get the current license - put Puts a new license in the datacenter -``` - -## put - -This command sets the Consul Enterprise license. - -Usage: `consul license put [options] LICENSE` - -#### API Options - -<%= partial "docs/commands/http_api_options_client" %> -<%= partial "docs/commands/http_api_options_server" %> - -The output looks like this: - -``` -License is valid -License ID: 2afbf681-0d1a-0649-cb6c-333ec9f0989c -Customer ID: 0259271d-8ffc-e85e-0830-c0822c1f5f2b -Expires At: 2019-05-22 03:59:59.999 +0000 UTC -Datacenter: * -Package: premium -Licensed Features: - Automated Backups - Automated Upgrades - Enhanced Read Scalability - Network Segments - Redundancy Zone - Advanced Network Federation -``` - -## get - -This command gets the Consul Enterprise license. - -Usage: `consul license get [options]` - -#### API Options - -<%= partial "docs/commands/http_api_options_client" %> -<%= partial "docs/commands/http_api_options_server" %> - -The output looks like this: - -``` -License is valid -License ID: 2afbf681-0d1a-0649-cb6c-333ec9f0989c -Customer ID: 0259271d-8ffc-e85e-0830-c0822c1f5f2b -Expires At: 2019-05-22 03:59:59.999 +0000 UTC -Datacenter: * -Package: premium -Licensed Features: - Automated Backups - Automated Upgrades - Enhanced Read Scalability - Network Segments - Redundancy Zone - Advanced Network Federation -``` \ No newline at end of file diff --git a/vendor/github.com/hashicorp/errwrap/README.md b/vendor/github.com/hashicorp/errwrap/README.md new file mode 100644 index 00000000..444df08f --- /dev/null +++ b/vendor/github.com/hashicorp/errwrap/README.md @@ -0,0 +1,89 @@ +# errwrap + +`errwrap` is a package for Go that formalizes the pattern of wrapping errors +and checking if an error contains another error. + +There is a common pattern in Go of taking a returned `error` value and +then wrapping it (such as with `fmt.Errorf`) before returning it. The problem +with this pattern is that you completely lose the original `error` structure. + +Arguably the _correct_ approach is that you should make a custom structure +implementing the `error` interface, and have the original error as a field +on that structure, such [as this example](http://golang.org/pkg/os/#PathError). +This is a good approach, but you have to know the entire chain of possible +rewrapping that happens, when you might just care about one. + +`errwrap` formalizes this pattern (it doesn't matter what approach you use +above) by giving a single interface for wrapping errors, checking if a specific +error is wrapped, and extracting that error. + +## Installation and Docs + +Install using `go get github.com/hashicorp/errwrap`. + +Full documentation is available at +http://godoc.org/github.com/hashicorp/errwrap + +## Usage + +#### Basic Usage + +Below is a very basic example of its usage: + +```go +// A function that always returns an error, but wraps it, like a real +// function might. +func tryOpen() error { + _, err := os.Open("/i/dont/exist") + if err != nil { + return errwrap.Wrapf("Doesn't exist: {{err}}", err) + } + + return nil +} + +func main() { + err := tryOpen() + + // We can use the Contains helpers to check if an error contains + // another error. It is safe to do this with a nil error, or with + // an error that doesn't even use the errwrap package. + if errwrap.Contains(err, "does not exist") { + // Do something + } + if errwrap.ContainsType(err, new(os.PathError)) { + // Do something + } + + // Or we can use the associated `Get` functions to just extract + // a specific error. This would return nil if that specific error doesn't + // exist. + perr := errwrap.GetType(err, new(os.PathError)) +} +``` + +#### Custom Types + +If you're already making custom types that properly wrap errors, then +you can get all the functionality of `errwraps.Contains` and such by +implementing the `Wrapper` interface with just one function. Example: + +```go +type AppError { + Code ErrorCode + Err error +} + +func (e *AppError) WrappedErrors() []error { + return []error{e.Err} +} +``` + +Now this works: + +```go +err := &AppError{Err: fmt.Errorf("an error")} +if errwrap.ContainsType(err, fmt.Errorf("")) { + // This will work! +} +``` diff --git a/vendor/github.com/hashicorp/errwrap/go.mod b/vendor/github.com/hashicorp/errwrap/go.mod new file mode 100644 index 00000000..c9b84022 --- /dev/null +++ b/vendor/github.com/hashicorp/errwrap/go.mod @@ -0,0 +1 @@ +module github.com/hashicorp/errwrap diff --git a/vendor/github.com/hashicorp/go-cleanhttp/README.md b/vendor/github.com/hashicorp/go-cleanhttp/README.md new file mode 100644 index 00000000..036e5313 --- /dev/null +++ b/vendor/github.com/hashicorp/go-cleanhttp/README.md @@ -0,0 +1,30 @@ +# cleanhttp + +Functions for accessing "clean" Go http.Client values + +------------- + +The Go standard library contains a default `http.Client` called +`http.DefaultClient`. It is a common idiom in Go code to start with +`http.DefaultClient` and tweak it as necessary, and in fact, this is +encouraged; from the `http` package documentation: + +> The Client's Transport typically has internal state (cached TCP connections), +so Clients should be reused instead of created as needed. Clients are safe for +concurrent use by multiple goroutines. + +Unfortunately, this is a shared value, and it is not uncommon for libraries to +assume that they are free to modify it at will. With enough dependencies, it +can be very easy to encounter strange problems and race conditions due to +manipulation of this shared value across libraries and goroutines (clients are +safe for concurrent use, but writing values to the client struct itself is not +protected). + +Making things worse is the fact that a bare `http.Client` will use a default +`http.Transport` called `http.DefaultTransport`, which is another global value +that behaves the same way. So it is not simply enough to replace +`http.DefaultClient` with `&http.Client{}`. + +This repository provides some simple functions to get a "clean" `http.Client` +-- one that uses the same default values as the Go standard library, but +returns a client that does not share any state with other clients. diff --git a/vendor/github.com/hashicorp/go-cleanhttp/go.mod b/vendor/github.com/hashicorp/go-cleanhttp/go.mod new file mode 100644 index 00000000..310f0756 --- /dev/null +++ b/vendor/github.com/hashicorp/go-cleanhttp/go.mod @@ -0,0 +1 @@ +module github.com/hashicorp/go-cleanhttp diff --git a/vendor/github.com/hashicorp/go-hclog/.gitignore b/vendor/github.com/hashicorp/go-hclog/.gitignore new file mode 100644 index 00000000..42cc4105 --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/.gitignore @@ -0,0 +1 @@ +.idea* \ No newline at end of file diff --git a/vendor/github.com/hashicorp/go-hclog/LICENSE b/vendor/github.com/hashicorp/go-hclog/LICENSE new file mode 100644 index 00000000..abaf1e45 --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 HashiCorp + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/hashicorp/go-hclog/README.md b/vendor/github.com/hashicorp/go-hclog/README.md new file mode 100644 index 00000000..9b6845e9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/README.md @@ -0,0 +1,148 @@ +# go-hclog + +[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godocs] + +[godocs]: https://godoc.org/github.com/hashicorp/go-hclog + +`go-hclog` is a package for Go that provides a simple key/value logging +interface for use in development and production environments. + +It provides logging levels that provide decreased output based upon the +desired amount of output, unlike the standard library `log` package. + +It provides `Printf` style logging of values via `hclog.Fmt()`. + +It provides a human readable output mode for use in development as well as +JSON output mode for production. + +## Stability Note + +While this library is fully open source and HashiCorp will be maintaining it +(since we are and will be making extensive use of it), the API and output +format is subject to minor changes as we fully bake and vet it in our projects. +This notice will be removed once it's fully integrated into our major projects +and no further changes are anticipated. + +## Installation and Docs + +Install using `go get github.com/hashicorp/go-hclog`. + +Full documentation is available at +http://godoc.org/github.com/hashicorp/go-hclog + +## Usage + +### Use the global logger + +```go +hclog.Default().Info("hello world") +``` + +```text +2017-07-05T16:15:55.167-0700 [INFO ] hello world +``` + +(Note timestamps are removed in future examples for brevity.) + +### Create a new logger + +```go +appLogger := hclog.New(&hclog.LoggerOptions{ + Name: "my-app", + Level: hclog.LevelFromString("DEBUG"), +}) +``` + +### Emit an Info level message with 2 key/value pairs + +```go +input := "5.5" +_, err := strconv.ParseInt(input, 10, 32) +if err != nil { + appLogger.Info("Invalid input for ParseInt", "input", input, "error", err) +} +``` + +```text +... [INFO ] my-app: Invalid input for ParseInt: input=5.5 error="strconv.ParseInt: parsing "5.5": invalid syntax" +``` + +### Create a new Logger for a major subsystem + +```go +subsystemLogger := appLogger.Named("transport") +subsystemLogger.Info("we are transporting something") +``` + +```text +... [INFO ] my-app.transport: we are transporting something +``` + +Notice that logs emitted by `subsystemLogger` contain `my-app.transport`, +reflecting both the application and subsystem names. + +### Create a new Logger with fixed key/value pairs + +Using `With()` will include a specific key-value pair in all messages emitted +by that logger. + +```go +requestID := "5fb446b6-6eba-821d-df1b-cd7501b6a363" +requestLogger := subsystemLogger.With("request", requestID) +requestLogger.Info("we are transporting a request") +``` + +```text +... [INFO ] my-app.transport: we are transporting a request: request=5fb446b6-6eba-821d-df1b-cd7501b6a363 +``` + +This allows sub Loggers to be context specific without having to thread that +into all the callers. + +### Using `hclog.Fmt()` + +```go +var int totalBandwidth = 200 +appLogger.Info("total bandwidth exceeded", "bandwidth", hclog.Fmt("%d GB/s", totalBandwidth)) +``` + +```text +... [INFO ] my-app: total bandwidth exceeded: bandwidth="200 GB/s" +``` + +### Use this with code that uses the standard library logger + +If you want to use the standard library's `log.Logger` interface you can wrap +`hclog.Logger` by calling the `StandardLogger()` method. This allows you to use +it with the familiar `Println()`, `Printf()`, etc. For example: + +```go +stdLogger := appLogger.StandardLogger(&hclog.StandardLoggerOptions{ + InferLevels: true, +}) +// Printf() is provided by stdlib log.Logger interface, not hclog.Logger +stdLogger.Printf("[DEBUG] %+v", stdLogger) +``` + +```text +... [DEBUG] my-app: &{mu:{state:0 sema:0} prefix: flag:0 out:0xc42000a0a0 buf:[]} +``` + +Alternatively, you may configure the system-wide logger: + +```go +// log the standard logger from 'import "log"' +log.SetOutput(appLogger.Writer(&hclog.StandardLoggerOptions{InferLevels: true})) +log.SetPrefix("") +log.SetFlags(0) + +log.Printf("[DEBUG] %d", 42) +``` + +```text +... [DEBUG] my-app: 42 +``` + +Notice that if `appLogger` is initialized with the `INFO` log level _and_ you +specify `InferLevels: true`, you will not see any output here. You must change +`appLogger` to `DEBUG` to see output. See the docs for more information. diff --git a/vendor/github.com/hashicorp/go-hclog/context.go b/vendor/github.com/hashicorp/go-hclog/context.go new file mode 100644 index 00000000..7815f501 --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/context.go @@ -0,0 +1,38 @@ +package hclog + +import ( + "context" +) + +// WithContext inserts a logger into the context and is retrievable +// with FromContext. The optional args can be set with the same syntax as +// Logger.With to set fields on the inserted logger. This will not modify +// the logger argument in-place. +func WithContext(ctx context.Context, logger Logger, args ...interface{}) context.Context { + // While we could call logger.With even with zero args, we have this + // check to avoid unnecessary allocations around creating a copy of a + // logger. + if len(args) > 0 { + logger = logger.With(args...) + } + + return context.WithValue(ctx, contextKey, logger) +} + +// FromContext returns a logger from the context. This will return L() +// (the default logger) if no logger is found in the context. Therefore, +// this will never return a nil value. +func FromContext(ctx context.Context) Logger { + logger, _ := ctx.Value(contextKey).(Logger) + if logger == nil { + return L() + } + + return logger +} + +// Unexported new type so that our context key never collides with another. +type contextKeyType struct{} + +// contextKey is the key used for the context to store the logger. +var contextKey = contextKeyType{} diff --git a/vendor/github.com/hashicorp/go-hclog/global.go b/vendor/github.com/hashicorp/go-hclog/global.go new file mode 100644 index 00000000..3efc54c1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/global.go @@ -0,0 +1,48 @@ +package hclog + +import ( + "sync" +) + +var ( + protect sync.Once + def Logger + + // DefaultOptions is used to create the Default logger. These are read + // only when the Default logger is created, so set them as soon as the + // process starts. + DefaultOptions = &LoggerOptions{ + Level: DefaultLevel, + Output: DefaultOutput, + } +) + +// Default returns a globally held logger. This can be a good starting +// place, and then you can use .With() and .Name() to create sub-loggers +// to be used in more specific contexts. +func Default() Logger { + protect.Do(func() { + // If SetDefault was used before Default() was called, we need to + // detect that here. + if def == nil { + def = New(DefaultOptions) + } + }) + + return def +} + +// L is a short alias for Default(). +func L() Logger { + return Default() +} + +// SetDefault changes the logger to be returned by Default()and L() +// to the one given. This allows packages to use the default logger +// and have higher level packages change it to match the execution +// environment. It returns any old default if there is one. +func SetDefault(log Logger) Logger { + old := def + def = log + return old +} diff --git a/vendor/github.com/hashicorp/go-hclog/go.mod b/vendor/github.com/hashicorp/go-hclog/go.mod new file mode 100644 index 00000000..0d079a65 --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/go.mod @@ -0,0 +1,7 @@ +module github.com/hashicorp/go-hclog + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/testify v1.2.2 +) diff --git a/vendor/github.com/hashicorp/go-hclog/go.sum b/vendor/github.com/hashicorp/go-hclog/go.sum new file mode 100644 index 00000000..e03ee77d --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/go.sum @@ -0,0 +1,6 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= diff --git a/vendor/github.com/hashicorp/go-hclog/intlogger.go b/vendor/github.com/hashicorp/go-hclog/intlogger.go new file mode 100644 index 00000000..219656c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/intlogger.go @@ -0,0 +1,527 @@ +package hclog + +import ( + "bytes" + "encoding" + "encoding/json" + "fmt" + "io" + "log" + "reflect" + "runtime" + "sort" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" +) + +// TimeFormat to use for logging. This is a version of RFC3339 that contains +// contains millisecond precision +const TimeFormat = "2006-01-02T15:04:05.000Z0700" + +// errJsonUnsupportedTypeMsg is included in log json entries, if an arg cannot be serialized to json +const errJsonUnsupportedTypeMsg = "logging contained values that don't serialize to json" + +var ( + _levelToBracket = map[Level]string{ + Debug: "[DEBUG]", + Trace: "[TRACE]", + Info: "[INFO] ", + Warn: "[WARN] ", + Error: "[ERROR]", + } +) + +// Make sure that intLogger is a Logger +var _ Logger = &intLogger{} + +// intLogger is an internal logger implementation. Internal in that it is +// defined entirely by this package. +type intLogger struct { + json bool + caller bool + name string + timeFormat string + + // This is a pointer so that it's shared by any derived loggers, since + // those derived loggers share the bufio.Writer as well. + mutex *sync.Mutex + writer *writer + level *int32 + + implied []interface{} +} + +// New returns a configured logger. +func New(opts *LoggerOptions) Logger { + if opts == nil { + opts = &LoggerOptions{} + } + + output := opts.Output + if output == nil { + output = DefaultOutput + } + + level := opts.Level + if level == NoLevel { + level = DefaultLevel + } + + mutex := opts.Mutex + if mutex == nil { + mutex = new(sync.Mutex) + } + + l := &intLogger{ + json: opts.JSONFormat, + caller: opts.IncludeLocation, + name: opts.Name, + timeFormat: TimeFormat, + mutex: mutex, + writer: newWriter(output), + level: new(int32), + } + + if opts.TimeFormat != "" { + l.timeFormat = opts.TimeFormat + } + + atomic.StoreInt32(l.level, int32(level)) + + return l +} + +// Log a message and a set of key/value pairs if the given level is at +// or more severe that the threshold configured in the Logger. +func (l *intLogger) Log(level Level, msg string, args ...interface{}) { + if level < Level(atomic.LoadInt32(l.level)) { + return + } + + t := time.Now() + + l.mutex.Lock() + defer l.mutex.Unlock() + + if l.json { + l.logJSON(t, level, msg, args...) + } else { + l.log(t, level, msg, args...) + } + + l.writer.Flush(level) +} + +// Cleanup a path by returning the last 2 segments of the path only. +func trimCallerPath(path string) string { + // lovely borrowed from zap + // nb. To make sure we trim the path correctly on Windows too, we + // counter-intuitively need to use '/' and *not* os.PathSeparator here, + // because the path given originates from Go stdlib, specifically + // runtime.Caller() which (as of Mar/17) returns forward slashes even on + // Windows. + // + // See https://github.com/golang/go/issues/3335 + // and https://github.com/golang/go/issues/18151 + // + // for discussion on the issue on Go side. + + // Find the last separator. + idx := strings.LastIndexByte(path, '/') + if idx == -1 { + return path + } + + // Find the penultimate separator. + idx = strings.LastIndexByte(path[:idx], '/') + if idx == -1 { + return path + } + + return path[idx+1:] +} + +// Non-JSON logging format function +func (l *intLogger) log(t time.Time, level Level, msg string, args ...interface{}) { + l.writer.WriteString(t.Format(l.timeFormat)) + l.writer.WriteByte(' ') + + s, ok := _levelToBracket[level] + if ok { + l.writer.WriteString(s) + } else { + l.writer.WriteString("[?????]") + } + + if l.caller { + if _, file, line, ok := runtime.Caller(3); ok { + l.writer.WriteByte(' ') + l.writer.WriteString(trimCallerPath(file)) + l.writer.WriteByte(':') + l.writer.WriteString(strconv.Itoa(line)) + l.writer.WriteByte(':') + } + } + + l.writer.WriteByte(' ') + + if l.name != "" { + l.writer.WriteString(l.name) + l.writer.WriteString(": ") + } + + l.writer.WriteString(msg) + + args = append(l.implied, args...) + + var stacktrace CapturedStacktrace + + if args != nil && len(args) > 0 { + if len(args)%2 != 0 { + cs, ok := args[len(args)-1].(CapturedStacktrace) + if ok { + args = args[:len(args)-1] + stacktrace = cs + } else { + args = append(args, "") + } + } + + l.writer.WriteByte(':') + + FOR: + for i := 0; i < len(args); i = i + 2 { + var ( + val string + raw bool + ) + + switch st := args[i+1].(type) { + case string: + val = st + case int: + val = strconv.FormatInt(int64(st), 10) + case int64: + val = strconv.FormatInt(int64(st), 10) + case int32: + val = strconv.FormatInt(int64(st), 10) + case int16: + val = strconv.FormatInt(int64(st), 10) + case int8: + val = strconv.FormatInt(int64(st), 10) + case uint: + val = strconv.FormatUint(uint64(st), 10) + case uint64: + val = strconv.FormatUint(uint64(st), 10) + case uint32: + val = strconv.FormatUint(uint64(st), 10) + case uint16: + val = strconv.FormatUint(uint64(st), 10) + case uint8: + val = strconv.FormatUint(uint64(st), 10) + case CapturedStacktrace: + stacktrace = st + continue FOR + case Format: + val = fmt.Sprintf(st[0].(string), st[1:]...) + default: + v := reflect.ValueOf(st) + if v.Kind() == reflect.Slice { + val = l.renderSlice(v) + raw = true + } else { + val = fmt.Sprintf("%v", st) + } + } + + l.writer.WriteByte(' ') + l.writer.WriteString(args[i].(string)) + l.writer.WriteByte('=') + + if !raw && strings.ContainsAny(val, " \t\n\r") { + l.writer.WriteByte('"') + l.writer.WriteString(val) + l.writer.WriteByte('"') + } else { + l.writer.WriteString(val) + } + } + } + + l.writer.WriteString("\n") + + if stacktrace != "" { + l.writer.WriteString(string(stacktrace)) + } +} + +func (l *intLogger) renderSlice(v reflect.Value) string { + var buf bytes.Buffer + + buf.WriteRune('[') + + for i := 0; i < v.Len(); i++ { + if i > 0 { + buf.WriteString(", ") + } + + sv := v.Index(i) + + var val string + + switch sv.Kind() { + case reflect.String: + val = sv.String() + case reflect.Int, reflect.Int16, reflect.Int32, reflect.Int64: + val = strconv.FormatInt(sv.Int(), 10) + case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64: + val = strconv.FormatUint(sv.Uint(), 10) + default: + val = fmt.Sprintf("%v", sv.Interface()) + } + + if strings.ContainsAny(val, " \t\n\r") { + buf.WriteByte('"') + buf.WriteString(val) + buf.WriteByte('"') + } else { + buf.WriteString(val) + } + } + + buf.WriteRune(']') + + return buf.String() +} + +// JSON logging function +func (l *intLogger) logJSON(t time.Time, level Level, msg string, args ...interface{}) { + vals := l.jsonMapEntry(t, level, msg) + args = append(l.implied, args...) + + if args != nil && len(args) > 0 { + if len(args)%2 != 0 { + cs, ok := args[len(args)-1].(CapturedStacktrace) + if ok { + args = args[:len(args)-1] + vals["stacktrace"] = cs + } else { + args = append(args, "") + } + } + + for i := 0; i < len(args); i = i + 2 { + if _, ok := args[i].(string); !ok { + // As this is the logging function not much we can do here + // without injecting into logs... + continue + } + val := args[i+1] + switch sv := val.(type) { + case error: + // Check if val is of type error. If error type doesn't + // implement json.Marshaler or encoding.TextMarshaler + // then set val to err.Error() so that it gets marshaled + switch sv.(type) { + case json.Marshaler, encoding.TextMarshaler: + default: + val = sv.Error() + } + case Format: + val = fmt.Sprintf(sv[0].(string), sv[1:]...) + } + + vals[args[i].(string)] = val + } + } + + err := json.NewEncoder(l.writer).Encode(vals) + if err != nil { + if _, ok := err.(*json.UnsupportedTypeError); ok { + plainVal := l.jsonMapEntry(t, level, msg) + plainVal["@warn"] = errJsonUnsupportedTypeMsg + + json.NewEncoder(l.writer).Encode(plainVal) + } + } +} + +func (l intLogger) jsonMapEntry(t time.Time, level Level, msg string) map[string]interface{} { + vals := map[string]interface{}{ + "@message": msg, + "@timestamp": t.Format("2006-01-02T15:04:05.000000Z07:00"), + } + + var levelStr string + switch level { + case Error: + levelStr = "error" + case Warn: + levelStr = "warn" + case Info: + levelStr = "info" + case Debug: + levelStr = "debug" + case Trace: + levelStr = "trace" + default: + levelStr = "all" + } + + vals["@level"] = levelStr + + if l.name != "" { + vals["@module"] = l.name + } + + if l.caller { + if _, file, line, ok := runtime.Caller(4); ok { + vals["@caller"] = fmt.Sprintf("%s:%d", file, line) + } + } + return vals +} + +// Emit the message and args at DEBUG level +func (l *intLogger) Debug(msg string, args ...interface{}) { + l.Log(Debug, msg, args...) +} + +// Emit the message and args at TRACE level +func (l *intLogger) Trace(msg string, args ...interface{}) { + l.Log(Trace, msg, args...) +} + +// Emit the message and args at INFO level +func (l *intLogger) Info(msg string, args ...interface{}) { + l.Log(Info, msg, args...) +} + +// Emit the message and args at WARN level +func (l *intLogger) Warn(msg string, args ...interface{}) { + l.Log(Warn, msg, args...) +} + +// Emit the message and args at ERROR level +func (l *intLogger) Error(msg string, args ...interface{}) { + l.Log(Error, msg, args...) +} + +// Indicate that the logger would emit TRACE level logs +func (l *intLogger) IsTrace() bool { + return Level(atomic.LoadInt32(l.level)) == Trace +} + +// Indicate that the logger would emit DEBUG level logs +func (l *intLogger) IsDebug() bool { + return Level(atomic.LoadInt32(l.level)) <= Debug +} + +// Indicate that the logger would emit INFO level logs +func (l *intLogger) IsInfo() bool { + return Level(atomic.LoadInt32(l.level)) <= Info +} + +// Indicate that the logger would emit WARN level logs +func (l *intLogger) IsWarn() bool { + return Level(atomic.LoadInt32(l.level)) <= Warn +} + +// Indicate that the logger would emit ERROR level logs +func (l *intLogger) IsError() bool { + return Level(atomic.LoadInt32(l.level)) <= Error +} + +// Return a sub-Logger for which every emitted log message will contain +// the given key/value pairs. This is used to create a context specific +// Logger. +func (l *intLogger) With(args ...interface{}) Logger { + if len(args)%2 != 0 { + panic("With() call requires paired arguments") + } + + sl := *l + + result := make(map[string]interface{}, len(l.implied)+len(args)) + keys := make([]string, 0, len(l.implied)+len(args)) + + // Read existing args, store map and key for consistent sorting + for i := 0; i < len(l.implied); i += 2 { + key := l.implied[i].(string) + keys = append(keys, key) + result[key] = l.implied[i+1] + } + // Read new args, store map and key for consistent sorting + for i := 0; i < len(args); i += 2 { + key := args[i].(string) + _, exists := result[key] + if !exists { + keys = append(keys, key) + } + result[key] = args[i+1] + } + + // Sort keys to be consistent + sort.Strings(keys) + + sl.implied = make([]interface{}, 0, len(l.implied)+len(args)) + for _, k := range keys { + sl.implied = append(sl.implied, k) + sl.implied = append(sl.implied, result[k]) + } + + return &sl +} + +// Create a new sub-Logger that a name decending from the current name. +// This is used to create a subsystem specific Logger. +func (l *intLogger) Named(name string) Logger { + sl := *l + + if sl.name != "" { + sl.name = sl.name + "." + name + } else { + sl.name = name + } + + return &sl +} + +// Create a new sub-Logger with an explicit name. This ignores the current +// name. This is used to create a standalone logger that doesn't fall +// within the normal hierarchy. +func (l *intLogger) ResetNamed(name string) Logger { + sl := *l + + sl.name = name + + return &sl +} + +// Update the logging level on-the-fly. This will affect all subloggers as +// well. +func (l *intLogger) SetLevel(level Level) { + atomic.StoreInt32(l.level, int32(level)) +} + +// Create a *log.Logger that will send it's data through this Logger. This +// allows packages that expect to be using the standard library log to actually +// use this logger. +func (l *intLogger) StandardLogger(opts *StandardLoggerOptions) *log.Logger { + if opts == nil { + opts = &StandardLoggerOptions{} + } + + return log.New(l.StandardWriter(opts), "", 0) +} + +func (l *intLogger) StandardWriter(opts *StandardLoggerOptions) io.Writer { + return &stdlogAdapter{ + log: l, + inferLevels: opts.InferLevels, + forceLevel: opts.ForceLevel, + } +} diff --git a/vendor/github.com/hashicorp/go-hclog/logger.go b/vendor/github.com/hashicorp/go-hclog/logger.go new file mode 100644 index 00000000..080ed799 --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/logger.go @@ -0,0 +1,176 @@ +package hclog + +import ( + "io" + "log" + "os" + "strings" + "sync" +) + +var ( + //DefaultOutput is used as the default log output. + DefaultOutput io.Writer = os.Stderr + + // DefaultLevel is used as the default log level. + DefaultLevel = Info +) + +// Level represents a log level. +type Level int32 + +const ( + // NoLevel is a special level used to indicate that no level has been + // set and allow for a default to be used. + NoLevel Level = 0 + + // Trace is the most verbose level. Intended to be used for the tracing + // of actions in code, such as function enters/exits, etc. + Trace Level = 1 + + // Debug information for programmer lowlevel analysis. + Debug Level = 2 + + // Info information about steady state operations. + Info Level = 3 + + // Warn information about rare but handled events. + Warn Level = 4 + + // Error information about unrecoverable events. + Error Level = 5 +) + +// Format is a simple convience type for when formatting is required. When +// processing a value of this type, the logger automatically treats the first +// argument as a Printf formatting string and passes the rest as the values +// to be formatted. For example: L.Info(Fmt{"%d beans/day", beans}). +type Format []interface{} + +// Fmt returns a Format type. This is a convience function for creating a Format +// type. +func Fmt(str string, args ...interface{}) Format { + return append(Format{str}, args...) +} + +// LevelFromString returns a Level type for the named log level, or "NoLevel" if +// the level string is invalid. This facilitates setting the log level via +// config or environment variable by name in a predictable way. +func LevelFromString(levelStr string) Level { + // We don't care about case. Accept both "INFO" and "info". + levelStr = strings.ToLower(strings.TrimSpace(levelStr)) + switch levelStr { + case "trace": + return Trace + case "debug": + return Debug + case "info": + return Info + case "warn": + return Warn + case "error": + return Error + default: + return NoLevel + } +} + +// Logger describes the interface that must be implemeted by all loggers. +type Logger interface { + // Args are alternating key, val pairs + // keys must be strings + // vals can be any type, but display is implementation specific + // Emit a message and key/value pairs at the TRACE level + Trace(msg string, args ...interface{}) + + // Emit a message and key/value pairs at the DEBUG level + Debug(msg string, args ...interface{}) + + // Emit a message and key/value pairs at the INFO level + Info(msg string, args ...interface{}) + + // Emit a message and key/value pairs at the WARN level + Warn(msg string, args ...interface{}) + + // Emit a message and key/value pairs at the ERROR level + Error(msg string, args ...interface{}) + + // Indicate if TRACE logs would be emitted. This and the other Is* guards + // are used to elide expensive logging code based on the current level. + IsTrace() bool + + // Indicate if DEBUG logs would be emitted. This and the other Is* guards + IsDebug() bool + + // Indicate if INFO logs would be emitted. This and the other Is* guards + IsInfo() bool + + // Indicate if WARN logs would be emitted. This and the other Is* guards + IsWarn() bool + + // Indicate if ERROR logs would be emitted. This and the other Is* guards + IsError() bool + + // Creates a sublogger that will always have the given key/value pairs + With(args ...interface{}) Logger + + // Create a logger that will prepend the name string on the front of all messages. + // If the logger already has a name, the new value will be appended to the current + // name. That way, a major subsystem can use this to decorate all it's own logs + // without losing context. + Named(name string) Logger + + // Create a logger that will prepend the name string on the front of all messages. + // This sets the name of the logger to the value directly, unlike Named which honor + // the current name as well. + ResetNamed(name string) Logger + + // Updates the level. This should affect all sub-loggers as well. If an + // implementation cannot update the level on the fly, it should no-op. + SetLevel(level Level) + + // Return a value that conforms to the stdlib log.Logger interface + StandardLogger(opts *StandardLoggerOptions) *log.Logger + + // Return a value that conforms to io.Writer, which can be passed into log.SetOutput() + StandardWriter(opts *StandardLoggerOptions) io.Writer +} + +// StandardLoggerOptions can be used to configure a new standard logger. +type StandardLoggerOptions struct { + // Indicate that some minimal parsing should be done on strings to try + // and detect their level and re-emit them. + // This supports the strings like [ERROR], [ERR] [TRACE], [WARN], [INFO], + // [DEBUG] and strip it off before reapplying it. + InferLevels bool + + // ForceLevel is used to force all output from the standard logger to be at + // the specified level. Similar to InferLevels, this will strip any level + // prefix contained in the logged string before applying the forced level. + // If set, this override InferLevels. + ForceLevel Level +} + +// LoggerOptions can be used to configure a new logger. +type LoggerOptions struct { + // Name of the subsystem to prefix logs with + Name string + + // The threshold for the logger. Anything less severe is supressed + Level Level + + // Where to write the logs to. Defaults to os.Stderr if nil + Output io.Writer + + // An optional mutex pointer in case Output is shared + Mutex *sync.Mutex + + // Control if the output should be in JSON. + JSONFormat bool + + // Include file and line information in each log line + IncludeLocation bool + + // The time format to use instead of the default + TimeFormat string +} diff --git a/vendor/github.com/hashicorp/go-hclog/nulllogger.go b/vendor/github.com/hashicorp/go-hclog/nulllogger.go new file mode 100644 index 00000000..7ad6b351 --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/nulllogger.go @@ -0,0 +1,52 @@ +package hclog + +import ( + "io" + "io/ioutil" + "log" +) + +// NewNullLogger instantiates a Logger for which all calls +// will succeed without doing anything. +// Useful for testing purposes. +func NewNullLogger() Logger { + return &nullLogger{} +} + +type nullLogger struct{} + +func (l *nullLogger) Trace(msg string, args ...interface{}) {} + +func (l *nullLogger) Debug(msg string, args ...interface{}) {} + +func (l *nullLogger) Info(msg string, args ...interface{}) {} + +func (l *nullLogger) Warn(msg string, args ...interface{}) {} + +func (l *nullLogger) Error(msg string, args ...interface{}) {} + +func (l *nullLogger) IsTrace() bool { return false } + +func (l *nullLogger) IsDebug() bool { return false } + +func (l *nullLogger) IsInfo() bool { return false } + +func (l *nullLogger) IsWarn() bool { return false } + +func (l *nullLogger) IsError() bool { return false } + +func (l *nullLogger) With(args ...interface{}) Logger { return l } + +func (l *nullLogger) Named(name string) Logger { return l } + +func (l *nullLogger) ResetNamed(name string) Logger { return l } + +func (l *nullLogger) SetLevel(level Level) {} + +func (l *nullLogger) StandardLogger(opts *StandardLoggerOptions) *log.Logger { + return log.New(l.StandardWriter(opts), "", log.LstdFlags) +} + +func (l *nullLogger) StandardWriter(opts *StandardLoggerOptions) io.Writer { + return ioutil.Discard +} diff --git a/vendor/github.com/hashicorp/go-hclog/stacktrace.go b/vendor/github.com/hashicorp/go-hclog/stacktrace.go new file mode 100644 index 00000000..9b27bd3d --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/stacktrace.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package hclog + +import ( + "bytes" + "runtime" + "strconv" + "strings" + "sync" +) + +var ( + _stacktraceIgnorePrefixes = []string{ + "runtime.goexit", + "runtime.main", + } + _stacktracePool = sync.Pool{ + New: func() interface{} { + return newProgramCounters(64) + }, + } +) + +// CapturedStacktrace represents a stacktrace captured by a previous call +// to log.Stacktrace. If passed to a logging function, the stacktrace +// will be appended. +type CapturedStacktrace string + +// Stacktrace captures a stacktrace of the current goroutine and returns +// it to be passed to a logging function. +func Stacktrace() CapturedStacktrace { + return CapturedStacktrace(takeStacktrace()) +} + +func takeStacktrace() string { + programCounters := _stacktracePool.Get().(*programCounters) + defer _stacktracePool.Put(programCounters) + + var buffer bytes.Buffer + + for { + // Skip the call to runtime.Counters and takeStacktrace so that the + // program counters start at the caller of takeStacktrace. + n := runtime.Callers(2, programCounters.pcs) + if n < cap(programCounters.pcs) { + programCounters.pcs = programCounters.pcs[:n] + break + } + // Don't put the too-short counter slice back into the pool; this lets + // the pool adjust if we consistently take deep stacktraces. + programCounters = newProgramCounters(len(programCounters.pcs) * 2) + } + + i := 0 + frames := runtime.CallersFrames(programCounters.pcs) + for frame, more := frames.Next(); more; frame, more = frames.Next() { + if shouldIgnoreStacktraceFunction(frame.Function) { + continue + } + if i != 0 { + buffer.WriteByte('\n') + } + i++ + buffer.WriteString(frame.Function) + buffer.WriteByte('\n') + buffer.WriteByte('\t') + buffer.WriteString(frame.File) + buffer.WriteByte(':') + buffer.WriteString(strconv.Itoa(int(frame.Line))) + } + + return buffer.String() +} + +func shouldIgnoreStacktraceFunction(function string) bool { + for _, prefix := range _stacktraceIgnorePrefixes { + if strings.HasPrefix(function, prefix) { + return true + } + } + return false +} + +type programCounters struct { + pcs []uintptr +} + +func newProgramCounters(size int) *programCounters { + return &programCounters{make([]uintptr, size)} +} diff --git a/vendor/github.com/hashicorp/go-hclog/stdlog.go b/vendor/github.com/hashicorp/go-hclog/stdlog.go new file mode 100644 index 00000000..044a4696 --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/stdlog.go @@ -0,0 +1,83 @@ +package hclog + +import ( + "bytes" + "strings" +) + +// Provides a io.Writer to shim the data out of *log.Logger +// and back into our Logger. This is basically the only way to +// build upon *log.Logger. +type stdlogAdapter struct { + log Logger + inferLevels bool + forceLevel Level +} + +// Take the data, infer the levels if configured, and send it through +// a regular Logger. +func (s *stdlogAdapter) Write(data []byte) (int, error) { + str := string(bytes.TrimRight(data, " \t\n")) + + if s.forceLevel != NoLevel { + // Use pickLevel to strip log levels included in the line since we are + // forcing the level + _, str := s.pickLevel(str) + + // Log at the forced level + switch s.forceLevel { + case Trace: + s.log.Trace(str) + case Debug: + s.log.Debug(str) + case Info: + s.log.Info(str) + case Warn: + s.log.Warn(str) + case Error: + s.log.Error(str) + default: + s.log.Info(str) + } + } else if s.inferLevels { + level, str := s.pickLevel(str) + switch level { + case Trace: + s.log.Trace(str) + case Debug: + s.log.Debug(str) + case Info: + s.log.Info(str) + case Warn: + s.log.Warn(str) + case Error: + s.log.Error(str) + default: + s.log.Info(str) + } + } else { + s.log.Info(str) + } + + return len(data), nil +} + +// Detect, based on conventions, what log level this is. +func (s *stdlogAdapter) pickLevel(str string) (Level, string) { + switch { + case strings.HasPrefix(str, "[DEBUG]"): + return Debug, strings.TrimSpace(str[7:]) + case strings.HasPrefix(str, "[TRACE]"): + return Trace, strings.TrimSpace(str[7:]) + case strings.HasPrefix(str, "[INFO]"): + return Info, strings.TrimSpace(str[6:]) + case strings.HasPrefix(str, "[WARN]"): + return Warn, strings.TrimSpace(str[7:]) + case strings.HasPrefix(str, "[ERROR]"): + return Error, strings.TrimSpace(str[7:]) + case strings.HasPrefix(str, "[ERR]"): + return Error, strings.TrimSpace(str[5:]) + default: + return Info, str + } +} diff --git a/vendor/github.com/hashicorp/go-hclog/writer.go b/vendor/github.com/hashicorp/go-hclog/writer.go new file mode 100644 index 00000000..7e8ec729 --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/writer.go @@ -0,0 +1,74 @@ +package hclog + +import ( + "bytes" + "io" +) + +type writer struct { + b bytes.Buffer + w io.Writer +} + +func newWriter(w io.Writer) *writer { + return &writer{w: w} +} + +func (w *writer) Flush(level Level) (err error) { + if lw, ok := w.w.(LevelWriter); ok { + _, err = lw.LevelWrite(level, w.b.Bytes()) + } else { + _, err = w.w.Write(w.b.Bytes()) + } + w.b.Reset() + return err +} + +func (w *writer) Write(p []byte) (int, error) { + return w.b.Write(p) +} + +func (w *writer) WriteByte(c byte) error { + return w.b.WriteByte(c) +} + +func (w *writer) WriteString(s string) (int, error) { + return w.b.WriteString(s) +} + +// LevelWriter is the interface that wraps the LevelWrite method. +type LevelWriter interface { + LevelWrite(level Level, p []byte) (n int, err error) +} + +// LeveledWriter writes all log messages to the standard writer, +// except for log levels that are defined in the overrides map. +type LeveledWriter struct { + standard io.Writer + overrides map[Level]io.Writer +} + +// NewLeveledWriter returns an initialized LeveledWriter. +// +// standard will be used as the default writer for all log levels, +// except for log levels that are defined in the overrides map. +func NewLeveledWriter(standard io.Writer, overrides map[Level]io.Writer) *LeveledWriter { + return &LeveledWriter{ + standard: standard, + overrides: overrides, + } +} + +// Write implements io.Writer. +func (lw *LeveledWriter) Write(p []byte) (int, error) { + return lw.standard.Write(p) +} + +// LevelWrite implements LevelWriter. +func (lw *LeveledWriter) LevelWrite(level Level, p []byte) (int, error) { + w, ok := lw.overrides[level] + if !ok { + w = lw.standard + } + return w.Write(p) +} diff --git a/vendor/github.com/hashicorp/go-immutable-radix/.gitignore b/vendor/github.com/hashicorp/go-immutable-radix/.gitignore new file mode 100644 index 00000000..daf913b1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-immutable-radix/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/hashicorp/go-immutable-radix/.travis.yml b/vendor/github.com/hashicorp/go-immutable-radix/.travis.yml new file mode 100644 index 00000000..1a0bbea6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-immutable-radix/.travis.yml @@ -0,0 +1,3 @@ +language: go +go: + - tip diff --git a/vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md b/vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md new file mode 100644 index 00000000..dd7c0efd --- /dev/null +++ b/vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md @@ -0,0 +1,9 @@ +# 1.1.0 (May 22nd, 2019) + +FEATURES + +* Add `SeekLowerBound` to allow for range scans. [[GH-24](https://github.com/hashicorp/go-immutable-radix/pull/24)] + +# 1.0.0 (August 30th, 2018) + +* go mod adopted diff --git a/vendor/github.com/hashicorp/go-immutable-radix/README.md b/vendor/github.com/hashicorp/go-immutable-radix/README.md new file mode 100644 index 00000000..4b6338b5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-immutable-radix/README.md @@ -0,0 +1,66 @@ +go-immutable-radix [![Build Status](https://travis-ci.org/hashicorp/go-immutable-radix.png)](https://travis-ci.org/hashicorp/go-immutable-radix) +========= + +Provides the `iradix` package that implements an immutable [radix tree](http://en.wikipedia.org/wiki/Radix_tree). +The package only provides a single `Tree` implementation, optimized for sparse nodes. + +As a radix tree, it provides the following: + * O(k) operations. In many cases, this can be faster than a hash table since + the hash function is an O(k) operation, and hash tables have very poor cache locality. + * Minimum / Maximum value lookups + * Ordered iteration + +A tree supports using a transaction to batch multiple updates (insert, delete) +in a more efficient manner than performing each operation one at a time. + +For a mutable variant, see [go-radix](https://github.com/armon/go-radix). + +Documentation +============= + +The full documentation is available on [Godoc](http://godoc.org/github.com/hashicorp/go-immutable-radix). + +Example +======= + +Below is a simple example of usage + +```go +// Create a tree +r := iradix.New() +r, _, _ = r.Insert([]byte("foo"), 1) +r, _, _ = r.Insert([]byte("bar"), 2) +r, _, _ = r.Insert([]byte("foobar"), 2) + +// Find the longest prefix match +m, _, _ := r.Root().LongestPrefix([]byte("foozip")) +if string(m) != "foo" { + panic("should be foo") +} +``` + +Here is an example of performing a range scan of the keys. + +```go +// Create a tree +r := iradix.New() +r, _, _ = r.Insert([]byte("001"), 1) +r, _, _ = r.Insert([]byte("002"), 2) +r, _, _ = r.Insert([]byte("005"), 5) +r, _, _ = r.Insert([]byte("010"), 10) +r, _, _ = r.Insert([]byte("100"), 10) + +// Range scan over the keys that sort lexicographically between [003, 050) +it := r.Root().Iterator() +it.SeekLowerBound([]byte("003")) +for key, _, ok := it.Next(); ok; key, _, ok = it.Next() { + if key >= "050" { + break + } + fmt.Println(key) +} +// Output: +// 005 +// 010 +``` + diff --git a/vendor/github.com/hashicorp/go-immutable-radix/go.mod b/vendor/github.com/hashicorp/go-immutable-radix/go.mod new file mode 100644 index 00000000..27e7b7c9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-immutable-radix/go.mod @@ -0,0 +1,6 @@ +module github.com/hashicorp/go-immutable-radix + +require ( + github.com/hashicorp/go-uuid v1.0.0 + github.com/hashicorp/golang-lru v0.5.0 +) diff --git a/vendor/github.com/hashicorp/go-immutable-radix/go.sum b/vendor/github.com/hashicorp/go-immutable-radix/go.sum new file mode 100644 index 00000000..7de5dfc5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-immutable-radix/go.sum @@ -0,0 +1,4 @@ +github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= diff --git a/vendor/github.com/hashicorp/go-multierror/.travis.yml b/vendor/github.com/hashicorp/go-multierror/.travis.yml new file mode 100644 index 00000000..304a8359 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/.travis.yml @@ -0,0 +1,12 @@ +sudo: false + +language: go + +go: + - 1.x + +branches: + only: + - master + +script: make test testrace diff --git a/vendor/github.com/hashicorp/go-multierror/Makefile b/vendor/github.com/hashicorp/go-multierror/Makefile new file mode 100644 index 00000000..b97cd6ed --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/Makefile @@ -0,0 +1,31 @@ +TEST?=./... + +default: test + +# test runs the test suite and vets the code. +test: generate + @echo "==> Running tests..." + @go list $(TEST) \ + | grep -v "/vendor/" \ + | xargs -n1 go test -timeout=60s -parallel=10 ${TESTARGS} + +# testrace runs the race checker +testrace: generate + @echo "==> Running tests (race)..." + @go list $(TEST) \ + | grep -v "/vendor/" \ + | xargs -n1 go test -timeout=60s -race ${TESTARGS} + +# updatedeps installs all the dependencies needed to run and build. +updatedeps: + @sh -c "'${CURDIR}/scripts/deps.sh' '${NAME}'" + +# generate runs `go generate` to build the dynamically generated source files. +generate: + @echo "==> Generating..." + @find . -type f -name '.DS_Store' -delete + @go list ./... \ + | grep -v "/vendor/" \ + | xargs -n1 go generate + +.PHONY: default test testrace updatedeps generate diff --git a/vendor/github.com/hashicorp/go-multierror/README.md b/vendor/github.com/hashicorp/go-multierror/README.md new file mode 100644 index 00000000..ead5830f --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/README.md @@ -0,0 +1,97 @@ +# go-multierror + +[![Build Status](http://img.shields.io/travis/hashicorp/go-multierror.svg?style=flat-square)][travis] +[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godocs] + +[travis]: https://travis-ci.org/hashicorp/go-multierror +[godocs]: https://godoc.org/github.com/hashicorp/go-multierror + +`go-multierror` is a package for Go that provides a mechanism for +representing a list of `error` values as a single `error`. + +This allows a function in Go to return an `error` that might actually +be a list of errors. If the caller knows this, they can unwrap the +list and access the errors. If the caller doesn't know, the error +formats to a nice human-readable format. + +`go-multierror` implements the +[errwrap](https://github.com/hashicorp/errwrap) interface so that it can +be used with that library, as well. + +## Installation and Docs + +Install using `go get github.com/hashicorp/go-multierror`. + +Full documentation is available at +http://godoc.org/github.com/hashicorp/go-multierror + +## Usage + +go-multierror is easy to use and purposely built to be unobtrusive in +existing Go applications/libraries that may not be aware of it. + +**Building a list of errors** + +The `Append` function is used to create a list of errors. This function +behaves a lot like the Go built-in `append` function: it doesn't matter +if the first argument is nil, a `multierror.Error`, or any other `error`, +the function behaves as you would expect. + +```go +var result error + +if err := step1(); err != nil { + result = multierror.Append(result, err) +} +if err := step2(); err != nil { + result = multierror.Append(result, err) +} + +return result +``` + +**Customizing the formatting of the errors** + +By specifying a custom `ErrorFormat`, you can customize the format +of the `Error() string` function: + +```go +var result *multierror.Error + +// ... accumulate errors here, maybe using Append + +if result != nil { + result.ErrorFormat = func([]error) string { + return "errors!" + } +} +``` + +**Accessing the list of errors** + +`multierror.Error` implements `error` so if the caller doesn't know about +multierror, it will work just fine. But if you're aware a multierror might +be returned, you can use type switches to access the list of errors: + +```go +if err := something(); err != nil { + if merr, ok := err.(*multierror.Error); ok { + // Use merr.Errors + } +} +``` + +**Returning a multierror only if there are errors** + +If you build a `multierror.Error`, you can use the `ErrorOrNil` function +to return an `error` implementation only if there are errors to return: + +```go +var result *multierror.Error + +// ... accumulate errors here + +// Return the `error` only if errors were added to the multierror, otherwise +// return nil since there are no errors. +return result.ErrorOrNil() +``` diff --git a/vendor/github.com/hashicorp/go-multierror/go.mod b/vendor/github.com/hashicorp/go-multierror/go.mod new file mode 100644 index 00000000..2534331d --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/go.mod @@ -0,0 +1,3 @@ +module github.com/hashicorp/go-multierror + +require github.com/hashicorp/errwrap v1.0.0 diff --git a/vendor/github.com/hashicorp/go-multierror/go.sum b/vendor/github.com/hashicorp/go-multierror/go.sum new file mode 100644 index 00000000..85b1f8ff --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/go.sum @@ -0,0 +1,4 @@ +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce h1:prjrVgOk2Yg6w+PflHoszQNLTUh4kaByUcEWM/9uin4= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= diff --git a/vendor/github.com/hashicorp/go-retryablehttp/.gitignore b/vendor/github.com/hashicorp/go-retryablehttp/.gitignore new file mode 100644 index 00000000..4e309e0b --- /dev/null +++ b/vendor/github.com/hashicorp/go-retryablehttp/.gitignore @@ -0,0 +1,4 @@ +.idea/ +*.iml +*.test +.vscode/ \ No newline at end of file diff --git a/vendor/github.com/hashicorp/go-retryablehttp/.travis.yml b/vendor/github.com/hashicorp/go-retryablehttp/.travis.yml new file mode 100644 index 00000000..c4fb6d6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-retryablehttp/.travis.yml @@ -0,0 +1,12 @@ +sudo: false + +language: go + +go: + - 1.12.4 + +branches: + only: + - master + +script: make updatedeps test diff --git a/vendor/github.com/hashicorp/go-retryablehttp/Makefile b/vendor/github.com/hashicorp/go-retryablehttp/Makefile new file mode 100644 index 00000000..da17640e --- /dev/null +++ b/vendor/github.com/hashicorp/go-retryablehttp/Makefile @@ -0,0 +1,11 @@ +default: test + +test: + go vet ./... + go test -race ./... + +updatedeps: + go get -f -t -u ./... + go get -f -u ./... + +.PHONY: default test updatedeps diff --git a/vendor/github.com/hashicorp/go-retryablehttp/README.md b/vendor/github.com/hashicorp/go-retryablehttp/README.md new file mode 100644 index 00000000..ccdc7e87 --- /dev/null +++ b/vendor/github.com/hashicorp/go-retryablehttp/README.md @@ -0,0 +1,46 @@ +go-retryablehttp +================ + +[![Build Status](http://img.shields.io/travis/hashicorp/go-retryablehttp.svg?style=flat-square)][travis] +[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godocs] + +[travis]: http://travis-ci.org/hashicorp/go-retryablehttp +[godocs]: http://godoc.org/github.com/hashicorp/go-retryablehttp + +The `retryablehttp` package provides a familiar HTTP client interface with +automatic retries and exponential backoff. It is a thin wrapper over the +standard `net/http` client library and exposes nearly the same public API. This +makes `retryablehttp` very easy to drop into existing programs. + +`retryablehttp` performs automatic retries under certain conditions. Mainly, if +an error is returned by the client (connection errors, etc.), or if a 500-range +response code is received (except 501), then a retry is invoked after a wait +period. Otherwise, the response is returned and left to the caller to +interpret. + +The main difference from `net/http` is that requests which take a request body +(POST/PUT et. al) can have the body provided in a number of ways (some more or +less efficient) that allow "rewinding" the request body if the initial request +fails so that the full request can be attempted again. See the +[godoc](http://godoc.org/github.com/hashicorp/go-retryablehttp) for more +details. + +Example Use +=========== + +Using this library should look almost identical to what you would do with +`net/http`. The most simple example of a GET request is shown below: + +```go +resp, err := retryablehttp.Get("/foo") +if err != nil { + panic(err) +} +``` + +The returned response object is an `*http.Response`, the same thing you would +usually get from `net/http`. Had the request failed one or more times, the above +call would block and retry with exponential backoff. + +For more usage and examples see the +[godoc](http://godoc.org/github.com/hashicorp/go-retryablehttp). diff --git a/vendor/github.com/hashicorp/go-retryablehttp/client.go b/vendor/github.com/hashicorp/go-retryablehttp/client.go index a4e5927c..b299f8d9 100644 --- a/vendor/github.com/hashicorp/go-retryablehttp/client.go +++ b/vendor/github.com/hashicorp/go-retryablehttp/client.go @@ -34,9 +34,11 @@ import ( "net/url" "os" "strings" + "sync" "time" cleanhttp "github.com/hashicorp/go-cleanhttp" + "github.com/hashicorp/go-hclog" ) var ( @@ -103,20 +105,18 @@ func (r *Request) BodyBytes() ([]byte, error) { return buf.Bytes(), nil } -// NewRequest creates a new wrapped request. -func NewRequest(method, url string, rawBody interface{}) (*Request, error) { - var err error - var body ReaderFunc +func getBodyReaderAndContentLength(rawBody interface{}) (ReaderFunc, int64, error) { + var bodyReader ReaderFunc var contentLength int64 if rawBody != nil { - switch rawBody.(type) { + switch body := rawBody.(type) { // If they gave us a function already, great! Use it. case ReaderFunc: - body = rawBody.(ReaderFunc) + bodyReader = body tmp, err := body() if err != nil { - return nil, err + return nil, 0, err } if lr, ok := tmp.(LenReader); ok { contentLength = int64(lr.Len()) @@ -126,10 +126,10 @@ func NewRequest(method, url string, rawBody interface{}) (*Request, error) { } case func() (io.Reader, error): - body = rawBody.(func() (io.Reader, error)) + bodyReader = body tmp, err := body() if err != nil { - return nil, err + return nil, 0, err } if lr, ok := tmp.(LenReader); ok { contentLength = int64(lr.Len()) @@ -141,8 +141,8 @@ func NewRequest(method, url string, rawBody interface{}) (*Request, error) { // If a regular byte slice, we can read it over and over via new // readers case []byte: - buf := rawBody.([]byte) - body = func() (io.Reader, error) { + buf := body + bodyReader = func() (io.Reader, error) { return bytes.NewReader(buf), nil } contentLength = int64(len(buf)) @@ -150,8 +150,8 @@ func NewRequest(method, url string, rawBody interface{}) (*Request, error) { // If a bytes.Buffer we can read the underlying byte slice over and // over case *bytes.Buffer: - buf := rawBody.(*bytes.Buffer) - body = func() (io.Reader, error) { + buf := body + bodyReader = func() (io.Reader, error) { return bytes.NewReader(buf.Bytes()), nil } contentLength = int64(buf.Len()) @@ -160,21 +160,21 @@ func NewRequest(method, url string, rawBody interface{}) (*Request, error) { // deal with it seeking so want it to match here instead of the // io.ReadSeeker case. case *bytes.Reader: - buf, err := ioutil.ReadAll(rawBody.(*bytes.Reader)) + buf, err := ioutil.ReadAll(body) if err != nil { - return nil, err + return nil, 0, err } - body = func() (io.Reader, error) { + bodyReader = func() (io.Reader, error) { return bytes.NewReader(buf), nil } contentLength = int64(len(buf)) // Compat case case io.ReadSeeker: - raw := rawBody.(io.ReadSeeker) - body = func() (io.Reader, error) { - raw.Seek(0, 0) - return ioutil.NopCloser(raw), nil + raw := body + bodyReader = func() (io.Reader, error) { + _, err := raw.Seek(0, 0) + return ioutil.NopCloser(raw), err } if lr, ok := raw.(LenReader); ok { contentLength = int64(lr.Len()) @@ -182,19 +182,38 @@ func NewRequest(method, url string, rawBody interface{}) (*Request, error) { // Read all in so we can reset case io.Reader: - buf, err := ioutil.ReadAll(rawBody.(io.Reader)) + buf, err := ioutil.ReadAll(body) if err != nil { - return nil, err + return nil, 0, err } - body = func() (io.Reader, error) { + bodyReader = func() (io.Reader, error) { return bytes.NewReader(buf), nil } contentLength = int64(len(buf)) default: - return nil, fmt.Errorf("cannot handle type %T", rawBody) + return nil, 0, fmt.Errorf("cannot handle type %T", rawBody) } } + return bodyReader, contentLength, nil +} + +// FromRequest wraps an http.Request in a retryablehttp.Request +func FromRequest(r *http.Request) (*Request, error) { + bodyReader, _, err := getBodyReaderAndContentLength(r.Body) + if err != nil { + return nil, err + } + // Could assert contentLength == r.ContentLength + return &Request{bodyReader, r}, nil +} + +// NewRequest creates a new wrapped request. +func NewRequest(method, url string, rawBody interface{}) (*Request, error) { + bodyReader, contentLength, err := getBodyReaderAndContentLength(rawBody) + if err != nil { + return nil, err + } httpReq, err := http.NewRequest(method, url, nil) if err != nil { @@ -202,7 +221,7 @@ func NewRequest(method, url string, rawBody interface{}) (*Request, error) { } httpReq.ContentLength = contentLength - return &Request{body, httpReq}, nil + return &Request{bodyReader, httpReq}, nil } // Logger interface allows to use other loggers than @@ -211,6 +230,16 @@ type Logger interface { Printf(string, ...interface{}) } +// To adapt an hclog.Logger to Logger for use by the existing hook functions +// without changing the API. +type hookLogger struct { + logger hclog.Logger +} + +func (h hookLogger) Printf(s string, args ...interface{}) { + h.logger.Info(fmt.Sprintf(s, args...)) +} + // RequestLogHook allows a function to run before each retry. The HTTP // request which will be made, and the retry number (0 for the initial // request) are available to users. The internal logger is exposed to @@ -249,7 +278,7 @@ type ErrorHandler func(resp *http.Response, err error, numTries int) (*http.Resp // like automatic retries to tolerate minor outages. type Client struct { HTTPClient *http.Client // Internal HTTP client. - Logger Logger // Customer logger instance. + Logger interface{} // Customer logger instance. Can be either Logger or hclog.Logger RetryWaitMin time.Duration // Minimum time to wait RetryWaitMax time.Duration // Maximum time to wait @@ -272,12 +301,14 @@ type Client struct { // ErrorHandler specifies the custom error handler to use, if any ErrorHandler ErrorHandler + + loggerInit sync.Once } // NewClient creates a new Client with default settings. func NewClient() *Client { return &Client{ - HTTPClient: cleanhttp.DefaultClient(), + HTTPClient: cleanhttp.DefaultPooledClient(), Logger: log.New(os.Stderr, "", log.LstdFlags), RetryWaitMin: defaultRetryWaitMin, RetryWaitMax: defaultRetryWaitMax, @@ -287,6 +318,26 @@ func NewClient() *Client { } } +func (c *Client) logger() interface{} { + c.loggerInit.Do(func() { + if c.Logger == nil { + return + } + + switch c.Logger.(type) { + case Logger: + // ok + case hclog.Logger: + // ok + default: + // This should happen in dev when they are setting Logger and work on code, not in prod. + panic(fmt.Sprintf("invalid logger type passed, must be Logger or hclog.Logger, was %T", c.Logger)) + } + }) + + return c.Logger +} + // DefaultRetryPolicy provides a default callback for Client.CheckRetry, which // will retry on connection errors and server errors. func DefaultRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error) { @@ -368,8 +419,19 @@ func PassthroughErrorHandler(resp *http.Response, err error, _ int) (*http.Respo // Do wraps calling an HTTP method with retries. func (c *Client) Do(req *Request) (*http.Response, error) { - if c.Logger != nil { - c.Logger.Printf("[DEBUG] %s %s", req.Method, req.URL) + if c.HTTPClient == nil { + c.HTTPClient = cleanhttp.DefaultPooledClient() + } + + logger := c.logger() + + if logger != nil { + switch v := logger.(type) { + case Logger: + v.Printf("[DEBUG] %s %s", req.Method, req.URL) + case hclog.Logger: + v.Debug("performing request", "method", req.Method, "url", req.URL) + } } var resp *http.Response @@ -382,6 +444,7 @@ func (c *Client) Do(req *Request) (*http.Response, error) { if req.body != nil { body, err := req.body() if err != nil { + c.HTTPClient.CloseIdleConnections() return resp, err } if c, ok := body.(io.ReadCloser); ok { @@ -391,8 +454,15 @@ func (c *Client) Do(req *Request) (*http.Response, error) { } } - if c.RequestLogHook != nil { - c.RequestLogHook(c.Logger, req.Request, i) + if c.RequestLogHook != nil && logger != nil { + switch v := logger.(type) { + case Logger: + c.RequestLogHook(v, req.Request, i) + case hclog.Logger: + c.RequestLogHook(hookLogger{v}, req.Request, i) + default: + c.RequestLogHook(nil, req.Request, i) + } } // Attempt the request @@ -404,16 +474,28 @@ func (c *Client) Do(req *Request) (*http.Response, error) { // Check if we should continue with retries. checkOK, checkErr := c.CheckRetry(req.Context(), resp, err) - if err != nil { - if c.Logger != nil { - c.Logger.Printf("[ERR] %s %s request failed: %v", req.Method, req.URL, err) - } - } else { - // Call this here to maintain the behavior of logging all requests, - // even if CheckRetry signals to stop. - if c.ResponseLogHook != nil { - // Call the response logger function if provided. - c.ResponseLogHook(c.Logger, resp) + if logger != nil { + if err != nil { + switch v := logger.(type) { + case Logger: + v.Printf("[ERR] %s %s request failed: %v", req.Method, req.URL, err) + case hclog.Logger: + v.Error("request failed", "error", err, "method", req.Method, "url", req.URL) + } + } else { + // Call this here to maintain the behavior of logging all requests, + // even if CheckRetry signals to stop. + if c.ResponseLogHook != nil { + // Call the response logger function if provided. + switch v := logger.(type) { + case Logger: + c.ResponseLogHook(v, resp) + case hclog.Logger: + c.ResponseLogHook(hookLogger{v}, resp) + default: + c.ResponseLogHook(nil, resp) + } + } } } @@ -422,6 +504,7 @@ func (c *Client) Do(req *Request) (*http.Response, error) { if checkErr != nil { err = checkErr } + c.HTTPClient.CloseIdleConnections() return resp, err } @@ -442,17 +525,24 @@ func (c *Client) Do(req *Request) (*http.Response, error) { if code > 0 { desc = fmt.Sprintf("%s (status: %d)", desc, code) } - if c.Logger != nil { - c.Logger.Printf("[DEBUG] %s: retrying in %s (%d left)", desc, wait, remain) + if logger != nil { + switch v := logger.(type) { + case Logger: + v.Printf("[DEBUG] %s: retrying in %s (%d left)", desc, wait, remain) + case hclog.Logger: + v.Debug("retrying request", "request", desc, "timeout", wait, "remaining", remain) + } } select { case <-req.Context().Done(): + c.HTTPClient.CloseIdleConnections() return nil, req.Context().Err() case <-time.After(wait): } } if c.ErrorHandler != nil { + c.HTTPClient.CloseIdleConnections() return c.ErrorHandler(resp, err, c.RetryMax+1) } @@ -461,6 +551,7 @@ func (c *Client) Do(req *Request) (*http.Response, error) { if resp != nil { resp.Body.Close() } + c.HTTPClient.CloseIdleConnections() return nil, fmt.Errorf("%s %s giving up after %d attempts", req.Method, req.URL, c.RetryMax+1) } @@ -470,8 +561,13 @@ func (c *Client) drainBody(body io.ReadCloser) { defer body.Close() _, err := io.Copy(ioutil.Discard, io.LimitReader(body, respReadLimit)) if err != nil { - if c.Logger != nil { - c.Logger.Printf("[ERR] error reading response body: %v", err) + if c.logger() != nil { + switch v := c.logger().(type) { + case Logger: + v.Printf("[ERR] error reading response body: %v", err) + case hclog.Logger: + v.Error("error reading response body", "error", err) + } } } } diff --git a/vendor/github.com/hashicorp/go-retryablehttp/go.mod b/vendor/github.com/hashicorp/go-retryablehttp/go.mod new file mode 100644 index 00000000..becbb7ee --- /dev/null +++ b/vendor/github.com/hashicorp/go-retryablehttp/go.mod @@ -0,0 +1,6 @@ +module github.com/hashicorp/go-retryablehttp + +require ( + github.com/hashicorp/go-cleanhttp v0.5.1 + github.com/hashicorp/go-hclog v0.9.2 +) diff --git a/vendor/github.com/hashicorp/go-retryablehttp/go.sum b/vendor/github.com/hashicorp/go-retryablehttp/go.sum new file mode 100644 index 00000000..71afe568 --- /dev/null +++ b/vendor/github.com/hashicorp/go-retryablehttp/go.sum @@ -0,0 +1,10 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= diff --git a/vendor/github.com/hashicorp/go-rootcerts/.travis.yml b/vendor/github.com/hashicorp/go-rootcerts/.travis.yml new file mode 100644 index 00000000..80e1de44 --- /dev/null +++ b/vendor/github.com/hashicorp/go-rootcerts/.travis.yml @@ -0,0 +1,12 @@ +sudo: false + +language: go + +go: + - 1.6 + +branches: + only: + - master + +script: make test diff --git a/vendor/github.com/hashicorp/go-rootcerts/Makefile b/vendor/github.com/hashicorp/go-rootcerts/Makefile new file mode 100644 index 00000000..c3989e78 --- /dev/null +++ b/vendor/github.com/hashicorp/go-rootcerts/Makefile @@ -0,0 +1,8 @@ +TEST?=./... + +test: + go test $(TEST) $(TESTARGS) -timeout=3s -parallel=4 + go vet $(TEST) + go test $(TEST) -race + +.PHONY: test diff --git a/vendor/github.com/hashicorp/go-rootcerts/README.md b/vendor/github.com/hashicorp/go-rootcerts/README.md new file mode 100644 index 00000000..f5abffc2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-rootcerts/README.md @@ -0,0 +1,43 @@ +# rootcerts + +Functions for loading root certificates for TLS connections. + +----- + +Go's standard library `crypto/tls` provides a common mechanism for configuring +TLS connections in `tls.Config`. The `RootCAs` field on this struct is a pool +of certificates for the client to use as a trust store when verifying server +certificates. + +This library contains utility functions for loading certificates destined for +that field, as well as one other important thing: + +When the `RootCAs` field is `nil`, the standard library attempts to load the +host's root CA set. This behavior is OS-specific, and the Darwin +implementation contains [a bug that prevents trusted certificates from the +System and Login keychains from being loaded][1]. This library contains +Darwin-specific behavior that works around that bug. + +[1]: https://github.com/golang/go/issues/14514 + +## Example Usage + +Here's a snippet demonstrating how this library is meant to be used: + +```go +func httpClient() (*http.Client, error) + tlsConfig := &tls.Config{} + err := rootcerts.ConfigureTLS(tlsConfig, &rootcerts.Config{ + CAFile: os.Getenv("MYAPP_CAFILE"), + CAPath: os.Getenv("MYAPP_CAPATH"), + }) + if err != nil { + return nil, err + } + c := cleanhttp.DefaultClient() + t := cleanhttp.DefaultTransport() + t.TLSClientConfig = tlsConfig + c.Transport = t + return c, nil +} +``` diff --git a/vendor/github.com/hashicorp/go-rootcerts/go.mod b/vendor/github.com/hashicorp/go-rootcerts/go.mod new file mode 100644 index 00000000..e2dd0247 --- /dev/null +++ b/vendor/github.com/hashicorp/go-rootcerts/go.mod @@ -0,0 +1,5 @@ +module github.com/hashicorp/go-rootcerts + +go 1.12 + +require github.com/mitchellh/go-homedir v1.1.0 diff --git a/vendor/github.com/hashicorp/go-rootcerts/go.sum b/vendor/github.com/hashicorp/go-rootcerts/go.sum new file mode 100644 index 00000000..ae38d147 --- /dev/null +++ b/vendor/github.com/hashicorp/go-rootcerts/go.sum @@ -0,0 +1,2 @@ +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= diff --git a/vendor/github.com/hashicorp/go-rootcerts/test-fixtures/capath-with-symlinks/securetrust.pem b/vendor/github.com/hashicorp/go-rootcerts/test-fixtures/capath-with-symlinks/securetrust.pem deleted file mode 120000 index dda0574d..00000000 --- a/vendor/github.com/hashicorp/go-rootcerts/test-fixtures/capath-with-symlinks/securetrust.pem +++ /dev/null @@ -1 +0,0 @@ -../capath/securetrust.pem \ No newline at end of file diff --git a/vendor/github.com/hashicorp/go-rootcerts/test-fixtures/capath-with-symlinks/thawte.pem b/vendor/github.com/hashicorp/go-rootcerts/test-fixtures/capath-with-symlinks/thawte.pem deleted file mode 120000 index 37ed4f01..00000000 --- a/vendor/github.com/hashicorp/go-rootcerts/test-fixtures/capath-with-symlinks/thawte.pem +++ /dev/null @@ -1 +0,0 @@ -../capath/thawte.pem \ No newline at end of file diff --git a/vendor/github.com/hashicorp/go-sockaddr/.gitignore b/vendor/github.com/hashicorp/go-sockaddr/.gitignore new file mode 100644 index 00000000..41720b86 --- /dev/null +++ b/vendor/github.com/hashicorp/go-sockaddr/.gitignore @@ -0,0 +1,26 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof +.cover.out* +coverage.html diff --git a/vendor/github.com/hashicorp/go-sockaddr/GNUmakefile b/vendor/github.com/hashicorp/go-sockaddr/GNUmakefile new file mode 100644 index 00000000..0f3ae166 --- /dev/null +++ b/vendor/github.com/hashicorp/go-sockaddr/GNUmakefile @@ -0,0 +1,65 @@ +TOOLS= golang.org/x/tools/cover +GOCOVER_TMPFILE?= $(GOCOVER_FILE).tmp +GOCOVER_FILE?= .cover.out +GOCOVERHTML?= coverage.html +FIND=`/usr/bin/which 2> /dev/null gfind find | /usr/bin/grep -v ^no | /usr/bin/head -n 1` +XARGS=`/usr/bin/which 2> /dev/null gxargs xargs | /usr/bin/grep -v ^no | /usr/bin/head -n 1` + +test:: $(GOCOVER_FILE) + @$(MAKE) -C cmd/sockaddr test + +cover:: coverage_report + +$(GOCOVER_FILE):: + @${FIND} . -type d ! -path '*cmd*' ! -path '*.git*' -print0 | ${XARGS} -0 -I % sh -ec "cd % && rm -f $(GOCOVER_TMPFILE) && go test -coverprofile=$(GOCOVER_TMPFILE)" + + @echo 'mode: set' > $(GOCOVER_FILE) + @${FIND} . -type f ! -path '*cmd*' ! -path '*.git*' -name "$(GOCOVER_TMPFILE)" -print0 | ${XARGS} -0 -n1 cat $(GOCOVER_TMPFILE) | grep -v '^mode: ' >> ${PWD}/$(GOCOVER_FILE) + +$(GOCOVERHTML): $(GOCOVER_FILE) + go tool cover -html=$(GOCOVER_FILE) -o $(GOCOVERHTML) + +coverage_report:: $(GOCOVER_FILE) + go tool cover -html=$(GOCOVER_FILE) + +audit_tools:: + @go get -u github.com/golang/lint/golint && echo "Installed golint:" + @go get -u github.com/fzipp/gocyclo && echo "Installed gocyclo:" + @go get -u github.com/remyoudompheng/go-misc/deadcode && echo "Installed deadcode:" + @go get -u github.com/client9/misspell/cmd/misspell && echo "Installed misspell:" + @go get -u github.com/gordonklaus/ineffassign && echo "Installed ineffassign:" + +audit:: + deadcode + go tool vet -all *.go + go tool vet -shadow=true *.go + golint *.go + ineffassign . + gocyclo -over 65 *.go + misspell *.go + +clean:: + rm -f $(GOCOVER_FILE) $(GOCOVERHTML) + +dev:: + @go build + @$(MAKE) -B -C cmd/sockaddr sockaddr + +install:: + @go install + @$(MAKE) -C cmd/sockaddr install + +doc:: + @echo Visit: http://127.0.0.1:6161/pkg/github.com/hashicorp/go-sockaddr/ + godoc -http=:6161 -goroot $GOROOT + +world:: + @set -e; \ + for os in solaris darwin freebsd linux windows android; do \ + for arch in amd64; do \ + printf "Building on %s-%s\n" "$${os}" "$${arch}" ; \ + env GOOS="$${os}" GOARCH="$${arch}" go build -o /dev/null; \ + done; \ + done + + $(MAKE) -C cmd/sockaddr world diff --git a/vendor/github.com/hashicorp/go-sockaddr/README.md b/vendor/github.com/hashicorp/go-sockaddr/README.md new file mode 100644 index 00000000..a2e170ae --- /dev/null +++ b/vendor/github.com/hashicorp/go-sockaddr/README.md @@ -0,0 +1,118 @@ +# go-sockaddr + +## `sockaddr` Library + +Socket address convenience functions for Go. `go-sockaddr` is a convenience +library that makes doing the right thing with IP addresses easy. `go-sockaddr` +is loosely modeled after the UNIX `sockaddr_t` and creates a union of the family +of `sockaddr_t` types (see below for an ascii diagram). Library documentation +is available +at +[https://godoc.org/github.com/hashicorp/go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr). +The primary intent of the library was to make it possible to define heuristics +for selecting the correct IP addresses when a configuration is evaluated at +runtime. See +the +[docs](https://godoc.org/github.com/hashicorp/go-sockaddr), +[`template` package](https://godoc.org/github.com/hashicorp/go-sockaddr/template), +tests, +and +[CLI utility](https://github.com/hashicorp/go-sockaddr/tree/master/cmd/sockaddr) +for details and hints as to how to use this library. + +For example, with this library it is possible to find an IP address that: + +* is attached to a default route + ([`GetDefaultInterfaces()`](https://godoc.org/github.com/hashicorp/go-sockaddr#GetDefaultInterfaces)) +* is contained within a CIDR block ([`IfByNetwork()`](https://godoc.org/github.com/hashicorp/go-sockaddr#IfByNetwork)) +* is an RFC1918 address + ([`IfByRFC("1918")`](https://godoc.org/github.com/hashicorp/go-sockaddr#IfByRFC)) +* is ordered + ([`OrderedIfAddrBy(args)`](https://godoc.org/github.com/hashicorp/go-sockaddr#OrderedIfAddrBy) where + `args` includes, but is not limited + to, + [`AscIfType`](https://godoc.org/github.com/hashicorp/go-sockaddr#AscIfType), + [`AscNetworkSize`](https://godoc.org/github.com/hashicorp/go-sockaddr#AscNetworkSize)) +* excludes all IPv6 addresses + ([`IfByType("^(IPv4)$")`](https://godoc.org/github.com/hashicorp/go-sockaddr#IfByType)) +* is larger than a `/32` + ([`IfByMaskSize(32)`](https://godoc.org/github.com/hashicorp/go-sockaddr#IfByMaskSize)) +* is not on a `down` interface + ([`ExcludeIfs("flags", "down")`](https://godoc.org/github.com/hashicorp/go-sockaddr#ExcludeIfs)) +* preferences an IPv6 address over an IPv4 address + ([`SortIfByType()`](https://godoc.org/github.com/hashicorp/go-sockaddr#SortIfByType) + + [`ReverseIfAddrs()`](https://godoc.org/github.com/hashicorp/go-sockaddr#ReverseIfAddrs)); and +* excludes any IP in RFC6890 address + ([`IfByRFC("6890")`](https://godoc.org/github.com/hashicorp/go-sockaddr#IfByRFC)) + +Or any combination or variation therein. + +There are also a few simple helper functions such as `GetPublicIP` and +`GetPrivateIP` which both return strings and select the first public or private +IP address on the default interface, respectively. Similarly, there is also a +helper function called `GetInterfaceIP` which returns the first usable IP +address on the named interface. + +## `sockaddr` CLI + +Given the possible complexity of the `sockaddr` library, there is a CLI utility +that accompanies the library, also +called +[`sockaddr`](https://github.com/hashicorp/go-sockaddr/tree/master/cmd/sockaddr). +The +[`sockaddr`](https://github.com/hashicorp/go-sockaddr/tree/master/cmd/sockaddr) +utility exposes nearly all of the functionality of the library and can be used +either as an administrative tool or testing tool. To install +the +[`sockaddr`](https://github.com/hashicorp/go-sockaddr/tree/master/cmd/sockaddr), +run: + +```text +$ go get -u github.com/hashicorp/go-sockaddr/cmd/sockaddr +``` + +If you're familiar with UNIX's `sockaddr` struct's, the following diagram +mapping the C `sockaddr` (top) to `go-sockaddr` structs (bottom) and +interfaces will be helpful: + +``` ++-------------------------------------------------------+ +| | +| sockaddr | +| SockAddr | +| | +| +--------------+ +----------------------------------+ | +| | sockaddr_un | | | | +| | SockAddrUnix | | sockaddr_in{,6} | | +| +--------------+ | IPAddr | | +| | | | +| | +-------------+ +--------------+ | | +| | | sockaddr_in | | sockaddr_in6 | | | +| | | IPv4Addr | | IPv6Addr | | | +| | +-------------+ +--------------+ | | +| | | | +| +----------------------------------+ | +| | ++-------------------------------------------------------+ +``` + +## Inspiration and Design + +There were many subtle inspirations that led to this design, but the most direct +inspiration for the filtering syntax was +OpenBSD's +[`pf.conf(5)`](https://www.freebsd.org/cgi/man.cgi?query=pf.conf&apropos=0&sektion=0&arch=default&format=html#PARAMETERS) firewall +syntax that lets you select the first IP address on a given named interface. +The original problem stemmed from: + +* needing to create immutable images using [Packer](https://www.packer.io) that + ran the [Consul](https://www.consul.io) process (Consul can only use one IP + address at a time); +* images that may or may not have multiple interfaces or IP addresses at + runtime; and +* we didn't want to rely on configuration management to render out the correct + IP address if the VM image was being used in an auto-scaling group. + +Instead we needed some way to codify a heuristic that would correctly select the +right IP address but the input parameters were not known when the image was +created. diff --git a/vendor/github.com/hashicorp/go-sockaddr/go.mod b/vendor/github.com/hashicorp/go-sockaddr/go.mod new file mode 100644 index 00000000..21f8d8e8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-sockaddr/go.mod @@ -0,0 +1,8 @@ +module github.com/hashicorp/go-sockaddr + +require ( + github.com/hashicorp/errwrap v1.0.0 + github.com/mitchellh/cli v1.0.0 + github.com/mitchellh/go-wordwrap v1.0.0 + github.com/ryanuber/columnize v2.1.0+incompatible +) diff --git a/vendor/github.com/hashicorp/go-sockaddr/go.sum b/vendor/github.com/hashicorp/go-sockaddr/go.sum new file mode 100644 index 00000000..1b2bdd48 --- /dev/null +++ b/vendor/github.com/hashicorp/go-sockaddr/go.sum @@ -0,0 +1,24 @@ +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/ryanuber/columnize v2.1.0+incompatible h1:j1Wcmh8OrK4Q7GXY+V7SVSY8nUWQxHW5TkBe7YUl+2s= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc h1:MeuS1UDyZyFH++6vVy44PuufTeFF0d0nfI6XB87YGSk= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/hashicorp/go-sockaddr/template/GNUmakefile b/vendor/github.com/hashicorp/go-sockaddr/template/GNUmakefile new file mode 100644 index 00000000..ce1e274e --- /dev/null +++ b/vendor/github.com/hashicorp/go-sockaddr/template/GNUmakefile @@ -0,0 +1,2 @@ +test:: + go test diff --git a/vendor/github.com/hashicorp/go-sockaddr/template/README.md b/vendor/github.com/hashicorp/go-sockaddr/template/README.md new file mode 100644 index 00000000..c40905af --- /dev/null +++ b/vendor/github.com/hashicorp/go-sockaddr/template/README.md @@ -0,0 +1,6 @@ +# sockaddr/template + +sockaddr's template library. See +the +[sockaddr/template](https://godoc.org/github.com/hashicorp/go-sockaddr/template) +docs for details on how to use this template. diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go index 5673773b..a86c8539 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go @@ -73,6 +73,9 @@ func (c *LRU) Add(key, value interface{}) (evicted bool) { func (c *LRU) Get(key interface{}) (value interface{}, ok bool) { if ent, ok := c.items[key]; ok { c.evictList.MoveToFront(ent) + if ent.Value.(*entry) == nil { + return nil, false + } return ent.Value.(*entry).value, true } return @@ -142,6 +145,19 @@ func (c *LRU) Len() int { return c.evictList.Len() } +// Resize changes the cache size. +func (c *LRU) Resize(size int) (evicted int) { + diff := c.Len() - size + if diff < 0 { + diff = 0 + } + for i := 0; i < diff; i++ { + c.removeOldest() + } + c.size = size + return diff +} + // removeOldest removes the oldest item from the cache. func (c *LRU) removeOldest() { ent := c.evictList.Back() diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go index 74c70774..92d70934 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go @@ -10,7 +10,7 @@ type LRUCache interface { // updates the "recently used"-ness of the key. #value, isFound Get(key interface{}) (value interface{}, ok bool) - // Check if a key exsists in cache without updating the recent-ness. + // Checks if a key exists in cache without updating the recent-ness. Contains(key interface{}) (ok bool) // Returns key's value without updating the "recently used"-ness of the key. @@ -31,6 +31,9 @@ type LRUCache interface { // Returns the number of items in the cache. Len() int - // Clear all cache entries + // Clears all cache entries. Purge() + + // Resizes cache, returning number evicted + Resize(int) int } diff --git a/vendor/github.com/hashicorp/hcl/.gitignore b/vendor/github.com/hashicorp/hcl/.gitignore new file mode 100644 index 00000000..15586a2b --- /dev/null +++ b/vendor/github.com/hashicorp/hcl/.gitignore @@ -0,0 +1,9 @@ +y.output + +# ignore intellij files +.idea +*.iml +*.ipr +*.iws + +*.test diff --git a/vendor/github.com/hashicorp/hcl/.travis.yml b/vendor/github.com/hashicorp/hcl/.travis.yml new file mode 100644 index 00000000..cb63a321 --- /dev/null +++ b/vendor/github.com/hashicorp/hcl/.travis.yml @@ -0,0 +1,13 @@ +sudo: false + +language: go + +go: + - 1.x + - tip + +branches: + only: + - master + +script: make test diff --git a/vendor/github.com/hashicorp/hcl/Makefile b/vendor/github.com/hashicorp/hcl/Makefile new file mode 100644 index 00000000..84fd743f --- /dev/null +++ b/vendor/github.com/hashicorp/hcl/Makefile @@ -0,0 +1,18 @@ +TEST?=./... + +default: test + +fmt: generate + go fmt ./... + +test: generate + go get -t ./... + go test $(TEST) $(TESTARGS) + +generate: + go generate ./... + +updatedeps: + go get -u golang.org/x/tools/cmd/stringer + +.PHONY: default generate test updatedeps diff --git a/vendor/github.com/hashicorp/hcl/README.md b/vendor/github.com/hashicorp/hcl/README.md new file mode 100644 index 00000000..c8223326 --- /dev/null +++ b/vendor/github.com/hashicorp/hcl/README.md @@ -0,0 +1,125 @@ +# HCL + +[![GoDoc](https://godoc.org/github.com/hashicorp/hcl?status.png)](https://godoc.org/github.com/hashicorp/hcl) [![Build Status](https://travis-ci.org/hashicorp/hcl.svg?branch=master)](https://travis-ci.org/hashicorp/hcl) + +HCL (HashiCorp Configuration Language) is a configuration language built +by HashiCorp. The goal of HCL is to build a structured configuration language +that is both human and machine friendly for use with command-line tools, but +specifically targeted towards DevOps tools, servers, etc. + +HCL is also fully JSON compatible. That is, JSON can be used as completely +valid input to a system expecting HCL. This helps makes systems +interoperable with other systems. + +HCL is heavily inspired by +[libucl](https://github.com/vstakhov/libucl), +nginx configuration, and others similar. + +## Why? + +A common question when viewing HCL is to ask the question: why not +JSON, YAML, etc.? + +Prior to HCL, the tools we built at [HashiCorp](http://www.hashicorp.com) +used a variety of configuration languages from full programming languages +such as Ruby to complete data structure languages such as JSON. What we +learned is that some people wanted human-friendly configuration languages +and some people wanted machine-friendly languages. + +JSON fits a nice balance in this, but is fairly verbose and most +importantly doesn't support comments. With YAML, we found that beginners +had a really hard time determining what the actual structure was, and +ended up guessing more often than not whether to use a hyphen, colon, etc. +in order to represent some configuration key. + +Full programming languages such as Ruby enable complex behavior +a configuration language shouldn't usually allow, and also forces +people to learn some set of Ruby. + +Because of this, we decided to create our own configuration language +that is JSON-compatible. Our configuration language (HCL) is designed +to be written and modified by humans. The API for HCL allows JSON +as an input so that it is also machine-friendly (machines can generate +JSON instead of trying to generate HCL). + +Our goal with HCL is not to alienate other configuration languages. +It is instead to provide HCL as a specialized language for our tools, +and JSON as the interoperability layer. + +## Syntax + +For a complete grammar, please see the parser itself. A high-level overview +of the syntax and grammar is listed here. + + * Single line comments start with `#` or `//` + + * Multi-line comments are wrapped in `/*` and `*/`. Nested block comments + are not allowed. A multi-line comment (also known as a block comment) + terminates at the first `*/` found. + + * Values are assigned with the syntax `key = value` (whitespace doesn't + matter). The value can be any primitive: a string, number, boolean, + object, or list. + + * Strings are double-quoted and can contain any UTF-8 characters. + Example: `"Hello, World"` + + * Multi-line strings start with `<- + echo %Path% + + go version + + go env + + go get -t ./... + +build_script: +- cmd: go test -v ./... diff --git a/vendor/github.com/hashicorp/hcl/go.mod b/vendor/github.com/hashicorp/hcl/go.mod new file mode 100644 index 00000000..4debbbe3 --- /dev/null +++ b/vendor/github.com/hashicorp/hcl/go.mod @@ -0,0 +1,3 @@ +module github.com/hashicorp/hcl + +require github.com/davecgh/go-spew v1.1.1 diff --git a/vendor/github.com/hashicorp/hcl/go.sum b/vendor/github.com/hashicorp/hcl/go.sum new file mode 100644 index 00000000..b5e2922e --- /dev/null +++ b/vendor/github.com/hashicorp/hcl/go.sum @@ -0,0 +1,2 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/vendor/github.com/hashicorp/serf/ops-misc/debian/copyright b/vendor/github.com/hashicorp/serf/ops-misc/debian/copyright deleted file mode 100644 index 21a1a1b5..00000000 --- a/vendor/github.com/hashicorp/serf/ops-misc/debian/copyright +++ /dev/null @@ -1,2 +0,0 @@ -Name: serf -Copyright: Hashicorp 2013 diff --git a/vendor/github.com/hashicorp/serf/website/LICENSE.md b/vendor/github.com/hashicorp/serf/website/LICENSE.md deleted file mode 100644 index 3189f43a..00000000 --- a/vendor/github.com/hashicorp/serf/website/LICENSE.md +++ /dev/null @@ -1,10 +0,0 @@ -# Proprietary License - -This license is temporary while a more official one is drafted. However, -this should make it clear: - -The text contents of this website are MPL 2.0 licensed. - -The design contents of this website are proprietary and may not be reproduced -or reused in any way other than to run the website locally. The license for -the design is owned solely by HashiCorp, Inc. diff --git a/vendor/github.com/hashicorp/serf/website/source/LICENSE b/vendor/github.com/hashicorp/serf/website/source/LICENSE deleted file mode 100644 index 36c29d7f..00000000 --- a/vendor/github.com/hashicorp/serf/website/source/LICENSE +++ /dev/null @@ -1,10 +0,0 @@ -# Proprietary License - -This license is temporary while a more official one is drafted. However, -this should make it clear: - -* The text contents of this website are MPL 2.0 licensed. - -* The design contents of this website are proprietary and may not be reproduced - or reused in any way other than to run the Serf website locally. The license - for the design is owned solely by HashiCorp, Inc. diff --git a/vendor/github.com/hashicorp/vault/LICENSE b/vendor/github.com/hashicorp/vault/LICENSE deleted file mode 100644 index e87a115e..00000000 --- a/vendor/github.com/hashicorp/vault/LICENSE +++ /dev/null @@ -1,363 +0,0 @@ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. "Contributor" - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. "Contributor Version" - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. - -1.6. "Executable Form" - - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. - -1.8. "License" - - means this document. - -1.9. "Licensable" - - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. - -1.10. "Modifications" - - means any of the following: - - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. "Patent Claims" of a Contributor - - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. - -1.12. "Secondary License" - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. "Source Code Form" - - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. - - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice - - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by - the Mozilla Public License, v. 2.0. - diff --git a/vendor/github.com/hashicorp/vault/api/LICENSE b/vendor/github.com/hashicorp/vault/api/LICENSE new file mode 100644 index 00000000..e87a115e --- /dev/null +++ b/vendor/github.com/hashicorp/vault/api/LICENSE @@ -0,0 +1,363 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. + diff --git a/vendor/github.com/hashicorp/vault/api/auth_token.go b/vendor/github.com/hashicorp/vault/api/auth_token.go index ed594eee..6807c89c 100644 --- a/vendor/github.com/hashicorp/vault/api/auth_token.go +++ b/vendor/github.com/hashicorp/vault/api/auth_token.go @@ -272,4 +272,5 @@ type TokenCreateRequest struct { NumUses int `json:"num_uses"` Renewable *bool `json:"renewable,omitempty"` Type string `json:"type"` + EntityAlias string `json:"entity_alias"` } diff --git a/vendor/github.com/hashicorp/vault/api/client.go b/vendor/github.com/hashicorp/vault/api/client.go index a77ceb86..fb50f207 100644 --- a/vendor/github.com/hashicorp/vault/api/client.go +++ b/vendor/github.com/hashicorp/vault/api/client.go @@ -19,8 +19,8 @@ import ( cleanhttp "github.com/hashicorp/go-cleanhttp" retryablehttp "github.com/hashicorp/go-retryablehttp" rootcerts "github.com/hashicorp/go-rootcerts" - "github.com/hashicorp/vault/helper/consts" - "github.com/hashicorp/vault/helper/parseutil" + "github.com/hashicorp/vault/sdk/helper/consts" + "github.com/hashicorp/vault/sdk/helper/parseutil" "golang.org/x/net/http2" "golang.org/x/time/rate" ) @@ -41,6 +41,10 @@ const EnvVaultToken = "VAULT_TOKEN" const EnvVaultMFA = "VAULT_MFA" const EnvRateLimit = "VAULT_RATE_LIMIT" +// Deprecated values +const EnvVaultAgentAddress = "VAULT_AGENT_ADDR" +const EnvVaultInsecure = "VAULT_SKIP_VERIFY" + // WrappingLookupFunc is a function that, given an HTTP verb and a path, // returns an optional string duration to be used for response wrapping (e.g. // "15s", or simply "15"). The path will not begin with "/v1/" or "v1/" or "/", @@ -246,6 +250,8 @@ func (c *Config) ReadEnvironment() error { } if v := os.Getenv(EnvVaultAgentAddr); v != "" { envAgentAddress = v + } else if v := os.Getenv(EnvVaultAgentAddress); v != "" { + envAgentAddress = v } if v := os.Getenv(EnvVaultMaxRetries); v != "" { maxRetries, err := strconv.ParseUint(v, 10, 32) @@ -286,7 +292,14 @@ func (c *Config) ReadEnvironment() error { if err != nil { return fmt.Errorf("could not parse VAULT_SKIP_VERIFY") } + } else if v := os.Getenv(EnvVaultInsecure); v != "" { + var err error + envInsecure, err = strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("could not parse VAULT_INSECURE") + } } + if v := os.Getenv(EnvVaultTLSServerName); v != "" { envTLSServerName = v } diff --git a/vendor/github.com/hashicorp/vault/api/go.mod b/vendor/github.com/hashicorp/vault/api/go.mod new file mode 100644 index 00000000..94ca00bb --- /dev/null +++ b/vendor/github.com/hashicorp/vault/api/go.mod @@ -0,0 +1,19 @@ +module github.com/hashicorp/vault/api + +go 1.12 + +replace github.com/hashicorp/vault/sdk => ../sdk + +require ( + github.com/hashicorp/errwrap v1.0.0 + github.com/hashicorp/go-cleanhttp v0.5.1 + github.com/hashicorp/go-multierror v1.0.0 + github.com/hashicorp/go-retryablehttp v0.5.4 + github.com/hashicorp/go-rootcerts v1.0.1 + github.com/hashicorp/hcl v1.0.0 + github.com/hashicorp/vault/sdk v0.1.13 + github.com/mitchellh/mapstructure v1.1.2 + golang.org/x/net v0.0.0-20190620200207-3b0461eec859 + golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 + gopkg.in/square/go-jose.v2 v2.3.1 +) diff --git a/vendor/github.com/hashicorp/vault/api/go.sum b/vendor/github.com/hashicorp/vault/api/go.sum new file mode 100644 index 00000000..0f4df0ae --- /dev/null +++ b/vendor/github.com/hashicorp/vault/api/go.sum @@ -0,0 +1,118 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= +github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-retryablehttp v0.5.4 h1:1BZvpawXoJCWX6pNtow9+rpEj+3itIlutiqnntI6jOE= +github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.1 h1:DMo4fmknnz0E0evoNYnV48RjWndOsmd6OW+09R3cEP8= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db h1:6/JqlYfC1CCaLnGceQTI+sDGhC9UBSPAsBqI0Gun6kU= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +gopkg.in/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/hashicorp/vault/api/help.go b/vendor/github.com/hashicorp/vault/api/help.go index 472ca039..321bd597 100644 --- a/vendor/github.com/hashicorp/vault/api/help.go +++ b/vendor/github.com/hashicorp/vault/api/help.go @@ -24,6 +24,7 @@ func (c *Client) Help(path string) (*Help, error) { } type Help struct { - Help string `json:"help"` - SeeAlso []string `json:"see_also"` + Help string `json:"help"` + SeeAlso []string `json:"see_also"` + OpenAPI map[string]interface{} `json:"openapi"` } diff --git a/vendor/github.com/hashicorp/vault/api/logical.go b/vendor/github.com/hashicorp/vault/api/logical.go index d13daac6..d5f94644 100644 --- a/vendor/github.com/hashicorp/vault/api/logical.go +++ b/vendor/github.com/hashicorp/vault/api/logical.go @@ -9,7 +9,7 @@ import ( "os" "github.com/hashicorp/errwrap" - "github.com/hashicorp/vault/helper/jsonutil" + "github.com/hashicorp/vault/sdk/helper/jsonutil" ) const ( @@ -161,8 +161,26 @@ func (c *Logical) Write(path string, data map[string]interface{}) (*Secret, erro } func (c *Logical) Delete(path string) (*Secret, error) { + return c.DeleteWithData(path, nil) +} + +func (c *Logical) DeleteWithData(path string, data map[string][]string) (*Secret, error) { r := c.c.NewRequest("DELETE", "/v1/"+path) + var values url.Values + for k, v := range data { + if values == nil { + values = make(url.Values) + } + for _, val := range v { + values.Add(k, val) + } + } + + if values != nil { + r.Params = values + } + ctx, cancelFunc := context.WithCancel(context.Background()) defer cancelFunc() resp, err := c.c.RawRequestWithContext(ctx, r) diff --git a/vendor/github.com/hashicorp/vault/api/plugin_helpers.go b/vendor/github.com/hashicorp/vault/api/plugin_helpers.go new file mode 100644 index 00000000..e664d5eb --- /dev/null +++ b/vendor/github.com/hashicorp/vault/api/plugin_helpers.go @@ -0,0 +1,186 @@ +package api + +import ( + "crypto/tls" + "crypto/x509" + "encoding/base64" + "errors" + "flag" + "net/url" + "os" + + squarejwt "gopkg.in/square/go-jose.v2/jwt" + + "github.com/hashicorp/errwrap" +) + +var ( + // PluginMetadataModeEnv is an ENV name used to disable TLS communication + // to bootstrap mounting plugins. + PluginMetadataModeEnv = "VAULT_PLUGIN_METADATA_MODE" + + // PluginUnwrapTokenEnv is the ENV name used to pass unwrap tokens to the + // plugin. + PluginUnwrapTokenEnv = "VAULT_UNWRAP_TOKEN" +) + +// PluginAPIClientMeta is a helper that plugins can use to configure TLS connections +// back to Vault. +type PluginAPIClientMeta struct { + // These are set by the command line flags. + flagCACert string + flagCAPath string + flagClientCert string + flagClientKey string + flagInsecure bool +} + +// FlagSet returns the flag set for configuring the TLS connection +func (f *PluginAPIClientMeta) FlagSet() *flag.FlagSet { + fs := flag.NewFlagSet("vault plugin settings", flag.ContinueOnError) + + fs.StringVar(&f.flagCACert, "ca-cert", "", "") + fs.StringVar(&f.flagCAPath, "ca-path", "", "") + fs.StringVar(&f.flagClientCert, "client-cert", "", "") + fs.StringVar(&f.flagClientKey, "client-key", "", "") + fs.BoolVar(&f.flagInsecure, "tls-skip-verify", false, "") + + return fs +} + +// GetTLSConfig will return a TLSConfig based off the values from the flags +func (f *PluginAPIClientMeta) GetTLSConfig() *TLSConfig { + // If we need custom TLS configuration, then set it + if f.flagCACert != "" || f.flagCAPath != "" || f.flagClientCert != "" || f.flagClientKey != "" || f.flagInsecure { + t := &TLSConfig{ + CACert: f.flagCACert, + CAPath: f.flagCAPath, + ClientCert: f.flagClientCert, + ClientKey: f.flagClientKey, + TLSServerName: "", + Insecure: f.flagInsecure, + } + + return t + } + + return nil +} + +// VaultPluginTLSProvider is run inside a plugin and retrieves the response +// wrapped TLS certificate from vault. It returns a configured TLS Config. +func VaultPluginTLSProvider(apiTLSConfig *TLSConfig) func() (*tls.Config, error) { + if os.Getenv(PluginMetadataModeEnv) == "true" { + return nil + } + + return func() (*tls.Config, error) { + unwrapToken := os.Getenv(PluginUnwrapTokenEnv) + + parsedJWT, err := squarejwt.ParseSigned(unwrapToken) + if err != nil { + return nil, errwrap.Wrapf("error parsing wrapping token: {{err}}", err) + } + + var allClaims = make(map[string]interface{}) + if err = parsedJWT.UnsafeClaimsWithoutVerification(&allClaims); err != nil { + return nil, errwrap.Wrapf("error parsing claims from wrapping token: {{err}}", err) + } + + addrClaimRaw, ok := allClaims["addr"] + if !ok { + return nil, errors.New("could not validate addr claim") + } + vaultAddr, ok := addrClaimRaw.(string) + if !ok { + return nil, errors.New("could not parse addr claim") + } + if vaultAddr == "" { + return nil, errors.New(`no vault api_addr found`) + } + + // Sanity check the value + if _, err := url.Parse(vaultAddr); err != nil { + return nil, errwrap.Wrapf("error parsing the vault api_addr: {{err}}", err) + } + + // Unwrap the token + clientConf := DefaultConfig() + clientConf.Address = vaultAddr + if apiTLSConfig != nil { + err := clientConf.ConfigureTLS(apiTLSConfig) + if err != nil { + return nil, errwrap.Wrapf("error configuring api client {{err}}", err) + } + } + client, err := NewClient(clientConf) + if err != nil { + return nil, errwrap.Wrapf("error during api client creation: {{err}}", err) + } + + secret, err := client.Logical().Unwrap(unwrapToken) + if err != nil { + return nil, errwrap.Wrapf("error during token unwrap request: {{err}}", err) + } + if secret == nil { + return nil, errors.New("error during token unwrap request: secret is nil") + } + + // Retrieve and parse the server's certificate + serverCertBytesRaw, ok := secret.Data["ServerCert"].(string) + if !ok { + return nil, errors.New("error unmarshalling certificate") + } + + serverCertBytes, err := base64.StdEncoding.DecodeString(serverCertBytesRaw) + if err != nil { + return nil, errwrap.Wrapf("error parsing certificate: {{err}}", err) + } + + serverCert, err := x509.ParseCertificate(serverCertBytes) + if err != nil { + return nil, errwrap.Wrapf("error parsing certificate: {{err}}", err) + } + + // Retrieve and parse the server's private key + serverKeyB64, ok := secret.Data["ServerKey"].(string) + if !ok { + return nil, errors.New("error unmarshalling certificate") + } + + serverKeyRaw, err := base64.StdEncoding.DecodeString(serverKeyB64) + if err != nil { + return nil, errwrap.Wrapf("error parsing certificate: {{err}}", err) + } + + serverKey, err := x509.ParseECPrivateKey(serverKeyRaw) + if err != nil { + return nil, errwrap.Wrapf("error parsing certificate: {{err}}", err) + } + + // Add CA cert to the cert pool + caCertPool := x509.NewCertPool() + caCertPool.AddCert(serverCert) + + // Build a certificate object out of the server's cert and private key. + cert := tls.Certificate{ + Certificate: [][]byte{serverCertBytes}, + PrivateKey: serverKey, + Leaf: serverCert, + } + + // Setup TLS config + tlsConfig := &tls.Config{ + ClientCAs: caCertPool, + RootCAs: caCertPool, + ClientAuth: tls.RequireAndVerifyClientCert, + // TLS 1.2 minimum + MinVersion: tls.VersionTLS12, + Certificates: []tls.Certificate{cert}, + ServerName: serverCert.Subject.CommonName, + } + tlsConfig.BuildNameToCertificate() + + return tlsConfig, nil + } +} diff --git a/vendor/github.com/hashicorp/vault/api/request.go b/vendor/github.com/hashicorp/vault/api/request.go index 4efa2aa8..0ed04220 100644 --- a/vendor/github.com/hashicorp/vault/api/request.go +++ b/vendor/github.com/hashicorp/vault/api/request.go @@ -8,7 +8,7 @@ import ( "net/http" "net/url" - "github.com/hashicorp/vault/helper/consts" + "github.com/hashicorp/vault/sdk/helper/consts" retryablehttp "github.com/hashicorp/go-retryablehttp" ) diff --git a/vendor/github.com/hashicorp/vault/api/response.go b/vendor/github.com/hashicorp/vault/api/response.go index 053a2772..aed2a52e 100644 --- a/vendor/github.com/hashicorp/vault/api/response.go +++ b/vendor/github.com/hashicorp/vault/api/response.go @@ -7,7 +7,7 @@ import ( "io/ioutil" "net/http" - "github.com/hashicorp/vault/helper/jsonutil" + "github.com/hashicorp/vault/sdk/helper/jsonutil" ) // Response is a raw response that wraps an HTTP response. @@ -42,32 +42,27 @@ func (r *Response) Error() error { r.Body.Close() r.Body = ioutil.NopCloser(bodyBuf) + // Build up the error object + respErr := &ResponseError{ + HTTPMethod: r.Request.Method, + URL: r.Request.URL.String(), + StatusCode: r.StatusCode, + } + // Decode the error response if we can. Note that we wrap the bodyBuf // in a bytes.Reader here so that the JSON decoder doesn't move the // read pointer for the original buffer. var resp ErrorResponse if err := jsonutil.DecodeJSON(bodyBuf.Bytes(), &resp); err != nil { - // Ignore the decoding error and just drop the raw response - return fmt.Errorf( - "Error making API request.\n\n"+ - "URL: %s %s\n"+ - "Code: %d. Raw Message:\n\n%s", - r.Request.Method, r.Request.URL.String(), - r.StatusCode, bodyBuf.String()) + // Store the fact that we couldn't decode the errors + respErr.RawError = true + respErr.Errors = []string{bodyBuf.String()} + } else { + // Store the decoded errors + respErr.Errors = resp.Errors } - var errBody bytes.Buffer - errBody.WriteString(fmt.Sprintf( - "Error making API request.\n\n"+ - "URL: %s %s\n"+ - "Code: %d. Errors:\n\n", - r.Request.Method, r.Request.URL.String(), - r.StatusCode)) - for _, err := range resp.Errors { - errBody.WriteString(fmt.Sprintf("* %s", err)) - } - - return fmt.Errorf(errBody.String()) + return respErr } // ErrorResponse is the raw structure of errors when they're returned by the @@ -75,3 +70,51 @@ func (r *Response) Error() error { type ErrorResponse struct { Errors []string } + +// ResponseError is the error returned when Vault responds with an error or +// non-success HTTP status code. If a request to Vault fails because of a +// network error a different error message will be returned. ResponseError gives +// access to the underlying errors and status code. +type ResponseError struct { + // HTTPMethod is the HTTP method for the request (PUT, GET, etc). + HTTPMethod string + + // URL is the URL of the request. + URL string + + // StatusCode is the HTTP status code. + StatusCode int + + // RawError marks that the underlying error messages returned by Vault were + // not parsable. The Errors slice will contain the raw response body as the + // first and only error string if this value is set to true. + RawError bool + + // Errors are the underlying errors returned by Vault. + Errors []string +} + +// Error returns a human-readable error string for the response error. +func (r *ResponseError) Error() string { + errString := "Errors" + if r.RawError { + errString = "Raw Message" + } + + var errBody bytes.Buffer + errBody.WriteString(fmt.Sprintf( + "Error making API request.\n\n"+ + "URL: %s %s\n"+ + "Code: %d. %s:\n\n", + r.HTTPMethod, r.URL, r.StatusCode, errString)) + + if r.RawError && len(r.Errors) == 1 { + errBody.WriteString(r.Errors[0]) + } else { + for _, err := range r.Errors { + errBody.WriteString(fmt.Sprintf("* %s", err)) + } + } + + return errBody.String() +} diff --git a/vendor/github.com/hashicorp/vault/api/secret.go b/vendor/github.com/hashicorp/vault/api/secret.go index c8a0ba3d..d5b9ce97 100644 --- a/vendor/github.com/hashicorp/vault/api/secret.go +++ b/vendor/github.com/hashicorp/vault/api/secret.go @@ -7,8 +7,8 @@ import ( "time" "github.com/hashicorp/errwrap" - "github.com/hashicorp/vault/helper/jsonutil" - "github.com/hashicorp/vault/helper/parseutil" + "github.com/hashicorp/vault/sdk/helper/jsonutil" + "github.com/hashicorp/vault/sdk/helper/parseutil" ) // Secret is the structure returned for every secret within Vault. @@ -293,6 +293,7 @@ type SecretAuth struct { IdentityPolicies []string `json:"identity_policies"` Metadata map[string]string `json:"metadata"` Orphan bool `json:"orphan"` + EntityID string `json:"entity_id"` LeaseDuration int `json:"lease_duration"` Renewable bool `json:"renewable"` diff --git a/vendor/github.com/hashicorp/vault/api/ssh_agent.go b/vendor/github.com/hashicorp/vault/api/ssh_agent.go index b8e82224..a4348ca2 100644 --- a/vendor/github.com/hashicorp/vault/api/ssh_agent.go +++ b/vendor/github.com/hashicorp/vault/api/ssh_agent.go @@ -14,7 +14,7 @@ import ( rootcerts "github.com/hashicorp/go-rootcerts" "github.com/hashicorp/hcl" "github.com/hashicorp/hcl/hcl/ast" - "github.com/hashicorp/vault/helper/hclutil" + "github.com/hashicorp/vault/sdk/helper/hclutil" "github.com/mitchellh/mapstructure" ) diff --git a/vendor/github.com/hashicorp/vault/api/sys_mounts.go b/vendor/github.com/hashicorp/vault/api/sys_mounts.go index 993a1b67..354b1ee9 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_mounts.go +++ b/vendor/github.com/hashicorp/vault/api/sys_mounts.go @@ -159,6 +159,7 @@ type MountConfigInput struct { } type MountOutput struct { + UUID string `json:"uuid"` Type string `json:"type"` Description string `json:"description"` Accessor string `json:"accessor"` diff --git a/vendor/github.com/hashicorp/vault/api/sys_plugins.go b/vendor/github.com/hashicorp/vault/api/sys_plugins.go index ebfcfbfc..0ab022ba 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_plugins.go +++ b/vendor/github.com/hashicorp/vault/api/sys_plugins.go @@ -6,7 +6,7 @@ import ( "fmt" "net/http" - "github.com/hashicorp/vault/helper/consts" + "github.com/hashicorp/vault/sdk/helper/consts" "github.com/mitchellh/mapstructure" ) diff --git a/vendor/github.com/hashicorp/vault/api/sys_raft.go b/vendor/github.com/hashicorp/vault/api/sys_raft.go new file mode 100644 index 00000000..6897dc0a --- /dev/null +++ b/vendor/github.com/hashicorp/vault/api/sys_raft.go @@ -0,0 +1,130 @@ +package api + +import ( + "context" + "io" + "net/http" + + "github.com/hashicorp/vault/sdk/helper/consts" +) + +// RaftJoinResponse represents the response of the raft join API +type RaftJoinResponse struct { + Joined bool `json:"joined"` +} + +// RaftJoinRequest represents the parameters consumed by the raft join API +type RaftJoinRequest struct { + LeaderAPIAddr string `json:"leader_api_addr"` + LeaderCACert string `json:"leader_ca_cert":` + LeaderClientCert string `json:"leader_client_cert"` + LeaderClientKey string `json:"leader_client_key"` + Retry bool `json:"retry"` +} + +// RaftJoin adds the node from which this call is invoked from to the raft +// cluster represented by the leader address in the parameter. +func (c *Sys) RaftJoin(opts *RaftJoinRequest) (*RaftJoinResponse, error) { + r := c.c.NewRequest("POST", "/v1/sys/storage/raft/join") + + if err := r.SetJSONBody(opts); err != nil { + return nil, err + } + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + var result RaftJoinResponse + err = resp.DecodeJSON(&result) + return &result, err +} + +// RaftSnapshot invokes the API that takes the snapshot of the raft cluster and +// writes it to the supplied io.Writer. +func (c *Sys) RaftSnapshot(snapWriter io.Writer) error { + r := c.c.NewRequest("GET", "/v1/sys/storage/raft/snapshot") + r.URL.RawQuery = r.Params.Encode() + + req, err := http.NewRequest(http.MethodGet, r.URL.RequestURI(), nil) + if err != nil { + return err + } + + req.URL.User = r.URL.User + req.URL.Scheme = r.URL.Scheme + req.URL.Host = r.URL.Host + req.Host = r.URL.Host + + if r.Headers != nil { + for header, vals := range r.Headers { + for _, val := range vals { + req.Header.Add(header, val) + } + } + } + + if len(r.ClientToken) != 0 { + req.Header.Set(consts.AuthHeaderName, r.ClientToken) + } + + if len(r.WrapTTL) != 0 { + req.Header.Set("X-Vault-Wrap-TTL", r.WrapTTL) + } + + if len(r.MFAHeaderVals) != 0 { + for _, mfaHeaderVal := range r.MFAHeaderVals { + req.Header.Add("X-Vault-MFA", mfaHeaderVal) + } + } + + if r.PolicyOverride { + req.Header.Set("X-Vault-Policy-Override", "true") + } + + // Avoiding the use of RawRequestWithContext which reads the response body + // to determine if the body contains error message. + var result *Response + resp, err := c.c.config.HttpClient.Do(req) + if resp == nil { + return nil + } + + result = &Response{Response: resp} + if err := result.Error(); err != nil { + return err + } + + _, err = io.Copy(snapWriter, resp.Body) + if err != nil { + return err + } + + return nil +} + +// RaftSnapshotRestore reads the snapshot from the io.Reader and installs that +// snapshot, returning the cluster to the state defined by it. +func (c *Sys) RaftSnapshotRestore(snapReader io.Reader, force bool) error { + path := "/v1/sys/storage/raft/snapshot" + if force { + path = "/v1/sys/storage/raft/snapshot-force" + } + r := c.c.NewRequest("POST", path) + + r.Body = snapReader + + ctx, cancelFunc := context.WithCancel(context.Background()) + defer cancelFunc() + resp, err := c.c.RawRequestWithContext(ctx, r) + if err != nil { + return err + } + defer resp.Body.Close() + + return nil +} diff --git a/vendor/github.com/hashicorp/vault/api/sys_rekey.go b/vendor/github.com/hashicorp/vault/api/sys_rekey.go index 55f1a703..153e486c 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_rekey.go +++ b/vendor/github.com/hashicorp/vault/api/sys_rekey.go @@ -234,7 +234,7 @@ func (c *Sys) RekeyRetrieveBackup() (*RekeyRetrieveResponse, error) { } func (c *Sys) RekeyRetrieveRecoveryBackup() (*RekeyRetrieveResponse, error) { - r := c.c.NewRequest("GET", "/v1/sys/rekey/recovery-backup") + r := c.c.NewRequest("GET", "/v1/sys/rekey/recovery-key-backup") ctx, cancelFunc := context.WithCancel(context.Background()) defer cancelFunc() @@ -275,7 +275,7 @@ func (c *Sys) RekeyDeleteBackup() error { } func (c *Sys) RekeyDeleteRecoveryBackup() error { - r := c.c.NewRequest("DELETE", "/v1/sys/rekey/recovery-backup") + r := c.c.NewRequest("DELETE", "/v1/sys/rekey/recovery-key-backup") ctx, cancelFunc := context.WithCancel(context.Background()) defer cancelFunc() diff --git a/vendor/github.com/hashicorp/vault/helper/compressutil/compress.go b/vendor/github.com/hashicorp/vault/helper/compressutil/compress.go deleted file mode 100644 index 356d4548..00000000 --- a/vendor/github.com/hashicorp/vault/helper/compressutil/compress.go +++ /dev/null @@ -1,207 +0,0 @@ -package compressutil - -import ( - "bytes" - "compress/gzip" - "compress/lzw" - "fmt" - "io" - - "github.com/golang/snappy" - "github.com/hashicorp/errwrap" - "github.com/pierrec/lz4" -) - -const ( - // A byte value used as a canary prefix for the compressed information - // which is used to distinguish if a JSON input is compressed or not. - // The value of this constant should not be a first character of any - // valid JSON string. - - CompressionTypeGzip = "gzip" - CompressionCanaryGzip byte = 'G' - - CompressionTypeLZW = "lzw" - CompressionCanaryLZW byte = 'L' - - CompressionTypeSnappy = "snappy" - CompressionCanarySnappy byte = 'S' - - CompressionTypeLZ4 = "lz4" - CompressionCanaryLZ4 byte = '4' -) - -// SnappyReadCloser embeds the snappy reader which implements the io.Reader -// interface. The decompress procedure in this utility expects an -// io.ReadCloser. This type implements the io.Closer interface to retain the -// generic way of decompression. -type CompressUtilReadCloser struct { - io.Reader -} - -// Close is a noop method implemented only to satisfy the io.Closer interface -func (c *CompressUtilReadCloser) Close() error { - return nil -} - -// CompressionConfig is used to select a compression type to be performed by -// Compress and Decompress utilities. -// Supported types are: -// * CompressionTypeLZW -// * CompressionTypeGzip -// * CompressionTypeSnappy -// * CompressionTypeLZ4 -// -// When using CompressionTypeGzip, the compression levels can also be chosen: -// * gzip.DefaultCompression -// * gzip.BestSpeed -// * gzip.BestCompression -type CompressionConfig struct { - // Type of the compression algorithm to be used - Type string - - // When using Gzip format, the compression level to employ - GzipCompressionLevel int -} - -// Compress places the canary byte in a buffer and uses the same buffer to fill -// in the compressed information of the given input. The configuration supports -// two type of compression: LZW and Gzip. When using Gzip compression format, -// if GzipCompressionLevel is not specified, the 'gzip.DefaultCompression' will -// be assumed. -func Compress(data []byte, config *CompressionConfig) ([]byte, error) { - var buf bytes.Buffer - var writer io.WriteCloser - var err error - - if config == nil { - return nil, fmt.Errorf("config is nil") - } - - // Write the canary into the buffer and create writer to compress the - // input data based on the configured type - switch config.Type { - case CompressionTypeLZW: - buf.Write([]byte{CompressionCanaryLZW}) - writer = lzw.NewWriter(&buf, lzw.LSB, 8) - - case CompressionTypeGzip: - buf.Write([]byte{CompressionCanaryGzip}) - - switch { - case config.GzipCompressionLevel == gzip.BestCompression, - config.GzipCompressionLevel == gzip.BestSpeed, - config.GzipCompressionLevel == gzip.DefaultCompression: - // These are valid compression levels - default: - // If compression level is set to NoCompression or to - // any invalid value, fallback to Defaultcompression - config.GzipCompressionLevel = gzip.DefaultCompression - } - writer, err = gzip.NewWriterLevel(&buf, config.GzipCompressionLevel) - - case CompressionTypeSnappy: - buf.Write([]byte{CompressionCanarySnappy}) - writer = snappy.NewBufferedWriter(&buf) - - case CompressionTypeLZ4: - buf.Write([]byte{CompressionCanaryLZ4}) - writer = lz4.NewWriter(&buf) - - default: - return nil, fmt.Errorf("unsupported compression type") - } - - if err != nil { - return nil, errwrap.Wrapf("failed to create a compression writer: {{err}}", err) - } - - if writer == nil { - return nil, fmt.Errorf("failed to create a compression writer") - } - - // Compress the input and place it in the same buffer containing the - // canary byte. - if _, err = writer.Write(data); err != nil { - return nil, errwrap.Wrapf("failed to compress input data: err: {{err}}", err) - } - - // Close the io.WriteCloser - if err = writer.Close(); err != nil { - return nil, err - } - - // Return the compressed bytes with canary byte at the start - return buf.Bytes(), nil -} - -// Decompress checks if the first byte in the input matches the canary byte. -// If the first byte is a canary byte, then the input past the canary byte -// will be decompressed using the method specified in the given configuration. -// If the first byte isn't a canary byte, then the utility returns a boolean -// value indicating that the input was not compressed. -func Decompress(data []byte) ([]byte, bool, error) { - var err error - var reader io.ReadCloser - if data == nil || len(data) == 0 { - return nil, false, fmt.Errorf("'data' being decompressed is empty") - } - - canary := data[0] - cData := data[1:] - - switch canary { - // If the first byte matches the canary byte, remove the canary - // byte and try to decompress the data that is after the canary. - case CompressionCanaryGzip: - if len(data) < 2 { - return nil, false, fmt.Errorf("invalid 'data' after the canary") - } - reader, err = gzip.NewReader(bytes.NewReader(cData)) - - case CompressionCanaryLZW: - if len(data) < 2 { - return nil, false, fmt.Errorf("invalid 'data' after the canary") - } - reader = lzw.NewReader(bytes.NewReader(cData), lzw.LSB, 8) - - case CompressionCanarySnappy: - if len(data) < 2 { - return nil, false, fmt.Errorf("invalid 'data' after the canary") - } - reader = &CompressUtilReadCloser{ - Reader: snappy.NewReader(bytes.NewReader(cData)), - } - - case CompressionCanaryLZ4: - if len(data) < 2 { - return nil, false, fmt.Errorf("invalid 'data' after the canary") - } - reader = &CompressUtilReadCloser{ - Reader: lz4.NewReader(bytes.NewReader(cData)), - } - - default: - // If the first byte doesn't match the canary byte, it means - // that the content was not compressed at all. Indicate the - // caller that the input was not compressed. - return nil, true, nil - } - if err != nil { - return nil, false, errwrap.Wrapf("failed to create a compression reader: {{err}}", err) - } - if reader == nil { - return nil, false, fmt.Errorf("failed to create a compression reader") - } - - // Close the io.ReadCloser - defer reader.Close() - - // Read all the compressed data into a buffer - var buf bytes.Buffer - if _, err = io.Copy(&buf, reader); err != nil { - return nil, false, err - } - - return buf.Bytes(), false, nil -} diff --git a/vendor/github.com/hashicorp/vault/helper/consts/agent.go b/vendor/github.com/hashicorp/vault/helper/consts/agent.go deleted file mode 100644 index b62962e3..00000000 --- a/vendor/github.com/hashicorp/vault/helper/consts/agent.go +++ /dev/null @@ -1,5 +0,0 @@ -package consts - -// AgentPathCacheClear is the path that the agent will use as its cache-clear -// endpoint. -const AgentPathCacheClear = "/agent/v1/cache-clear" diff --git a/vendor/github.com/hashicorp/vault/helper/consts/consts.go b/vendor/github.com/hashicorp/vault/helper/consts/consts.go deleted file mode 100644 index 972a69f4..00000000 --- a/vendor/github.com/hashicorp/vault/helper/consts/consts.go +++ /dev/null @@ -1,14 +0,0 @@ -package consts - -const ( - // ExpirationRestoreWorkerCount specifies the number of workers to use while - // restoring leases into the expiration manager - ExpirationRestoreWorkerCount = 64 - - // NamespaceHeaderName is the header set to specify which namespace the - // request is indented for. - NamespaceHeaderName = "X-Vault-Namespace" - - // AuthHeaderName is the name of the header containing the token. - AuthHeaderName = "X-Vault-Token" -) diff --git a/vendor/github.com/hashicorp/vault/helper/consts/error.go b/vendor/github.com/hashicorp/vault/helper/consts/error.go deleted file mode 100644 index 06977d5d..00000000 --- a/vendor/github.com/hashicorp/vault/helper/consts/error.go +++ /dev/null @@ -1,16 +0,0 @@ -package consts - -import "errors" - -var ( - // ErrSealed is returned if an operation is performed on a sealed barrier. - // No operation is expected to succeed before unsealing - ErrSealed = errors.New("Vault is sealed") - - // ErrStandby is returned if an operation is performed on a standby Vault. - // No operation is expected to succeed until active. - ErrStandby = errors.New("Vault is in standby mode") - - // Used when .. is used in a path - ErrPathContainsParentReferences = errors.New("path cannot contain parent references") -) diff --git a/vendor/github.com/hashicorp/vault/helper/consts/plugin_types.go b/vendor/github.com/hashicorp/vault/helper/consts/plugin_types.go deleted file mode 100644 index e0a00e48..00000000 --- a/vendor/github.com/hashicorp/vault/helper/consts/plugin_types.go +++ /dev/null @@ -1,59 +0,0 @@ -package consts - -import "fmt" - -var PluginTypes = []PluginType{ - PluginTypeUnknown, - PluginTypeCredential, - PluginTypeDatabase, - PluginTypeSecrets, -} - -type PluginType uint32 - -// This is a list of PluginTypes used by Vault. -// If we need to add any in the future, it would -// be best to add them to the _end_ of the list below -// because they resolve to incrementing numbers, -// which may be saved in state somewhere. Thus if -// the name for one of those numbers changed because -// a value were added to the middle, that could cause -// the wrong plugin types to be read from storage -// for a given underlying number. Example of the problem -// here: https://play.golang.org/p/YAaPw5ww3er -const ( - PluginTypeUnknown PluginType = iota - PluginTypeCredential - PluginTypeDatabase - PluginTypeSecrets -) - -func (p PluginType) String() string { - switch p { - case PluginTypeUnknown: - return "unknown" - case PluginTypeCredential: - return "auth" - case PluginTypeDatabase: - return "database" - case PluginTypeSecrets: - return "secret" - default: - return "unsupported" - } -} - -func ParsePluginType(pluginType string) (PluginType, error) { - switch pluginType { - case "unknown": - return PluginTypeUnknown, nil - case "auth": - return PluginTypeCredential, nil - case "database": - return PluginTypeDatabase, nil - case "secret": - return PluginTypeSecrets, nil - default: - return PluginTypeUnknown, fmt.Errorf("%q is not a supported plugin type", pluginType) - } -} diff --git a/vendor/github.com/hashicorp/vault/helper/consts/replication.go b/vendor/github.com/hashicorp/vault/helper/consts/replication.go deleted file mode 100644 index f3cafe75..00000000 --- a/vendor/github.com/hashicorp/vault/helper/consts/replication.go +++ /dev/null @@ -1,150 +0,0 @@ -package consts - -import "time" - -const ( - //N.B. This needs to be excluded from replication despite the name; it's - //merely saying that this is cluster information for the replicated - //cluster. - CoreReplicatedClusterPrefix = "core/cluster/replicated/" - CoreReplicatedClusterPrefixDR = "core/cluster/replicated-dr/" - - CoreReplicatedClusterInfoPath = CoreReplicatedClusterPrefix + "info" - CoreReplicatedClusterSecondariesPrefix = CoreReplicatedClusterPrefix + "secondaries/" - CoreReplicatedClusterInfoPathDR = CoreReplicatedClusterPrefixDR + "info" - CoreReplicatedClusterSecondariesPrefixDR = CoreReplicatedClusterPrefixDR + "secondaries/" - - // This is an identifier for the current secondary in the replicated paths - // manager. It should contain a character that is not allowed in secondary - // ids to ensure it doesn't collide. - CurrentReplicatedSecondaryIdentifier = ".current" -) - -type ReplicationState uint32 - -var ReplicationStaleReadTimeout = 2 * time.Second - -const ( - _ ReplicationState = iota - OldReplicationPrimary - OldReplicationSecondary - OldReplicationBootstrapping - // Don't add anything here. Adding anything to this Old block would cause - // the rest of the values to change below. This was done originally to - // ensure no overlap between old and new values. - - ReplicationUnknown ReplicationState = 0 - ReplicationPerformancePrimary ReplicationState = 1 << iota // Note -- iota is 5 here! - ReplicationPerformanceSecondary - OldSplitReplicationBootstrapping - ReplicationDRPrimary - ReplicationDRSecondary - ReplicationPerformanceBootstrapping - ReplicationDRBootstrapping - ReplicationPerformanceDisabled - ReplicationDRDisabled - ReplicationPerformanceStandby -) - -// We verify no change to the above values are made -func init() { - - if OldReplicationBootstrapping != 3 { - panic("Replication Constants have changed") - } - - if ReplicationPerformancePrimary != 1<<5 { - panic("Replication Constants have changed") - } -} - -func (r ReplicationState) string() string { - switch r { - case ReplicationPerformanceSecondary: - return "secondary" - case ReplicationPerformancePrimary: - return "primary" - case ReplicationPerformanceBootstrapping: - return "bootstrapping" - case ReplicationPerformanceDisabled: - return "disabled" - case ReplicationDRPrimary: - return "primary" - case ReplicationDRSecondary: - return "secondary" - case ReplicationDRBootstrapping: - return "bootstrapping" - case ReplicationDRDisabled: - return "disabled" - } - - return "unknown" -} - -func (r ReplicationState) StateStrings() []string { - var ret []string - if r.HasState(ReplicationPerformanceSecondary) { - ret = append(ret, "perf-secondary") - } - if r.HasState(ReplicationPerformancePrimary) { - ret = append(ret, "perf-primary") - } - if r.HasState(ReplicationPerformanceBootstrapping) { - ret = append(ret, "perf-bootstrapping") - } - if r.HasState(ReplicationPerformanceDisabled) { - ret = append(ret, "perf-disabled") - } - if r.HasState(ReplicationDRPrimary) { - ret = append(ret, "dr-primary") - } - if r.HasState(ReplicationDRSecondary) { - ret = append(ret, "dr-secondary") - } - if r.HasState(ReplicationDRBootstrapping) { - ret = append(ret, "dr-bootstrapping") - } - if r.HasState(ReplicationDRDisabled) { - ret = append(ret, "dr-disabled") - } - if r.HasState(ReplicationPerformanceStandby) { - ret = append(ret, "perfstandby") - } - - return ret -} - -func (r ReplicationState) GetDRString() string { - switch { - case r.HasState(ReplicationDRBootstrapping): - return ReplicationDRBootstrapping.string() - case r.HasState(ReplicationDRPrimary): - return ReplicationDRPrimary.string() - case r.HasState(ReplicationDRSecondary): - return ReplicationDRSecondary.string() - case r.HasState(ReplicationDRDisabled): - return ReplicationDRDisabled.string() - default: - return "unknown" - } -} - -func (r ReplicationState) GetPerformanceString() string { - switch { - case r.HasState(ReplicationPerformanceBootstrapping): - return ReplicationPerformanceBootstrapping.string() - case r.HasState(ReplicationPerformancePrimary): - return ReplicationPerformancePrimary.string() - case r.HasState(ReplicationPerformanceSecondary): - return ReplicationPerformanceSecondary.string() - case r.HasState(ReplicationPerformanceDisabled): - return ReplicationPerformanceDisabled.string() - default: - return "unknown" - } -} - -func (r ReplicationState) HasState(flag ReplicationState) bool { return r&flag != 0 } -func (r *ReplicationState) AddState(flag ReplicationState) { *r |= flag } -func (r *ReplicationState) ClearState(flag ReplicationState) { *r &= ^flag } -func (r *ReplicationState) ToggleState(flag ReplicationState) { *r ^= flag } diff --git a/vendor/github.com/hashicorp/vault/helper/hclutil/hcl.go b/vendor/github.com/hashicorp/vault/helper/hclutil/hcl.go deleted file mode 100644 index 0b120367..00000000 --- a/vendor/github.com/hashicorp/vault/helper/hclutil/hcl.go +++ /dev/null @@ -1,36 +0,0 @@ -package hclutil - -import ( - "fmt" - - multierror "github.com/hashicorp/go-multierror" - "github.com/hashicorp/hcl/hcl/ast" -) - -// CheckHCLKeys checks whether the keys in the AST list contains any of the valid keys provided. -func CheckHCLKeys(node ast.Node, valid []string) error { - var list *ast.ObjectList - switch n := node.(type) { - case *ast.ObjectList: - list = n - case *ast.ObjectType: - list = n.List - default: - return fmt.Errorf("cannot check HCL keys of type %T", n) - } - - validMap := make(map[string]struct{}, len(valid)) - for _, v := range valid { - validMap[v] = struct{}{} - } - - var result error - for _, item := range list.Items { - key := item.Keys[0].Token.Value().(string) - if _, ok := validMap[key]; !ok { - result = multierror.Append(result, fmt.Errorf("invalid key %q on line %d", key, item.Assign.Line)) - } - } - - return result -} diff --git a/vendor/github.com/hashicorp/vault/helper/jsonutil/json.go b/vendor/github.com/hashicorp/vault/helper/jsonutil/json.go deleted file mode 100644 index d03ddef5..00000000 --- a/vendor/github.com/hashicorp/vault/helper/jsonutil/json.go +++ /dev/null @@ -1,100 +0,0 @@ -package jsonutil - -import ( - "bytes" - "compress/gzip" - "encoding/json" - "fmt" - "io" - - "github.com/hashicorp/errwrap" - "github.com/hashicorp/vault/helper/compressutil" -) - -// Encodes/Marshals the given object into JSON -func EncodeJSON(in interface{}) ([]byte, error) { - if in == nil { - return nil, fmt.Errorf("input for encoding is nil") - } - var buf bytes.Buffer - enc := json.NewEncoder(&buf) - if err := enc.Encode(in); err != nil { - return nil, err - } - return buf.Bytes(), nil -} - -// EncodeJSONAndCompress encodes the given input into JSON and compresses the -// encoded value (using Gzip format BestCompression level, by default). A -// canary byte is placed at the beginning of the returned bytes for the logic -// in decompression method to identify compressed input. -func EncodeJSONAndCompress(in interface{}, config *compressutil.CompressionConfig) ([]byte, error) { - if in == nil { - return nil, fmt.Errorf("input for encoding is nil") - } - - // First JSON encode the given input - encodedBytes, err := EncodeJSON(in) - if err != nil { - return nil, err - } - - if config == nil { - config = &compressutil.CompressionConfig{ - Type: compressutil.CompressionTypeGzip, - GzipCompressionLevel: gzip.BestCompression, - } - } - - return compressutil.Compress(encodedBytes, config) -} - -// DecodeJSON tries to decompress the given data. The call to decompress, fails -// if the content was not compressed in the first place, which is identified by -// a canary byte before the compressed data. If the data is not compressed, it -// is JSON decoded directly. Otherwise the decompressed data will be JSON -// decoded. -func DecodeJSON(data []byte, out interface{}) error { - if data == nil || len(data) == 0 { - return fmt.Errorf("'data' being decoded is nil") - } - if out == nil { - return fmt.Errorf("output parameter 'out' is nil") - } - - // Decompress the data if it was compressed in the first place - decompressedBytes, uncompressed, err := compressutil.Decompress(data) - if err != nil { - return errwrap.Wrapf("failed to decompress JSON: {{err}}", err) - } - if !uncompressed && (decompressedBytes == nil || len(decompressedBytes) == 0) { - return fmt.Errorf("decompressed data being decoded is invalid") - } - - // If the input supplied failed to contain the compression canary, it - // will be notified by the compression utility. Decode the decompressed - // input. - if !uncompressed { - data = decompressedBytes - } - - return DecodeJSONFromReader(bytes.NewReader(data), out) -} - -// Decodes/Unmarshals the given io.Reader pointing to a JSON, into a desired object -func DecodeJSONFromReader(r io.Reader, out interface{}) error { - if r == nil { - return fmt.Errorf("'io.Reader' being decoded is nil") - } - if out == nil { - return fmt.Errorf("output parameter 'out' is nil") - } - - dec := json.NewDecoder(r) - - // While decoding JSON values, interpret the integer values as `json.Number`s instead of `float64`. - dec.UseNumber() - - // Since 'out' is an interface representing a pointer, pass it to the decoder without an '&' - return dec.Decode(out) -} diff --git a/vendor/github.com/hashicorp/vault/helper/parseutil/parseutil.go b/vendor/github.com/hashicorp/vault/helper/parseutil/parseutil.go deleted file mode 100644 index 8ce5eae4..00000000 --- a/vendor/github.com/hashicorp/vault/helper/parseutil/parseutil.go +++ /dev/null @@ -1,167 +0,0 @@ -package parseutil - -import ( - "encoding/json" - "errors" - "fmt" - "strconv" - "strings" - "time" - - "github.com/hashicorp/errwrap" - sockaddr "github.com/hashicorp/go-sockaddr" - "github.com/hashicorp/vault/helper/strutil" - "github.com/mitchellh/mapstructure" -) - -func ParseDurationSecond(in interface{}) (time.Duration, error) { - var dur time.Duration - jsonIn, ok := in.(json.Number) - if ok { - in = jsonIn.String() - } - switch in.(type) { - case string: - inp := in.(string) - if inp == "" { - return time.Duration(0), nil - } - var err error - // Look for a suffix otherwise its a plain second value - if strings.HasSuffix(inp, "s") || strings.HasSuffix(inp, "m") || strings.HasSuffix(inp, "h") || strings.HasSuffix(inp, "ms") { - dur, err = time.ParseDuration(inp) - if err != nil { - return dur, err - } - } else { - // Plain integer - secs, err := strconv.ParseInt(inp, 10, 64) - if err != nil { - return dur, err - } - dur = time.Duration(secs) * time.Second - } - case int: - dur = time.Duration(in.(int)) * time.Second - case int32: - dur = time.Duration(in.(int32)) * time.Second - case int64: - dur = time.Duration(in.(int64)) * time.Second - case uint: - dur = time.Duration(in.(uint)) * time.Second - case uint32: - dur = time.Duration(in.(uint32)) * time.Second - case uint64: - dur = time.Duration(in.(uint64)) * time.Second - default: - return 0, errors.New("could not parse duration from input") - } - - return dur, nil -} - -func ParseInt(in interface{}) (int64, error) { - var ret int64 - jsonIn, ok := in.(json.Number) - if ok { - in = jsonIn.String() - } - switch in.(type) { - case string: - inp := in.(string) - if inp == "" { - return 0, nil - } - var err error - left, err := strconv.ParseInt(inp, 10, 64) - if err != nil { - return ret, err - } - ret = left - case int: - ret = int64(in.(int)) - case int32: - ret = int64(in.(int32)) - case int64: - ret = in.(int64) - case uint: - ret = int64(in.(uint)) - case uint32: - ret = int64(in.(uint32)) - case uint64: - ret = int64(in.(uint64)) - default: - return 0, errors.New("could not parse value from input") - } - - return ret, nil -} - -func ParseBool(in interface{}) (bool, error) { - var result bool - if err := mapstructure.WeakDecode(in, &result); err != nil { - return false, err - } - return result, nil -} - -func ParseCommaStringSlice(in interface{}) ([]string, error) { - rawString, ok := in.(string) - if ok && rawString == "" { - return []string{}, nil - } - var result []string - config := &mapstructure.DecoderConfig{ - Result: &result, - WeaklyTypedInput: true, - DecodeHook: mapstructure.StringToSliceHookFunc(","), - } - decoder, err := mapstructure.NewDecoder(config) - if err != nil { - return nil, err - } - if err := decoder.Decode(in); err != nil { - return nil, err - } - return strutil.TrimStrings(result), nil -} - -func ParseAddrs(addrs interface{}) ([]*sockaddr.SockAddrMarshaler, error) { - out := make([]*sockaddr.SockAddrMarshaler, 0) - stringAddrs := make([]string, 0) - - switch addrs.(type) { - case string: - stringAddrs = strutil.ParseArbitraryStringSlice(addrs.(string), ",") - if len(stringAddrs) == 0 { - return nil, fmt.Errorf("unable to parse addresses from %v", addrs) - } - - case []string: - stringAddrs = addrs.([]string) - - case []interface{}: - for _, v := range addrs.([]interface{}) { - stringAddr, ok := v.(string) - if !ok { - return nil, fmt.Errorf("error parsing %v as string", v) - } - stringAddrs = append(stringAddrs, stringAddr) - } - - default: - return nil, fmt.Errorf("unknown address input type %T", addrs) - } - - for _, addr := range stringAddrs { - sa, err := sockaddr.NewSockAddr(addr) - if err != nil { - return nil, errwrap.Wrapf(fmt.Sprintf("error parsing address %q: {{err}}", addr), err) - } - out = append(out, &sockaddr.SockAddrMarshaler{ - SockAddr: sa, - }) - } - - return out, nil -} diff --git a/vendor/github.com/hashicorp/vault/helper/strutil/strutil.go b/vendor/github.com/hashicorp/vault/helper/strutil/strutil.go deleted file mode 100644 index 3b54b720..00000000 --- a/vendor/github.com/hashicorp/vault/helper/strutil/strutil.go +++ /dev/null @@ -1,425 +0,0 @@ -package strutil - -import ( - "encoding/base64" - "encoding/json" - "fmt" - "sort" - "strings" - - "github.com/hashicorp/errwrap" - glob "github.com/ryanuber/go-glob" -) - -// StrListContainsGlob looks for a string in a list of strings and allows -// globs. -func StrListContainsGlob(haystack []string, needle string) bool { - for _, item := range haystack { - if glob.Glob(item, needle) { - return true - } - } - return false -} - -// StrListContains looks for a string in a list of strings. -func StrListContains(haystack []string, needle string) bool { - for _, item := range haystack { - if item == needle { - return true - } - } - return false -} - -// StrListSubset checks if a given list is a subset -// of another set -func StrListSubset(super, sub []string) bool { - for _, item := range sub { - if !StrListContains(super, item) { - return false - } - } - return true -} - -// ParseDedupAndSortStrings parses a comma separated list of strings -// into a slice of strings. The return slice will be sorted and will -// not contain duplicate or empty items. -func ParseDedupAndSortStrings(input string, sep string) []string { - input = strings.TrimSpace(input) - parsed := []string{} - if input == "" { - // Don't return nil - return parsed - } - return RemoveDuplicates(strings.Split(input, sep), false) -} - -// ParseDedupLowercaseAndSortStrings parses a comma separated list of -// strings into a slice of strings. The return slice will be sorted and -// will not contain duplicate or empty items. The values will be converted -// to lower case. -func ParseDedupLowercaseAndSortStrings(input string, sep string) []string { - input = strings.TrimSpace(input) - parsed := []string{} - if input == "" { - // Don't return nil - return parsed - } - return RemoveDuplicates(strings.Split(input, sep), true) -} - -// ParseKeyValues parses a comma separated list of `=` tuples -// into a map[string]string. -func ParseKeyValues(input string, out map[string]string, sep string) error { - if out == nil { - return fmt.Errorf("'out is nil") - } - - keyValues := ParseDedupLowercaseAndSortStrings(input, sep) - if len(keyValues) == 0 { - return nil - } - - for _, keyValue := range keyValues { - shards := strings.Split(keyValue, "=") - if len(shards) != 2 { - return fmt.Errorf("invalid format") - } - - key := strings.TrimSpace(shards[0]) - value := strings.TrimSpace(shards[1]) - if key == "" || value == "" { - return fmt.Errorf("invalid pair: key: %q value: %q", key, value) - } - out[key] = value - } - return nil -} - -// ParseArbitraryKeyValues parses arbitrary tuples. The input -// can be one of the following: -// * JSON string -// * Base64 encoded JSON string -// * Comma separated list of `=` pairs -// * Base64 encoded string containing comma separated list of -// `=` pairs -// -// Input will be parsed into the output parameter, which should -// be a non-nil map[string]string. -func ParseArbitraryKeyValues(input string, out map[string]string, sep string) error { - input = strings.TrimSpace(input) - if input == "" { - return nil - } - if out == nil { - return fmt.Errorf("'out' is nil") - } - - // Try to base64 decode the input. If successful, consider the decoded - // value as input. - inputBytes, err := base64.StdEncoding.DecodeString(input) - if err == nil { - input = string(inputBytes) - } - - // Try to JSON unmarshal the input. If successful, consider that the - // metadata was supplied as JSON input. - err = json.Unmarshal([]byte(input), &out) - if err != nil { - // If JSON unmarshalling fails, consider that the input was - // supplied as a comma separated string of 'key=value' pairs. - if err = ParseKeyValues(input, out, sep); err != nil { - return errwrap.Wrapf("failed to parse the input: {{err}}", err) - } - } - - // Validate the parsed input - for key, value := range out { - if key != "" && value == "" { - return fmt.Errorf("invalid value for key %q", key) - } - } - - return nil -} - -// ParseStringSlice parses a `sep`-separated list of strings into a -// []string with surrounding whitespace removed. -// -// The output will always be a valid slice but may be of length zero. -func ParseStringSlice(input string, sep string) []string { - input = strings.TrimSpace(input) - if input == "" { - return []string{} - } - - splitStr := strings.Split(input, sep) - ret := make([]string, len(splitStr)) - for i, val := range splitStr { - ret[i] = strings.TrimSpace(val) - } - - return ret -} - -// ParseArbitraryStringSlice parses arbitrary string slice. The input -// can be one of the following: -// * JSON string -// * Base64 encoded JSON string -// * `sep` separated list of values -// * Base64-encoded string containing a `sep` separated list of values -// -// Note that the separator is ignored if the input is found to already be in a -// structured format (e.g., JSON) -// -// The output will always be a valid slice but may be of length zero. -func ParseArbitraryStringSlice(input string, sep string) []string { - input = strings.TrimSpace(input) - if input == "" { - return []string{} - } - - // Try to base64 decode the input. If successful, consider the decoded - // value as input. - inputBytes, err := base64.StdEncoding.DecodeString(input) - if err == nil { - input = string(inputBytes) - } - - ret := []string{} - - // Try to JSON unmarshal the input. If successful, consider that the - // metadata was supplied as JSON input. - err = json.Unmarshal([]byte(input), &ret) - if err != nil { - // If JSON unmarshalling fails, consider that the input was - // supplied as a separated string of values. - return ParseStringSlice(input, sep) - } - - if ret == nil { - return []string{} - } - - return ret -} - -// TrimStrings takes a slice of strings and returns a slice of strings -// with trimmed spaces -func TrimStrings(items []string) []string { - ret := make([]string, len(items)) - for i, item := range items { - ret[i] = strings.TrimSpace(item) - } - return ret -} - -// RemoveDuplicates removes duplicate and empty elements from a slice of -// strings. This also may convert the items in the slice to lower case and -// returns a sorted slice. -func RemoveDuplicates(items []string, lowercase bool) []string { - itemsMap := map[string]bool{} - for _, item := range items { - item = strings.TrimSpace(item) - if lowercase { - item = strings.ToLower(item) - } - if item == "" { - continue - } - itemsMap[item] = true - } - items = make([]string, 0, len(itemsMap)) - for item := range itemsMap { - items = append(items, item) - } - sort.Strings(items) - return items -} - -// RemoveEmpty removes empty elements from a slice of -// strings -func RemoveEmpty(items []string) []string { - if len(items) == 0 { - return items - } - itemsSlice := make([]string, 0, len(items)) - for _, item := range items { - if item == "" { - continue - } - itemsSlice = append(itemsSlice, item) - } - return itemsSlice -} - -// EquivalentSlices checks whether the given string sets are equivalent, as in, -// they contain the same values. -func EquivalentSlices(a, b []string) bool { - if a == nil && b == nil { - return true - } - - if a == nil || b == nil { - return false - } - - // First we'll build maps to ensure unique values - mapA := map[string]bool{} - mapB := map[string]bool{} - for _, keyA := range a { - mapA[keyA] = true - } - for _, keyB := range b { - mapB[keyB] = true - } - - // Now we'll build our checking slices - var sortedA, sortedB []string - for keyA := range mapA { - sortedA = append(sortedA, keyA) - } - for keyB := range mapB { - sortedB = append(sortedB, keyB) - } - sort.Strings(sortedA) - sort.Strings(sortedB) - - // Finally, compare - if len(sortedA) != len(sortedB) { - return false - } - - for i := range sortedA { - if sortedA[i] != sortedB[i] { - return false - } - } - - return true -} - -// EqualStringMaps tests whether two map[string]string objects are equal. -// Equal means both maps have the same sets of keys and values. This function -// is 6-10x faster than a call to reflect.DeepEqual(). -func EqualStringMaps(a, b map[string]string) bool { - if len(a) != len(b) { - return false - } - - for k := range a { - v, ok := b[k] - if !ok || a[k] != v { - return false - } - } - - return true -} - -// StrListDelete removes the first occurrence of the given item from the slice -// of strings if the item exists. -func StrListDelete(s []string, d string) []string { - if s == nil { - return s - } - - for index, element := range s { - if element == d { - return append(s[:index], s[index+1:]...) - } - } - - return s -} - -// GlobbedStringsMatch compares item to val with support for a leading and/or -// trailing wildcard '*' in item. -func GlobbedStringsMatch(item, val string) bool { - if len(item) < 2 { - return val == item - } - - hasPrefix := strings.HasPrefix(item, "*") - hasSuffix := strings.HasSuffix(item, "*") - - if hasPrefix && hasSuffix { - return strings.Contains(val, item[1:len(item)-1]) - } else if hasPrefix { - return strings.HasSuffix(val, item[1:]) - } else if hasSuffix { - return strings.HasPrefix(val, item[:len(item)-1]) - } - - return val == item -} - -// AppendIfMissing adds a string to a slice if the given string is not present -func AppendIfMissing(slice []string, i string) []string { - if StrListContains(slice, i) { - return slice - } - return append(slice, i) -} - -// MergeSlices adds an arbitrary number of slices together, uniquely -func MergeSlices(args ...[]string) []string { - all := map[string]struct{}{} - for _, slice := range args { - for _, v := range slice { - all[v] = struct{}{} - } - } - - result := make([]string, 0, len(all)) - for k := range all { - result = append(result, k) - } - sort.Strings(result) - return result -} - -// Difference returns the set difference (A - B) of the two given slices. The -// result will also remove any duplicated values in set A regardless of whether -// that matches any values in set B. -func Difference(a, b []string, lowercase bool) []string { - if len(a) == 0 { - return a - } - if len(b) == 0 { - if !lowercase { - return a - } - newA := make([]string, len(a)) - for i, v := range a { - newA[i] = strings.ToLower(v) - } - return newA - } - - a = RemoveDuplicates(a, lowercase) - b = RemoveDuplicates(b, lowercase) - - itemsMap := map[string]bool{} - for _, aVal := range a { - itemsMap[aVal] = true - } - - // Perform difference calculation - for _, bVal := range b { - if _, ok := itemsMap[bVal]; ok { - itemsMap[bVal] = false - } - } - - items := []string{} - for item, exists := range itemsMap { - if exists { - items = append(items, item) - } - } - sort.Strings(items) - return items -} diff --git a/vendor/github.com/hashicorp/vault/sdk/LICENSE b/vendor/github.com/hashicorp/vault/sdk/LICENSE new file mode 100644 index 00000000..e87a115e --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/LICENSE @@ -0,0 +1,363 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. + diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/compressutil/compress.go b/vendor/github.com/hashicorp/vault/sdk/helper/compressutil/compress.go new file mode 100644 index 00000000..356d4548 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/compressutil/compress.go @@ -0,0 +1,207 @@ +package compressutil + +import ( + "bytes" + "compress/gzip" + "compress/lzw" + "fmt" + "io" + + "github.com/golang/snappy" + "github.com/hashicorp/errwrap" + "github.com/pierrec/lz4" +) + +const ( + // A byte value used as a canary prefix for the compressed information + // which is used to distinguish if a JSON input is compressed or not. + // The value of this constant should not be a first character of any + // valid JSON string. + + CompressionTypeGzip = "gzip" + CompressionCanaryGzip byte = 'G' + + CompressionTypeLZW = "lzw" + CompressionCanaryLZW byte = 'L' + + CompressionTypeSnappy = "snappy" + CompressionCanarySnappy byte = 'S' + + CompressionTypeLZ4 = "lz4" + CompressionCanaryLZ4 byte = '4' +) + +// SnappyReadCloser embeds the snappy reader which implements the io.Reader +// interface. The decompress procedure in this utility expects an +// io.ReadCloser. This type implements the io.Closer interface to retain the +// generic way of decompression. +type CompressUtilReadCloser struct { + io.Reader +} + +// Close is a noop method implemented only to satisfy the io.Closer interface +func (c *CompressUtilReadCloser) Close() error { + return nil +} + +// CompressionConfig is used to select a compression type to be performed by +// Compress and Decompress utilities. +// Supported types are: +// * CompressionTypeLZW +// * CompressionTypeGzip +// * CompressionTypeSnappy +// * CompressionTypeLZ4 +// +// When using CompressionTypeGzip, the compression levels can also be chosen: +// * gzip.DefaultCompression +// * gzip.BestSpeed +// * gzip.BestCompression +type CompressionConfig struct { + // Type of the compression algorithm to be used + Type string + + // When using Gzip format, the compression level to employ + GzipCompressionLevel int +} + +// Compress places the canary byte in a buffer and uses the same buffer to fill +// in the compressed information of the given input. The configuration supports +// two type of compression: LZW and Gzip. When using Gzip compression format, +// if GzipCompressionLevel is not specified, the 'gzip.DefaultCompression' will +// be assumed. +func Compress(data []byte, config *CompressionConfig) ([]byte, error) { + var buf bytes.Buffer + var writer io.WriteCloser + var err error + + if config == nil { + return nil, fmt.Errorf("config is nil") + } + + // Write the canary into the buffer and create writer to compress the + // input data based on the configured type + switch config.Type { + case CompressionTypeLZW: + buf.Write([]byte{CompressionCanaryLZW}) + writer = lzw.NewWriter(&buf, lzw.LSB, 8) + + case CompressionTypeGzip: + buf.Write([]byte{CompressionCanaryGzip}) + + switch { + case config.GzipCompressionLevel == gzip.BestCompression, + config.GzipCompressionLevel == gzip.BestSpeed, + config.GzipCompressionLevel == gzip.DefaultCompression: + // These are valid compression levels + default: + // If compression level is set to NoCompression or to + // any invalid value, fallback to Defaultcompression + config.GzipCompressionLevel = gzip.DefaultCompression + } + writer, err = gzip.NewWriterLevel(&buf, config.GzipCompressionLevel) + + case CompressionTypeSnappy: + buf.Write([]byte{CompressionCanarySnappy}) + writer = snappy.NewBufferedWriter(&buf) + + case CompressionTypeLZ4: + buf.Write([]byte{CompressionCanaryLZ4}) + writer = lz4.NewWriter(&buf) + + default: + return nil, fmt.Errorf("unsupported compression type") + } + + if err != nil { + return nil, errwrap.Wrapf("failed to create a compression writer: {{err}}", err) + } + + if writer == nil { + return nil, fmt.Errorf("failed to create a compression writer") + } + + // Compress the input and place it in the same buffer containing the + // canary byte. + if _, err = writer.Write(data); err != nil { + return nil, errwrap.Wrapf("failed to compress input data: err: {{err}}", err) + } + + // Close the io.WriteCloser + if err = writer.Close(); err != nil { + return nil, err + } + + // Return the compressed bytes with canary byte at the start + return buf.Bytes(), nil +} + +// Decompress checks if the first byte in the input matches the canary byte. +// If the first byte is a canary byte, then the input past the canary byte +// will be decompressed using the method specified in the given configuration. +// If the first byte isn't a canary byte, then the utility returns a boolean +// value indicating that the input was not compressed. +func Decompress(data []byte) ([]byte, bool, error) { + var err error + var reader io.ReadCloser + if data == nil || len(data) == 0 { + return nil, false, fmt.Errorf("'data' being decompressed is empty") + } + + canary := data[0] + cData := data[1:] + + switch canary { + // If the first byte matches the canary byte, remove the canary + // byte and try to decompress the data that is after the canary. + case CompressionCanaryGzip: + if len(data) < 2 { + return nil, false, fmt.Errorf("invalid 'data' after the canary") + } + reader, err = gzip.NewReader(bytes.NewReader(cData)) + + case CompressionCanaryLZW: + if len(data) < 2 { + return nil, false, fmt.Errorf("invalid 'data' after the canary") + } + reader = lzw.NewReader(bytes.NewReader(cData), lzw.LSB, 8) + + case CompressionCanarySnappy: + if len(data) < 2 { + return nil, false, fmt.Errorf("invalid 'data' after the canary") + } + reader = &CompressUtilReadCloser{ + Reader: snappy.NewReader(bytes.NewReader(cData)), + } + + case CompressionCanaryLZ4: + if len(data) < 2 { + return nil, false, fmt.Errorf("invalid 'data' after the canary") + } + reader = &CompressUtilReadCloser{ + Reader: lz4.NewReader(bytes.NewReader(cData)), + } + + default: + // If the first byte doesn't match the canary byte, it means + // that the content was not compressed at all. Indicate the + // caller that the input was not compressed. + return nil, true, nil + } + if err != nil { + return nil, false, errwrap.Wrapf("failed to create a compression reader: {{err}}", err) + } + if reader == nil { + return nil, false, fmt.Errorf("failed to create a compression reader") + } + + // Close the io.ReadCloser + defer reader.Close() + + // Read all the compressed data into a buffer + var buf bytes.Buffer + if _, err = io.Copy(&buf, reader); err != nil { + return nil, false, err + } + + return buf.Bytes(), false, nil +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/consts/agent.go b/vendor/github.com/hashicorp/vault/sdk/helper/consts/agent.go new file mode 100644 index 00000000..b62962e3 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/consts/agent.go @@ -0,0 +1,5 @@ +package consts + +// AgentPathCacheClear is the path that the agent will use as its cache-clear +// endpoint. +const AgentPathCacheClear = "/agent/v1/cache-clear" diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/consts/consts.go b/vendor/github.com/hashicorp/vault/sdk/helper/consts/consts.go new file mode 100644 index 00000000..769a7858 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/consts/consts.go @@ -0,0 +1,28 @@ +package consts + +const ( + // ExpirationRestoreWorkerCount specifies the number of workers to use while + // restoring leases into the expiration manager + ExpirationRestoreWorkerCount = 64 + + // NamespaceHeaderName is the header set to specify which namespace the + // request is indented for. + NamespaceHeaderName = "X-Vault-Namespace" + + // AuthHeaderName is the name of the header containing the token. + AuthHeaderName = "X-Vault-Token" + + // PerformanceReplicationALPN is the negotiated protocol used for + // performance replication. + PerformanceReplicationALPN = "replication_v1" + + // DRReplicationALPN is the negotiated protocol used for + // dr replication. + DRReplicationALPN = "replication_dr_v1" + + PerfStandbyALPN = "perf_standby_v1" + + RequestForwardingALPN = "req_fw_sb-act_v1" + + RaftStorageALPN = "raft_storage_v1" +) diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/consts/error.go b/vendor/github.com/hashicorp/vault/sdk/helper/consts/error.go new file mode 100644 index 00000000..d4e60e54 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/consts/error.go @@ -0,0 +1,21 @@ +package consts + +import "errors" + +var ( + // ErrSealed is returned if an operation is performed on a sealed barrier. + // No operation is expected to succeed before unsealing + ErrSealed = errors.New("Vault is sealed") + + // ErrStandby is returned if an operation is performed on a standby Vault. + // No operation is expected to succeed until active. + ErrStandby = errors.New("Vault is in standby mode") + + // ErrPathContainsParentReferences is returned when a path contains parent + // references. + ErrPathContainsParentReferences = errors.New("path cannot contain parent references") + + // ErrInvalidWrappingToken is returned when checking for the validity of + // a wrapping token that turns out to be invalid. + ErrInvalidWrappingToken = errors.New("wrapping token is not valid or does not exist") +) diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/consts/plugin_types.go b/vendor/github.com/hashicorp/vault/sdk/helper/consts/plugin_types.go new file mode 100644 index 00000000..e0a00e48 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/consts/plugin_types.go @@ -0,0 +1,59 @@ +package consts + +import "fmt" + +var PluginTypes = []PluginType{ + PluginTypeUnknown, + PluginTypeCredential, + PluginTypeDatabase, + PluginTypeSecrets, +} + +type PluginType uint32 + +// This is a list of PluginTypes used by Vault. +// If we need to add any in the future, it would +// be best to add them to the _end_ of the list below +// because they resolve to incrementing numbers, +// which may be saved in state somewhere. Thus if +// the name for one of those numbers changed because +// a value were added to the middle, that could cause +// the wrong plugin types to be read from storage +// for a given underlying number. Example of the problem +// here: https://play.golang.org/p/YAaPw5ww3er +const ( + PluginTypeUnknown PluginType = iota + PluginTypeCredential + PluginTypeDatabase + PluginTypeSecrets +) + +func (p PluginType) String() string { + switch p { + case PluginTypeUnknown: + return "unknown" + case PluginTypeCredential: + return "auth" + case PluginTypeDatabase: + return "database" + case PluginTypeSecrets: + return "secret" + default: + return "unsupported" + } +} + +func ParsePluginType(pluginType string) (PluginType, error) { + switch pluginType { + case "unknown": + return PluginTypeUnknown, nil + case "auth": + return PluginTypeCredential, nil + case "database": + return PluginTypeDatabase, nil + case "secret": + return PluginTypeSecrets, nil + default: + return PluginTypeUnknown, fmt.Errorf("%q is not a supported plugin type", pluginType) + } +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/consts/replication.go b/vendor/github.com/hashicorp/vault/sdk/helper/consts/replication.go new file mode 100644 index 00000000..f3cafe75 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/consts/replication.go @@ -0,0 +1,150 @@ +package consts + +import "time" + +const ( + //N.B. This needs to be excluded from replication despite the name; it's + //merely saying that this is cluster information for the replicated + //cluster. + CoreReplicatedClusterPrefix = "core/cluster/replicated/" + CoreReplicatedClusterPrefixDR = "core/cluster/replicated-dr/" + + CoreReplicatedClusterInfoPath = CoreReplicatedClusterPrefix + "info" + CoreReplicatedClusterSecondariesPrefix = CoreReplicatedClusterPrefix + "secondaries/" + CoreReplicatedClusterInfoPathDR = CoreReplicatedClusterPrefixDR + "info" + CoreReplicatedClusterSecondariesPrefixDR = CoreReplicatedClusterPrefixDR + "secondaries/" + + // This is an identifier for the current secondary in the replicated paths + // manager. It should contain a character that is not allowed in secondary + // ids to ensure it doesn't collide. + CurrentReplicatedSecondaryIdentifier = ".current" +) + +type ReplicationState uint32 + +var ReplicationStaleReadTimeout = 2 * time.Second + +const ( + _ ReplicationState = iota + OldReplicationPrimary + OldReplicationSecondary + OldReplicationBootstrapping + // Don't add anything here. Adding anything to this Old block would cause + // the rest of the values to change below. This was done originally to + // ensure no overlap between old and new values. + + ReplicationUnknown ReplicationState = 0 + ReplicationPerformancePrimary ReplicationState = 1 << iota // Note -- iota is 5 here! + ReplicationPerformanceSecondary + OldSplitReplicationBootstrapping + ReplicationDRPrimary + ReplicationDRSecondary + ReplicationPerformanceBootstrapping + ReplicationDRBootstrapping + ReplicationPerformanceDisabled + ReplicationDRDisabled + ReplicationPerformanceStandby +) + +// We verify no change to the above values are made +func init() { + + if OldReplicationBootstrapping != 3 { + panic("Replication Constants have changed") + } + + if ReplicationPerformancePrimary != 1<<5 { + panic("Replication Constants have changed") + } +} + +func (r ReplicationState) string() string { + switch r { + case ReplicationPerformanceSecondary: + return "secondary" + case ReplicationPerformancePrimary: + return "primary" + case ReplicationPerformanceBootstrapping: + return "bootstrapping" + case ReplicationPerformanceDisabled: + return "disabled" + case ReplicationDRPrimary: + return "primary" + case ReplicationDRSecondary: + return "secondary" + case ReplicationDRBootstrapping: + return "bootstrapping" + case ReplicationDRDisabled: + return "disabled" + } + + return "unknown" +} + +func (r ReplicationState) StateStrings() []string { + var ret []string + if r.HasState(ReplicationPerformanceSecondary) { + ret = append(ret, "perf-secondary") + } + if r.HasState(ReplicationPerformancePrimary) { + ret = append(ret, "perf-primary") + } + if r.HasState(ReplicationPerformanceBootstrapping) { + ret = append(ret, "perf-bootstrapping") + } + if r.HasState(ReplicationPerformanceDisabled) { + ret = append(ret, "perf-disabled") + } + if r.HasState(ReplicationDRPrimary) { + ret = append(ret, "dr-primary") + } + if r.HasState(ReplicationDRSecondary) { + ret = append(ret, "dr-secondary") + } + if r.HasState(ReplicationDRBootstrapping) { + ret = append(ret, "dr-bootstrapping") + } + if r.HasState(ReplicationDRDisabled) { + ret = append(ret, "dr-disabled") + } + if r.HasState(ReplicationPerformanceStandby) { + ret = append(ret, "perfstandby") + } + + return ret +} + +func (r ReplicationState) GetDRString() string { + switch { + case r.HasState(ReplicationDRBootstrapping): + return ReplicationDRBootstrapping.string() + case r.HasState(ReplicationDRPrimary): + return ReplicationDRPrimary.string() + case r.HasState(ReplicationDRSecondary): + return ReplicationDRSecondary.string() + case r.HasState(ReplicationDRDisabled): + return ReplicationDRDisabled.string() + default: + return "unknown" + } +} + +func (r ReplicationState) GetPerformanceString() string { + switch { + case r.HasState(ReplicationPerformanceBootstrapping): + return ReplicationPerformanceBootstrapping.string() + case r.HasState(ReplicationPerformancePrimary): + return ReplicationPerformancePrimary.string() + case r.HasState(ReplicationPerformanceSecondary): + return ReplicationPerformanceSecondary.string() + case r.HasState(ReplicationPerformanceDisabled): + return ReplicationPerformanceDisabled.string() + default: + return "unknown" + } +} + +func (r ReplicationState) HasState(flag ReplicationState) bool { return r&flag != 0 } +func (r *ReplicationState) AddState(flag ReplicationState) { *r |= flag } +func (r *ReplicationState) ClearState(flag ReplicationState) { *r &= ^flag } +func (r *ReplicationState) ToggleState(flag ReplicationState) { *r ^= flag } diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/hclutil/hcl.go b/vendor/github.com/hashicorp/vault/sdk/helper/hclutil/hcl.go new file mode 100644 index 00000000..0b120367 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/hclutil/hcl.go @@ -0,0 +1,36 @@ +package hclutil + +import ( + "fmt" + + multierror "github.com/hashicorp/go-multierror" + "github.com/hashicorp/hcl/hcl/ast" +) + +// CheckHCLKeys checks whether the keys in the AST list contains any of the valid keys provided. +func CheckHCLKeys(node ast.Node, valid []string) error { + var list *ast.ObjectList + switch n := node.(type) { + case *ast.ObjectList: + list = n + case *ast.ObjectType: + list = n.List + default: + return fmt.Errorf("cannot check HCL keys of type %T", n) + } + + validMap := make(map[string]struct{}, len(valid)) + for _, v := range valid { + validMap[v] = struct{}{} + } + + var result error + for _, item := range list.Items { + key := item.Keys[0].Token.Value().(string) + if _, ok := validMap[key]; !ok { + result = multierror.Append(result, fmt.Errorf("invalid key %q on line %d", key, item.Assign.Line)) + } + } + + return result +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/jsonutil/json.go b/vendor/github.com/hashicorp/vault/sdk/helper/jsonutil/json.go new file mode 100644 index 00000000..c03a4f8c --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/jsonutil/json.go @@ -0,0 +1,100 @@ +package jsonutil + +import ( + "bytes" + "compress/gzip" + "encoding/json" + "fmt" + "io" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/vault/sdk/helper/compressutil" +) + +// Encodes/Marshals the given object into JSON +func EncodeJSON(in interface{}) ([]byte, error) { + if in == nil { + return nil, fmt.Errorf("input for encoding is nil") + } + var buf bytes.Buffer + enc := json.NewEncoder(&buf) + if err := enc.Encode(in); err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +// EncodeJSONAndCompress encodes the given input into JSON and compresses the +// encoded value (using Gzip format BestCompression level, by default). A +// canary byte is placed at the beginning of the returned bytes for the logic +// in decompression method to identify compressed input. +func EncodeJSONAndCompress(in interface{}, config *compressutil.CompressionConfig) ([]byte, error) { + if in == nil { + return nil, fmt.Errorf("input for encoding is nil") + } + + // First JSON encode the given input + encodedBytes, err := EncodeJSON(in) + if err != nil { + return nil, err + } + + if config == nil { + config = &compressutil.CompressionConfig{ + Type: compressutil.CompressionTypeGzip, + GzipCompressionLevel: gzip.BestCompression, + } + } + + return compressutil.Compress(encodedBytes, config) +} + +// DecodeJSON tries to decompress the given data. The call to decompress, fails +// if the content was not compressed in the first place, which is identified by +// a canary byte before the compressed data. If the data is not compressed, it +// is JSON decoded directly. Otherwise the decompressed data will be JSON +// decoded. +func DecodeJSON(data []byte, out interface{}) error { + if data == nil || len(data) == 0 { + return fmt.Errorf("'data' being decoded is nil") + } + if out == nil { + return fmt.Errorf("output parameter 'out' is nil") + } + + // Decompress the data if it was compressed in the first place + decompressedBytes, uncompressed, err := compressutil.Decompress(data) + if err != nil { + return errwrap.Wrapf("failed to decompress JSON: {{err}}", err) + } + if !uncompressed && (decompressedBytes == nil || len(decompressedBytes) == 0) { + return fmt.Errorf("decompressed data being decoded is invalid") + } + + // If the input supplied failed to contain the compression canary, it + // will be notified by the compression utility. Decode the decompressed + // input. + if !uncompressed { + data = decompressedBytes + } + + return DecodeJSONFromReader(bytes.NewReader(data), out) +} + +// Decodes/Unmarshals the given io.Reader pointing to a JSON, into a desired object +func DecodeJSONFromReader(r io.Reader, out interface{}) error { + if r == nil { + return fmt.Errorf("'io.Reader' being decoded is nil") + } + if out == nil { + return fmt.Errorf("output parameter 'out' is nil") + } + + dec := json.NewDecoder(r) + + // While decoding JSON values, interpret the integer values as `json.Number`s instead of `float64`. + dec.UseNumber() + + // Since 'out' is an interface representing a pointer, pass it to the decoder without an '&' + return dec.Decode(out) +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/parseutil/parseutil.go b/vendor/github.com/hashicorp/vault/sdk/helper/parseutil/parseutil.go new file mode 100644 index 00000000..ea8289b4 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/parseutil/parseutil.go @@ -0,0 +1,174 @@ +package parseutil + +import ( + "encoding/json" + "errors" + "fmt" + "strconv" + "strings" + "time" + + "github.com/hashicorp/errwrap" + sockaddr "github.com/hashicorp/go-sockaddr" + "github.com/hashicorp/vault/sdk/helper/strutil" + "github.com/mitchellh/mapstructure" +) + +func ParseDurationSecond(in interface{}) (time.Duration, error) { + var dur time.Duration + jsonIn, ok := in.(json.Number) + if ok { + in = jsonIn.String() + } + switch inp := in.(type) { + case nil: + // return default of zero + case string: + if inp == "" { + return dur, nil + } + var err error + // Look for a suffix otherwise its a plain second value + if strings.HasSuffix(inp, "s") || strings.HasSuffix(inp, "m") || strings.HasSuffix(inp, "h") || strings.HasSuffix(inp, "ms") { + dur, err = time.ParseDuration(inp) + if err != nil { + return dur, err + } + } else { + // Plain integer + secs, err := strconv.ParseInt(inp, 10, 64) + if err != nil { + return dur, err + } + dur = time.Duration(secs) * time.Second + } + case int: + dur = time.Duration(inp) * time.Second + case int32: + dur = time.Duration(inp) * time.Second + case int64: + dur = time.Duration(inp) * time.Second + case uint: + dur = time.Duration(inp) * time.Second + case uint32: + dur = time.Duration(inp) * time.Second + case uint64: + dur = time.Duration(inp) * time.Second + case float32: + dur = time.Duration(inp) * time.Second + case float64: + dur = time.Duration(inp) * time.Second + case time.Duration: + dur = inp + default: + return 0, errors.New("could not parse duration from input") + } + + return dur, nil +} + +func ParseInt(in interface{}) (int64, error) { + var ret int64 + jsonIn, ok := in.(json.Number) + if ok { + in = jsonIn.String() + } + switch in.(type) { + case string: + inp := in.(string) + if inp == "" { + return 0, nil + } + var err error + left, err := strconv.ParseInt(inp, 10, 64) + if err != nil { + return ret, err + } + ret = left + case int: + ret = int64(in.(int)) + case int32: + ret = int64(in.(int32)) + case int64: + ret = in.(int64) + case uint: + ret = int64(in.(uint)) + case uint32: + ret = int64(in.(uint32)) + case uint64: + ret = int64(in.(uint64)) + default: + return 0, errors.New("could not parse value from input") + } + + return ret, nil +} + +func ParseBool(in interface{}) (bool, error) { + var result bool + if err := mapstructure.WeakDecode(in, &result); err != nil { + return false, err + } + return result, nil +} + +func ParseCommaStringSlice(in interface{}) ([]string, error) { + rawString, ok := in.(string) + if ok && rawString == "" { + return []string{}, nil + } + var result []string + config := &mapstructure.DecoderConfig{ + Result: &result, + WeaklyTypedInput: true, + DecodeHook: mapstructure.StringToSliceHookFunc(","), + } + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return nil, err + } + if err := decoder.Decode(in); err != nil { + return nil, err + } + return strutil.TrimStrings(result), nil +} + +func ParseAddrs(addrs interface{}) ([]*sockaddr.SockAddrMarshaler, error) { + out := make([]*sockaddr.SockAddrMarshaler, 0) + stringAddrs := make([]string, 0) + + switch addrs.(type) { + case string: + stringAddrs = strutil.ParseArbitraryStringSlice(addrs.(string), ",") + if len(stringAddrs) == 0 { + return nil, fmt.Errorf("unable to parse addresses from %v", addrs) + } + + case []string: + stringAddrs = addrs.([]string) + + case []interface{}: + for _, v := range addrs.([]interface{}) { + stringAddr, ok := v.(string) + if !ok { + return nil, fmt.Errorf("error parsing %v as string", v) + } + stringAddrs = append(stringAddrs, stringAddr) + } + + default: + return nil, fmt.Errorf("unknown address input type %T", addrs) + } + + for _, addr := range stringAddrs { + sa, err := sockaddr.NewSockAddr(addr) + if err != nil { + return nil, errwrap.Wrapf(fmt.Sprintf("error parsing address %q: {{err}}", addr), err) + } + out = append(out, &sockaddr.SockAddrMarshaler{ + SockAddr: sa, + }) + } + + return out, nil +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/strutil/strutil.go b/vendor/github.com/hashicorp/vault/sdk/helper/strutil/strutil.go new file mode 100644 index 00000000..0069a137 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/strutil/strutil.go @@ -0,0 +1,447 @@ +package strutil + +import ( + "encoding/base64" + "encoding/json" + "fmt" + "sort" + "strings" + + "github.com/hashicorp/errwrap" + glob "github.com/ryanuber/go-glob" +) + +// StrListContainsGlob looks for a string in a list of strings and allows +// globs. +func StrListContainsGlob(haystack []string, needle string) bool { + for _, item := range haystack { + if glob.Glob(item, needle) { + return true + } + } + return false +} + +// StrListContains looks for a string in a list of strings. +func StrListContains(haystack []string, needle string) bool { + for _, item := range haystack { + if item == needle { + return true + } + } + return false +} + +// StrListSubset checks if a given list is a subset +// of another set +func StrListSubset(super, sub []string) bool { + for _, item := range sub { + if !StrListContains(super, item) { + return false + } + } + return true +} + +// ParseDedupAndSortStrings parses a comma separated list of strings +// into a slice of strings. The return slice will be sorted and will +// not contain duplicate or empty items. +func ParseDedupAndSortStrings(input string, sep string) []string { + input = strings.TrimSpace(input) + parsed := []string{} + if input == "" { + // Don't return nil + return parsed + } + return RemoveDuplicates(strings.Split(input, sep), false) +} + +// ParseDedupLowercaseAndSortStrings parses a comma separated list of +// strings into a slice of strings. The return slice will be sorted and +// will not contain duplicate or empty items. The values will be converted +// to lower case. +func ParseDedupLowercaseAndSortStrings(input string, sep string) []string { + input = strings.TrimSpace(input) + parsed := []string{} + if input == "" { + // Don't return nil + return parsed + } + return RemoveDuplicates(strings.Split(input, sep), true) +} + +// ParseKeyValues parses a comma separated list of `=` tuples +// into a map[string]string. +func ParseKeyValues(input string, out map[string]string, sep string) error { + if out == nil { + return fmt.Errorf("'out is nil") + } + + keyValues := ParseDedupLowercaseAndSortStrings(input, sep) + if len(keyValues) == 0 { + return nil + } + + for _, keyValue := range keyValues { + shards := strings.Split(keyValue, "=") + if len(shards) != 2 { + return fmt.Errorf("invalid format") + } + + key := strings.TrimSpace(shards[0]) + value := strings.TrimSpace(shards[1]) + if key == "" || value == "" { + return fmt.Errorf("invalid pair: key: %q value: %q", key, value) + } + out[key] = value + } + return nil +} + +// ParseArbitraryKeyValues parses arbitrary tuples. The input +// can be one of the following: +// * JSON string +// * Base64 encoded JSON string +// * Comma separated list of `=` pairs +// * Base64 encoded string containing comma separated list of +// `=` pairs +// +// Input will be parsed into the output parameter, which should +// be a non-nil map[string]string. +func ParseArbitraryKeyValues(input string, out map[string]string, sep string) error { + input = strings.TrimSpace(input) + if input == "" { + return nil + } + if out == nil { + return fmt.Errorf("'out' is nil") + } + + // Try to base64 decode the input. If successful, consider the decoded + // value as input. + inputBytes, err := base64.StdEncoding.DecodeString(input) + if err == nil { + input = string(inputBytes) + } + + // Try to JSON unmarshal the input. If successful, consider that the + // metadata was supplied as JSON input. + err = json.Unmarshal([]byte(input), &out) + if err != nil { + // If JSON unmarshalling fails, consider that the input was + // supplied as a comma separated string of 'key=value' pairs. + if err = ParseKeyValues(input, out, sep); err != nil { + return errwrap.Wrapf("failed to parse the input: {{err}}", err) + } + } + + // Validate the parsed input + for key, value := range out { + if key != "" && value == "" { + return fmt.Errorf("invalid value for key %q", key) + } + } + + return nil +} + +// ParseStringSlice parses a `sep`-separated list of strings into a +// []string with surrounding whitespace removed. +// +// The output will always be a valid slice but may be of length zero. +func ParseStringSlice(input string, sep string) []string { + input = strings.TrimSpace(input) + if input == "" { + return []string{} + } + + splitStr := strings.Split(input, sep) + ret := make([]string, len(splitStr)) + for i, val := range splitStr { + ret[i] = strings.TrimSpace(val) + } + + return ret +} + +// ParseArbitraryStringSlice parses arbitrary string slice. The input +// can be one of the following: +// * JSON string +// * Base64 encoded JSON string +// * `sep` separated list of values +// * Base64-encoded string containing a `sep` separated list of values +// +// Note that the separator is ignored if the input is found to already be in a +// structured format (e.g., JSON) +// +// The output will always be a valid slice but may be of length zero. +func ParseArbitraryStringSlice(input string, sep string) []string { + input = strings.TrimSpace(input) + if input == "" { + return []string{} + } + + // Try to base64 decode the input. If successful, consider the decoded + // value as input. + inputBytes, err := base64.StdEncoding.DecodeString(input) + if err == nil { + input = string(inputBytes) + } + + ret := []string{} + + // Try to JSON unmarshal the input. If successful, consider that the + // metadata was supplied as JSON input. + err = json.Unmarshal([]byte(input), &ret) + if err != nil { + // If JSON unmarshalling fails, consider that the input was + // supplied as a separated string of values. + return ParseStringSlice(input, sep) + } + + if ret == nil { + return []string{} + } + + return ret +} + +// TrimStrings takes a slice of strings and returns a slice of strings +// with trimmed spaces +func TrimStrings(items []string) []string { + ret := make([]string, len(items)) + for i, item := range items { + ret[i] = strings.TrimSpace(item) + } + return ret +} + +// RemoveDuplicates removes duplicate and empty elements from a slice of +// strings. This also may convert the items in the slice to lower case and +// returns a sorted slice. +func RemoveDuplicates(items []string, lowercase bool) []string { + itemsMap := map[string]bool{} + for _, item := range items { + item = strings.TrimSpace(item) + if lowercase { + item = strings.ToLower(item) + } + if item == "" { + continue + } + itemsMap[item] = true + } + items = make([]string, 0, len(itemsMap)) + for item := range itemsMap { + items = append(items, item) + } + sort.Strings(items) + return items +} + +// RemoveDuplicatesStable removes duplicate and empty elements from a slice of +// strings, preserving order (and case) of the original slice. +// In all cases, strings are compared after trimming whitespace +// If caseInsensitive, strings will be compared after ToLower() +func RemoveDuplicatesStable(items []string, caseInsensitive bool) []string { + itemsMap := make(map[string]bool, len(items)) + deduplicated := make([]string, 0, len(items)) + + for _, item := range items { + key := strings.TrimSpace(item) + if caseInsensitive { + key = strings.ToLower(key) + } + if key == "" || itemsMap[key] { + continue + } + itemsMap[key] = true + deduplicated = append(deduplicated, item) + } + return deduplicated +} + +// RemoveEmpty removes empty elements from a slice of +// strings +func RemoveEmpty(items []string) []string { + if len(items) == 0 { + return items + } + itemsSlice := make([]string, 0, len(items)) + for _, item := range items { + if item == "" { + continue + } + itemsSlice = append(itemsSlice, item) + } + return itemsSlice +} + +// EquivalentSlices checks whether the given string sets are equivalent, as in, +// they contain the same values. +func EquivalentSlices(a, b []string) bool { + if a == nil && b == nil { + return true + } + + if a == nil || b == nil { + return false + } + + // First we'll build maps to ensure unique values + mapA := map[string]bool{} + mapB := map[string]bool{} + for _, keyA := range a { + mapA[keyA] = true + } + for _, keyB := range b { + mapB[keyB] = true + } + + // Now we'll build our checking slices + var sortedA, sortedB []string + for keyA := range mapA { + sortedA = append(sortedA, keyA) + } + for keyB := range mapB { + sortedB = append(sortedB, keyB) + } + sort.Strings(sortedA) + sort.Strings(sortedB) + + // Finally, compare + if len(sortedA) != len(sortedB) { + return false + } + + for i := range sortedA { + if sortedA[i] != sortedB[i] { + return false + } + } + + return true +} + +// EqualStringMaps tests whether two map[string]string objects are equal. +// Equal means both maps have the same sets of keys and values. This function +// is 6-10x faster than a call to reflect.DeepEqual(). +func EqualStringMaps(a, b map[string]string) bool { + if len(a) != len(b) { + return false + } + + for k := range a { + v, ok := b[k] + if !ok || a[k] != v { + return false + } + } + + return true +} + +// StrListDelete removes the first occurrence of the given item from the slice +// of strings if the item exists. +func StrListDelete(s []string, d string) []string { + if s == nil { + return s + } + + for index, element := range s { + if element == d { + return append(s[:index], s[index+1:]...) + } + } + + return s +} + +// GlobbedStringsMatch compares item to val with support for a leading and/or +// trailing wildcard '*' in item. +func GlobbedStringsMatch(item, val string) bool { + if len(item) < 2 { + return val == item + } + + hasPrefix := strings.HasPrefix(item, "*") + hasSuffix := strings.HasSuffix(item, "*") + + if hasPrefix && hasSuffix { + return strings.Contains(val, item[1:len(item)-1]) + } else if hasPrefix { + return strings.HasSuffix(val, item[1:]) + } else if hasSuffix { + return strings.HasPrefix(val, item[:len(item)-1]) + } + + return val == item +} + +// AppendIfMissing adds a string to a slice if the given string is not present +func AppendIfMissing(slice []string, i string) []string { + if StrListContains(slice, i) { + return slice + } + return append(slice, i) +} + +// MergeSlices adds an arbitrary number of slices together, uniquely +func MergeSlices(args ...[]string) []string { + all := map[string]struct{}{} + for _, slice := range args { + for _, v := range slice { + all[v] = struct{}{} + } + } + + result := make([]string, 0, len(all)) + for k := range all { + result = append(result, k) + } + sort.Strings(result) + return result +} + +// Difference returns the set difference (A - B) of the two given slices. The +// result will also remove any duplicated values in set A regardless of whether +// that matches any values in set B. +func Difference(a, b []string, lowercase bool) []string { + if len(a) == 0 { + return a + } + if len(b) == 0 { + if !lowercase { + return a + } + newA := make([]string, len(a)) + for i, v := range a { + newA[i] = strings.ToLower(v) + } + return newA + } + + a = RemoveDuplicates(a, lowercase) + b = RemoveDuplicates(b, lowercase) + + itemsMap := map[string]bool{} + for _, aVal := range a { + itemsMap[aVal] = true + } + + // Perform difference calculation + for _, bVal := range b { + if _, ok := itemsMap[bVal]; ok { + itemsMap[bVal] = false + } + } + + items := []string{} + for item, exists := range itemsMap { + if exists { + items = append(items, item) + } + } + sort.Strings(items) + return items +} diff --git a/vendor/github.com/hashicorp/vault/ui/app/adapters/license.js b/vendor/github.com/hashicorp/vault/ui/app/adapters/license.js deleted file mode 100644 index c116ab16..00000000 --- a/vendor/github.com/hashicorp/vault/ui/app/adapters/license.js +++ /dev/null @@ -1,36 +0,0 @@ -import ClusterAdapter from './cluster'; - -export default ClusterAdapter.extend({ - queryRecord() { - return this._super(...arguments).then(resp => { - resp.data.id = resp.data.license_id; - return resp.data; - }); - }, - - createRecord(store, type, snapshot) { - let id = snapshot.attr('licenseId'); - return this._super(...arguments).then(() => { - return { - id, - }; - }); - }, - - updateRecord(store, type, snapshot) { - let id = snapshot.attr('licenseId'); - return this._super(...arguments).then(() => { - return { - id, - }; - }); - }, - - pathForType() { - return 'license'; - }, - - urlForUpdateRecord() { - return this.buildURL() + '/license'; - }, -}); diff --git a/vendor/github.com/hashicorp/vault/ui/app/components/license-info.js b/vendor/github.com/hashicorp/vault/ui/app/components/license-info.js deleted file mode 100644 index b48d1b78..00000000 --- a/vendor/github.com/hashicorp/vault/ui/app/components/license-info.js +++ /dev/null @@ -1,39 +0,0 @@ -import Component from '@ember/component'; -import { allFeatures } from 'vault/helpers/all-features'; -import { computed } from '@ember/object'; - -export default Component.extend({ - expirationTime: '', - startTime: '', - licenseId: '', - features: null, - model: null, - text: '', - showForm: false, - isTemporary: computed('licenseId', function() { - return this.licenseId === 'temporary'; - }), - featuresInfo: computed('model', 'features', function() { - return allFeatures().map(feature => { - let active = this.features.includes(feature); - if (active && feature === 'Performance Standby') { - let count = this.model.performanceStandbyCount; - return { - name: feature, - active: count ? active : false, - count, - }; - } - return { name: feature, active }; - }); - }), - saveModel() {}, - actions: { - saveModel(text) { - this.saveModel(text); - }, - toggleForm() { - this.toggleProperty('showForm'); - }, - }, -}); diff --git a/vendor/github.com/hashicorp/vault/ui/app/controllers/vault/cluster/license.js b/vendor/github.com/hashicorp/vault/ui/app/controllers/vault/cluster/license.js deleted file mode 100644 index baa4190c..00000000 --- a/vendor/github.com/hashicorp/vault/ui/app/controllers/vault/cluster/license.js +++ /dev/null @@ -1,15 +0,0 @@ -import Controller from '@ember/controller'; - -export default Controller.extend({ - licenseSuccess() { - this.send('doRefresh'); - }, - licenseError() { - //eat the error (handled in MessageError component) - }, - actions: { - saveModel({ text }) { - this.model.save({ text }).then(() => this.licenseSuccess(), () => this.licenseError()); - }, - }, -}); diff --git a/vendor/github.com/hashicorp/vault/ui/app/models/license.js b/vendor/github.com/hashicorp/vault/ui/app/models/license.js deleted file mode 100644 index 369678ab..00000000 --- a/vendor/github.com/hashicorp/vault/ui/app/models/license.js +++ /dev/null @@ -1,30 +0,0 @@ -import DS from 'ember-data'; -const { attr } = DS; - -/* sample response -{ - "data": { - "expiration_time": "2017-11-14T16:34:36.546753-05:00", - "features": [ - "UI", - "HSM", - "Performance Replication", - "DR Replication" - ], - "license_id": "temporary", - "start_time": "2017-11-14T16:04:36.546753-05:00" - }, - "warnings": [ - "time left on license is 29m33s" - ] -} -*/ - -export default DS.Model.extend({ - expirationTime: attr('string'), - features: attr('array'), - licenseId: attr('string'), - startTime: attr('string'), - text: attr('string'), - performanceStandbyCount: attr('number'), -}); diff --git a/vendor/github.com/hashicorp/vault/ui/app/routes/vault/cluster/license.js b/vendor/github.com/hashicorp/vault/ui/app/routes/vault/cluster/license.js deleted file mode 100644 index d1822ea6..00000000 --- a/vendor/github.com/hashicorp/vault/ui/app/routes/vault/cluster/license.js +++ /dev/null @@ -1,22 +0,0 @@ -import Route from '@ember/routing/route'; -import ClusterRoute from 'vault/mixins/cluster-route'; -import { inject as service } from '@ember/service'; - -export default Route.extend(ClusterRoute, { - version: service(), - beforeModel() { - if (this.version.isOSS) { - this.transitionTo('vault.cluster'); - } - }, - - model() { - return this.store.queryRecord('license', {}); - }, - - actions: { - doRefresh() { - this.refresh(); - }, - }, -}); diff --git a/vendor/github.com/hashicorp/vault/ui/app/templates/components/license-info.hbs b/vendor/github.com/hashicorp/vault/ui/app/templates/components/license-info.hbs deleted file mode 100644 index 62038382..00000000 --- a/vendor/github.com/hashicorp/vault/ui/app/templates/components/license-info.hbs +++ /dev/null @@ -1,82 +0,0 @@ - - -

License

- - - -{{#if isTemporary}} -
- - Temporary license -
-
-
- -
- {{input id="license-id" value=text autocomplete="off" class="input" data-test-text-input="data-test-text-input"}} -
-
-
-
-
- -
-
-
-
-{{else}} -
- Details - {{#if showForm}} -
-
- -
- {{input id="license-id" value=text autocomplete="off" class="input" data-test-text-input="data-test-text-input"}} -
-
-
-
- -
-
- -
-
-
- {{else}} -
- {{info-table-row label="License ID" value=licenseId}} - {{#info-table-row label="Valid from" value=startTime}} - {{date-format model.startTime 'MMM DD, YYYY hh:mm:ss A'}} to {{date-format expirationTime 'MMM DD, YYYY hh:mm:ss A'}} - {{/info-table-row}} -
-
-
- -
-
- {{/if}} -
- {{/if}} -
- Features -
- {{#each featuresInfo as |info|}} - {{#info-table-row label=info.name value=(if info.active "Active" "Not Active") data-test-feature-row="data-test-feature-row"}} - {{#if info.active}} - Active {{#if info.count}}— - {{info.count}} standby nodes allotted{{/if}} - {{else}} - Not Active - {{/if}} - {{/info-table-row}} - {{/each}} -
-
diff --git a/vendor/github.com/hashicorp/vault/ui/app/templates/vault/cluster/license.hbs b/vendor/github.com/hashicorp/vault/ui/app/templates/vault/cluster/license.hbs deleted file mode 100644 index 2da2b08c..00000000 --- a/vendor/github.com/hashicorp/vault/ui/app/templates/vault/cluster/license.hbs +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/vendor/github.com/hashicorp/vault/ui/tests/integration/components/license-info-test.js b/vendor/github.com/hashicorp/vault/ui/tests/integration/components/license-info-test.js deleted file mode 100644 index f7a934df..00000000 --- a/vendor/github.com/hashicorp/vault/ui/tests/integration/components/license-info-test.js +++ /dev/null @@ -1,141 +0,0 @@ -import { addMinutes } from 'date-fns'; -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render } from '@ember/test-helpers'; -import hbs from 'htmlbars-inline-precompile'; -import sinon from 'sinon'; -import { create } from 'ember-cli-page-object'; -import license from '../../pages/components/license-info'; -import { allFeatures } from 'vault/helpers/all-features'; - -const FEATURES = allFeatures(); - -const component = create(license); - -module('Integration | Component | license info', function(hooks) { - setupRenderingTest(hooks); - - const LICENSE_WARNING_TEXT = `Warning Your temporary license expires in 30 minutes and your vault will seal. Please enter a valid license below.`; - - test('it renders properly for temporary license', async function(assert) { - const now = Date.now(); - this.set('licenseId', 'temporary'); - this.set('expirationTime', addMinutes(now, 30)); - this.set('startTime', now); - this.set('features', ['HSM', 'Namespaces']); - await render( - hbs`` - ); - assert.equal(component.warning, LICENSE_WARNING_TEXT, 'it renders warning text including time left'); - assert.equal(component.hasSaveButton, true, 'it renders the save button'); - assert.equal(component.hasTextInput, true, 'it renders text input for new license'); - assert.equal(component.featureRows.length, FEATURES.length, 'it renders all of the features'); - assert.equal(component.featureRows[0].featureName, 'HSM', 'it renders HSM feature'); - assert.equal(component.featureRows[0].featureStatus, 'Active', 'it renders Active for HSM feature'); - assert.equal( - component.featureRows[1].featureName, - 'Performance Replication', - 'it renders Performance Replication feature name' - ); - assert.equal( - component.featureRows[1].featureStatus, - 'Not Active', - 'it renders Not Active for Performance Replication' - ); - }); - - test('it renders feature status properly for features associated with license', async function(assert) { - const now = Date.now(); - this.set('licenseId', 'temporary'); - this.set('expirationTime', addMinutes(now, 30)); - this.set('startTime', now); - this.set('features', ['HSM', 'Namespaces']); - await render( - hbs`` - ); - assert.equal(component.featureRows.length, FEATURES.length, 'it renders all of the features'); - let activeFeatures = component.featureRows.filter(f => f.featureStatus === 'Active'); - assert.equal(activeFeatures.length, 2); - }); - - test('it renders properly for non-temporary license', async function(assert) { - const now = Date.now(); - this.set('licenseId', 'test'); - this.set('expirationTime', addMinutes(now, 30)); - this.set('startTime', now); - this.set('features', ['HSM', 'Namespaces']); - await render( - hbs`` - ); - assert.equal(component.hasWarning, false, 'it does not have a warning'); - assert.equal(component.hasSaveButton, false, 'it does not render the save button'); - assert.equal(component.hasTextInput, false, 'it does not render the text input for new license'); - assert.equal(component.hasEnterButton, true, 'it renders the button to toggle license form'); - }); - - test('it shows and hides license form when enter and cancel buttons are clicked', async function(assert) { - const now = Date.now(); - this.set('licenseId', 'test'); - this.set('expirationTime', addMinutes(now, 30)); - this.set('startTime', now); - this.set('features', ['HSM', 'Namespaces']); - await render( - hbs`` - ); - await component.enterButton(); - assert.equal(component.hasSaveButton, true, 'it does not render the save button'); - assert.equal(component.hasTextInput, true, 'it does not render the text input for new license'); - assert.equal(component.hasEnterButton, false, 'it renders the button to toggle license form'); - await component.cancelButton(); - assert.equal(component.hasSaveButton, false, 'it does not render the save button'); - assert.equal(component.hasTextInput, false, 'it does not render the text input for new license'); - assert.equal(component.hasEnterButton, true, 'it renders the button to toggle license form'); - }); - - test('it calls saveModel when save button is clicked', async function(assert) { - const now = Date.now(); - this.set('licenseId', 'temporary'); - this.set('expirationTime', addMinutes(now, 30)); - this.set('startTime', now); - this.set('features', ['HSM', 'Namespaces']); - this.set('saveModel', sinon.spy()); - await render( - hbs`` - ); - await component.text('ABCDE12345'); - await component.saveButton(); - assert.ok(this.get('saveModel').calledOnce); - }); - - test('it renders Performance Standby as inactive if count is 0', async function(assert) { - const now = Date.now(); - this.set('licenseId', 'temporary'); - this.set('expirationTime', addMinutes(now, 30)); - this.set('startTime', now); - this.set('model', { performanceStandbyCount: 0 }); - this.set('features', ['Performance Standby', 'Namespaces']); - - await render( - hbs`` - ); - - let row = component.featureRows.filterBy('featureName', 'Performance Standby')[0]; - assert.equal(row.featureStatus, 'Not Active', 'renders feature as inactive because when count is 0'); - }); - - test('it renders Performance Standby as active and shows count', async function(assert) { - const now = Date.now(); - this.set('licenseId', 'temporary'); - this.set('expirationTime', addMinutes(now, 30)); - this.set('startTime', now); - this.set('model', { performanceStandbyCount: 4 }); - this.set('features', ['Performance Standby', 'Namespaces']); - - await render( - hbs`` - ); - - let row = component.featureRows.filterBy('featureName', 'Performance Standby')[0]; - assert.equal(row.featureStatus, 'Active — 4 standby nodes allotted', 'renders active and displays count'); - }); -}); diff --git a/vendor/github.com/hashicorp/vault/ui/tests/pages/components/license-info.js b/vendor/github.com/hashicorp/vault/ui/tests/pages/components/license-info.js deleted file mode 100644 index 813ce1fb..00000000 --- a/vendor/github.com/hashicorp/vault/ui/tests/pages/components/license-info.js +++ /dev/null @@ -1,18 +0,0 @@ -import { clickable, fillable, text, isPresent, collection } from 'ember-cli-page-object'; - -export default { - text: fillable('[data-test-text-input]'), - isTemp: isPresent('[data-test-temp-license]'), - hasTextInput: isPresent('[data-test-text-input]'), - saveButton: clickable('[data-test-save-button]'), - hasSaveButton: isPresent('[data-test-save-button]'), - enterButton: clickable('[data-test-enter-button]'), - hasEnterButton: isPresent('[data-test-enter-button]'), - cancelButton: clickable('[data-test-cancel-button]'), - hasWarning: isPresent('[data-test-warning-text]'), - warning: text('[data-test-warning-text]'), - featureRows: collection('[data-test-feature-row]', { - featureName: text('[data-test-row-label]'), - featureStatus: text('[data-test-feature-status]'), - }), -}; diff --git a/vendor/github.com/hashicorp/vault/website/LICENSE.md b/vendor/github.com/hashicorp/vault/website/LICENSE.md deleted file mode 100644 index 3189f43a..00000000 --- a/vendor/github.com/hashicorp/vault/website/LICENSE.md +++ /dev/null @@ -1,10 +0,0 @@ -# Proprietary License - -This license is temporary while a more official one is drafted. However, -this should make it clear: - -The text contents of this website are MPL 2.0 licensed. - -The design contents of this website are proprietary and may not be reproduced -or reused in any way other than to run the website locally. The license for -the design is owned solely by HashiCorp, Inc. diff --git a/vendor/github.com/hashicorp/vault/website/source/api/system/license.html.md b/vendor/github.com/hashicorp/vault/website/source/api/system/license.html.md deleted file mode 100644 index c41cd780..00000000 --- a/vendor/github.com/hashicorp/vault/website/source/api/system/license.html.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -layout: "api" -page_title: "/sys/license - HTTP API" -sidebar_title: "/sys/license" -sidebar_current: "api-http-system-license" -description: |- - The `/sys/license` endpoint is used to view and update the license used in - Vault. ---- - -# `/sys/license` - -~> **Enterprise Only** – These endpoints require Vault Enterprise. - -The `/sys/license` endpoint is used to view and update the license used in -Vault. - -## Read License - -This endpoint returns information about the currently installed license. - -| Method | Path | -| :--------------------------- | :--------------------- | -| `GET` | `/sys/license` | - -### Sample Request - -``` -$ curl \ - --header "X-Vault-Token: ..." \ - http://127.0.0.1:8200/v1/sys/license -``` - -### Sample Response - -```json -{ - "data": { - "expiration_time": "2017-11-14T16:34:36.546753-05:00", - "features": [ - "UI", - "HSM", - "Performance Replication", - "DR Replication" - ], - "license_id": "temporary", - "start_time": "2017-11-14T16:04:36.546753-05:00" - }, - "warnings": [ - "time left on license is 29m33s" - ] -} -``` - -## Install License - -This endpoint is used to install a license into Vault. - -| Method | Path | -| :--------------------------- | :--------------------- | -| `PUT` | `/sys/license` | - -### Parameters - -- `text` `(string: )` – The text of the license. - -*DR Secondary Specific Parameters* - - - `dr_operation_token` `(string: )` - DR operation token used to authorize this request. - - -### Sample Payload - -```json -{ - "text": "01ABCDEFG..." -} -``` - -### Sample Request - -``` -$ curl \ - --header "X-Vault-Token: ..." \ - --request PUT \ - --data @payload.json \ - http://127.0.0.1:8200/v1/sys/license -``` diff --git a/vendor/github.com/inconshreveable/mousetrap/README.md b/vendor/github.com/inconshreveable/mousetrap/README.md new file mode 100644 index 00000000..7a950d17 --- /dev/null +++ b/vendor/github.com/inconshreveable/mousetrap/README.md @@ -0,0 +1,23 @@ +# mousetrap + +mousetrap is a tiny library that answers a single question. + +On a Windows machine, was the process invoked by someone double clicking on +the executable file while browsing in explorer? + +### Motivation + +Windows developers unfamiliar with command line tools will often "double-click" +the executable for a tool. Because most CLI tools print the help and then exit +when invoked without arguments, this is often very frustrating for those users. + +mousetrap provides a way to detect these invocations so that you can provide +more helpful behavior and instructions on how to run the CLI tool. To see what +this looks like, both from an organizational and a technical perspective, see +https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/ + +### The interface + +The library exposes a single interface: + + func StartedByExplorer() (bool) diff --git a/vendor/github.com/jmespath/go-jmespath/.gitignore b/vendor/github.com/jmespath/go-jmespath/.gitignore new file mode 100644 index 00000000..5091fb07 --- /dev/null +++ b/vendor/github.com/jmespath/go-jmespath/.gitignore @@ -0,0 +1,4 @@ +/jpgo +jmespath-fuzz.zip +cpu.out +go-jmespath.test diff --git a/vendor/github.com/jmespath/go-jmespath/.travis.yml b/vendor/github.com/jmespath/go-jmespath/.travis.yml new file mode 100644 index 00000000..1f980775 --- /dev/null +++ b/vendor/github.com/jmespath/go-jmespath/.travis.yml @@ -0,0 +1,9 @@ +language: go + +sudo: false + +go: + - 1.4 + +install: go get -v -t ./... +script: make test diff --git a/vendor/github.com/jmespath/go-jmespath/Makefile b/vendor/github.com/jmespath/go-jmespath/Makefile new file mode 100644 index 00000000..a828d284 --- /dev/null +++ b/vendor/github.com/jmespath/go-jmespath/Makefile @@ -0,0 +1,44 @@ + +CMD = jpgo + +help: + @echo "Please use \`make ' where is one of" + @echo " test to run all the tests" + @echo " build to build the library and jp executable" + @echo " generate to run codegen" + + +generate: + go generate ./... + +build: + rm -f $(CMD) + go build ./... + rm -f cmd/$(CMD)/$(CMD) && cd cmd/$(CMD)/ && go build ./... + mv cmd/$(CMD)/$(CMD) . + +test: + go test -v ./... + +check: + go vet ./... + @echo "golint ./..." + @lint=`golint ./...`; \ + lint=`echo "$$lint" | grep -v "astnodetype_string.go" | grep -v "toktype_string.go"`; \ + echo "$$lint"; \ + if [ "$$lint" != "" ]; then exit 1; fi + +htmlc: + go test -coverprofile="/tmp/jpcov" && go tool cover -html="/tmp/jpcov" && unlink /tmp/jpcov + +buildfuzz: + go-fuzz-build github.com/jmespath/go-jmespath/fuzz + +fuzz: buildfuzz + go-fuzz -bin=./jmespath-fuzz.zip -workdir=fuzz/testdata + +bench: + go test -bench . -cpuprofile cpu.out + +pprof-cpu: + go tool pprof ./go-jmespath.test ./cpu.out diff --git a/vendor/github.com/jmespath/go-jmespath/README.md b/vendor/github.com/jmespath/go-jmespath/README.md new file mode 100644 index 00000000..187ef676 --- /dev/null +++ b/vendor/github.com/jmespath/go-jmespath/README.md @@ -0,0 +1,7 @@ +# go-jmespath - A JMESPath implementation in Go + +[![Build Status](https://img.shields.io/travis/jmespath/go-jmespath.svg)](https://travis-ci.org/jmespath/go-jmespath) + + + +See http://jmespath.org for more info. diff --git a/vendor/github.com/joho/godotenv/.gitignore b/vendor/github.com/joho/godotenv/.gitignore new file mode 100644 index 00000000..e43b0f98 --- /dev/null +++ b/vendor/github.com/joho/godotenv/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/vendor/github.com/joho/godotenv/.travis.yml b/vendor/github.com/joho/godotenv/.travis.yml new file mode 100644 index 00000000..f0db1adc --- /dev/null +++ b/vendor/github.com/joho/godotenv/.travis.yml @@ -0,0 +1,8 @@ +language: go + +go: + - 1.x + +os: + - linux + - osx diff --git a/vendor/github.com/joho/godotenv/README.md b/vendor/github.com/joho/godotenv/README.md new file mode 100644 index 00000000..4e8fcf2e --- /dev/null +++ b/vendor/github.com/joho/godotenv/README.md @@ -0,0 +1,163 @@ +# GoDotEnv [![Build Status](https://travis-ci.org/joho/godotenv.svg?branch=master)](https://travis-ci.org/joho/godotenv) [![Build status](https://ci.appveyor.com/api/projects/status/9v40vnfvvgde64u4?svg=true)](https://ci.appveyor.com/project/joho/godotenv) [![Go Report Card](https://goreportcard.com/badge/github.com/joho/godotenv)](https://goreportcard.com/report/github.com/joho/godotenv) + +A Go (golang) port of the Ruby dotenv project (which loads env vars from a .env file) + +From the original Library: + +> Storing configuration in the environment is one of the tenets of a twelve-factor app. Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables. +> +> But it is not always practical to set environment variables on development machines or continuous integration servers where multiple projects are run. Dotenv load variables from a .env file into ENV when the environment is bootstrapped. + +It can be used as a library (for loading in env for your own daemons etc) or as a bin command. + +There is test coverage and CI for both linuxish and windows environments, but I make no guarantees about the bin version working on windows. + +## Installation + +As a library + +```shell +go get github.com/joho/godotenv +``` + +or if you want to use it as a bin command +```shell +go get github.com/joho/godotenv/cmd/godotenv +``` + +## Usage + +Add your application configuration to your `.env` file in the root of your project: + +```shell +S3_BUCKET=YOURS3BUCKET +SECRET_KEY=YOURSECRETKEYGOESHERE +``` + +Then in your Go app you can do something like + +```go +package main + +import ( + "github.com/joho/godotenv" + "log" + "os" +) + +func main() { + err := godotenv.Load() + if err != nil { + log.Fatal("Error loading .env file") + } + + s3Bucket := os.Getenv("S3_BUCKET") + secretKey := os.Getenv("SECRET_KEY") + + // now do something with s3 or whatever +} +``` + +If you're even lazier than that, you can just take advantage of the autoload package which will read in `.env` on import + +```go +import _ "github.com/joho/godotenv/autoload" +``` + +While `.env` in the project root is the default, you don't have to be constrained, both examples below are 100% legit + +```go +_ = godotenv.Load("somerandomfile") +_ = godotenv.Load("filenumberone.env", "filenumbertwo.env") +``` + +If you want to be really fancy with your env file you can do comments and exports (below is a valid env file) + +```shell +# I am a comment and that is OK +SOME_VAR=someval +FOO=BAR # comments at line end are OK too +export BAR=BAZ +``` + +Or finally you can do YAML(ish) style + +```yaml +FOO: bar +BAR: baz +``` + +as a final aside, if you don't want godotenv munging your env you can just get a map back instead + +```go +var myEnv map[string]string +myEnv, err := godotenv.Read() + +s3Bucket := myEnv["S3_BUCKET"] +``` + +... or from an `io.Reader` instead of a local file + +```go +reader := getRemoteFile() +myEnv, err := godotenv.Parse(reader) +``` + +... or from a `string` if you so desire + +```go +content := getRemoteFileContent() +myEnv, err := godotenv.Unmarshal(content) +``` + +### Command Mode + +Assuming you've installed the command as above and you've got `$GOPATH/bin` in your `$PATH` + +``` +godotenv -f /some/path/to/.env some_command with some args +``` + +If you don't specify `-f` it will fall back on the default of loading `.env` in `PWD` + +### Writing Env Files + +Godotenv can also write a map representing the environment to a correctly-formatted and escaped file + +```go +env, err := godotenv.Unmarshal("KEY=value") +err := godotenv.Write(env, "./.env") +``` + +... or to a string + +```go +env, err := godotenv.Unmarshal("KEY=value") +content, err := godotenv.Marshal(env) +``` + +## Contributing + +Contributions are most welcome! The parser itself is pretty stupidly naive and I wouldn't be surprised if it breaks with edge cases. + +*code changes without tests will not be accepted* + +1. Fork it +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Added some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request + +## Releases + +Releases should follow [Semver](http://semver.org/) though the first couple of releases are `v1` and `v1.1`. + +Use [annotated tags for all releases](https://github.com/joho/godotenv/issues/30). Example `git tag -a v1.2.1` + +## CI + +Linux: [![Build Status](https://travis-ci.org/joho/godotenv.svg?branch=master)](https://travis-ci.org/joho/godotenv) Windows: [![Build status](https://ci.appveyor.com/api/projects/status/9v40vnfvvgde64u4)](https://ci.appveyor.com/project/joho/godotenv) + +## Who? + +The original library [dotenv](https://github.com/bkeepers/dotenv) was written by [Brandon Keepers](http://opensoul.org/), and this port was done by [John Barton](https://johnbarton.co/) based off the tests/fixtures in the original library. diff --git a/vendor/github.com/kr/pretty/License b/vendor/github.com/kr/pretty/License deleted file mode 100644 index 05c783cc..00000000 --- a/vendor/github.com/kr/pretty/License +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright 2012 Keith Rarick - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/kr/pretty/diff.go b/vendor/github.com/kr/pretty/diff.go deleted file mode 100644 index 6aa7f743..00000000 --- a/vendor/github.com/kr/pretty/diff.go +++ /dev/null @@ -1,265 +0,0 @@ -package pretty - -import ( - "fmt" - "io" - "reflect" -) - -type sbuf []string - -func (p *sbuf) Printf(format string, a ...interface{}) { - s := fmt.Sprintf(format, a...) - *p = append(*p, s) -} - -// Diff returns a slice where each element describes -// a difference between a and b. -func Diff(a, b interface{}) (desc []string) { - Pdiff((*sbuf)(&desc), a, b) - return desc -} - -// wprintfer calls Fprintf on w for each Printf call -// with a trailing newline. -type wprintfer struct{ w io.Writer } - -func (p *wprintfer) Printf(format string, a ...interface{}) { - fmt.Fprintf(p.w, format+"\n", a...) -} - -// Fdiff writes to w a description of the differences between a and b. -func Fdiff(w io.Writer, a, b interface{}) { - Pdiff(&wprintfer{w}, a, b) -} - -type Printfer interface { - Printf(format string, a ...interface{}) -} - -// Pdiff prints to p a description of the differences between a and b. -// It calls Printf once for each difference, with no trailing newline. -// The standard library log.Logger is a Printfer. -func Pdiff(p Printfer, a, b interface{}) { - diffPrinter{w: p}.diff(reflect.ValueOf(a), reflect.ValueOf(b)) -} - -type Logfer interface { - Logf(format string, a ...interface{}) -} - -// logprintfer calls Fprintf on w for each Printf call -// with a trailing newline. -type logprintfer struct{ l Logfer } - -func (p *logprintfer) Printf(format string, a ...interface{}) { - p.l.Logf(format, a...) -} - -// Ldiff prints to l a description of the differences between a and b. -// It calls Logf once for each difference, with no trailing newline. -// The standard library testing.T and testing.B are Logfers. -func Ldiff(l Logfer, a, b interface{}) { - Pdiff(&logprintfer{l}, a, b) -} - -type diffPrinter struct { - w Printfer - l string // label -} - -func (w diffPrinter) printf(f string, a ...interface{}) { - var l string - if w.l != "" { - l = w.l + ": " - } - w.w.Printf(l+f, a...) -} - -func (w diffPrinter) diff(av, bv reflect.Value) { - if !av.IsValid() && bv.IsValid() { - w.printf("nil != %# v", formatter{v: bv, quote: true}) - return - } - if av.IsValid() && !bv.IsValid() { - w.printf("%# v != nil", formatter{v: av, quote: true}) - return - } - if !av.IsValid() && !bv.IsValid() { - return - } - - at := av.Type() - bt := bv.Type() - if at != bt { - w.printf("%v != %v", at, bt) - return - } - - switch kind := at.Kind(); kind { - case reflect.Bool: - if a, b := av.Bool(), bv.Bool(); a != b { - w.printf("%v != %v", a, b) - } - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - if a, b := av.Int(), bv.Int(); a != b { - w.printf("%d != %d", a, b) - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - if a, b := av.Uint(), bv.Uint(); a != b { - w.printf("%d != %d", a, b) - } - case reflect.Float32, reflect.Float64: - if a, b := av.Float(), bv.Float(); a != b { - w.printf("%v != %v", a, b) - } - case reflect.Complex64, reflect.Complex128: - if a, b := av.Complex(), bv.Complex(); a != b { - w.printf("%v != %v", a, b) - } - case reflect.Array: - n := av.Len() - for i := 0; i < n; i++ { - w.relabel(fmt.Sprintf("[%d]", i)).diff(av.Index(i), bv.Index(i)) - } - case reflect.Chan, reflect.Func, reflect.UnsafePointer: - if a, b := av.Pointer(), bv.Pointer(); a != b { - w.printf("%#x != %#x", a, b) - } - case reflect.Interface: - w.diff(av.Elem(), bv.Elem()) - case reflect.Map: - ak, both, bk := keyDiff(av.MapKeys(), bv.MapKeys()) - for _, k := range ak { - w := w.relabel(fmt.Sprintf("[%#v]", k)) - w.printf("%q != (missing)", av.MapIndex(k)) - } - for _, k := range both { - w := w.relabel(fmt.Sprintf("[%#v]", k)) - w.diff(av.MapIndex(k), bv.MapIndex(k)) - } - for _, k := range bk { - w := w.relabel(fmt.Sprintf("[%#v]", k)) - w.printf("(missing) != %q", bv.MapIndex(k)) - } - case reflect.Ptr: - switch { - case av.IsNil() && !bv.IsNil(): - w.printf("nil != %# v", formatter{v: bv, quote: true}) - case !av.IsNil() && bv.IsNil(): - w.printf("%# v != nil", formatter{v: av, quote: true}) - case !av.IsNil() && !bv.IsNil(): - w.diff(av.Elem(), bv.Elem()) - } - case reflect.Slice: - lenA := av.Len() - lenB := bv.Len() - if lenA != lenB { - w.printf("%s[%d] != %s[%d]", av.Type(), lenA, bv.Type(), lenB) - break - } - for i := 0; i < lenA; i++ { - w.relabel(fmt.Sprintf("[%d]", i)).diff(av.Index(i), bv.Index(i)) - } - case reflect.String: - if a, b := av.String(), bv.String(); a != b { - w.printf("%q != %q", a, b) - } - case reflect.Struct: - for i := 0; i < av.NumField(); i++ { - w.relabel(at.Field(i).Name).diff(av.Field(i), bv.Field(i)) - } - default: - panic("unknown reflect Kind: " + kind.String()) - } -} - -func (d diffPrinter) relabel(name string) (d1 diffPrinter) { - d1 = d - if d.l != "" && name[0] != '[' { - d1.l += "." - } - d1.l += name - return d1 -} - -// keyEqual compares a and b for equality. -// Both a and b must be valid map keys. -func keyEqual(av, bv reflect.Value) bool { - if !av.IsValid() && !bv.IsValid() { - return true - } - if !av.IsValid() || !bv.IsValid() || av.Type() != bv.Type() { - return false - } - switch kind := av.Kind(); kind { - case reflect.Bool: - a, b := av.Bool(), bv.Bool() - return a == b - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - a, b := av.Int(), bv.Int() - return a == b - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - a, b := av.Uint(), bv.Uint() - return a == b - case reflect.Float32, reflect.Float64: - a, b := av.Float(), bv.Float() - return a == b - case reflect.Complex64, reflect.Complex128: - a, b := av.Complex(), bv.Complex() - return a == b - case reflect.Array: - for i := 0; i < av.Len(); i++ { - if !keyEqual(av.Index(i), bv.Index(i)) { - return false - } - } - return true - case reflect.Chan, reflect.UnsafePointer, reflect.Ptr: - a, b := av.Pointer(), bv.Pointer() - return a == b - case reflect.Interface: - return keyEqual(av.Elem(), bv.Elem()) - case reflect.String: - a, b := av.String(), bv.String() - return a == b - case reflect.Struct: - for i := 0; i < av.NumField(); i++ { - if !keyEqual(av.Field(i), bv.Field(i)) { - return false - } - } - return true - default: - panic("invalid map key type " + av.Type().String()) - } -} - -func keyDiff(a, b []reflect.Value) (ak, both, bk []reflect.Value) { - for _, av := range a { - inBoth := false - for _, bv := range b { - if keyEqual(av, bv) { - inBoth = true - both = append(both, av) - break - } - } - if !inBoth { - ak = append(ak, av) - } - } - for _, bv := range b { - inBoth := false - for _, av := range a { - if keyEqual(av, bv) { - inBoth = true - break - } - } - if !inBoth { - bk = append(bk, bv) - } - } - return -} diff --git a/vendor/github.com/kr/pretty/formatter.go b/vendor/github.com/kr/pretty/formatter.go deleted file mode 100644 index a317d7b8..00000000 --- a/vendor/github.com/kr/pretty/formatter.go +++ /dev/null @@ -1,328 +0,0 @@ -package pretty - -import ( - "fmt" - "io" - "reflect" - "strconv" - "text/tabwriter" - - "github.com/kr/text" -) - -type formatter struct { - v reflect.Value - force bool - quote bool -} - -// Formatter makes a wrapper, f, that will format x as go source with line -// breaks and tabs. Object f responds to the "%v" formatting verb when both the -// "#" and " " (space) flags are set, for example: -// -// fmt.Sprintf("%# v", Formatter(x)) -// -// If one of these two flags is not set, or any other verb is used, f will -// format x according to the usual rules of package fmt. -// In particular, if x satisfies fmt.Formatter, then x.Format will be called. -func Formatter(x interface{}) (f fmt.Formatter) { - return formatter{v: reflect.ValueOf(x), quote: true} -} - -func (fo formatter) String() string { - return fmt.Sprint(fo.v.Interface()) // unwrap it -} - -func (fo formatter) passThrough(f fmt.State, c rune) { - s := "%" - for i := 0; i < 128; i++ { - if f.Flag(i) { - s += string(i) - } - } - if w, ok := f.Width(); ok { - s += fmt.Sprintf("%d", w) - } - if p, ok := f.Precision(); ok { - s += fmt.Sprintf(".%d", p) - } - s += string(c) - fmt.Fprintf(f, s, fo.v.Interface()) -} - -func (fo formatter) Format(f fmt.State, c rune) { - if fo.force || c == 'v' && f.Flag('#') && f.Flag(' ') { - w := tabwriter.NewWriter(f, 4, 4, 1, ' ', 0) - p := &printer{tw: w, Writer: w, visited: make(map[visit]int)} - p.printValue(fo.v, true, fo.quote) - w.Flush() - return - } - fo.passThrough(f, c) -} - -type printer struct { - io.Writer - tw *tabwriter.Writer - visited map[visit]int - depth int -} - -func (p *printer) indent() *printer { - q := *p - q.tw = tabwriter.NewWriter(p.Writer, 4, 4, 1, ' ', 0) - q.Writer = text.NewIndentWriter(q.tw, []byte{'\t'}) - return &q -} - -func (p *printer) printInline(v reflect.Value, x interface{}, showType bool) { - if showType { - io.WriteString(p, v.Type().String()) - fmt.Fprintf(p, "(%#v)", x) - } else { - fmt.Fprintf(p, "%#v", x) - } -} - -// printValue must keep track of already-printed pointer values to avoid -// infinite recursion. -type visit struct { - v uintptr - typ reflect.Type -} - -func (p *printer) printValue(v reflect.Value, showType, quote bool) { - if p.depth > 10 { - io.WriteString(p, "!%v(DEPTH EXCEEDED)") - return - } - - switch v.Kind() { - case reflect.Bool: - p.printInline(v, v.Bool(), showType) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - p.printInline(v, v.Int(), showType) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - p.printInline(v, v.Uint(), showType) - case reflect.Float32, reflect.Float64: - p.printInline(v, v.Float(), showType) - case reflect.Complex64, reflect.Complex128: - fmt.Fprintf(p, "%#v", v.Complex()) - case reflect.String: - p.fmtString(v.String(), quote) - case reflect.Map: - t := v.Type() - if showType { - io.WriteString(p, t.String()) - } - writeByte(p, '{') - if nonzero(v) { - expand := !canInline(v.Type()) - pp := p - if expand { - writeByte(p, '\n') - pp = p.indent() - } - keys := v.MapKeys() - for i := 0; i < v.Len(); i++ { - showTypeInStruct := true - k := keys[i] - mv := v.MapIndex(k) - pp.printValue(k, false, true) - writeByte(pp, ':') - if expand { - writeByte(pp, '\t') - } - showTypeInStruct = t.Elem().Kind() == reflect.Interface - pp.printValue(mv, showTypeInStruct, true) - if expand { - io.WriteString(pp, ",\n") - } else if i < v.Len()-1 { - io.WriteString(pp, ", ") - } - } - if expand { - pp.tw.Flush() - } - } - writeByte(p, '}') - case reflect.Struct: - t := v.Type() - if v.CanAddr() { - addr := v.UnsafeAddr() - vis := visit{addr, t} - if vd, ok := p.visited[vis]; ok && vd < p.depth { - p.fmtString(t.String()+"{(CYCLIC REFERENCE)}", false) - break // don't print v again - } - p.visited[vis] = p.depth - } - - if showType { - io.WriteString(p, t.String()) - } - writeByte(p, '{') - if nonzero(v) { - expand := !canInline(v.Type()) - pp := p - if expand { - writeByte(p, '\n') - pp = p.indent() - } - for i := 0; i < v.NumField(); i++ { - showTypeInStruct := true - if f := t.Field(i); f.Name != "" { - io.WriteString(pp, f.Name) - writeByte(pp, ':') - if expand { - writeByte(pp, '\t') - } - showTypeInStruct = labelType(f.Type) - } - pp.printValue(getField(v, i), showTypeInStruct, true) - if expand { - io.WriteString(pp, ",\n") - } else if i < v.NumField()-1 { - io.WriteString(pp, ", ") - } - } - if expand { - pp.tw.Flush() - } - } - writeByte(p, '}') - case reflect.Interface: - switch e := v.Elem(); { - case e.Kind() == reflect.Invalid: - io.WriteString(p, "nil") - case e.IsValid(): - pp := *p - pp.depth++ - pp.printValue(e, showType, true) - default: - io.WriteString(p, v.Type().String()) - io.WriteString(p, "(nil)") - } - case reflect.Array, reflect.Slice: - t := v.Type() - if showType { - io.WriteString(p, t.String()) - } - if v.Kind() == reflect.Slice && v.IsNil() && showType { - io.WriteString(p, "(nil)") - break - } - if v.Kind() == reflect.Slice && v.IsNil() { - io.WriteString(p, "nil") - break - } - writeByte(p, '{') - expand := !canInline(v.Type()) - pp := p - if expand { - writeByte(p, '\n') - pp = p.indent() - } - for i := 0; i < v.Len(); i++ { - showTypeInSlice := t.Elem().Kind() == reflect.Interface - pp.printValue(v.Index(i), showTypeInSlice, true) - if expand { - io.WriteString(pp, ",\n") - } else if i < v.Len()-1 { - io.WriteString(pp, ", ") - } - } - if expand { - pp.tw.Flush() - } - writeByte(p, '}') - case reflect.Ptr: - e := v.Elem() - if !e.IsValid() { - writeByte(p, '(') - io.WriteString(p, v.Type().String()) - io.WriteString(p, ")(nil)") - } else { - pp := *p - pp.depth++ - writeByte(pp, '&') - pp.printValue(e, true, true) - } - case reflect.Chan: - x := v.Pointer() - if showType { - writeByte(p, '(') - io.WriteString(p, v.Type().String()) - fmt.Fprintf(p, ")(%#v)", x) - } else { - fmt.Fprintf(p, "%#v", x) - } - case reflect.Func: - io.WriteString(p, v.Type().String()) - io.WriteString(p, " {...}") - case reflect.UnsafePointer: - p.printInline(v, v.Pointer(), showType) - case reflect.Invalid: - io.WriteString(p, "nil") - } -} - -func canInline(t reflect.Type) bool { - switch t.Kind() { - case reflect.Map: - return !canExpand(t.Elem()) - case reflect.Struct: - for i := 0; i < t.NumField(); i++ { - if canExpand(t.Field(i).Type) { - return false - } - } - return true - case reflect.Interface: - return false - case reflect.Array, reflect.Slice: - return !canExpand(t.Elem()) - case reflect.Ptr: - return false - case reflect.Chan, reflect.Func, reflect.UnsafePointer: - return false - } - return true -} - -func canExpand(t reflect.Type) bool { - switch t.Kind() { - case reflect.Map, reflect.Struct, - reflect.Interface, reflect.Array, reflect.Slice, - reflect.Ptr: - return true - } - return false -} - -func labelType(t reflect.Type) bool { - switch t.Kind() { - case reflect.Interface, reflect.Struct: - return true - } - return false -} - -func (p *printer) fmtString(s string, quote bool) { - if quote { - s = strconv.Quote(s) - } - io.WriteString(p, s) -} - -func writeByte(w io.Writer, b byte) { - w.Write([]byte{b}) -} - -func getField(v reflect.Value, i int) reflect.Value { - val := v.Field(i) - if val.Kind() == reflect.Interface && !val.IsNil() { - val = val.Elem() - } - return val -} diff --git a/vendor/github.com/kr/pretty/pretty.go b/vendor/github.com/kr/pretty/pretty.go deleted file mode 100644 index 49423ec7..00000000 --- a/vendor/github.com/kr/pretty/pretty.go +++ /dev/null @@ -1,108 +0,0 @@ -// Package pretty provides pretty-printing for Go values. This is -// useful during debugging, to avoid wrapping long output lines in -// the terminal. -// -// It provides a function, Formatter, that can be used with any -// function that accepts a format string. It also provides -// convenience wrappers for functions in packages fmt and log. -package pretty - -import ( - "fmt" - "io" - "log" - "reflect" -) - -// Errorf is a convenience wrapper for fmt.Errorf. -// -// Calling Errorf(f, x, y) is equivalent to -// fmt.Errorf(f, Formatter(x), Formatter(y)). -func Errorf(format string, a ...interface{}) error { - return fmt.Errorf(format, wrap(a, false)...) -} - -// Fprintf is a convenience wrapper for fmt.Fprintf. -// -// Calling Fprintf(w, f, x, y) is equivalent to -// fmt.Fprintf(w, f, Formatter(x), Formatter(y)). -func Fprintf(w io.Writer, format string, a ...interface{}) (n int, error error) { - return fmt.Fprintf(w, format, wrap(a, false)...) -} - -// Log is a convenience wrapper for log.Printf. -// -// Calling Log(x, y) is equivalent to -// log.Print(Formatter(x), Formatter(y)), but each operand is -// formatted with "%# v". -func Log(a ...interface{}) { - log.Print(wrap(a, true)...) -} - -// Logf is a convenience wrapper for log.Printf. -// -// Calling Logf(f, x, y) is equivalent to -// log.Printf(f, Formatter(x), Formatter(y)). -func Logf(format string, a ...interface{}) { - log.Printf(format, wrap(a, false)...) -} - -// Logln is a convenience wrapper for log.Printf. -// -// Calling Logln(x, y) is equivalent to -// log.Println(Formatter(x), Formatter(y)), but each operand is -// formatted with "%# v". -func Logln(a ...interface{}) { - log.Println(wrap(a, true)...) -} - -// Print pretty-prints its operands and writes to standard output. -// -// Calling Print(x, y) is equivalent to -// fmt.Print(Formatter(x), Formatter(y)), but each operand is -// formatted with "%# v". -func Print(a ...interface{}) (n int, errno error) { - return fmt.Print(wrap(a, true)...) -} - -// Printf is a convenience wrapper for fmt.Printf. -// -// Calling Printf(f, x, y) is equivalent to -// fmt.Printf(f, Formatter(x), Formatter(y)). -func Printf(format string, a ...interface{}) (n int, errno error) { - return fmt.Printf(format, wrap(a, false)...) -} - -// Println pretty-prints its operands and writes to standard output. -// -// Calling Print(x, y) is equivalent to -// fmt.Println(Formatter(x), Formatter(y)), but each operand is -// formatted with "%# v". -func Println(a ...interface{}) (n int, errno error) { - return fmt.Println(wrap(a, true)...) -} - -// Sprint is a convenience wrapper for fmt.Sprintf. -// -// Calling Sprint(x, y) is equivalent to -// fmt.Sprint(Formatter(x), Formatter(y)), but each operand is -// formatted with "%# v". -func Sprint(a ...interface{}) string { - return fmt.Sprint(wrap(a, true)...) -} - -// Sprintf is a convenience wrapper for fmt.Sprintf. -// -// Calling Sprintf(f, x, y) is equivalent to -// fmt.Sprintf(f, Formatter(x), Formatter(y)). -func Sprintf(format string, a ...interface{}) string { - return fmt.Sprintf(format, wrap(a, false)...) -} - -func wrap(a []interface{}, force bool) []interface{} { - w := make([]interface{}, len(a)) - for i, x := range a { - w[i] = formatter{v: reflect.ValueOf(x), force: force} - } - return w -} diff --git a/vendor/github.com/kr/pretty/zero.go b/vendor/github.com/kr/pretty/zero.go deleted file mode 100644 index abb5b6fc..00000000 --- a/vendor/github.com/kr/pretty/zero.go +++ /dev/null @@ -1,41 +0,0 @@ -package pretty - -import ( - "reflect" -) - -func nonzero(v reflect.Value) bool { - switch v.Kind() { - case reflect.Bool: - return v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() != 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() != 0 - case reflect.Float32, reflect.Float64: - return v.Float() != 0 - case reflect.Complex64, reflect.Complex128: - return v.Complex() != complex(0, 0) - case reflect.String: - return v.String() != "" - case reflect.Struct: - for i := 0; i < v.NumField(); i++ { - if nonzero(getField(v, i)) { - return true - } - } - return false - case reflect.Array: - for i := 0; i < v.Len(); i++ { - if nonzero(v.Index(i)) { - return true - } - } - return false - case reflect.Map, reflect.Interface, reflect.Slice, reflect.Ptr, reflect.Chan, reflect.Func: - return !v.IsNil() - case reflect.UnsafePointer: - return v.Pointer() != 0 - } - return true -} diff --git a/vendor/github.com/kr/text/License b/vendor/github.com/kr/text/License deleted file mode 100644 index 480a3280..00000000 --- a/vendor/github.com/kr/text/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2012 Keith Rarick - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/kr/text/doc.go b/vendor/github.com/kr/text/doc.go deleted file mode 100644 index cf4c198f..00000000 --- a/vendor/github.com/kr/text/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package text provides rudimentary functions for manipulating text in -// paragraphs. -package text diff --git a/vendor/github.com/kr/text/indent.go b/vendor/github.com/kr/text/indent.go deleted file mode 100644 index 4ebac45c..00000000 --- a/vendor/github.com/kr/text/indent.go +++ /dev/null @@ -1,74 +0,0 @@ -package text - -import ( - "io" -) - -// Indent inserts prefix at the beginning of each non-empty line of s. The -// end-of-line marker is NL. -func Indent(s, prefix string) string { - return string(IndentBytes([]byte(s), []byte(prefix))) -} - -// IndentBytes inserts prefix at the beginning of each non-empty line of b. -// The end-of-line marker is NL. -func IndentBytes(b, prefix []byte) []byte { - var res []byte - bol := true - for _, c := range b { - if bol && c != '\n' { - res = append(res, prefix...) - } - res = append(res, c) - bol = c == '\n' - } - return res -} - -// Writer indents each line of its input. -type indentWriter struct { - w io.Writer - bol bool - pre [][]byte - sel int - off int -} - -// NewIndentWriter makes a new write filter that indents the input -// lines. Each line is prefixed in order with the corresponding -// element of pre. If there are more lines than elements, the last -// element of pre is repeated for each subsequent line. -func NewIndentWriter(w io.Writer, pre ...[]byte) io.Writer { - return &indentWriter{ - w: w, - pre: pre, - bol: true, - } -} - -// The only errors returned are from the underlying indentWriter. -func (w *indentWriter) Write(p []byte) (n int, err error) { - for _, c := range p { - if w.bol { - var i int - i, err = w.w.Write(w.pre[w.sel][w.off:]) - w.off += i - if err != nil { - return n, err - } - } - _, err = w.w.Write([]byte{c}) - if err != nil { - return n, err - } - n++ - w.bol = c == '\n' - if w.bol { - w.off = 0 - if w.sel < len(w.pre)-1 { - w.sel++ - } - } - } - return n, nil -} diff --git a/vendor/github.com/kr/text/wrap.go b/vendor/github.com/kr/text/wrap.go deleted file mode 100644 index b09bb037..00000000 --- a/vendor/github.com/kr/text/wrap.go +++ /dev/null @@ -1,86 +0,0 @@ -package text - -import ( - "bytes" - "math" -) - -var ( - nl = []byte{'\n'} - sp = []byte{' '} -) - -const defaultPenalty = 1e5 - -// Wrap wraps s into a paragraph of lines of length lim, with minimal -// raggedness. -func Wrap(s string, lim int) string { - return string(WrapBytes([]byte(s), lim)) -} - -// WrapBytes wraps b into a paragraph of lines of length lim, with minimal -// raggedness. -func WrapBytes(b []byte, lim int) []byte { - words := bytes.Split(bytes.Replace(bytes.TrimSpace(b), nl, sp, -1), sp) - var lines [][]byte - for _, line := range WrapWords(words, 1, lim, defaultPenalty) { - lines = append(lines, bytes.Join(line, sp)) - } - return bytes.Join(lines, nl) -} - -// WrapWords is the low-level line-breaking algorithm, useful if you need more -// control over the details of the text wrapping process. For most uses, either -// Wrap or WrapBytes will be sufficient and more convenient. -// -// WrapWords splits a list of words into lines with minimal "raggedness", -// treating each byte as one unit, accounting for spc units between adjacent -// words on each line, and attempting to limit lines to lim units. Raggedness -// is the total error over all lines, where error is the square of the -// difference of the length of the line and lim. Too-long lines (which only -// happen when a single word is longer than lim units) have pen penalty units -// added to the error. -func WrapWords(words [][]byte, spc, lim, pen int) [][][]byte { - n := len(words) - - length := make([][]int, n) - for i := 0; i < n; i++ { - length[i] = make([]int, n) - length[i][i] = len(words[i]) - for j := i + 1; j < n; j++ { - length[i][j] = length[i][j-1] + spc + len(words[j]) - } - } - - nbrk := make([]int, n) - cost := make([]int, n) - for i := range cost { - cost[i] = math.MaxInt32 - } - for i := n - 1; i >= 0; i-- { - if length[i][n-1] <= lim || i == n-1 { - cost[i] = 0 - nbrk[i] = n - } else { - for j := i + 1; j < n; j++ { - d := lim - length[i][j-1] - c := d*d + cost[j] - if length[i][j-1] > lim { - c += pen // too-long lines get a worse penalty - } - if c < cost[i] { - cost[i] = c - nbrk[i] = j - } - } - } - } - - var lines [][][]byte - i := 0 - for i < n { - lines = append(lines, words[i:nbrk[i]]) - i = nbrk[i] - } - return lines -} diff --git a/vendor/github.com/mitchellh/go-homedir/README.md b/vendor/github.com/mitchellh/go-homedir/README.md new file mode 100644 index 00000000..d70706d5 --- /dev/null +++ b/vendor/github.com/mitchellh/go-homedir/README.md @@ -0,0 +1,14 @@ +# go-homedir + +This is a Go library for detecting the user's home directory without +the use of cgo, so the library can be used in cross-compilation environments. + +Usage is incredibly simple, just call `homedir.Dir()` to get the home directory +for a user, and `homedir.Expand()` to expand the `~` in a path to the home +directory. + +**Why not just use `os/user`?** The built-in `os/user` package requires +cgo on Darwin systems. This means that any Go code that uses that package +cannot cross compile. But 99% of the time the use for `os/user` is just to +retrieve the home directory, which we can do for the current user without +cgo. This library does that, enabling cross-compilation. diff --git a/vendor/github.com/mitchellh/go-homedir/go.mod b/vendor/github.com/mitchellh/go-homedir/go.mod new file mode 100644 index 00000000..7efa09a0 --- /dev/null +++ b/vendor/github.com/mitchellh/go-homedir/go.mod @@ -0,0 +1 @@ +module github.com/mitchellh/go-homedir diff --git a/vendor/github.com/mitchellh/mapstructure/.travis.yml b/vendor/github.com/mitchellh/mapstructure/.travis.yml new file mode 100644 index 00000000..1689c7d7 --- /dev/null +++ b/vendor/github.com/mitchellh/mapstructure/.travis.yml @@ -0,0 +1,8 @@ +language: go + +go: + - "1.11.x" + - tip + +script: + - go test diff --git a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md new file mode 100644 index 00000000..3b3cb723 --- /dev/null +++ b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md @@ -0,0 +1,21 @@ +## 1.1.2 + +* Fix error when decode hook decodes interface implementation into interface + type. [GH-140] + +## 1.1.1 + +* Fix panic that can happen in `decodePtr` + +## 1.1.0 + +* Added `StringToIPHookFunc` to convert `string` to `net.IP` and `net.IPNet` [GH-133] +* Support struct to struct decoding [GH-137] +* If source map value is nil, then destination map value is nil (instead of empty) +* If source slice value is nil, then destination slice value is nil (instead of empty) +* If source pointer is nil, then destination pointer is set to nil (instead of + allocated zero value of type) + +## 1.0.0 + +* Initial tagged stable release. diff --git a/vendor/github.com/mitchellh/mapstructure/README.md b/vendor/github.com/mitchellh/mapstructure/README.md new file mode 100644 index 00000000..0018dc7d --- /dev/null +++ b/vendor/github.com/mitchellh/mapstructure/README.md @@ -0,0 +1,46 @@ +# mapstructure [![Godoc](https://godoc.org/github.com/mitchellh/mapstructure?status.svg)](https://godoc.org/github.com/mitchellh/mapstructure) + +mapstructure is a Go library for decoding generic map values to structures +and vice versa, while providing helpful error handling. + +This library is most useful when decoding values from some data stream (JSON, +Gob, etc.) where you don't _quite_ know the structure of the underlying data +until you read a part of it. You can therefore read a `map[string]interface{}` +and use this library to decode it into the proper underlying native Go +structure. + +## Installation + +Standard `go get`: + +``` +$ go get github.com/mitchellh/mapstructure +``` + +## Usage & Example + +For usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/mapstructure). + +The `Decode` function has examples associated with it there. + +## But Why?! + +Go offers fantastic standard libraries for decoding formats such as JSON. +The standard method is to have a struct pre-created, and populate that struct +from the bytes of the encoded format. This is great, but the problem is if +you have configuration or an encoding that changes slightly depending on +specific fields. For example, consider this JSON: + +```json +{ + "type": "person", + "name": "Mitchell" +} +``` + +Perhaps we can't populate a specific structure without first reading +the "type" field from the JSON. We could always do two passes over the +decoding of the JSON (reading the "type" first, and the rest later). +However, it is much simpler to just decode this into a `map[string]interface{}` +structure, read the "type" key, then use something like this library +to decode it into the proper structure. diff --git a/vendor/github.com/mitchellh/mapstructure/go.mod b/vendor/github.com/mitchellh/mapstructure/go.mod new file mode 100644 index 00000000..d2a71256 --- /dev/null +++ b/vendor/github.com/mitchellh/mapstructure/go.mod @@ -0,0 +1 @@ +module github.com/mitchellh/mapstructure diff --git a/vendor/github.com/pierrec/lz4/.gitignore b/vendor/github.com/pierrec/lz4/.gitignore new file mode 100644 index 00000000..5e987350 --- /dev/null +++ b/vendor/github.com/pierrec/lz4/.gitignore @@ -0,0 +1,34 @@ +# Created by https://www.gitignore.io/api/macos + +### macOS ### +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# End of https://www.gitignore.io/api/macos + +cmd/*/*exe +.idea \ No newline at end of file diff --git a/vendor/github.com/pierrec/lz4/.travis.yml b/vendor/github.com/pierrec/lz4/.travis.yml new file mode 100644 index 00000000..fd6c6db7 --- /dev/null +++ b/vendor/github.com/pierrec/lz4/.travis.yml @@ -0,0 +1,24 @@ +language: go + +env: + - GO111MODULE=off + +go: + - 1.9.x + - 1.10.x + - 1.11.x + - 1.12.x + - master + +matrix: + fast_finish: true + allow_failures: + - go: master + +sudo: false + +script: + - go test -v -cpu=2 + - go test -v -cpu=2 -race + - go test -v -cpu=2 -tags noasm + - go test -v -cpu=2 -race -tags noasm diff --git a/vendor/github.com/pierrec/lz4/README.md b/vendor/github.com/pierrec/lz4/README.md new file mode 100644 index 00000000..be1f52ad --- /dev/null +++ b/vendor/github.com/pierrec/lz4/README.md @@ -0,0 +1,106 @@ +# lz4 : LZ4 compression in pure Go + +[![GoDoc](https://godoc.org/github.com/pierrec/lz4?status.svg)](https://godoc.org/github.com/pierrec/lz4) +[![Build Status](https://travis-ci.org/pierrec/lz4.svg?branch=master)](https://travis-ci.org/pierrec/lz4) +[![Go Report Card](https://goreportcard.com/badge/github.com/pierrec/lz4)](https://goreportcard.com/report/github.com/pierrec/lz4) +[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/pierrec/lz4.svg?style=social)](https://github.com/pierrec/lz4/tags) + +## Overview + +This package provides a streaming interface to [LZ4 data streams](http://fastcompression.blogspot.fr/2013/04/lz4-streaming-format-final.html) as well as low level compress and uncompress functions for LZ4 data blocks. +The implementation is based on the reference C [one](https://github.com/lz4/lz4). + +## Install + +Assuming you have the go toolchain installed: + +``` +go get github.com/pierrec/lz4 +``` + +There is a command line interface tool to compress and decompress LZ4 files. + +``` +go install github.com/pierrec/lz4/cmd/lz4c +``` + +Usage + +``` +Usage of lz4c: + -version + print the program version + +Subcommands: +Compress the given files or from stdin to stdout. +compress [arguments] [ ...] + -bc + enable block checksum + -l int + compression level (0=fastest) + -sc + disable stream checksum + -size string + block max size [64K,256K,1M,4M] (default "4M") + +Uncompress the given files or from stdin to stdout. +uncompress [arguments] [ ...] + +``` + + +## Example + +``` +// Compress and uncompress an input string. +s := "hello world" +r := strings.NewReader(s) + +// The pipe will uncompress the data from the writer. +pr, pw := io.Pipe() +zw := lz4.NewWriter(pw) +zr := lz4.NewReader(pr) + +go func() { + // Compress the input string. + _, _ = io.Copy(zw, r) + _ = zw.Close() // Make sure the writer is closed + _ = pw.Close() // Terminate the pipe +}() + +_, _ = io.Copy(os.Stdout, zr) + +// Output: +// hello world +``` + +## Contributing + +Contributions are very welcome for bug fixing, performance improvements...! + +- Open an issue with a proper description +- Send a pull request with appropriate test case(s) + +## Contributors + +Thanks to all contributors so far: + +- [@klauspost](https://github.com/klauspost) +- [@heidawei](https://github.com/heidawei) +- [@x4m](https://github.com/x4m) +- [@Zariel](https://github.com/Zariel) +- [@edwingeng](https://github.com/edwingeng) +- [@danielmoy-google](https://github.com/danielmoy-google) +- [@honda-tatsuya](https://github.com/honda-tatsuya) +- [@h8liu](https://github.com/h8liu) +- [@sbinet](https://github.com/sbinet) +- [@fingon](https://github.com/fingon) +- [@emfree](https://github.com/emfree) +- [@lhemala](https://github.com/lhemala) +- [@connor4312](https://github.com/connor4312) +- [@oov](https://github.com/oov) +- [@arya](https://github.com/arya) +- [@ikkeps](https://github.com/ikkeps) + +Special thanks to [@Zariel](https://github.com/Zariel) for his asm implementation of the decoder +Special thanks to [@klauspost](https://github.com/klauspost) for his work on optimizing the code diff --git a/vendor/github.com/pierrec/lz4/block.go b/vendor/github.com/pierrec/lz4/block.go index d96e0e76..5755cda2 100644 --- a/vendor/github.com/pierrec/lz4/block.go +++ b/vendor/github.com/pierrec/lz4/block.go @@ -2,21 +2,14 @@ package lz4 import ( "encoding/binary" - "errors" + "fmt" + "math/bits" ) -var ( - // ErrInvalidSourceShortBuffer is returned by UncompressBlock or CompressBLock when a compressed - // block is corrupted or the destination buffer is not large enough for the uncompressed data. - ErrInvalidSourceShortBuffer = errors.New("lz4: invalid source or destination buffer too short") - // ErrInvalid is returned when reading an invalid LZ4 archive. - ErrInvalid = errors.New("lz4: bad magic number") -) - -// blockHash hashes 4 bytes into a value < winSize. -func blockHash(x uint32) uint32 { - const hasher uint32 = 2654435761 // Knuth multiplicative hash. - return x * hasher >> hashShift +// blockHash hashes the lower 6 bytes into a value < htSize. +func blockHash(x uint64) uint32 { + const prime6bytes = 227718039650203 + return uint32(((x << (64 - 48)) * prime6bytes) >> (64 - hashLog)) } // CompressBlockBound returns the maximum size of a given buffer of size n, when not compressible. @@ -30,17 +23,14 @@ func CompressBlockBound(n int) int { // The destination buffer must be sized appropriately. // // An error is returned if the source data is invalid or the destination buffer is too small. -func UncompressBlock(src, dst []byte) (di int, err error) { - sn := len(src) - if sn == 0 { +func UncompressBlock(src, dst []byte) (int, error) { + if len(src) == 0 { return 0, nil } - - di = decodeBlock(dst, src) - if di < 0 { - return 0, ErrInvalidSourceShortBuffer + if di := decodeBlock(dst, src); di >= 0 { + return di, nil } - return di, nil + return 0, ErrInvalidSourceShortBuffer } // CompressBlock compresses the source buffer into the destination one. @@ -51,58 +41,98 @@ func UncompressBlock(src, dst []byte) (di int, err error) { // // An error is returned if the destination buffer is too small. func CompressBlock(src, dst []byte, hashTable []int) (di int, err error) { - defer func() { - if recover() != nil { - err = ErrInvalidSourceShortBuffer - } - }() + defer recoverBlock(&err) + // adaptSkipLog sets how quickly the compressor begins skipping blocks when data is incompressible. + // This significantly speeds up incompressible data and usually has very small impact on compresssion. + // bytes to skip = 1 + (bytes since last match >> adaptSkipLog) + const adaptSkipLog = 7 sn, dn := len(src)-mfLimit, len(dst) if sn <= 0 || dn == 0 { return 0, nil } - var si int - - // Fast scan strategy: the hash table only stores the last 4 bytes sequences. - // const accInit = 1 << skipStrength + if len(hashTable) < htSize { + return 0, fmt.Errorf("hash table too small, should be at least %d in size", htSize) + } + // Prove to the compiler the table has at least htSize elements. + // The compiler can see that "uint32() >> hashShift" cannot be out of bounds. + hashTable = hashTable[:htSize] - anchor := si // Position of the current literals. - // acc := accInit // Variable step: improves performance on non-compressible data. + // si: Current position of the search. + // anchor: Position of the current literals. + var si, anchor int + // Fast scan strategy: the hash table only stores the last 4 bytes sequences. for si < sn { - // Hash the next 4 bytes (sequence)... - match := binary.LittleEndian.Uint32(src[si:]) + // Hash the next 6 bytes (sequence)... + match := binary.LittleEndian.Uint64(src[si:]) h := blockHash(match) + h2 := blockHash(match >> 8) + // We check a match at s, s+1 and s+2 and pick the first one we get. + // Checking 3 only requires us to load the source one. ref := hashTable[h] + ref2 := hashTable[h2] hashTable[h] = si - if ref >= sn { // Invalid reference (dirty hashtable). - si++ - continue - } + hashTable[h2] = si + 1 offset := si - ref + + // If offset <= 0 we got an old entry in the hash table. if offset <= 0 || offset >= winSize || // Out of window. - match != binary.LittleEndian.Uint32(src[ref:]) { // Hash collision on different matches. - // si += acc >> skipStrength - // acc++ - si++ - continue + uint32(match) != binary.LittleEndian.Uint32(src[ref:]) { // Hash collision on different matches. + // No match. Start calculating another hash. + // The processor can usually do this out-of-order. + h = blockHash(match >> 16) + ref = hashTable[h] + + // Check the second match at si+1 + si += 1 + offset = si - ref2 + + if offset <= 0 || offset >= winSize || + uint32(match>>8) != binary.LittleEndian.Uint32(src[ref2:]) { + // No match. Check the third match at si+2 + si += 1 + offset = si - ref + hashTable[h] = si + + if offset <= 0 || offset >= winSize || + uint32(match>>16) != binary.LittleEndian.Uint32(src[ref:]) { + // Skip one extra byte (at si+3) before we check 3 matches again. + si += 2 + (si-anchor)>>adaptSkipLog + continue + } + } } // Match found. - // acc = accInit lLen := si - anchor // Literal length. - - // Encode match length part 1. - si += minMatch - mLen := si // Match length has minMatch already. - // Find the longest match, first looking by batches of 8 bytes. - for si < sn && binary.LittleEndian.Uint64(src[si:]) == binary.LittleEndian.Uint64(src[si-offset:]) { - si += 8 + // We already matched 4 bytes. + mLen := 4 + + // Extend backwards if we can, reducing literals. + tOff := si - offset - 1 + for lLen > 0 && tOff >= 0 && src[si-1] == src[tOff] { + si-- + tOff-- + lLen-- + mLen++ } - // Then byte by byte. - for si < sn && src[si] == src[si-offset] { - si++ + + // Add the match length, so we continue search at the end. + // Use mLen to store the offset base. + si, mLen = si+mLen, si+minMatch + + // Find the longest match by looking by batches of 8 bytes. + for si < sn { + x := binary.LittleEndian.Uint64(src[si:]) ^ binary.LittleEndian.Uint64(src[si-offset:]) + if x == 0 { + si += 8 + } else { + // Stop is first non-zero byte. + si += bits.TrailingZeros64(x) >> 3 + break + } } mLen = si - mLen @@ -145,6 +175,13 @@ func CompressBlock(src, dst []byte, hashTable []int) (di int, err error) { dst[di] = byte(mLen) di++ } + // Check if we can load next values. + if si >= sn { + break + } + // Hash match end-2 + h = blockHash(binary.LittleEndian.Uint64(src[si-2:])) + hashTable[h] = si - 2 } if anchor == 0 { @@ -176,6 +213,12 @@ func CompressBlock(src, dst []byte, hashTable []int) (di int, err error) { return di, nil } +// blockHash hashes 4 bytes into a value < winSize. +func blockHashHC(x uint32) uint32 { + const hasher uint32 = 2654435761 // Knuth multiplicative hash. + return x * hasher >> (32 - winSizeLog) +} + // CompressBlockHC compresses the source buffer src into the destination dst // with max search depth (use 0 or negative value for no max). // @@ -185,11 +228,12 @@ func CompressBlock(src, dst []byte, hashTable []int) (di int, err error) { // // An error is returned if the destination buffer is too small. func CompressBlockHC(src, dst []byte, depth int) (di int, err error) { - defer func() { - if recover() != nil { - err = ErrInvalidSourceShortBuffer - } - }() + defer recoverBlock(&err) + + // adaptSkipLog sets how quickly the compressor begins skipping blocks when data is incompressible. + // This significantly speeds up incompressible data and usually has very small impact on compresssion. + // bytes to skip = 1 + (bytes since last match >> adaptSkipLog) + const adaptSkipLog = 7 sn, dn := len(src)-mfLimit, len(dst) if sn <= 0 || dn == 0 { @@ -198,7 +242,7 @@ func CompressBlockHC(src, dst []byte, depth int) (di int, err error) { var si int // hashTable: stores the last position found for a given hash - // chaingTable: stores previous positions for a given hash + // chainTable: stores previous positions for a given hash var hashTable, chainTable [winSize]int if depth <= 0 { @@ -209,7 +253,7 @@ func CompressBlockHC(src, dst []byte, depth int) (di int, err error) { for si < sn { // Hash the next 4 bytes (sequence). match := binary.LittleEndian.Uint32(src[si:]) - h := blockHash(match) + h := blockHashHC(match) // Follow the chain until out of window and give the longest match. mLen := 0 @@ -222,11 +266,15 @@ func CompressBlockHC(src, dst []byte, depth int) (di int, err error) { } ml := 0 // Compare the current position with a previous with the same hash. - for ml < sn-si && binary.LittleEndian.Uint64(src[next+ml:]) == binary.LittleEndian.Uint64(src[si+ml:]) { - ml += 8 - } - for ml < sn-si && src[next+ml] == src[si+ml] { - ml++ + for ml < sn-si { + x := binary.LittleEndian.Uint64(src[next+ml:]) ^ binary.LittleEndian.Uint64(src[si+ml:]) + if x == 0 { + ml += 8 + } else { + // Stop is first non-zero byte. + ml += bits.TrailingZeros64(x) >> 3 + break + } } if ml < minMatch || ml <= mLen { // Match too small (>adaptSkipLog continue } @@ -257,7 +305,7 @@ func CompressBlockHC(src, dst []byte, depth int) (di int, err error) { for si, ml := winStart, si+mLen; si < ml; { match >>= 8 match |= uint32(src[si+3]) << 24 - h := blockHash(match) + h := blockHashHC(match) chainTable[si&winMask] = hashTable[h] hashTable[h] = si si++ diff --git a/vendor/github.com/pierrec/lz4/decode_other.go b/vendor/github.com/pierrec/lz4/decode_other.go index b83a19a4..919888ed 100644 --- a/vendor/github.com/pierrec/lz4/decode_other.go +++ b/vendor/github.com/pierrec/lz4/decode_other.go @@ -3,11 +3,10 @@ package lz4 func decodeBlock(dst, src []byte) (ret int) { + const hasError = -2 defer func() { - // It is now faster to let the runtime panic and recover on out of bound slice access - // than checking indices as we go along. if recover() != nil { - ret = -2 + ret = hasError } }() @@ -20,7 +19,7 @@ func decodeBlock(dst, src []byte) (ret int) { // Literals. if lLen := b >> 4; lLen > 0 { switch { - case lLen < 0xF && di+18 < len(dst) && si+16 < len(src): + case lLen < 0xF && si+16 < len(src): // Shortcut 1 // if we have enough room in src and dst, and the literals length // is small enough (0..14) then copy all 16 bytes, even if not all @@ -35,7 +34,13 @@ func decodeBlock(dst, src []byte) (ret int) { mLen += 4 if offset := int(src[si]) | int(src[si+1])<<8; mLen <= offset { i := di - offset - copy(dst[di:], dst[i:i+18]) + end := i + 18 + if end > len(dst) { + // The remaining buffer may not hold 18 bytes. + // See https://github.com/pierrec/lz4/issues/51. + end = len(dst) + } + copy(dst[di:], dst[i:end]) si += 2 di += mLen continue @@ -61,7 +66,7 @@ func decodeBlock(dst, src []byte) (ret int) { offset := int(src[si]) | int(src[si+1])<<8 if offset == 0 { - return -2 + return hasError } si += 2 @@ -90,6 +95,4 @@ func decodeBlock(dst, src []byte) (ret int) { } di += copy(dst[di:di+mLen], expanded[:mLen]) } - - return di } diff --git a/vendor/github.com/pierrec/lz4/errors.go b/vendor/github.com/pierrec/lz4/errors.go new file mode 100644 index 00000000..1c45d181 --- /dev/null +++ b/vendor/github.com/pierrec/lz4/errors.go @@ -0,0 +1,30 @@ +package lz4 + +import ( + "errors" + "fmt" + "os" + rdebug "runtime/debug" +) + +var ( + // ErrInvalidSourceShortBuffer is returned by UncompressBlock or CompressBLock when a compressed + // block is corrupted or the destination buffer is not large enough for the uncompressed data. + ErrInvalidSourceShortBuffer = errors.New("lz4: invalid source or destination buffer too short") + // ErrInvalid is returned when reading an invalid LZ4 archive. + ErrInvalid = errors.New("lz4: bad magic number") + // ErrBlockDependency is returned when attempting to decompress an archive created with block dependency. + ErrBlockDependency = errors.New("lz4: block dependency not supported") + // ErrUnsupportedSeek is returned when attempting to Seek any way but forward from the current position. + ErrUnsupportedSeek = errors.New("lz4: can only seek forward from io.SeekCurrent") +) + +func recoverBlock(e *error) { + if r := recover(); r != nil && *e == nil { + if debugFlag { + fmt.Fprintln(os.Stderr, r) + rdebug.PrintStack() + } + *e = ErrInvalidSourceShortBuffer + } +} diff --git a/vendor/github.com/pierrec/lz4/internal/xxh32/xxh32zero.go b/vendor/github.com/pierrec/lz4/internal/xxh32/xxh32zero.go index 850a6fdf..7a76a6bc 100644 --- a/vendor/github.com/pierrec/lz4/internal/xxh32/xxh32zero.go +++ b/vendor/github.com/pierrec/lz4/internal/xxh32/xxh32zero.go @@ -7,14 +7,15 @@ import ( ) const ( - prime32_1 uint32 = 2654435761 - prime32_2 uint32 = 2246822519 - prime32_3 uint32 = 3266489917 - prime32_4 uint32 = 668265263 - prime32_5 uint32 = 374761393 - - prime32_1plus2 uint32 = 606290984 - prime32_minus1 uint32 = 1640531535 + prime1 uint32 = 2654435761 + prime2 uint32 = 2246822519 + prime3 uint32 = 3266489917 + prime4 uint32 = 668265263 + prime5 uint32 = 374761393 + + primeMask = 0xFFFFFFFF + prime1plus2 = uint32((uint64(prime1) + uint64(prime2)) & primeMask) // 606290984 + prime1minus = uint32((-int64(prime1)) & primeMask) // 1640531535 ) // XXHZero represents an xxhash32 object with seed 0. @@ -37,10 +38,10 @@ func (xxh XXHZero) Sum(b []byte) []byte { // Reset resets the Hash to its initial state. func (xxh *XXHZero) Reset() { - xxh.v1 = prime32_1plus2 - xxh.v2 = prime32_2 + xxh.v1 = prime1plus2 + xxh.v2 = prime2 xxh.v3 = 0 - xxh.v4 = prime32_minus1 + xxh.v4 = prime1minus xxh.totalLen = 0 xxh.bufused = 0 } @@ -83,20 +84,20 @@ func (xxh *XXHZero) Write(input []byte) (int, error) { // fast rotl(13) buf := xxh.buf[:16] // BCE hint. - v1 = rol13(v1+binary.LittleEndian.Uint32(buf[:])*prime32_2) * prime32_1 - v2 = rol13(v2+binary.LittleEndian.Uint32(buf[4:])*prime32_2) * prime32_1 - v3 = rol13(v3+binary.LittleEndian.Uint32(buf[8:])*prime32_2) * prime32_1 - v4 = rol13(v4+binary.LittleEndian.Uint32(buf[12:])*prime32_2) * prime32_1 + v1 = rol13(v1+binary.LittleEndian.Uint32(buf[:])*prime2) * prime1 + v2 = rol13(v2+binary.LittleEndian.Uint32(buf[4:])*prime2) * prime1 + v3 = rol13(v3+binary.LittleEndian.Uint32(buf[8:])*prime2) * prime1 + v4 = rol13(v4+binary.LittleEndian.Uint32(buf[12:])*prime2) * prime1 p = r xxh.bufused = 0 } for n := n - 16; p <= n; p += 16 { sub := input[p:][:16] //BCE hint for compiler - v1 = rol13(v1+binary.LittleEndian.Uint32(sub[:])*prime32_2) * prime32_1 - v2 = rol13(v2+binary.LittleEndian.Uint32(sub[4:])*prime32_2) * prime32_1 - v3 = rol13(v3+binary.LittleEndian.Uint32(sub[8:])*prime32_2) * prime32_1 - v4 = rol13(v4+binary.LittleEndian.Uint32(sub[12:])*prime32_2) * prime32_1 + v1 = rol13(v1+binary.LittleEndian.Uint32(sub[:])*prime2) * prime1 + v2 = rol13(v2+binary.LittleEndian.Uint32(sub[4:])*prime2) * prime1 + v3 = rol13(v3+binary.LittleEndian.Uint32(sub[8:])*prime2) * prime1 + v4 = rol13(v4+binary.LittleEndian.Uint32(sub[12:])*prime2) * prime1 } xxh.v1, xxh.v2, xxh.v3, xxh.v4 = v1, v2, v3, v4 @@ -112,25 +113,25 @@ func (xxh *XXHZero) Sum32() uint32 { if h32 >= 16 { h32 += rol1(xxh.v1) + rol7(xxh.v2) + rol12(xxh.v3) + rol18(xxh.v4) } else { - h32 += prime32_5 + h32 += prime5 } p := 0 n := xxh.bufused buf := xxh.buf for n := n - 4; p <= n; p += 4 { - h32 += binary.LittleEndian.Uint32(buf[p:p+4]) * prime32_3 - h32 = rol17(h32) * prime32_4 + h32 += binary.LittleEndian.Uint32(buf[p:p+4]) * prime3 + h32 = rol17(h32) * prime4 } for ; p < n; p++ { - h32 += uint32(buf[p]) * prime32_5 - h32 = rol11(h32) * prime32_1 + h32 += uint32(buf[p]) * prime5 + h32 = rol11(h32) * prime1 } h32 ^= h32 >> 15 - h32 *= prime32_2 + h32 *= prime2 h32 ^= h32 >> 13 - h32 *= prime32_3 + h32 *= prime3 h32 ^= h32 >> 16 return h32 @@ -142,19 +143,19 @@ func ChecksumZero(input []byte) uint32 { h32 := uint32(n) if n < 16 { - h32 += prime32_5 + h32 += prime5 } else { - v1 := prime32_1plus2 - v2 := prime32_2 + v1 := prime1plus2 + v2 := prime2 v3 := uint32(0) - v4 := prime32_minus1 + v4 := prime1minus p := 0 for n := n - 16; p <= n; p += 16 { sub := input[p:][:16] //BCE hint for compiler - v1 = rol13(v1+binary.LittleEndian.Uint32(sub[:])*prime32_2) * prime32_1 - v2 = rol13(v2+binary.LittleEndian.Uint32(sub[4:])*prime32_2) * prime32_1 - v3 = rol13(v3+binary.LittleEndian.Uint32(sub[8:])*prime32_2) * prime32_1 - v4 = rol13(v4+binary.LittleEndian.Uint32(sub[12:])*prime32_2) * prime32_1 + v1 = rol13(v1+binary.LittleEndian.Uint32(sub[:])*prime2) * prime1 + v2 = rol13(v2+binary.LittleEndian.Uint32(sub[4:])*prime2) * prime1 + v3 = rol13(v3+binary.LittleEndian.Uint32(sub[8:])*prime2) * prime1 + v4 = rol13(v4+binary.LittleEndian.Uint32(sub[12:])*prime2) * prime1 } input = input[p:] n -= p @@ -163,19 +164,19 @@ func ChecksumZero(input []byte) uint32 { p := 0 for n := n - 4; p <= n; p += 4 { - h32 += binary.LittleEndian.Uint32(input[p:p+4]) * prime32_3 - h32 = rol17(h32) * prime32_4 + h32 += binary.LittleEndian.Uint32(input[p:p+4]) * prime3 + h32 = rol17(h32) * prime4 } for p < n { - h32 += uint32(input[p]) * prime32_5 - h32 = rol11(h32) * prime32_1 + h32 += uint32(input[p]) * prime5 + h32 = rol11(h32) * prime1 p++ } h32 ^= h32 >> 15 - h32 *= prime32_2 + h32 *= prime2 h32 ^= h32 >> 13 - h32 *= prime32_3 + h32 *= prime3 h32 ^= h32 >> 16 return h32 @@ -183,12 +184,12 @@ func ChecksumZero(input []byte) uint32 { // Uint32Zero hashes x with seed 0. func Uint32Zero(x uint32) uint32 { - h := prime32_5 + 4 + x*prime32_3 - h = rol17(h) * prime32_4 + h := prime5 + 4 + x*prime3 + h = rol17(h) * prime4 h ^= h >> 15 - h *= prime32_2 + h *= prime2 h ^= h >> 13 - h *= prime32_3 + h *= prime3 h ^= h >> 16 return h } diff --git a/vendor/github.com/pierrec/lz4/lz4.go b/vendor/github.com/pierrec/lz4/lz4.go index 35802756..cdbf9611 100644 --- a/vendor/github.com/pierrec/lz4/lz4.go +++ b/vendor/github.com/pierrec/lz4/lz4.go @@ -30,27 +30,25 @@ const ( // hashLog determines the size of the hash table used to quickly find a previous match position. // Its value influences the compression speed and memory usage, the lower the faster, // but at the expense of the compression ratio. - // 16 seems to be the best compromise. - hashLog = 16 - hashTableSize = 1 << hashLog - hashShift = uint((minMatch * 8) - hashLog) + // 16 seems to be the best compromise for fast compression. + hashLog = 16 + htSize = 1 << hashLog - mfLimit = 8 + minMatch // The last match cannot start within the last 12 bytes. - skipStrength = 6 // variable step for fast scan + mfLimit = 8 + minMatch // The last match cannot start within the last 12 bytes. ) // map the block max size id with its value in bytes: 64Kb, 256Kb, 1Mb and 4Mb. -var ( - bsMapID = map[byte]int{4: 64 << 10, 5: 256 << 10, 6: 1 << 20, 7: 4 << 20} - bsMapValue = make(map[int]byte, len(bsMapID)) +const ( + blockSize64K = 64 << 10 + blockSize256K = 256 << 10 + blockSize1M = 1 << 20 + blockSize4M = 4 << 20 ) -// Reversed. -func init() { - for i, v := range bsMapID { - bsMapValue[v] = i - } -} +var ( + bsMapID = map[byte]int{4: blockSize64K, 5: blockSize256K, 6: blockSize1M, 7: blockSize4M} + bsMapValue = map[int]byte{blockSize64K: 4, blockSize256K: 5, blockSize1M: 6, blockSize4M: 7} +) // Header describes the various flags that can be set on a Writer or obtained from a Reader. // The default values match those of the LZ4 frame format definition diff --git a/vendor/github.com/pierrec/lz4/reader.go b/vendor/github.com/pierrec/lz4/reader.go index 9fac0430..126b792e 100644 --- a/vendor/github.com/pierrec/lz4/reader.go +++ b/vendor/github.com/pierrec/lz4/reader.go @@ -25,6 +25,8 @@ type Reader struct { data []byte // Uncompressed data. idx int // Index of unread bytes into data. checksum xxh32.XXHZero // Frame hash. + skip int64 // Bytes to skip before next read. + dpos int64 // Position in dest } // NewReader returns a new LZ4 frame decoder. @@ -79,7 +81,7 @@ func (z *Reader) readHeader(first bool) error { return fmt.Errorf("lz4: invalid version: got %d; expected %d", v, Version) } if b>>5&1 == 0 { - return fmt.Errorf("lz4: block dependency not supported") + return ErrBlockDependency } z.BlockChecksum = b>>4&1 > 0 frameSize := b>>3&1 > 0 @@ -275,8 +277,20 @@ func (z *Reader) Read(buf []byte) (int, error) { z.idx = 0 } + if z.skip > int64(len(z.data[z.idx:])) { + z.skip -= int64(len(z.data[z.idx:])) + z.dpos += int64(len(z.data[z.idx:])) + z.idx = len(z.data) + return 0, nil + } + + z.idx += int(z.skip) + z.dpos += z.skip + z.skip = 0 + n := copy(buf, z.data[z.idx:]) z.idx += n + z.dpos += int64(n) if debugFlag { debug("copied %d bytes to input", n) } @@ -284,6 +298,20 @@ func (z *Reader) Read(buf []byte) (int, error) { return n, nil } +// Seek implements io.Seeker, but supports seeking forward from the current +// position only. Any other seek will return an error. Allows skipping output +// bytes which aren't needed, which in some scenarios is faster than reading +// and discarding them. +// Note this may cause future calls to Read() to read 0 bytes if all of the +// data they would have returned is skipped. +func (z *Reader) Seek(offset int64, whence int) (int64, error) { + if offset < 0 || whence != io.SeekCurrent { + return z.dpos + z.skip, ErrUnsupportedSeek + } + z.skip += offset + return z.dpos + z.skip, nil +} + // Reset discards the Reader's state and makes it equivalent to the // result of its original state from NewReader, but reading from r instead. // This permits reusing a Reader rather than allocating a new one. diff --git a/vendor/github.com/pierrec/lz4/writer.go b/vendor/github.com/pierrec/lz4/writer.go index df8602df..2cc8d95c 100644 --- a/vendor/github.com/pierrec/lz4/writer.go +++ b/vendor/github.com/pierrec/lz4/writer.go @@ -46,11 +46,13 @@ func (z *Writer) writeHeader() error { } // Allocate the compressed/uncompressed buffers. // The compressed buffer cannot exceed the uncompressed one. - if n := 2 * bSize; cap(z.zdata) < n { - z.zdata = make([]byte, n, n) + if cap(z.zdata) < bSize { + // Only allocate if there is not enough capacity. + // Allocate both buffers at once. + z.zdata = make([]byte, 2*bSize) } - z.data = z.zdata[:bSize] - z.zdata = z.zdata[:cap(z.zdata)][bSize:] + z.data = z.zdata[:bSize] // Uncompressed buffer is the first half. + z.zdata = z.zdata[:cap(z.zdata)][bSize:] // Compressed buffer is the second half. z.idx = 0 // Size is optional. @@ -193,20 +195,18 @@ func (z *Writer) compressBlock(data []byte) error { h(written) } - if z.BlockChecksum { - checksum := xxh32.ChecksumZero(zdata) + if !z.BlockChecksum { if debugFlag { - debug("block checksum %x", checksum) - } - if err := z.writeUint32(checksum); err != nil { - return err + debug("current frame checksum %x", z.checksum.Sum32()) } + return nil } + checksum := xxh32.ChecksumZero(zdata) if debugFlag { - debug("current frame checksum %x", z.checksum.Sum32()) + debug("block checksum %x", checksum) + defer func() { debug("current frame checksum %x", z.checksum.Sum32()) }() } - - return nil + return z.writeUint32(checksum) } // Flush flushes any pending compressed data to the underlying writer. @@ -234,7 +234,6 @@ func (z *Writer) Close() error { return err } } - if err := z.Flush(); err != nil { return err } @@ -245,16 +244,14 @@ func (z *Writer) Close() error { if err := z.writeUint32(0); err != nil { return err } - if !z.NoChecksum { - checksum := z.checksum.Sum32() - if debugFlag { - debug("stream checksum %x", checksum) - } - if err := z.writeUint32(checksum); err != nil { - return err - } + if z.NoChecksum { + return nil } - return nil + checksum := z.checksum.Sum32() + if debugFlag { + debug("stream checksum %x", checksum) + } + return z.writeUint32(checksum) } // Reset clears the state of the Writer z such that it is equivalent to its diff --git a/vendor/github.com/pkg/errors/.gitignore b/vendor/github.com/pkg/errors/.gitignore new file mode 100644 index 00000000..daf913b1 --- /dev/null +++ b/vendor/github.com/pkg/errors/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/pkg/errors/.travis.yml b/vendor/github.com/pkg/errors/.travis.yml new file mode 100644 index 00000000..d4b92663 --- /dev/null +++ b/vendor/github.com/pkg/errors/.travis.yml @@ -0,0 +1,15 @@ +language: go +go_import_path: github.com/pkg/errors +go: + - 1.4.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - 1.10.x + - 1.11.x + - tip + +script: + - go test -v ./... diff --git a/vendor/github.com/pkg/errors/README.md b/vendor/github.com/pkg/errors/README.md new file mode 100644 index 00000000..6483ba2a --- /dev/null +++ b/vendor/github.com/pkg/errors/README.md @@ -0,0 +1,52 @@ +# errors [![Travis-CI](https://travis-ci.org/pkg/errors.svg)](https://travis-ci.org/pkg/errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/b98mptawhudj53ep/branch/master?svg=true)](https://ci.appveyor.com/project/davecheney/errors/branch/master) [![GoDoc](https://godoc.org/github.com/pkg/errors?status.svg)](http://godoc.org/github.com/pkg/errors) [![Report card](https://goreportcard.com/badge/github.com/pkg/errors)](https://goreportcard.com/report/github.com/pkg/errors) [![Sourcegraph](https://sourcegraph.com/github.com/pkg/errors/-/badge.svg)](https://sourcegraph.com/github.com/pkg/errors?badge) + +Package errors provides simple error handling primitives. + +`go get github.com/pkg/errors` + +The traditional error handling idiom in Go is roughly akin to +```go +if err != nil { + return err +} +``` +which applied recursively up the call stack results in error reports without context or debugging information. The errors package allows programmers to add context to the failure path in their code in a way that does not destroy the original value of the error. + +## Adding context to an error + +The errors.Wrap function returns a new error that adds context to the original error. For example +```go +_, err := ioutil.ReadAll(r) +if err != nil { + return errors.Wrap(err, "read failed") +} +``` +## Retrieving the cause of an error + +Using `errors.Wrap` constructs a stack of errors, adding context to the preceding error. Depending on the nature of the error it may be necessary to reverse the operation of errors.Wrap to retrieve the original error for inspection. Any error value which implements this interface can be inspected by `errors.Cause`. +```go +type causer interface { + Cause() error +} +``` +`errors.Cause` will recursively retrieve the topmost error which does not implement `causer`, which is assumed to be the original cause. For example: +```go +switch err := errors.Cause(err).(type) { +case *MyError: + // handle specifically +default: + // unknown error +} +``` + +[Read the package documentation for more information](https://godoc.org/github.com/pkg/errors). + +## Contributing + +We welcome pull requests, bug fixes and issue reports. With that said, the bar for adding new symbols to this package is intentionally set high. + +Before proposing a change, please discuss your change by raising an issue. + +## License + +BSD-2-Clause diff --git a/vendor/github.com/pkg/errors/appveyor.yml b/vendor/github.com/pkg/errors/appveyor.yml new file mode 100644 index 00000000..a932eade --- /dev/null +++ b/vendor/github.com/pkg/errors/appveyor.yml @@ -0,0 +1,32 @@ +version: build-{build}.{branch} + +clone_folder: C:\gopath\src\github.com\pkg\errors +shallow_clone: true # for startup speed + +environment: + GOPATH: C:\gopath + +platform: + - x64 + +# http://www.appveyor.com/docs/installed-software +install: + # some helpful output for debugging builds + - go version + - go env + # pre-installed MinGW at C:\MinGW is 32bit only + # but MSYS2 at C:\msys64 has mingw64 + - set PATH=C:\msys64\mingw64\bin;%PATH% + - gcc --version + - g++ --version + +build_script: + - go install -v ./... + +test_script: + - set PATH=C:\gopath\bin;%PATH% + - go test -v ./... + +#artifacts: +# - path: '%GOPATH%\bin\*.exe' +deploy: off diff --git a/vendor/github.com/rainycape/unidecode/.gitignore b/vendor/github.com/rainycape/unidecode/.gitignore new file mode 100644 index 00000000..83656241 --- /dev/null +++ b/vendor/github.com/rainycape/unidecode/.gitignore @@ -0,0 +1,23 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test diff --git a/vendor/github.com/rainycape/unidecode/README.md b/vendor/github.com/rainycape/unidecode/README.md new file mode 100644 index 00000000..9a109bcf --- /dev/null +++ b/vendor/github.com/rainycape/unidecode/README.md @@ -0,0 +1,6 @@ +unidecode +========= + +Unicode transliterator in Golang - Replaces non-ASCII characters with their ASCII approximations. + +[![GoDoc](https://godoc.org/github.com/rainycape/unidecode?status.svg)](https://godoc.org/github.com/rainycape/unidecode) diff --git a/vendor/github.com/rainycape/unidecode/table.txt b/vendor/github.com/rainycape/unidecode/table.txt new file mode 100644 index 00000000..9f5d59fe --- /dev/null +++ b/vendor/github.com/rainycape/unidecode/table.txt @@ -0,0 +1,46731 @@ +/* x000 */ +0x0000: "\x00" +0x0001: "\x01" +0x0002: "\x02" +0x0003: "\x03" +0x0004: "\x04" +0x0005: "\x05" +0x0006: "\x06" +0x0007: "\x07" +0x0008: "\x08" +0x0009: "\t" +0x000a: "\n" +0x000b: "\x0b" +0x000c: "\x0c" +0x000d: "\r" +0x000e: "\x0e" +0x000f: "\x0f" +0x0010: "\x10" +0x0011: "\x11" +0x0012: "\x12" +0x0013: "\x13" +0x0014: "\x14" +0x0015: "\x15" +0x0016: "\x16" +0x0017: "\x17" +0x0018: "\x18" +0x0019: "\x19" +0x001a: "\x1a" +0x001b: "\x1b" +0x001c: "\x1c" +0x001d: "\x1d" +0x001e: "\x1e" +0x001f: "\x1f" +0x0020: " " +0x0021: "!" +0x0022: "\"" +0x0023: "#" +0x0024: "$" +0x0025: "%" +0x0026: "&" +0x0027: "'" +0x0028: "(" +0x0029: ")" +0x002a: "*" +0x002b: "+" +0x002c: "," +0x002d: "-" +0x002e: "." +0x002f: "/" +0x0030: "0" +0x0031: "1" +0x0032: "2" +0x0033: "3" +0x0034: "4" +0x0035: "5" +0x0036: "6" +0x0037: "7" +0x0038: "8" +0x0039: "9" +0x003a: ":" +0x003b: ";" +0x003c: "<" +0x003d: "=" +0x003e: ">" +0x003f: "?" +0x0040: "@" +0x0041: "A" +0x0042: "B" +0x0043: "C" +0x0044: "D" +0x0045: "E" +0x0046: "F" +0x0047: "G" +0x0048: "H" +0x0049: "I" +0x004a: "J" +0x004b: "K" +0x004c: "L" +0x004d: "M" +0x004e: "N" +0x004f: "O" +0x0050: "P" +0x0051: "Q" +0x0052: "R" +0x0053: "S" +0x0054: "T" +0x0055: "U" +0x0056: "V" +0x0057: "W" +0x0058: "X" +0x0059: "Y" +0x005a: "Z" +0x005b: "]" +0x005c: "\\" +0x005d: "]" +0x005e: "^" +0x005f: "_" +0x0060: "`" +0x0061: "a" +0x0062: "b" +0x0063: "c" +0x0064: "d" +0x0065: "e" +0x0066: "f" +0x0067: "g" +0x0068: "h" +0x0069: "i" +0x006a: "j" +0x006b: "k" +0x006c: "l" +0x006d: "m" +0x006e: "n" +0x006f: "o" +0x0070: "p" +0x0071: "q" +0x0072: "r" +0x0073: "s" +0x0074: "t" +0x0075: "u" +0x0076: "v" +0x0077: "w" +0x0078: "x" +0x0079: "y" +0x007a: "z" +0x007b: "{" +0x007c: "|" +0x007d: "}" +0x007e: "~" +0x007f: "\x7f" +0x0080: "" +0x0081: "" +0x0082: "" +0x0083: "" +0x0084: "" +0x0085: "" +0x0086: "" +0x0087: "" +0x0088: "" +0x0089: "" +0x008a: "" +0x008b: "" +0x008c: "" +0x008d: "" +0x008e: "" +0x008f: "" +0x0090: "" +0x0091: "" +0x0092: "" +0x0093: "" +0x0094: "" +0x0095: "" +0x0096: "" +0x0097: "" +0x0098: "" +0x0099: "" +0x009a: "" +0x009b: "" +0x009c: "" +0x009d: "" +0x009e: "" +0x009f: "" +0x00a0: " " +0x00a1: "!" +0x00a2: "C/" +0x00a3: "PS" +0x00a4: "$?" +0x00a5: "Y=" +0x00a6: "|" +0x00a7: "SS" +0x00a8: "\"" +0x00a9: "(c)" +0x00aa: "a" +0x00ab: "<<" +0x00ac: "!" +0x00ad: "" +0x00ae: "(r)" +0x00af: "-" +0x00b0: "deg" +0x00b1: "+-" +0x00b2: "2" +0x00b3: "3" +0x00b4: "'" +0x00b5: "u" +0x00b6: "P" +0x00b7: "*" +0x00b8: "," +0x00b9: "1" +0x00ba: "o" +0x00bb: ">>" +0x00bc: "1/4" +0x00bd: "1/2" +0x00be: "3/4" +0x00bf: "?" +0x00c0: "A" +0x00c1: "A" +0x00c2: "A" +0x00c3: "A" +0x00c4: "A" +0x00c5: "A" +0x00c6: "AE" +0x00c7: "C" +0x00c8: "E" +0x00c9: "E" +0x00ca: "E" +0x00cb: "E" +0x00cc: "I" +0x00cd: "I" +0x00ce: "I" +0x00cf: "I" +0x00d0: "D" +0x00d1: "N" +0x00d2: "O" +0x00d3: "O" +0x00d4: "O" +0x00d5: "O" +0x00d6: "O" +0x00d7: "x" +0x00d8: "O" +0x00d9: "U" +0x00da: "U" +0x00db: "U" +0x00dc: "U" +0x00dd: "Y" +0x00de: "Th" +0x00df: "ss" +0x00e0: "a" +0x00e1: "a" +0x00e2: "a" +0x00e3: "a" +0x00e4: "a" +0x00e5: "a" +0x00e6: "ae" +0x00e7: "c" +0x00e8: "e" +0x00e9: "e" +0x00ea: "e" +0x00eb: "e" +0x00ec: "i" +0x00ed: "i" +0x00ee: "i" +0x00ef: "i" +0x00f0: "d" +0x00f1: "n" +0x00f2: "o" +0x00f3: "o" +0x00f4: "o" +0x00f5: "o" +0x00f6: "o" +0x00f7: "/" +0x00f8: "o" +0x00f9: "u" +0x00fa: "u" +0x00fb: "u" +0x00fc: "u" +0x00fd: "y" +0x00fe: "th" +0x00ff: "y" +/* x001 */ +0x0100: "A" +0x0101: "a" +0x0102: "A" +0x0103: "a" +0x0104: "A" +0x0105: "a" +0x0106: "C" +0x0107: "c" +0x0108: "C" +0x0109: "c" +0x010a: "C" +0x010b: "c" +0x010c: "C" +0x010d: "c" +0x010e: "D" +0x010f: "d" +0x0110: "D" +0x0111: "d" +0x0112: "E" +0x0113: "e" +0x0114: "E" +0x0115: "e" +0x0116: "E" +0x0117: "e" +0x0118: "E" +0x0119: "e" +0x011a: "E" +0x011b: "e" +0x011c: "G" +0x011d: "g" +0x011e: "G" +0x011f: "g" +0x0120: "G" +0x0121: "g" +0x0122: "G" +0x0123: "g" +0x0124: "H" +0x0125: "h" +0x0126: "H" +0x0127: "h" +0x0128: "I" +0x0129: "i" +0x012a: "I" +0x012b: "i" +0x012c: "I" +0x012d: "i" +0x012e: "I" +0x012f: "i" +0x0130: "I" +0x0131: "i" +0x0132: "IJ" +0x0133: "ij" +0x0134: "J" +0x0135: "j" +0x0136: "K" +0x0137: "k" +0x0138: "k" +0x0139: "L" +0x013a: "l" +0x013b: "L" +0x013c: "l" +0x013d: "L" +0x013e: "l" +0x013f: "L" +0x0140: "l" +0x0141: "L" +0x0142: "l" +0x0143: "N" +0x0144: "n" +0x0145: "N" +0x0146: "n" +0x0147: "N" +0x0148: "n" +0x0149: "'n" +0x014a: "ng" +0x014b: "NG" +0x014c: "O" +0x014d: "o" +0x014e: "O" +0x014f: "o" +0x0150: "O" +0x0151: "o" +0x0152: "OE" +0x0153: "oe" +0x0154: "R" +0x0155: "r" +0x0156: "R" +0x0157: "r" +0x0158: "R" +0x0159: "r" +0x015a: "S" +0x015b: "s" +0x015c: "S" +0x015d: "s" +0x015e: "S" +0x015f: "s" +0x0160: "S" +0x0161: "s" +0x0162: "T" +0x0163: "t" +0x0164: "T" +0x0165: "t" +0x0166: "T" +0x0167: "t" +0x0168: "U" +0x0169: "u" +0x016a: "U" +0x016b: "u" +0x016c: "U" +0x016d: "u" +0x016e: "U" +0x016f: "u" +0x0170: "U" +0x0171: "u" +0x0172: "U" +0x0173: "u" +0x0174: "W" +0x0175: "w" +0x0176: "Y" +0x0177: "y" +0x0178: "Y" +0x0179: "Z" +0x017a: "z" +0x017b: "Z" +0x017c: "z" +0x017d: "Z" +0x017e: "z" +0x017f: "s" +0x0180: "b" +0x0181: "B" +0x0182: "B" +0x0183: "b" +0x0184: "6" +0x0185: "6" +0x0186: "O" +0x0187: "C" +0x0188: "c" +0x0189: "D" +0x018a: "D" +0x018b: "D" +0x018c: "d" +0x018d: "d" +0x018e: "3" +0x018f: "@" +0x0190: "E" +0x0191: "F" +0x0192: "f" +0x0193: "G" +0x0194: "G" +0x0195: "hv" +0x0196: "I" +0x0197: "I" +0x0198: "K" +0x0199: "k" +0x019a: "l" +0x019b: "l" +0x019c: "W" +0x019d: "N" +0x019e: "n" +0x019f: "O" +0x01a0: "O" +0x01a1: "o" +0x01a2: "OI" +0x01a3: "oi" +0x01a4: "P" +0x01a5: "p" +0x01a6: "YR" +0x01a7: "2" +0x01a8: "2" +0x01a9: "SH" +0x01aa: "sh" +0x01ab: "t" +0x01ac: "T" +0x01ad: "t" +0x01ae: "T" +0x01af: "U" +0x01b0: "u" +0x01b1: "Y" +0x01b2: "V" +0x01b3: "Y" +0x01b4: "y" +0x01b5: "Z" +0x01b6: "z" +0x01b7: "ZH" +0x01b8: "ZH" +0x01b9: "zh" +0x01ba: "zh" +0x01bb: "2" +0x01bc: "5" +0x01bd: "5" +0x01be: "ts" +0x01bf: "w" +0x01c0: "|" +0x01c1: "||" +0x01c2: "|=" +0x01c3: "!" +0x01c4: "DZ" +0x01c5: "Dz" +0x01c6: "dz" +0x01c7: "LJ" +0x01c8: "Lj" +0x01c9: "lj" +0x01ca: "NJ" +0x01cb: "Nj" +0x01cc: "nj" +0x01cd: "A" +0x01ce: "a" +0x01cf: "I" +0x01d0: "i" +0x01d1: "O" +0x01d2: "o" +0x01d3: "U" +0x01d4: "u" +0x01d5: "U" +0x01d6: "u" +0x01d7: "U" +0x01d8: "u" +0x01d9: "U" +0x01da: "u" +0x01db: "U" +0x01dc: "u" +0x01dd: "@" +0x01de: "A" +0x01df: "a" +0x01e0: "A" +0x01e1: "a" +0x01e2: "AE" +0x01e3: "ae" +0x01e4: "G" +0x01e5: "g" +0x01e6: "G" +0x01e7: "g" +0x01e8: "K" +0x01e9: "k" +0x01ea: "O" +0x01eb: "o" +0x01ec: "O" +0x01ed: "o" +0x01ee: "ZH" +0x01ef: "zh" +0x01f0: "j" +0x01f1: "DZ" +0x01f2: "Dz" +0x01f3: "dz" +0x01f4: "G" +0x01f5: "g" +0x01f6: "HV" +0x01f7: "W" +0x01f8: "N" +0x01f9: "n" +0x01fa: "A" +0x01fb: "a" +0x01fc: "AE" +0x01fd: "ae" +0x01fe: "O" +0x01ff: "o" +/* x002 */ +0x0200: "A" +0x0201: "a" +0x0202: "A" +0x0203: "a" +0x0204: "E" +0x0205: "e" +0x0206: "E" +0x0207: "e" +0x0208: "I" +0x0209: "i" +0x020a: "I" +0x020b: "i" +0x020c: "O" +0x020d: "o" +0x020e: "O" +0x020f: "o" +0x0210: "R" +0x0211: "r" +0x0212: "R" +0x0213: "r" +0x0214: "U" +0x0215: "u" +0x0216: "U" +0x0217: "u" +0x0218: "S" +0x0219: "s" +0x021a: "T" +0x021b: "t" +0x021c: "Y" +0x021d: "y" +0x021e: "H" +0x021f: "h" +0x0220: "N" +0x0221: "d" +0x0222: "OU" +0x0223: "ou" +0x0224: "Z" +0x0225: "z" +0x0226: "A" +0x0227: "a" +0x0228: "E" +0x0229: "e" +0x022a: "O" +0x022b: "o" +0x022c: "O" +0x022d: "o" +0x022e: "O" +0x022f: "o" +0x0230: "O" +0x0231: "o" +0x0232: "Y" +0x0233: "y" +0x0234: "l" +0x0235: "n" +0x0236: "t" +0x0237: "j" +0x0238: "db" +0x0239: "qp" +0x023a: "A" +0x023b: "C" +0x023c: "c" +0x023d: "L" +0x023e: "T" +0x023f: "s" +0x0240: "z" +0x0241: "[?]" +0x0242: "[?]" +0x0243: "B" +0x0244: "U" +0x0245: "^" +0x0246: "E" +0x0247: "e" +0x0248: "J" +0x0249: "j" +0x024a: "q" +0x024b: "q" +0x024c: "R" +0x024d: "r" +0x024e: "Y" +0x024f: "y" +0x0250: "a" +0x0251: "a" +0x0252: "a" +0x0253: "b" +0x0254: "o" +0x0255: "c" +0x0256: "d" +0x0257: "d" +0x0258: "e" +0x0259: "@" +0x025a: "@" +0x025b: "e" +0x025c: "e" +0x025d: "e" +0x025e: "e" +0x025f: "j" +0x0260: "g" +0x0261: "g" +0x0262: "g" +0x0263: "g" +0x0264: "u" +0x0265: "Y" +0x0266: "h" +0x0267: "h" +0x0268: "i" +0x0269: "i" +0x026a: "I" +0x026b: "l" +0x026c: "l" +0x026d: "l" +0x026e: "lZ" +0x026f: "W" +0x0270: "W" +0x0271: "m" +0x0272: "n" +0x0273: "n" +0x0274: "n" +0x0275: "o" +0x0276: "OE" +0x0277: "O" +0x0278: "F" +0x0279: "r" +0x027a: "r" +0x027b: "r" +0x027c: "r" +0x027d: "r" +0x027e: "r" +0x027f: "r" +0x0280: "R" +0x0281: "R" +0x0282: "s" +0x0283: "S" +0x0284: "j" +0x0285: "S" +0x0286: "S" +0x0287: "t" +0x0288: "t" +0x0289: "u" +0x028a: "U" +0x028b: "v" +0x028c: "^" +0x028d: "w" +0x028e: "y" +0x028f: "Y" +0x0290: "z" +0x0291: "z" +0x0292: "Z" +0x0293: "Z" +0x0294: "?" +0x0295: "?" +0x0296: "?" +0x0297: "C" +0x0298: "@" +0x0299: "B" +0x029a: "E" +0x029b: "G" +0x029c: "H" +0x029d: "j" +0x029e: "k" +0x029f: "L" +0x02a0: "q" +0x02a1: "?" +0x02a2: "?" +0x02a3: "dz" +0x02a4: "dZ" +0x02a5: "dz" +0x02a6: "ts" +0x02a7: "tS" +0x02a8: "tC" +0x02a9: "fN" +0x02aa: "ls" +0x02ab: "lz" +0x02ac: "WW" +0x02ad: "]]" +0x02ae: "h" +0x02af: "h" +0x02b0: "k" +0x02b1: "h" +0x02b2: "j" +0x02b3: "r" +0x02b4: "r" +0x02b5: "r" +0x02b6: "r" +0x02b7: "w" +0x02b8: "y" +0x02b9: "'" +0x02ba: "\"" +0x02bb: "`" +0x02bc: "'" +0x02bd: "`" +0x02be: "`" +0x02bf: "'" +0x02c0: "?" +0x02c1: "?" +0x02c2: "<" +0x02c3: ">" +0x02c4: "^" +0x02c5: "V" +0x02c6: "^" +0x02c7: "V" +0x02c8: "'" +0x02c9: "-" +0x02ca: "/" +0x02cb: "\\" +0x02cc: "," +0x02cd: "_" +0x02ce: "\\" +0x02cf: "/" +0x02d0: ":" +0x02d1: "." +0x02d2: "`" +0x02d3: "'" +0x02d4: "^" +0x02d5: "V" +0x02d6: "+" +0x02d7: "-" +0x02d8: "V" +0x02d9: "." +0x02da: "@" +0x02db: "," +0x02dc: "~" +0x02dd: "\"" +0x02de: "R" +0x02df: "X" +0x02e0: "G" +0x02e1: "l" +0x02e2: "s" +0x02e3: "x" +0x02e4: "?" +0x02e5: "" +0x02e6: "" +0x02e7: "" +0x02e8: "" +0x02e9: "" +0x02ea: "" +0x02eb: "" +0x02ec: "V" +0x02ed: "=" +0x02ee: "\"" +0x02ef: "[?]" +0x02f0: "[?]" +0x02f1: "[?]" +0x02f2: "[?]" +0x02f3: "[?]" +0x02f4: "[?]" +0x02f5: "[?]" +0x02f6: "[?]" +0x02f7: "[?]" +0x02f8: "[?]" +0x02f9: "[?]" +0x02fa: "[?]" +0x02fb: "[?]" +0x02fc: "[?]" +0x02fd: "[?]" +0x02fe: "[?]" +/* x003 */ +0x0300: "" +0x0301: "" +0x0302: "" +0x0303: "" +0x0304: "" +0x0305: "" +0x0306: "" +0x0307: "" +0x0308: "" +0x0309: "" +0x030a: "" +0x030b: "" +0x030c: "" +0x030d: "" +0x030e: "" +0x030f: "" +0x0310: "" +0x0311: "" +0x0312: "" +0x0313: "" +0x0314: "" +0x0315: "" +0x0316: "" +0x0317: "" +0x0318: "" +0x0319: "" +0x031a: "" +0x031b: "" +0x031c: "" +0x031d: "" +0x031e: "" +0x031f: "" +0x0320: "" +0x0321: "" +0x0322: "" +0x0323: "" +0x0324: "" +0x0325: "" +0x0326: "" +0x0327: "" +0x0328: "" +0x0329: "" +0x032a: "" +0x032b: "" +0x032c: "" +0x032d: "" +0x032e: "" +0x032f: "" +0x0330: "" +0x0331: "" +0x0332: "" +0x0333: "" +0x0334: "" +0x0335: "" +0x0336: "" +0x0337: "" +0x0338: "" +0x0339: "" +0x033a: "" +0x033b: "" +0x033c: "" +0x033d: "" +0x033e: "" +0x033f: "" +0x0340: "" +0x0341: "" +0x0342: "" +0x0343: "" +0x0344: "" +0x0345: "" +0x0346: "" +0x0347: "" +0x0348: "" +0x0349: "" +0x034a: "" +0x034b: "" +0x034c: "" +0x034d: "" +0x034e: "" +0x034f: "[?]" +0x0350: "[?]" +0x0351: "[?]" +0x0352: "[?]" +0x0353: "[?]" +0x0354: "[?]" +0x0355: "[?]" +0x0356: "[?]" +0x0357: "[?]" +0x0358: "[?]" +0x0359: "[?]" +0x035a: "[?]" +0x035b: "[?]" +0x035c: "[?]" +0x035d: "[?]" +0x035e: "[?]" +0x035f: "[?]" +0x0360: "" +0x0361: "" +0x0362: "" +0x0363: "a" +0x0364: "e" +0x0365: "i" +0x0366: "o" +0x0367: "u" +0x0368: "c" +0x0369: "d" +0x036a: "h" +0x036b: "m" +0x036c: "r" +0x036d: "t" +0x036e: "v" +0x036f: "x" +0x0370: "[?]" +0x0371: "[?]" +0x0372: "[?]" +0x0373: "[?]" +0x0374: "'" +0x0375: "," +0x0376: "[?]" +0x0377: "[?]" +0x0378: "[?]" +0x0379: "[?]" +0x037a: "" +0x037b: "[?]" +0x037c: "[?]" +0x037d: "[?]" +0x037e: "?" +0x037f: "[?]" +0x0380: "[?]" +0x0381: "[?]" +0x0382: "[?]" +0x0383: "[?]" +0x0384: "" +0x0385: "" +0x0386: "A" +0x0387: ";" +0x0388: "E" +0x0389: "E" +0x038a: "I" +0x038b: "[?]" +0x038c: "O" +0x038d: "[?]" +0x038e: "U" +0x038f: "O" +0x0390: "I" +0x0391: "A" +0x0392: "B" +0x0393: "G" +0x0394: "D" +0x0395: "E" +0x0396: "Z" +0x0397: "E" +0x0398: "Th" +0x0399: "I" +0x039a: "K" +0x039b: "L" +0x039c: "M" +0x039d: "N" +0x039e: "Ks" +0x039f: "O" +0x03a0: "P" +0x03a1: "R" +0x03a2: "[?]" +0x03a3: "S" +0x03a4: "T" +0x03a5: "U" +0x03a6: "Ph" +0x03a7: "Kh" +0x03a8: "Ps" +0x03a9: "O" +0x03aa: "I" +0x03ab: "U" +0x03ac: "a" +0x03ad: "e" +0x03ae: "e" +0x03af: "i" +0x03b0: "u" +0x03b1: "a" +0x03b2: "b" +0x03b3: "g" +0x03b4: "d" +0x03b5: "e" +0x03b6: "z" +0x03b7: "e" +0x03b8: "th" +0x03b9: "i" +0x03ba: "k" +0x03bb: "l" +0x03bc: "m" +0x03bd: "n" +0x03be: "x" +0x03bf: "o" +0x03c0: "p" +0x03c1: "r" +0x03c2: "s" +0x03c3: "s" +0x03c4: "t" +0x03c5: "u" +0x03c6: "ph" +0x03c7: "kh" +0x03c8: "ps" +0x03c9: "o" +0x03ca: "i" +0x03cb: "u" +0x03cc: "o" +0x03cd: "u" +0x03ce: "o" +0x03cf: "[?]" +0x03d0: "b" +0x03d1: "th" +0x03d2: "U" +0x03d3: "U" +0x03d4: "U" +0x03d5: "ph" +0x03d6: "p" +0x03d7: "&" +0x03d8: "[?]" +0x03d9: "[?]" +0x03da: "St" +0x03db: "st" +0x03dc: "W" +0x03dd: "w" +0x03de: "Q" +0x03df: "q" +0x03e0: "Sp" +0x03e1: "sp" +0x03e2: "Sh" +0x03e3: "sh" +0x03e4: "F" +0x03e5: "f" +0x03e6: "Kh" +0x03e7: "kh" +0x03e8: "H" +0x03e9: "h" +0x03ea: "G" +0x03eb: "g" +0x03ec: "CH" +0x03ed: "ch" +0x03ee: "Ti" +0x03ef: "ti" +0x03f0: "k" +0x03f1: "r" +0x03f2: "c" +0x03f3: "j" +0x03f4: "[?]" +0x03f5: "[?]" +0x03f6: "[?]" +0x03f7: "[?]" +0x03f8: "[?]" +0x03f9: "[?]" +0x03fa: "[?]" +0x03fb: "[?]" +0x03fc: "[?]" +0x03fd: "[?]" +0x03fe: "[?]" +/* x004 */ +0x0400: "Ie" +0x0401: "Io" +0x0402: "Dj" +0x0403: "Gj" +0x0404: "Ie" +0x0405: "Dz" +0x0406: "I" +0x0407: "Yi" +0x0408: "J" +0x0409: "Lj" +0x040a: "Nj" +0x040b: "Tsh" +0x040c: "Kj" +0x040d: "I" +0x040e: "U" +0x040f: "Dzh" +0x0410: "A" +0x0411: "B" +0x0412: "V" +0x0413: "G" +0x0414: "D" +0x0415: "E" +0x0416: "Zh" +0x0417: "Z" +0x0418: "I" +0x0419: "I" +0x041a: "K" +0x041b: "L" +0x041c: "M" +0x041d: "N" +0x041e: "O" +0x041f: "P" +0x0420: "R" +0x0421: "S" +0x0422: "T" +0x0423: "U" +0x0424: "F" +0x0425: "Kh" +0x0426: "Ts" +0x0427: "Ch" +0x0428: "Sh" +0x0429: "Shch" +0x042a: "'" +0x042b: "Y" +0x042c: "'" +0x042d: "E" +0x042e: "Iu" +0x042f: "Ia" +0x0430: "a" +0x0431: "b" +0x0432: "v" +0x0433: "g" +0x0434: "d" +0x0435: "e" +0x0436: "zh" +0x0437: "z" +0x0438: "i" +0x0439: "i" +0x043a: "k" +0x043b: "l" +0x043c: "m" +0x043d: "n" +0x043e: "o" +0x043f: "p" +0x0440: "r" +0x0441: "s" +0x0442: "t" +0x0443: "u" +0x0444: "f" +0x0445: "kh" +0x0446: "ts" +0x0447: "ch" +0x0448: "sh" +0x0449: "shch" +0x044a: "'" +0x044b: "y" +0x044c: "'" +0x044d: "e" +0x044e: "iu" +0x044f: "ia" +0x0450: "ie" +0x0451: "io" +0x0452: "dj" +0x0453: "gj" +0x0454: "ie" +0x0455: "dz" +0x0456: "i" +0x0457: "yi" +0x0458: "j" +0x0459: "lj" +0x045a: "nj" +0x045b: "tsh" +0x045c: "kj" +0x045d: "i" +0x045e: "u" +0x045f: "dzh" +0x0460: "O" +0x0461: "o" +0x0462: "E" +0x0463: "e" +0x0464: "Ie" +0x0465: "ie" +0x0466: "E" +0x0467: "e" +0x0468: "Ie" +0x0469: "ie" +0x046a: "O" +0x046b: "o" +0x046c: "Io" +0x046d: "io" +0x046e: "Ks" +0x046f: "ks" +0x0470: "Ps" +0x0471: "ps" +0x0472: "F" +0x0473: "f" +0x0474: "Y" +0x0475: "y" +0x0476: "Y" +0x0477: "y" +0x0478: "u" +0x0479: "u" +0x047a: "O" +0x047b: "o" +0x047c: "O" +0x047d: "o" +0x047e: "Ot" +0x047f: "ot" +0x0480: "Q" +0x0481: "q" +0x0482: "*1000*" +0x0483: "" +0x0484: "" +0x0485: "" +0x0486: "" +0x0487: "[?]" +0x0488: "*100.000*" +0x0489: "*1.000.000*" +0x048a: "[?]" +0x048b: "[?]" +0x048c: "\"" +0x048d: "\"" +0x048e: "R'" +0x048f: "r'" +0x0490: "G'" +0x0491: "g'" +0x0492: "G'" +0x0493: "g'" +0x0494: "G'" +0x0495: "g'" +0x0496: "Zh'" +0x0497: "zh'" +0x0498: "Z'" +0x0499: "z'" +0x049a: "K'" +0x049b: "k'" +0x049c: "K'" +0x049d: "k'" +0x049e: "K'" +0x049f: "k'" +0x04a0: "K'" +0x04a1: "k'" +0x04a2: "N'" +0x04a3: "n'" +0x04a4: "Ng" +0x04a5: "ng" +0x04a6: "P'" +0x04a7: "p'" +0x04a8: "Kh" +0x04a9: "kh" +0x04aa: "S'" +0x04ab: "s'" +0x04ac: "T'" +0x04ad: "t'" +0x04ae: "U" +0x04af: "u" +0x04b0: "U'" +0x04b1: "u'" +0x04b2: "Kh'" +0x04b3: "kh'" +0x04b4: "Tts" +0x04b5: "tts" +0x04b6: "Ch'" +0x04b7: "ch'" +0x04b8: "Ch'" +0x04b9: "ch'" +0x04ba: "H" +0x04bb: "h" +0x04bc: "Ch" +0x04bd: "ch" +0x04be: "Ch'" +0x04bf: "ch'" +0x04c0: "`" +0x04c1: "Zh" +0x04c2: "zh" +0x04c3: "K'" +0x04c4: "k'" +0x04c5: "[?]" +0x04c6: "[?]" +0x04c7: "N'" +0x04c8: "n'" +0x04c9: "[?]" +0x04ca: "[?]" +0x04cb: "Ch" +0x04cc: "ch" +0x04cd: "[?]" +0x04ce: "[?]" +0x04cf: "[?]" +0x04d0: "a" +0x04d1: "a" +0x04d2: "A" +0x04d3: "a" +0x04d4: "Ae" +0x04d5: "ae" +0x04d6: "Ie" +0x04d7: "ie" +0x04d8: "@" +0x04d9: "@" +0x04da: "@" +0x04db: "@" +0x04dc: "Zh" +0x04dd: "zh" +0x04de: "Z" +0x04df: "z" +0x04e0: "Dz" +0x04e1: "dz" +0x04e2: "I" +0x04e3: "i" +0x04e4: "I" +0x04e5: "i" +0x04e6: "O" +0x04e7: "o" +0x04e8: "O" +0x04e9: "o" +0x04ea: "O" +0x04eb: "o" +0x04ec: "E" +0x04ed: "e" +0x04ee: "U" +0x04ef: "u" +0x04f0: "U" +0x04f1: "u" +0x04f2: "U" +0x04f3: "u" +0x04f4: "Ch" +0x04f5: "ch" +0x04f6: "[?]" +0x04f7: "[?]" +0x04f8: "Y" +0x04f9: "y" +0x04fa: "[?]" +0x04fb: "[?]" +0x04fc: "[?]" +0x04fd: "[?]" +0x04fe: "[?]" +/* x005 */ +0x0500: "[?]" +0x0501: "[?]" +0x0502: "[?]" +0x0503: "[?]" +0x0504: "[?]" +0x0505: "[?]" +0x0506: "[?]" +0x0507: "[?]" +0x0508: "[?]" +0x0509: "[?]" +0x050a: "[?]" +0x050b: "[?]" +0x050c: "[?]" +0x050d: "[?]" +0x050e: "[?]" +0x050f: "[?]" +0x0510: "[?]" +0x0511: "[?]" +0x0512: "[?]" +0x0513: "[?]" +0x0514: "[?]" +0x0515: "[?]" +0x0516: "[?]" +0x0517: "[?]" +0x0518: "[?]" +0x0519: "[?]" +0x051a: "[?]" +0x051b: "[?]" +0x051c: "[?]" +0x051d: "[?]" +0x051e: "[?]" +0x051f: "[?]" +0x0520: "[?]" +0x0521: "[?]" +0x0522: "[?]" +0x0523: "[?]" +0x0524: "[?]" +0x0525: "[?]" +0x0526: "[?]" +0x0527: "[?]" +0x0528: "[?]" +0x0529: "[?]" +0x052a: "[?]" +0x052b: "[?]" +0x052c: "[?]" +0x052d: "[?]" +0x052e: "[?]" +0x052f: "[?]" +0x0530: "[?]" +0x0531: "A" +0x0532: "B" +0x0533: "G" +0x0534: "D" +0x0535: "E" +0x0536: "Z" +0x0537: "E" +0x0538: "E" +0x0539: "T`" +0x053a: "Zh" +0x053b: "I" +0x053c: "L" +0x053d: "Kh" +0x053e: "Ts" +0x053f: "K" +0x0540: "H" +0x0541: "Dz" +0x0542: "Gh" +0x0543: "Ch" +0x0544: "M" +0x0545: "Y" +0x0546: "N" +0x0547: "Sh" +0x0548: "O" +0x0549: "Ch`" +0x054a: "P" +0x054b: "J" +0x054c: "Rh" +0x054d: "S" +0x054e: "V" +0x054f: "T" +0x0550: "R" +0x0551: "Ts`" +0x0552: "W" +0x0553: "P`" +0x0554: "K`" +0x0555: "O" +0x0556: "F" +0x0557: "[?]" +0x0558: "[?]" +0x0559: "<" +0x055a: "'" +0x055b: "/" +0x055c: "!" +0x055d: "," +0x055e: "?" +0x055f: "." +0x0560: "[?]" +0x0561: "a" +0x0562: "b" +0x0563: "g" +0x0564: "d" +0x0565: "e" +0x0566: "z" +0x0567: "e" +0x0568: "e" +0x0569: "t`" +0x056a: "zh" +0x056b: "i" +0x056c: "l" +0x056d: "kh" +0x056e: "ts" +0x056f: "k" +0x0570: "h" +0x0571: "dz" +0x0572: "gh" +0x0573: "ch" +0x0574: "m" +0x0575: "y" +0x0576: "n" +0x0577: "sh" +0x0578: "o" +0x0579: "ch`" +0x057a: "p" +0x057b: "j" +0x057c: "rh" +0x057d: "s" +0x057e: "v" +0x057f: "t" +0x0580: "r" +0x0581: "ts`" +0x0582: "w" +0x0583: "p`" +0x0584: "k`" +0x0585: "o" +0x0586: "f" +0x0587: "ew" +0x0588: "[?]" +0x0589: "." +0x058a: "-" +0x058b: "[?]" +0x058c: "[?]" +0x058d: "[?]" +0x058e: "[?]" +0x058f: "[?]" +0x0590: "[?]" +0x0591: "" +0x0592: "" +0x0593: "" +0x0594: "" +0x0595: "" +0x0596: "" +0x0597: "" +0x0598: "" +0x0599: "" +0x059a: "" +0x059b: "" +0x059c: "" +0x059d: "" +0x059e: "" +0x059f: "" +0x05a0: "" +0x05a1: "" +0x05a2: "[?]" +0x05a3: "" +0x05a4: "" +0x05a5: "" +0x05a6: "" +0x05a7: "" +0x05a8: "" +0x05a9: "" +0x05aa: "" +0x05ab: "" +0x05ac: "" +0x05ad: "" +0x05ae: "" +0x05af: "" +0x05b0: "@" +0x05b1: "e" +0x05b2: "a" +0x05b3: "o" +0x05b4: "i" +0x05b5: "e" +0x05b6: "e" +0x05b7: "a" +0x05b8: "a" +0x05b9: "o" +0x05ba: "[?]" +0x05bb: "u" +0x05bc: "'" +0x05bd: "" +0x05be: "" +0x05bf: "" +0x05c0: "" +0x05c1: "" +0x05c2: "" +0x05c3: ":" +0x05c4: "" +0x05c5: "[?]" +0x05c6: "[?]" +0x05c7: "[?]" +0x05c8: "[?]" +0x05c9: "[?]" +0x05ca: "[?]" +0x05cb: "[?]" +0x05cc: "[?]" +0x05cd: "[?]" +0x05ce: "[?]" +0x05cf: "[?]" +0x05d0: "" +0x05d1: "b" +0x05d2: "g" +0x05d3: "d" +0x05d4: "h" +0x05d5: "v" +0x05d6: "z" +0x05d7: "kh" +0x05d8: "t" +0x05d9: "y" +0x05da: "k" +0x05db: "k" +0x05dc: "l" +0x05dd: "m" +0x05de: "m" +0x05df: "n" +0x05e0: "n" +0x05e1: "s" +0x05e2: "`" +0x05e3: "p" +0x05e4: "p" +0x05e5: "ts" +0x05e6: "ts" +0x05e7: "q" +0x05e8: "r" +0x05e9: "sh" +0x05ea: "t" +0x05eb: "[?]" +0x05ec: "[?]" +0x05ed: "[?]" +0x05ee: "[?]" +0x05ef: "[?]" +0x05f0: "V" +0x05f1: "oy" +0x05f2: "i" +0x05f3: "'" +0x05f4: "\"" +0x05f5: "[?]" +0x05f6: "[?]" +0x05f7: "[?]" +0x05f8: "[?]" +0x05f9: "[?]" +0x05fa: "[?]" +0x05fb: "[?]" +0x05fc: "[?]" +0x05fd: "[?]" +0x05fe: "[?]" +/* x006 */ +0x0600: "[?]" +0x0601: "[?]" +0x0602: "[?]" +0x0603: "[?]" +0x0604: "[?]" +0x0605: "[?]" +0x0606: "[?]" +0x0607: "[?]" +0x0608: "[?]" +0x0609: "[?]" +0x060a: "[?]" +0x060b: "[?]" +0x060c: "," +0x060d: "[?]" +0x060e: "[?]" +0x060f: "[?]" +0x0610: "[?]" +0x0611: "[?]" +0x0612: "[?]" +0x0613: "[?]" +0x0614: "[?]" +0x0615: "[?]" +0x0616: "[?]" +0x0617: "[?]" +0x0618: "[?]" +0x0619: "[?]" +0x061a: "[?]" +0x061b: ";" +0x061c: "[?]" +0x061d: "[?]" +0x061e: "[?]" +0x061f: "?" +0x0620: "[?]" +0x0621: "" +0x0622: "a" +0x0623: "'" +0x0624: "w'" +0x0625: "" +0x0626: "y'" +0x0627: "" +0x0628: "b" +0x0629: "@" +0x062a: "t" +0x062b: "th" +0x062c: "j" +0x062d: "H" +0x062e: "kh" +0x062f: "d" +0x0630: "dh" +0x0631: "r" +0x0632: "z" +0x0633: "s" +0x0634: "sh" +0x0635: "S" +0x0636: "D" +0x0637: "T" +0x0638: "Z" +0x0639: "`" +0x063a: "G" +0x063b: "[?]" +0x063c: "[?]" +0x063d: "[?]" +0x063e: "[?]" +0x063f: "[?]" +0x0640: "" +0x0641: "f" +0x0642: "q" +0x0643: "k" +0x0644: "l" +0x0645: "m" +0x0646: "n" +0x0647: "h" +0x0648: "w" +0x0649: "~" +0x064a: "y" +0x064b: "an" +0x064c: "un" +0x064d: "in" +0x064e: "a" +0x064f: "u" +0x0650: "i" +0x0651: "W" +0x0652: "" +0x0653: "" +0x0654: "'" +0x0655: "'" +0x0656: "[?]" +0x0657: "[?]" +0x0658: "[?]" +0x0659: "[?]" +0x065a: "[?]" +0x065b: "[?]" +0x065c: "[?]" +0x065d: "[?]" +0x065e: "[?]" +0x065f: "[?]" +0x0660: "0" +0x0661: "1" +0x0662: "2" +0x0663: "3" +0x0664: "4" +0x0665: "5" +0x0666: "6" +0x0667: "7" +0x0668: "8" +0x0669: "9" +0x066a: "%" +0x066b: "." +0x066c: "," +0x066d: "*" +0x066e: "[?]" +0x066f: "[?]" +0x0670: "" +0x0671: "'" +0x0672: "'" +0x0673: "'" +0x0674: "" +0x0675: "'" +0x0676: "'w" +0x0677: "'u" +0x0678: "'y" +0x0679: "tt" +0x067a: "tth" +0x067b: "b" +0x067c: "t" +0x067d: "T" +0x067e: "p" +0x067f: "th" +0x0680: "bh" +0x0681: "'h" +0x0682: "H" +0x0683: "ny" +0x0684: "dy" +0x0685: "H" +0x0686: "ch" +0x0687: "cch" +0x0688: "dd" +0x0689: "D" +0x068a: "D" +0x068b: "Dt" +0x068c: "dh" +0x068d: "ddh" +0x068e: "d" +0x068f: "D" +0x0690: "D" +0x0691: "rr" +0x0692: "R" +0x0693: "R" +0x0694: "R" +0x0695: "R" +0x0696: "R" +0x0697: "R" +0x0698: "j" +0x0699: "R" +0x069a: "S" +0x069b: "S" +0x069c: "S" +0x069d: "S" +0x069e: "S" +0x069f: "T" +0x06a0: "GH" +0x06a1: "F" +0x06a2: "F" +0x06a3: "F" +0x06a4: "v" +0x06a5: "f" +0x06a6: "ph" +0x06a7: "Q" +0x06a8: "Q" +0x06a9: "kh" +0x06aa: "k" +0x06ab: "K" +0x06ac: "K" +0x06ad: "ng" +0x06ae: "K" +0x06af: "g" +0x06b0: "G" +0x06b1: "N" +0x06b2: "G" +0x06b3: "G" +0x06b4: "G" +0x06b5: "L" +0x06b6: "L" +0x06b7: "L" +0x06b8: "L" +0x06b9: "N" +0x06ba: "N" +0x06bb: "N" +0x06bc: "N" +0x06bd: "N" +0x06be: "h" +0x06bf: "Ch" +0x06c0: "hy" +0x06c1: "h" +0x06c2: "H" +0x06c3: "@" +0x06c4: "W" +0x06c5: "oe" +0x06c6: "oe" +0x06c7: "u" +0x06c8: "yu" +0x06c9: "yu" +0x06ca: "W" +0x06cb: "v" +0x06cc: "y" +0x06cd: "Y" +0x06ce: "Y" +0x06cf: "W" +0x06d0: "" +0x06d1: "" +0x06d2: "y" +0x06d3: "y'" +0x06d4: "." +0x06d5: "ae" +0x06d6: "" +0x06d7: "" +0x06d8: "" +0x06d9: "" +0x06da: "" +0x06db: "" +0x06dc: "" +0x06dd: "@" +0x06de: "#" +0x06df: "" +0x06e0: "" +0x06e1: "" +0x06e2: "" +0x06e3: "" +0x06e4: "" +0x06e5: "" +0x06e6: "" +0x06e7: "" +0x06e8: "" +0x06e9: "^" +0x06ea: "" +0x06eb: "" +0x06ec: "" +0x06ed: "" +0x06ee: "[?]" +0x06ef: "[?]" +0x06f0: "0" +0x06f1: "1" +0x06f2: "2" +0x06f3: "3" +0x06f4: "4" +0x06f5: "5" +0x06f6: "6" +0x06f7: "7" +0x06f8: "8" +0x06f9: "9" +0x06fa: "Sh" +0x06fb: "D" +0x06fc: "Gh" +0x06fd: "&" +0x06fe: "+m" +/* x007 */ +0x0700: "//" +0x0701: "/" +0x0702: "," +0x0703: "!" +0x0704: "!" +0x0705: "-" +0x0706: "," +0x0707: "," +0x0708: ";" +0x0709: "?" +0x070a: "~" +0x070b: "{" +0x070c: "}" +0x070d: "*" +0x070e: "[?]" +0x070f: "" +0x0710: "'" +0x0711: "" +0x0712: "b" +0x0713: "g" +0x0714: "g" +0x0715: "d" +0x0716: "d" +0x0717: "h" +0x0718: "w" +0x0719: "z" +0x071a: "H" +0x071b: "t" +0x071c: "t" +0x071d: "y" +0x071e: "yh" +0x071f: "k" +0x0720: "l" +0x0721: "m" +0x0722: "n" +0x0723: "s" +0x0724: "s" +0x0725: "`" +0x0726: "p" +0x0727: "p" +0x0728: "S" +0x0729: "q" +0x072a: "r" +0x072b: "sh" +0x072c: "t" +0x072d: "[?]" +0x072e: "[?]" +0x072f: "[?]" +0x0730: "a" +0x0731: "a" +0x0732: "a" +0x0733: "A" +0x0734: "A" +0x0735: "A" +0x0736: "e" +0x0737: "e" +0x0738: "e" +0x0739: "E" +0x073a: "i" +0x073b: "i" +0x073c: "u" +0x073d: "u" +0x073e: "u" +0x073f: "o" +0x0740: "" +0x0741: "`" +0x0742: "'" +0x0743: "" +0x0744: "" +0x0745: "X" +0x0746: "Q" +0x0747: "@" +0x0748: "@" +0x0749: "|" +0x074a: "+" +0x074b: "[?]" +0x074c: "[?]" +0x074d: "[?]" +0x074e: "[?]" +0x074f: "[?]" +0x0750: "[?]" +0x0751: "[?]" +0x0752: "[?]" +0x0753: "[?]" +0x0754: "[?]" +0x0755: "[?]" +0x0756: "[?]" +0x0757: "[?]" +0x0758: "[?]" +0x0759: "[?]" +0x075a: "[?]" +0x075b: "[?]" +0x075c: "[?]" +0x075d: "[?]" +0x075e: "[?]" +0x075f: "[?]" +0x0760: "[?]" +0x0761: "[?]" +0x0762: "[?]" +0x0763: "[?]" +0x0764: "[?]" +0x0765: "[?]" +0x0766: "[?]" +0x0767: "[?]" +0x0768: "[?]" +0x0769: "[?]" +0x076a: "[?]" +0x076b: "[?]" +0x076c: "[?]" +0x076d: "[?]" +0x076e: "[?]" +0x076f: "[?]" +0x0770: "[?]" +0x0771: "[?]" +0x0772: "[?]" +0x0773: "[?]" +0x0774: "[?]" +0x0775: "[?]" +0x0776: "[?]" +0x0777: "[?]" +0x0778: "[?]" +0x0779: "[?]" +0x077a: "[?]" +0x077b: "[?]" +0x077c: "[?]" +0x077d: "[?]" +0x077e: "[?]" +0x077f: "[?]" +0x0780: "h" +0x0781: "sh" +0x0782: "n" +0x0783: "r" +0x0784: "b" +0x0785: "L" +0x0786: "k" +0x0787: "'" +0x0788: "v" +0x0789: "m" +0x078a: "f" +0x078b: "dh" +0x078c: "th" +0x078d: "l" +0x078e: "g" +0x078f: "ny" +0x0790: "s" +0x0791: "d" +0x0792: "z" +0x0793: "t" +0x0794: "y" +0x0795: "p" +0x0796: "j" +0x0797: "ch" +0x0798: "tt" +0x0799: "hh" +0x079a: "kh" +0x079b: "th" +0x079c: "z" +0x079d: "sh" +0x079e: "s" +0x079f: "d" +0x07a0: "t" +0x07a1: "z" +0x07a2: "`" +0x07a3: "gh" +0x07a4: "q" +0x07a5: "w" +0x07a6: "a" +0x07a7: "aa" +0x07a8: "i" +0x07a9: "ee" +0x07aa: "u" +0x07ab: "oo" +0x07ac: "e" +0x07ad: "ey" +0x07ae: "o" +0x07af: "oa" +0x07b0: "" +0x07b1: "[?]" +0x07b2: "[?]" +0x07b3: "[?]" +0x07b4: "[?]" +0x07b5: "[?]" +0x07b6: "[?]" +0x07b7: "[?]" +0x07b8: "[?]" +0x07b9: "[?]" +0x07ba: "[?]" +0x07bb: "[?]" +0x07bc: "[?]" +0x07bd: "[?]" +0x07be: "[?]" +0x07bf: "[?]" +0x07c0: "[?]" +0x07c1: "[?]" +0x07c2: "[?]" +0x07c3: "[?]" +0x07c4: "[?]" +0x07c5: "[?]" +0x07c6: "[?]" +0x07c7: "[?]" +0x07c8: "[?]" +0x07c9: "[?]" +0x07ca: "[?]" +0x07cb: "[?]" +0x07cc: "[?]" +0x07cd: "[?]" +0x07ce: "[?]" +0x07cf: "[?]" +0x07d0: "[?]" +0x07d1: "[?]" +0x07d2: "[?]" +0x07d3: "[?]" +0x07d4: "[?]" +0x07d5: "[?]" +0x07d6: "[?]" +0x07d7: "[?]" +0x07d8: "[?]" +0x07d9: "[?]" +0x07da: "[?]" +0x07db: "[?]" +0x07dc: "[?]" +0x07dd: "[?]" +0x07de: "[?]" +0x07df: "[?]" +0x07e0: "[?]" +0x07e1: "[?]" +0x07e2: "[?]" +0x07e3: "[?]" +0x07e4: "[?]" +0x07e5: "[?]" +0x07e6: "[?]" +0x07e7: "[?]" +0x07e8: "[?]" +0x07e9: "[?]" +0x07ea: "[?]" +0x07eb: "[?]" +0x07ec: "[?]" +0x07ed: "[?]" +0x07ee: "[?]" +0x07ef: "[?]" +0x07f0: "[?]" +0x07f1: "[?]" +0x07f2: "[?]" +0x07f3: "[?]" +0x07f4: "[?]" +0x07f5: "[?]" +0x07f6: "[?]" +0x07f7: "[?]" +0x07f8: "[?]" +0x07f9: "[?]" +0x07fa: "[?]" +0x07fb: "[?]" +0x07fc: "[?]" +0x07fd: "[?]" +0x07fe: "[?]" +/* x009 */ +0x0900: "[?]" +0x0901: "N" +0x0902: "N" +0x0903: "H" +0x0904: "[?]" +0x0905: "a" +0x0906: "aa" +0x0907: "i" +0x0908: "ii" +0x0909: "u" +0x090a: "uu" +0x090b: "R" +0x090c: "L" +0x090d: "eN" +0x090e: "e" +0x090f: "e" +0x0910: "ai" +0x0911: "oN" +0x0912: "o" +0x0913: "o" +0x0914: "au" +0x0915: "k" +0x0916: "kh" +0x0917: "g" +0x0918: "gh" +0x0919: "ng" +0x091a: "c" +0x091b: "ch" +0x091c: "j" +0x091d: "jh" +0x091e: "ny" +0x091f: "tt" +0x0920: "tth" +0x0921: "dd" +0x0922: "ddh" +0x0923: "nn" +0x0924: "t" +0x0925: "th" +0x0926: "d" +0x0927: "dh" +0x0928: "n" +0x0929: "nnn" +0x092a: "p" +0x092b: "ph" +0x092c: "b" +0x092d: "bh" +0x092e: "m" +0x092f: "y" +0x0930: "r" +0x0931: "rr" +0x0932: "l" +0x0933: "l" +0x0934: "lll" +0x0935: "v" +0x0936: "sh" +0x0937: "ss" +0x0938: "s" +0x0939: "h" +0x093a: "[?]" +0x093b: "[?]" +0x093c: "'" +0x093d: "'" +0x093e: "aa" +0x093f: "i" +0x0940: "ii" +0x0941: "u" +0x0942: "uu" +0x0943: "R" +0x0944: "RR" +0x0945: "eN" +0x0946: "e" +0x0947: "e" +0x0948: "ai" +0x0949: "oN" +0x094a: "o" +0x094b: "o" +0x094c: "au" +0x094d: "" +0x094e: "[?]" +0x094f: "[?]" +0x0950: "AUM" +0x0951: "'" +0x0952: "'" +0x0953: "`" +0x0954: "'" +0x0955: "[?]" +0x0956: "[?]" +0x0957: "[?]" +0x0958: "q" +0x0959: "khh" +0x095a: "ghh" +0x095b: "z" +0x095c: "dddh" +0x095d: "rh" +0x095e: "f" +0x095f: "yy" +0x0960: "RR" +0x0961: "LL" +0x0962: "L" +0x0963: "LL" +0x0964: " / " +0x0965: " // " +0x0966: "0" +0x0967: "1" +0x0968: "2" +0x0969: "3" +0x096a: "4" +0x096b: "5" +0x096c: "6" +0x096d: "7" +0x096e: "8" +0x096f: "9" +0x0970: "." +0x0971: "[?]" +0x0972: "[?]" +0x0973: "[?]" +0x0974: "[?]" +0x0975: "[?]" +0x0976: "[?]" +0x0977: "[?]" +0x0978: "[?]" +0x0979: "[?]" +0x097a: "[?]" +0x097b: "[?]" +0x097c: "[?]" +0x097d: "[?]" +0x097e: "[?]" +0x097f: "[?]" +0x0980: "[?]" +0x0981: "N" +0x0982: "N" +0x0983: "H" +0x0984: "[?]" +0x0985: "a" +0x0986: "aa" +0x0987: "i" +0x0988: "ii" +0x0989: "u" +0x098a: "uu" +0x098b: "R" +0x098c: "RR" +0x098d: "[?]" +0x098e: "[?]" +0x098f: "e" +0x0990: "ai" +0x0991: "[?]" +0x0992: "[?]" +0x0993: "o" +0x0994: "au" +0x0995: "k" +0x0996: "kh" +0x0997: "g" +0x0998: "gh" +0x0999: "ng" +0x099a: "c" +0x099b: "ch" +0x099c: "j" +0x099d: "jh" +0x099e: "ny" +0x099f: "tt" +0x09a0: "tth" +0x09a1: "dd" +0x09a2: "ddh" +0x09a3: "nn" +0x09a4: "t" +0x09a5: "th" +0x09a6: "d" +0x09a7: "dh" +0x09a8: "n" +0x09a9: "[?]" +0x09aa: "p" +0x09ab: "ph" +0x09ac: "b" +0x09ad: "bh" +0x09ae: "m" +0x09af: "y" +0x09b0: "r" +0x09b1: "[?]" +0x09b2: "l" +0x09b3: "[?]" +0x09b4: "[?]" +0x09b5: "[?]" +0x09b6: "sh" +0x09b7: "ss" +0x09b8: "s" +0x09b9: "h" +0x09ba: "[?]" +0x09bb: "[?]" +0x09bc: "'" +0x09bd: "[?]" +0x09be: "aa" +0x09bf: "i" +0x09c0: "ii" +0x09c1: "u" +0x09c2: "uu" +0x09c3: "R" +0x09c4: "RR" +0x09c5: "[?]" +0x09c6: "[?]" +0x09c7: "e" +0x09c8: "ai" +0x09c9: "[?]" +0x09ca: "[?]" +0x09cb: "o" +0x09cc: "au" +0x09cd: "" +0x09ce: "[?]" +0x09cf: "[?]" +0x09d0: "[?]" +0x09d1: "[?]" +0x09d2: "[?]" +0x09d3: "[?]" +0x09d4: "[?]" +0x09d5: "[?]" +0x09d6: "[?]" +0x09d7: "+" +0x09d8: "[?]" +0x09d9: "[?]" +0x09da: "[?]" +0x09db: "[?]" +0x09dc: "rr" +0x09dd: "rh" +0x09de: "[?]" +0x09df: "yy" +0x09e0: "RR" +0x09e1: "LL" +0x09e2: "L" +0x09e3: "LL" +0x09e4: "[?]" +0x09e5: "[?]" +0x09e6: "0" +0x09e7: "1" +0x09e8: "2" +0x09e9: "3" +0x09ea: "4" +0x09eb: "5" +0x09ec: "6" +0x09ed: "7" +0x09ee: "8" +0x09ef: "9" +0x09f0: "r'" +0x09f1: "r`" +0x09f2: "Rs" +0x09f3: "Rs" +0x09f4: "1/" +0x09f5: "2/" +0x09f6: "3/" +0x09f7: "4/" +0x09f8: " 1 - 1/" +0x09f9: "/16" +0x09fa: "" +0x09fb: "[?]" +0x09fc: "[?]" +0x09fd: "[?]" +0x09fe: "[?]" +/* x00a */ +0x0a00: "[?]" +0x0a01: "[?]" +0x0a02: "N" +0x0a03: "[?]" +0x0a04: "[?]" +0x0a05: "a" +0x0a06: "aa" +0x0a07: "i" +0x0a08: "ii" +0x0a09: "u" +0x0a0a: "uu" +0x0a0b: "[?]" +0x0a0c: "[?]" +0x0a0d: "[?]" +0x0a0e: "[?]" +0x0a0f: "ee" +0x0a10: "ai" +0x0a11: "[?]" +0x0a12: "[?]" +0x0a13: "oo" +0x0a14: "au" +0x0a15: "k" +0x0a16: "kh" +0x0a17: "g" +0x0a18: "gh" +0x0a19: "ng" +0x0a1a: "c" +0x0a1b: "ch" +0x0a1c: "j" +0x0a1d: "jh" +0x0a1e: "ny" +0x0a1f: "tt" +0x0a20: "tth" +0x0a21: "dd" +0x0a22: "ddh" +0x0a23: "nn" +0x0a24: "t" +0x0a25: "th" +0x0a26: "d" +0x0a27: "dh" +0x0a28: "n" +0x0a29: "[?]" +0x0a2a: "p" +0x0a2b: "ph" +0x0a2c: "b" +0x0a2d: "bb" +0x0a2e: "m" +0x0a2f: "y" +0x0a30: "r" +0x0a31: "[?]" +0x0a32: "l" +0x0a33: "ll" +0x0a34: "[?]" +0x0a35: "v" +0x0a36: "sh" +0x0a37: "[?]" +0x0a38: "s" +0x0a39: "h" +0x0a3a: "[?]" +0x0a3b: "[?]" +0x0a3c: "'" +0x0a3d: "[?]" +0x0a3e: "aa" +0x0a3f: "i" +0x0a40: "ii" +0x0a41: "u" +0x0a42: "uu" +0x0a43: "[?]" +0x0a44: "[?]" +0x0a45: "[?]" +0x0a46: "[?]" +0x0a47: "ee" +0x0a48: "ai" +0x0a49: "[?]" +0x0a4a: "[?]" +0x0a4b: "oo" +0x0a4c: "au" +0x0a4d: "" +0x0a4e: "[?]" +0x0a4f: "[?]" +0x0a50: "[?]" +0x0a51: "[?]" +0x0a52: "[?]" +0x0a53: "[?]" +0x0a54: "[?]" +0x0a55: "[?]" +0x0a56: "[?]" +0x0a57: "[?]" +0x0a58: "[?]" +0x0a59: "khh" +0x0a5a: "ghh" +0x0a5b: "z" +0x0a5c: "rr" +0x0a5d: "[?]" +0x0a5e: "f" +0x0a5f: "[?]" +0x0a60: "[?]" +0x0a61: "[?]" +0x0a62: "[?]" +0x0a63: "[?]" +0x0a64: "[?]" +0x0a65: "[?]" +0x0a66: "0" +0x0a67: "1" +0x0a68: "2" +0x0a69: "3" +0x0a6a: "4" +0x0a6b: "5" +0x0a6c: "6" +0x0a6d: "7" +0x0a6e: "8" +0x0a6f: "9" +0x0a70: "N" +0x0a71: "H" +0x0a72: "" +0x0a73: "" +0x0a74: "G.E.O." +0x0a75: "[?]" +0x0a76: "[?]" +0x0a77: "[?]" +0x0a78: "[?]" +0x0a79: "[?]" +0x0a7a: "[?]" +0x0a7b: "[?]" +0x0a7c: "[?]" +0x0a7d: "[?]" +0x0a7e: "[?]" +0x0a7f: "[?]" +0x0a80: "[?]" +0x0a81: "N" +0x0a82: "N" +0x0a83: "H" +0x0a84: "[?]" +0x0a85: "a" +0x0a86: "aa" +0x0a87: "i" +0x0a88: "ii" +0x0a89: "u" +0x0a8a: "uu" +0x0a8b: "R" +0x0a8c: "[?]" +0x0a8d: "eN" +0x0a8e: "[?]" +0x0a8f: "e" +0x0a90: "ai" +0x0a91: "oN" +0x0a92: "[?]" +0x0a93: "o" +0x0a94: "au" +0x0a95: "k" +0x0a96: "kh" +0x0a97: "g" +0x0a98: "gh" +0x0a99: "ng" +0x0a9a: "c" +0x0a9b: "ch" +0x0a9c: "j" +0x0a9d: "jh" +0x0a9e: "ny" +0x0a9f: "tt" +0x0aa0: "tth" +0x0aa1: "dd" +0x0aa2: "ddh" +0x0aa3: "nn" +0x0aa4: "t" +0x0aa5: "th" +0x0aa6: "d" +0x0aa7: "dh" +0x0aa8: "n" +0x0aa9: "[?]" +0x0aaa: "p" +0x0aab: "ph" +0x0aac: "b" +0x0aad: "bh" +0x0aae: "m" +0x0aaf: "ya" +0x0ab0: "r" +0x0ab1: "[?]" +0x0ab2: "l" +0x0ab3: "ll" +0x0ab4: "[?]" +0x0ab5: "v" +0x0ab6: "sh" +0x0ab7: "ss" +0x0ab8: "s" +0x0ab9: "h" +0x0aba: "[?]" +0x0abb: "[?]" +0x0abc: "'" +0x0abd: "'" +0x0abe: "aa" +0x0abf: "i" +0x0ac0: "ii" +0x0ac1: "u" +0x0ac2: "uu" +0x0ac3: "R" +0x0ac4: "RR" +0x0ac5: "eN" +0x0ac6: "[?]" +0x0ac7: "e" +0x0ac8: "ai" +0x0ac9: "oN" +0x0aca: "[?]" +0x0acb: "o" +0x0acc: "au" +0x0acd: "" +0x0ace: "[?]" +0x0acf: "[?]" +0x0ad0: "AUM" +0x0ad1: "[?]" +0x0ad2: "[?]" +0x0ad3: "[?]" +0x0ad4: "[?]" +0x0ad5: "[?]" +0x0ad6: "[?]" +0x0ad7: "[?]" +0x0ad8: "[?]" +0x0ad9: "[?]" +0x0ada: "[?]" +0x0adb: "[?]" +0x0adc: "[?]" +0x0add: "[?]" +0x0ade: "[?]" +0x0adf: "[?]" +0x0ae0: "RR" +0x0ae1: "[?]" +0x0ae2: "[?]" +0x0ae3: "[?]" +0x0ae4: "[?]" +0x0ae5: "[?]" +0x0ae6: "0" +0x0ae7: "1" +0x0ae8: "2" +0x0ae9: "3" +0x0aea: "4" +0x0aeb: "5" +0x0aec: "6" +0x0aed: "7" +0x0aee: "8" +0x0aef: "9" +0x0af0: "[?]" +0x0af1: "[?]" +0x0af2: "[?]" +0x0af3: "[?]" +0x0af4: "[?]" +0x0af5: "[?]" +0x0af6: "[?]" +0x0af7: "[?]" +0x0af8: "[?]" +0x0af9: "[?]" +0x0afa: "[?]" +0x0afb: "[?]" +0x0afc: "[?]" +0x0afd: "[?]" +0x0afe: "[?]" +/* x00b */ +0x0b00: "[?]" +0x0b01: "N" +0x0b02: "N" +0x0b03: "H" +0x0b04: "[?]" +0x0b05: "a" +0x0b06: "aa" +0x0b07: "i" +0x0b08: "ii" +0x0b09: "u" +0x0b0a: "uu" +0x0b0b: "R" +0x0b0c: "L" +0x0b0d: "[?]" +0x0b0e: "[?]" +0x0b0f: "e" +0x0b10: "ai" +0x0b11: "[?]" +0x0b12: "[?]" +0x0b13: "o" +0x0b14: "au" +0x0b15: "k" +0x0b16: "kh" +0x0b17: "g" +0x0b18: "gh" +0x0b19: "ng" +0x0b1a: "c" +0x0b1b: "ch" +0x0b1c: "j" +0x0b1d: "jh" +0x0b1e: "ny" +0x0b1f: "tt" +0x0b20: "tth" +0x0b21: "dd" +0x0b22: "ddh" +0x0b23: "nn" +0x0b24: "t" +0x0b25: "th" +0x0b26: "d" +0x0b27: "dh" +0x0b28: "n" +0x0b29: "[?]" +0x0b2a: "p" +0x0b2b: "ph" +0x0b2c: "b" +0x0b2d: "bh" +0x0b2e: "m" +0x0b2f: "y" +0x0b30: "r" +0x0b31: "[?]" +0x0b32: "l" +0x0b33: "ll" +0x0b34: "[?]" +0x0b35: "" +0x0b36: "sh" +0x0b37: "ss" +0x0b38: "s" +0x0b39: "h" +0x0b3a: "[?]" +0x0b3b: "[?]" +0x0b3c: "'" +0x0b3d: "'" +0x0b3e: "aa" +0x0b3f: "i" +0x0b40: "ii" +0x0b41: "u" +0x0b42: "uu" +0x0b43: "R" +0x0b44: "[?]" +0x0b45: "[?]" +0x0b46: "[?]" +0x0b47: "e" +0x0b48: "ai" +0x0b49: "[?]" +0x0b4a: "[?]" +0x0b4b: "o" +0x0b4c: "au" +0x0b4d: "" +0x0b4e: "[?]" +0x0b4f: "[?]" +0x0b50: "[?]" +0x0b51: "[?]" +0x0b52: "[?]" +0x0b53: "[?]" +0x0b54: "[?]" +0x0b55: "[?]" +0x0b56: "+" +0x0b57: "+" +0x0b58: "[?]" +0x0b59: "[?]" +0x0b5a: "[?]" +0x0b5b: "[?]" +0x0b5c: "rr" +0x0b5d: "rh" +0x0b5e: "[?]" +0x0b5f: "yy" +0x0b60: "RR" +0x0b61: "LL" +0x0b62: "[?]" +0x0b63: "[?]" +0x0b64: "[?]" +0x0b65: "[?]" +0x0b66: "0" +0x0b67: "1" +0x0b68: "2" +0x0b69: "3" +0x0b6a: "4" +0x0b6b: "5" +0x0b6c: "6" +0x0b6d: "7" +0x0b6e: "8" +0x0b6f: "9" +0x0b70: "" +0x0b71: "[?]" +0x0b72: "[?]" +0x0b73: "[?]" +0x0b74: "[?]" +0x0b75: "[?]" +0x0b76: "[?]" +0x0b77: "[?]" +0x0b78: "[?]" +0x0b79: "[?]" +0x0b7a: "[?]" +0x0b7b: "[?]" +0x0b7c: "[?]" +0x0b7d: "[?]" +0x0b7e: "[?]" +0x0b7f: "[?]" +0x0b80: "[?]" +0x0b81: "[?]" +0x0b82: "N" +0x0b83: "H" +0x0b84: "[?]" +0x0b85: "a" +0x0b86: "aa" +0x0b87: "i" +0x0b88: "ii" +0x0b89: "u" +0x0b8a: "uu" +0x0b8b: "[?]" +0x0b8c: "[?]" +0x0b8d: "[?]" +0x0b8e: "e" +0x0b8f: "ee" +0x0b90: "ai" +0x0b91: "[?]" +0x0b92: "o" +0x0b93: "oo" +0x0b94: "au" +0x0b95: "k" +0x0b96: "[?]" +0x0b97: "[?]" +0x0b98: "[?]" +0x0b99: "ng" +0x0b9a: "c" +0x0b9b: "[?]" +0x0b9c: "j" +0x0b9d: "[?]" +0x0b9e: "ny" +0x0b9f: "tt" +0x0ba0: "[?]" +0x0ba1: "[?]" +0x0ba2: "[?]" +0x0ba3: "nn" +0x0ba4: "t" +0x0ba5: "[?]" +0x0ba6: "[?]" +0x0ba7: "[?]" +0x0ba8: "n" +0x0ba9: "nnn" +0x0baa: "p" +0x0bab: "[?]" +0x0bac: "[?]" +0x0bad: "[?]" +0x0bae: "m" +0x0baf: "y" +0x0bb0: "r" +0x0bb1: "rr" +0x0bb2: "l" +0x0bb3: "ll" +0x0bb4: "lll" +0x0bb5: "v" +0x0bb6: "[?]" +0x0bb7: "ss" +0x0bb8: "s" +0x0bb9: "h" +0x0bba: "[?]" +0x0bbb: "[?]" +0x0bbc: "[?]" +0x0bbd: "[?]" +0x0bbe: "aa" +0x0bbf: "i" +0x0bc0: "ii" +0x0bc1: "u" +0x0bc2: "uu" +0x0bc3: "[?]" +0x0bc4: "[?]" +0x0bc5: "[?]" +0x0bc6: "e" +0x0bc7: "ee" +0x0bc8: "ai" +0x0bc9: "[?]" +0x0bca: "o" +0x0bcb: "oo" +0x0bcc: "au" +0x0bcd: "" +0x0bce: "[?]" +0x0bcf: "[?]" +0x0bd0: "[?]" +0x0bd1: "[?]" +0x0bd2: "[?]" +0x0bd3: "[?]" +0x0bd4: "[?]" +0x0bd5: "[?]" +0x0bd6: "[?]" +0x0bd7: "+" +0x0bd8: "[?]" +0x0bd9: "[?]" +0x0bda: "[?]" +0x0bdb: "[?]" +0x0bdc: "[?]" +0x0bdd: "[?]" +0x0bde: "[?]" +0x0bdf: "[?]" +0x0be0: "[?]" +0x0be1: "[?]" +0x0be2: "[?]" +0x0be3: "[?]" +0x0be4: "[?]" +0x0be5: "[?]" +0x0be6: "0" +0x0be7: "1" +0x0be8: "2" +0x0be9: "3" +0x0bea: "4" +0x0beb: "5" +0x0bec: "6" +0x0bed: "7" +0x0bee: "8" +0x0bef: "9" +0x0bf0: "+10+" +0x0bf1: "+100+" +0x0bf2: "+1000+" +0x0bf3: "[?]" +0x0bf4: "[?]" +0x0bf5: "[?]" +0x0bf6: "[?]" +0x0bf7: "[?]" +0x0bf8: "[?]" +0x0bf9: "[?]" +0x0bfa: "[?]" +0x0bfb: "[?]" +0x0bfc: "[?]" +0x0bfd: "[?]" +0x0bfe: "[?]" +/* x00c */ +0x0c00: "[?]" +0x0c01: "N" +0x0c02: "N" +0x0c03: "H" +0x0c04: "[?]" +0x0c05: "a" +0x0c06: "aa" +0x0c07: "i" +0x0c08: "ii" +0x0c09: "u" +0x0c0a: "uu" +0x0c0b: "R" +0x0c0c: "L" +0x0c0d: "[?]" +0x0c0e: "e" +0x0c0f: "ee" +0x0c10: "ai" +0x0c11: "[?]" +0x0c12: "o" +0x0c13: "oo" +0x0c14: "au" +0x0c15: "k" +0x0c16: "kh" +0x0c17: "g" +0x0c18: "gh" +0x0c19: "ng" +0x0c1a: "c" +0x0c1b: "ch" +0x0c1c: "j" +0x0c1d: "jh" +0x0c1e: "ny" +0x0c1f: "tt" +0x0c20: "tth" +0x0c21: "dd" +0x0c22: "ddh" +0x0c23: "nn" +0x0c24: "t" +0x0c25: "th" +0x0c26: "d" +0x0c27: "dh" +0x0c28: "n" +0x0c29: "[?]" +0x0c2a: "p" +0x0c2b: "ph" +0x0c2c: "b" +0x0c2d: "bh" +0x0c2e: "m" +0x0c2f: "y" +0x0c30: "r" +0x0c31: "rr" +0x0c32: "l" +0x0c33: "ll" +0x0c34: "[?]" +0x0c35: "v" +0x0c36: "sh" +0x0c37: "ss" +0x0c38: "s" +0x0c39: "h" +0x0c3a: "[?]" +0x0c3b: "[?]" +0x0c3c: "[?]" +0x0c3d: "[?]" +0x0c3e: "aa" +0x0c3f: "i" +0x0c40: "ii" +0x0c41: "u" +0x0c42: "uu" +0x0c43: "R" +0x0c44: "RR" +0x0c45: "[?]" +0x0c46: "e" +0x0c47: "ee" +0x0c48: "ai" +0x0c49: "[?]" +0x0c4a: "o" +0x0c4b: "oo" +0x0c4c: "au" +0x0c4d: "" +0x0c4e: "[?]" +0x0c4f: "[?]" +0x0c50: "[?]" +0x0c51: "[?]" +0x0c52: "[?]" +0x0c53: "[?]" +0x0c54: "[?]" +0x0c55: "+" +0x0c56: "+" +0x0c57: "[?]" +0x0c58: "[?]" +0x0c59: "[?]" +0x0c5a: "[?]" +0x0c5b: "[?]" +0x0c5c: "[?]" +0x0c5d: "[?]" +0x0c5e: "[?]" +0x0c5f: "[?]" +0x0c60: "RR" +0x0c61: "LL" +0x0c62: "[?]" +0x0c63: "[?]" +0x0c64: "[?]" +0x0c65: "[?]" +0x0c66: "0" +0x0c67: "1" +0x0c68: "2" +0x0c69: "3" +0x0c6a: "4" +0x0c6b: "5" +0x0c6c: "6" +0x0c6d: "7" +0x0c6e: "8" +0x0c6f: "9" +0x0c70: "[?]" +0x0c71: "[?]" +0x0c72: "[?]" +0x0c73: "[?]" +0x0c74: "[?]" +0x0c75: "[?]" +0x0c76: "[?]" +0x0c77: "[?]" +0x0c78: "[?]" +0x0c79: "[?]" +0x0c7a: "[?]" +0x0c7b: "[?]" +0x0c7c: "[?]" +0x0c7d: "[?]" +0x0c7e: "[?]" +0x0c7f: "[?]" +0x0c80: "[?]" +0x0c81: "[?]" +0x0c82: "N" +0x0c83: "H" +0x0c84: "[?]" +0x0c85: "a" +0x0c86: "aa" +0x0c87: "i" +0x0c88: "ii" +0x0c89: "u" +0x0c8a: "uu" +0x0c8b: "R" +0x0c8c: "L" +0x0c8d: "[?]" +0x0c8e: "e" +0x0c8f: "ee" +0x0c90: "ai" +0x0c91: "[?]" +0x0c92: "o" +0x0c93: "oo" +0x0c94: "au" +0x0c95: "k" +0x0c96: "kh" +0x0c97: "g" +0x0c98: "gh" +0x0c99: "ng" +0x0c9a: "c" +0x0c9b: "ch" +0x0c9c: "j" +0x0c9d: "jh" +0x0c9e: "ny" +0x0c9f: "tt" +0x0ca0: "tth" +0x0ca1: "dd" +0x0ca2: "ddh" +0x0ca3: "nn" +0x0ca4: "t" +0x0ca5: "th" +0x0ca6: "d" +0x0ca7: "dh" +0x0ca8: "n" +0x0ca9: "[?]" +0x0caa: "p" +0x0cab: "ph" +0x0cac: "b" +0x0cad: "bh" +0x0cae: "m" +0x0caf: "y" +0x0cb0: "r" +0x0cb1: "rr" +0x0cb2: "l" +0x0cb3: "ll" +0x0cb4: "[?]" +0x0cb5: "v" +0x0cb6: "sh" +0x0cb7: "ss" +0x0cb8: "s" +0x0cb9: "h" +0x0cba: "[?]" +0x0cbb: "[?]" +0x0cbc: "[?]" +0x0cbd: "[?]" +0x0cbe: "aa" +0x0cbf: "i" +0x0cc0: "ii" +0x0cc1: "u" +0x0cc2: "uu" +0x0cc3: "R" +0x0cc4: "RR" +0x0cc5: "[?]" +0x0cc6: "e" +0x0cc7: "ee" +0x0cc8: "ai" +0x0cc9: "[?]" +0x0cca: "o" +0x0ccb: "oo" +0x0ccc: "au" +0x0ccd: "" +0x0cce: "[?]" +0x0ccf: "[?]" +0x0cd0: "[?]" +0x0cd1: "[?]" +0x0cd2: "[?]" +0x0cd3: "[?]" +0x0cd4: "[?]" +0x0cd5: "+" +0x0cd6: "+" +0x0cd7: "[?]" +0x0cd8: "[?]" +0x0cd9: "[?]" +0x0cda: "[?]" +0x0cdb: "[?]" +0x0cdc: "[?]" +0x0cdd: "[?]" +0x0cde: "lll" +0x0cdf: "[?]" +0x0ce0: "RR" +0x0ce1: "LL" +0x0ce2: "[?]" +0x0ce3: "[?]" +0x0ce4: "[?]" +0x0ce5: "[?]" +0x0ce6: "0" +0x0ce7: "1" +0x0ce8: "2" +0x0ce9: "3" +0x0cea: "4" +0x0ceb: "5" +0x0cec: "6" +0x0ced: "7" +0x0cee: "8" +0x0cef: "9" +0x0cf0: "[?]" +0x0cf1: "[?]" +0x0cf2: "[?]" +0x0cf3: "[?]" +0x0cf4: "[?]" +0x0cf5: "[?]" +0x0cf6: "[?]" +0x0cf7: "[?]" +0x0cf8: "[?]" +0x0cf9: "[?]" +0x0cfa: "[?]" +0x0cfb: "[?]" +0x0cfc: "[?]" +0x0cfd: "[?]" +0x0cfe: "[?]" +/* x00d */ +0x0d00: "[?]" +0x0d01: "[?]" +0x0d02: "N" +0x0d03: "H" +0x0d04: "[?]" +0x0d05: "a" +0x0d06: "aa" +0x0d07: "i" +0x0d08: "ii" +0x0d09: "u" +0x0d0a: "uu" +0x0d0b: "R" +0x0d0c: "L" +0x0d0d: "[?]" +0x0d0e: "e" +0x0d0f: "ee" +0x0d10: "ai" +0x0d11: "[?]" +0x0d12: "o" +0x0d13: "oo" +0x0d14: "au" +0x0d15: "k" +0x0d16: "kh" +0x0d17: "g" +0x0d18: "gh" +0x0d19: "ng" +0x0d1a: "c" +0x0d1b: "ch" +0x0d1c: "j" +0x0d1d: "jh" +0x0d1e: "ny" +0x0d1f: "tt" +0x0d20: "tth" +0x0d21: "dd" +0x0d22: "ddh" +0x0d23: "nn" +0x0d24: "t" +0x0d25: "th" +0x0d26: "d" +0x0d27: "dh" +0x0d28: "n" +0x0d29: "[?]" +0x0d2a: "p" +0x0d2b: "ph" +0x0d2c: "b" +0x0d2d: "bh" +0x0d2e: "m" +0x0d2f: "y" +0x0d30: "r" +0x0d31: "rr" +0x0d32: "l" +0x0d33: "ll" +0x0d34: "lll" +0x0d35: "v" +0x0d36: "sh" +0x0d37: "ss" +0x0d38: "s" +0x0d39: "h" +0x0d3a: "[?]" +0x0d3b: "[?]" +0x0d3c: "[?]" +0x0d3d: "[?]" +0x0d3e: "aa" +0x0d3f: "i" +0x0d40: "ii" +0x0d41: "u" +0x0d42: "uu" +0x0d43: "R" +0x0d44: "[?]" +0x0d45: "[?]" +0x0d46: "e" +0x0d47: "ee" +0x0d48: "ai" +0x0d49: "" +0x0d4a: "o" +0x0d4b: "oo" +0x0d4c: "au" +0x0d4d: "" +0x0d4e: "[?]" +0x0d4f: "[?]" +0x0d50: "[?]" +0x0d51: "[?]" +0x0d52: "[?]" +0x0d53: "[?]" +0x0d54: "[?]" +0x0d55: "[?]" +0x0d56: "[?]" +0x0d57: "+" +0x0d58: "[?]" +0x0d59: "[?]" +0x0d5a: "[?]" +0x0d5b: "[?]" +0x0d5c: "[?]" +0x0d5d: "[?]" +0x0d5e: "[?]" +0x0d5f: "[?]" +0x0d60: "RR" +0x0d61: "LL" +0x0d62: "[?]" +0x0d63: "[?]" +0x0d64: "[?]" +0x0d65: "[?]" +0x0d66: "0" +0x0d67: "1" +0x0d68: "2" +0x0d69: "3" +0x0d6a: "4" +0x0d6b: "5" +0x0d6c: "6" +0x0d6d: "7" +0x0d6e: "8" +0x0d6f: "9" +0x0d70: "[?]" +0x0d71: "[?]" +0x0d72: "[?]" +0x0d73: "[?]" +0x0d74: "[?]" +0x0d75: "[?]" +0x0d76: "[?]" +0x0d77: "[?]" +0x0d78: "[?]" +0x0d79: "[?]" +0x0d7a: "[?]" +0x0d7b: "[?]" +0x0d7c: "[?]" +0x0d7d: "[?]" +0x0d7e: "[?]" +0x0d7f: "[?]" +0x0d80: "[?]" +0x0d81: "[?]" +0x0d82: "N" +0x0d83: "H" +0x0d84: "[?]" +0x0d85: "a" +0x0d86: "aa" +0x0d87: "ae" +0x0d88: "aae" +0x0d89: "i" +0x0d8a: "ii" +0x0d8b: "u" +0x0d8c: "uu" +0x0d8d: "R" +0x0d8e: "RR" +0x0d8f: "L" +0x0d90: "LL" +0x0d91: "e" +0x0d92: "ee" +0x0d93: "ai" +0x0d94: "o" +0x0d95: "oo" +0x0d96: "au" +0x0d97: "[?]" +0x0d98: "[?]" +0x0d99: "[?]" +0x0d9a: "k" +0x0d9b: "kh" +0x0d9c: "g" +0x0d9d: "gh" +0x0d9e: "ng" +0x0d9f: "nng" +0x0da0: "c" +0x0da1: "ch" +0x0da2: "j" +0x0da3: "jh" +0x0da4: "ny" +0x0da5: "jny" +0x0da6: "nyj" +0x0da7: "tt" +0x0da8: "tth" +0x0da9: "dd" +0x0daa: "ddh" +0x0dab: "nn" +0x0dac: "nndd" +0x0dad: "t" +0x0dae: "th" +0x0daf: "d" +0x0db0: "dh" +0x0db1: "n" +0x0db2: "[?]" +0x0db3: "nd" +0x0db4: "p" +0x0db5: "ph" +0x0db6: "b" +0x0db7: "bh" +0x0db8: "m" +0x0db9: "mb" +0x0dba: "y" +0x0dbb: "r" +0x0dbc: "[?]" +0x0dbd: "l" +0x0dbe: "[?]" +0x0dbf: "[?]" +0x0dc0: "v" +0x0dc1: "sh" +0x0dc2: "ss" +0x0dc3: "s" +0x0dc4: "h" +0x0dc5: "ll" +0x0dc6: "f" +0x0dc7: "[?]" +0x0dc8: "[?]" +0x0dc9: "[?]" +0x0dca: "" +0x0dcb: "[?]" +0x0dcc: "[?]" +0x0dcd: "[?]" +0x0dce: "[?]" +0x0dcf: "aa" +0x0dd0: "ae" +0x0dd1: "aae" +0x0dd2: "i" +0x0dd3: "ii" +0x0dd4: "u" +0x0dd5: "[?]" +0x0dd6: "uu" +0x0dd7: "[?]" +0x0dd8: "R" +0x0dd9: "e" +0x0dda: "ee" +0x0ddb: "ai" +0x0ddc: "o" +0x0ddd: "oo" +0x0dde: "au" +0x0ddf: "L" +0x0de0: "[?]" +0x0de1: "[?]" +0x0de2: "[?]" +0x0de3: "[?]" +0x0de4: "[?]" +0x0de5: "[?]" +0x0de6: "[?]" +0x0de7: "[?]" +0x0de8: "[?]" +0x0de9: "[?]" +0x0dea: "[?]" +0x0deb: "[?]" +0x0dec: "[?]" +0x0ded: "[?]" +0x0dee: "[?]" +0x0def: "[?]" +0x0df0: "[?]" +0x0df1: "[?]" +0x0df2: "RR" +0x0df3: "LL" +0x0df4: " . " +0x0df5: "[?]" +0x0df6: "[?]" +0x0df7: "[?]" +0x0df8: "[?]" +0x0df9: "[?]" +0x0dfa: "[?]" +0x0dfb: "[?]" +0x0dfc: "[?]" +0x0dfd: "[?]" +0x0dfe: "[?]" +/* x00e */ +0x0e00: "[?]" +0x0e01: "k" +0x0e02: "kh" +0x0e03: "kh" +0x0e04: "kh" +0x0e05: "kh" +0x0e06: "kh" +0x0e07: "ng" +0x0e08: "cch" +0x0e09: "ch" +0x0e0a: "ch" +0x0e0b: "ch" +0x0e0c: "ch" +0x0e0d: "y" +0x0e0e: "d" +0x0e0f: "t" +0x0e10: "th" +0x0e11: "th" +0x0e12: "th" +0x0e13: "n" +0x0e14: "d" +0x0e15: "t" +0x0e16: "th" +0x0e17: "th" +0x0e18: "th" +0x0e19: "n" +0x0e1a: "b" +0x0e1b: "p" +0x0e1c: "ph" +0x0e1d: "f" +0x0e1e: "ph" +0x0e1f: "f" +0x0e20: "ph" +0x0e21: "m" +0x0e22: "y" +0x0e23: "r" +0x0e24: "R" +0x0e25: "l" +0x0e26: "L" +0x0e27: "w" +0x0e28: "s" +0x0e29: "s" +0x0e2a: "s" +0x0e2b: "h" +0x0e2c: "l" +0x0e2d: "`" +0x0e2e: "h" +0x0e2f: "~" +0x0e30: "a" +0x0e31: "a" +0x0e32: "aa" +0x0e33: "am" +0x0e34: "i" +0x0e35: "ii" +0x0e36: "ue" +0x0e37: "uue" +0x0e38: "u" +0x0e39: "uu" +0x0e3a: "'" +0x0e3b: "[?]" +0x0e3c: "[?]" +0x0e3d: "[?]" +0x0e3e: "[?]" +0x0e3f: "Bh." +0x0e40: "e" +0x0e41: "ae" +0x0e42: "o" +0x0e43: "ai" +0x0e44: "ai" +0x0e45: "ao" +0x0e46: "+" +0x0e47: "" +0x0e48: "" +0x0e49: "" +0x0e4a: "" +0x0e4b: "" +0x0e4c: "" +0x0e4d: "M" +0x0e4e: "" +0x0e4f: " * " +0x0e50: "0" +0x0e51: "1" +0x0e52: "2" +0x0e53: "3" +0x0e54: "4" +0x0e55: "5" +0x0e56: "6" +0x0e57: "7" +0x0e58: "8" +0x0e59: "9" +0x0e5a: " // " +0x0e5b: " /// " +0x0e5c: "[?]" +0x0e5d: "[?]" +0x0e5e: "[?]" +0x0e5f: "[?]" +0x0e60: "[?]" +0x0e61: "[?]" +0x0e62: "[?]" +0x0e63: "[?]" +0x0e64: "[?]" +0x0e65: "[?]" +0x0e66: "[?]" +0x0e67: "[?]" +0x0e68: "[?]" +0x0e69: "[?]" +0x0e6a: "[?]" +0x0e6b: "[?]" +0x0e6c: "[?]" +0x0e6d: "[?]" +0x0e6e: "[?]" +0x0e6f: "[?]" +0x0e70: "[?]" +0x0e71: "[?]" +0x0e72: "[?]" +0x0e73: "[?]" +0x0e74: "[?]" +0x0e75: "[?]" +0x0e76: "[?]" +0x0e77: "[?]" +0x0e78: "[?]" +0x0e79: "[?]" +0x0e7a: "[?]" +0x0e7b: "[?]" +0x0e7c: "[?]" +0x0e7d: "[?]" +0x0e7e: "[?]" +0x0e7f: "[?]" +0x0e80: "[?]" +0x0e81: "k" +0x0e82: "kh" +0x0e83: "[?]" +0x0e84: "kh" +0x0e85: "[?]" +0x0e86: "[?]" +0x0e87: "ng" +0x0e88: "ch" +0x0e89: "[?]" +0x0e8a: "s" +0x0e8b: "[?]" +0x0e8c: "[?]" +0x0e8d: "ny" +0x0e8e: "[?]" +0x0e8f: "[?]" +0x0e90: "[?]" +0x0e91: "[?]" +0x0e92: "[?]" +0x0e93: "[?]" +0x0e94: "d" +0x0e95: "h" +0x0e96: "th" +0x0e97: "th" +0x0e98: "[?]" +0x0e99: "n" +0x0e9a: "b" +0x0e9b: "p" +0x0e9c: "ph" +0x0e9d: "f" +0x0e9e: "ph" +0x0e9f: "f" +0x0ea0: "[?]" +0x0ea1: "m" +0x0ea2: "y" +0x0ea3: "r" +0x0ea4: "[?]" +0x0ea5: "l" +0x0ea6: "[?]" +0x0ea7: "w" +0x0ea8: "[?]" +0x0ea9: "[?]" +0x0eaa: "s" +0x0eab: "h" +0x0eac: "[?]" +0x0ead: "`" +0x0eae: "" +0x0eaf: "~" +0x0eb0: "a" +0x0eb1: "" +0x0eb2: "aa" +0x0eb3: "am" +0x0eb4: "i" +0x0eb5: "ii" +0x0eb6: "y" +0x0eb7: "yy" +0x0eb8: "u" +0x0eb9: "uu" +0x0eba: "[?]" +0x0ebb: "o" +0x0ebc: "l" +0x0ebd: "ny" +0x0ebe: "[?]" +0x0ebf: "[?]" +0x0ec0: "e" +0x0ec1: "ei" +0x0ec2: "o" +0x0ec3: "ay" +0x0ec4: "ai" +0x0ec5: "[?]" +0x0ec6: "+" +0x0ec7: "[?]" +0x0ec8: "" +0x0ec9: "" +0x0eca: "" +0x0ecb: "" +0x0ecc: "" +0x0ecd: "M" +0x0ece: "[?]" +0x0ecf: "[?]" +0x0ed0: "0" +0x0ed1: "1" +0x0ed2: "2" +0x0ed3: "3" +0x0ed4: "4" +0x0ed5: "5" +0x0ed6: "6" +0x0ed7: "7" +0x0ed8: "8" +0x0ed9: "9" +0x0eda: "[?]" +0x0edb: "[?]" +0x0edc: "hn" +0x0edd: "hm" +0x0ede: "[?]" +0x0edf: "[?]" +0x0ee0: "[?]" +0x0ee1: "[?]" +0x0ee2: "[?]" +0x0ee3: "[?]" +0x0ee4: "[?]" +0x0ee5: "[?]" +0x0ee6: "[?]" +0x0ee7: "[?]" +0x0ee8: "[?]" +0x0ee9: "[?]" +0x0eea: "[?]" +0x0eeb: "[?]" +0x0eec: "[?]" +0x0eed: "[?]" +0x0eee: "[?]" +0x0eef: "[?]" +0x0ef0: "[?]" +0x0ef1: "[?]" +0x0ef2: "[?]" +0x0ef3: "[?]" +0x0ef4: "[?]" +0x0ef5: "[?]" +0x0ef6: "[?]" +0x0ef7: "[?]" +0x0ef8: "[?]" +0x0ef9: "[?]" +0x0efa: "[?]" +0x0efb: "[?]" +0x0efc: "[?]" +0x0efd: "[?]" +0x0efe: "[?]" +/* x00f */ +0x0f00: "AUM" +0x0f01: "" +0x0f02: "" +0x0f03: "" +0x0f04: "" +0x0f05: "" +0x0f06: "" +0x0f07: "" +0x0f08: " // " +0x0f09: " * " +0x0f0a: "" +0x0f0b: "-" +0x0f0c: " / " +0x0f0d: " / " +0x0f0e: " // " +0x0f0f: " -/ " +0x0f10: " +/ " +0x0f11: " X/ " +0x0f12: " /XX/ " +0x0f13: " /X/ " +0x0f14: ", " +0x0f15: "" +0x0f16: "" +0x0f17: "" +0x0f18: "" +0x0f19: "" +0x0f1a: "" +0x0f1b: "" +0x0f1c: "" +0x0f1d: "" +0x0f1e: "" +0x0f1f: "" +0x0f20: "0" +0x0f21: "1" +0x0f22: "2" +0x0f23: "3" +0x0f24: "4" +0x0f25: "5" +0x0f26: "6" +0x0f27: "7" +0x0f28: "8" +0x0f29: "9" +0x0f2a: ".5" +0x0f2b: "1.5" +0x0f2c: "2.5" +0x0f2d: "3.5" +0x0f2e: "4.5" +0x0f2f: "5.5" +0x0f30: "6.5" +0x0f31: "7.5" +0x0f32: "8.5" +0x0f33: "-.5" +0x0f34: "+" +0x0f35: "*" +0x0f36: "^" +0x0f37: "_" +0x0f38: "" +0x0f39: "~" +0x0f3a: "[?]" +0x0f3b: "]" +0x0f3c: "[[" +0x0f3d: "]]" +0x0f3e: "" +0x0f3f: "" +0x0f40: "k" +0x0f41: "kh" +0x0f42: "g" +0x0f43: "gh" +0x0f44: "ng" +0x0f45: "c" +0x0f46: "ch" +0x0f47: "j" +0x0f48: "[?]" +0x0f49: "ny" +0x0f4a: "tt" +0x0f4b: "tth" +0x0f4c: "dd" +0x0f4d: "ddh" +0x0f4e: "nn" +0x0f4f: "t" +0x0f50: "th" +0x0f51: "d" +0x0f52: "dh" +0x0f53: "n" +0x0f54: "p" +0x0f55: "ph" +0x0f56: "b" +0x0f57: "bh" +0x0f58: "m" +0x0f59: "ts" +0x0f5a: "tsh" +0x0f5b: "dz" +0x0f5c: "dzh" +0x0f5d: "w" +0x0f5e: "zh" +0x0f5f: "z" +0x0f60: "'" +0x0f61: "y" +0x0f62: "r" +0x0f63: "l" +0x0f64: "sh" +0x0f65: "ssh" +0x0f66: "s" +0x0f67: "h" +0x0f68: "a" +0x0f69: "kss" +0x0f6a: "r" +0x0f6b: "[?]" +0x0f6c: "[?]" +0x0f6d: "[?]" +0x0f6e: "[?]" +0x0f6f: "[?]" +0x0f70: "[?]" +0x0f71: "aa" +0x0f72: "i" +0x0f73: "ii" +0x0f74: "u" +0x0f75: "uu" +0x0f76: "R" +0x0f77: "RR" +0x0f78: "L" +0x0f79: "LL" +0x0f7a: "e" +0x0f7b: "ee" +0x0f7c: "o" +0x0f7d: "oo" +0x0f7e: "M" +0x0f7f: "H" +0x0f80: "i" +0x0f81: "ii" +0x0f82: "" +0x0f83: "" +0x0f84: "" +0x0f85: "" +0x0f86: "" +0x0f87: "" +0x0f88: "" +0x0f89: "" +0x0f8a: "" +0x0f8b: "" +0x0f8c: "[?]" +0x0f8d: "[?]" +0x0f8e: "[?]" +0x0f8f: "[?]" +0x0f90: "k" +0x0f91: "kh" +0x0f92: "g" +0x0f93: "gh" +0x0f94: "ng" +0x0f95: "c" +0x0f96: "ch" +0x0f97: "j" +0x0f98: "[?]" +0x0f99: "ny" +0x0f9a: "tt" +0x0f9b: "tth" +0x0f9c: "dd" +0x0f9d: "ddh" +0x0f9e: "nn" +0x0f9f: "t" +0x0fa0: "th" +0x0fa1: "d" +0x0fa2: "dh" +0x0fa3: "n" +0x0fa4: "p" +0x0fa5: "ph" +0x0fa6: "b" +0x0fa7: "bh" +0x0fa8: "m" +0x0fa9: "ts" +0x0faa: "tsh" +0x0fab: "dz" +0x0fac: "dzh" +0x0fad: "w" +0x0fae: "zh" +0x0faf: "z" +0x0fb0: "'" +0x0fb1: "y" +0x0fb2: "r" +0x0fb3: "l" +0x0fb4: "sh" +0x0fb5: "ss" +0x0fb6: "s" +0x0fb7: "h" +0x0fb8: "a" +0x0fb9: "kss" +0x0fba: "w" +0x0fbb: "y" +0x0fbc: "r" +0x0fbd: "[?]" +0x0fbe: "X" +0x0fbf: " :X: " +0x0fc0: " /O/ " +0x0fc1: " /o/ " +0x0fc2: " \\o\\ " +0x0fc3: " (O) " +0x0fc4: "" +0x0fc5: "" +0x0fc6: "" +0x0fc7: "" +0x0fc8: "" +0x0fc9: "" +0x0fca: "" +0x0fcb: "" +0x0fcc: "" +0x0fcd: "[?]" +0x0fce: "[?]" +0x0fcf: "" +0x0fd0: "[?]" +0x0fd1: "[?]" +0x0fd2: "[?]" +0x0fd3: "[?]" +0x0fd4: "[?]" +0x0fd5: "[?]" +0x0fd6: "[?]" +0x0fd7: "[?]" +0x0fd8: "[?]" +0x0fd9: "[?]" +0x0fda: "[?]" +0x0fdb: "[?]" +0x0fdc: "[?]" +0x0fdd: "[?]" +0x0fde: "[?]" +0x0fdf: "[?]" +0x0fe0: "[?]" +0x0fe1: "[?]" +0x0fe2: "[?]" +0x0fe3: "[?]" +0x0fe4: "[?]" +0x0fe5: "[?]" +0x0fe6: "[?]" +0x0fe7: "[?]" +0x0fe8: "[?]" +0x0fe9: "[?]" +0x0fea: "[?]" +0x0feb: "[?]" +0x0fec: "[?]" +0x0fed: "[?]" +0x0fee: "[?]" +0x0fef: "[?]" +0x0ff0: "[?]" +0x0ff1: "[?]" +0x0ff2: "[?]" +0x0ff3: "[?]" +0x0ff4: "[?]" +0x0ff5: "[?]" +0x0ff6: "[?]" +0x0ff7: "[?]" +0x0ff8: "[?]" +0x0ff9: "[?]" +0x0ffa: "[?]" +0x0ffb: "[?]" +0x0ffc: "[?]" +0x0ffd: "[?]" +0x0ffe: "[?]" +/* x010 */ +0x1000: "k" +0x1001: "kh" +0x1002: "g" +0x1003: "gh" +0x1004: "ng" +0x1005: "c" +0x1006: "ch" +0x1007: "j" +0x1008: "jh" +0x1009: "ny" +0x100a: "nny" +0x100b: "tt" +0x100c: "tth" +0x100d: "dd" +0x100e: "ddh" +0x100f: "nn" +0x1010: "tt" +0x1011: "th" +0x1012: "d" +0x1013: "dh" +0x1014: "n" +0x1015: "p" +0x1016: "ph" +0x1017: "b" +0x1018: "bh" +0x1019: "m" +0x101a: "y" +0x101b: "r" +0x101c: "l" +0x101d: "w" +0x101e: "s" +0x101f: "h" +0x1020: "ll" +0x1021: "a" +0x1022: "[?]" +0x1023: "i" +0x1024: "ii" +0x1025: "u" +0x1026: "uu" +0x1027: "e" +0x1028: "[?]" +0x1029: "o" +0x102a: "au" +0x102b: "[?]" +0x102c: "aa" +0x102d: "i" +0x102e: "ii" +0x102f: "u" +0x1030: "uu" +0x1031: "e" +0x1032: "ai" +0x1033: "[?]" +0x1034: "[?]" +0x1035: "[?]" +0x1036: "N" +0x1037: "'" +0x1038: ":" +0x1039: "" +0x103a: "[?]" +0x103b: "[?]" +0x103c: "[?]" +0x103d: "[?]" +0x103e: "[?]" +0x103f: "[?]" +0x1040: "0" +0x1041: "1" +0x1042: "2" +0x1043: "3" +0x1044: "4" +0x1045: "5" +0x1046: "6" +0x1047: "7" +0x1048: "8" +0x1049: "9" +0x104a: " / " +0x104b: " // " +0x104c: "n*" +0x104d: "r*" +0x104e: "l*" +0x104f: "e*" +0x1050: "sh" +0x1051: "ss" +0x1052: "R" +0x1053: "RR" +0x1054: "L" +0x1055: "LL" +0x1056: "R" +0x1057: "RR" +0x1058: "L" +0x1059: "LL" +0x105a: "[?]" +0x105b: "[?]" +0x105c: "[?]" +0x105d: "[?]" +0x105e: "[?]" +0x105f: "[?]" +0x1060: "[?]" +0x1061: "[?]" +0x1062: "[?]" +0x1063: "[?]" +0x1064: "[?]" +0x1065: "[?]" +0x1066: "[?]" +0x1067: "[?]" +0x1068: "[?]" +0x1069: "[?]" +0x106a: "[?]" +0x106b: "[?]" +0x106c: "[?]" +0x106d: "[?]" +0x106e: "[?]" +0x106f: "[?]" +0x1070: "[?]" +0x1071: "[?]" +0x1072: "[?]" +0x1073: "[?]" +0x1074: "[?]" +0x1075: "[?]" +0x1076: "[?]" +0x1077: "[?]" +0x1078: "[?]" +0x1079: "[?]" +0x107a: "[?]" +0x107b: "[?]" +0x107c: "[?]" +0x107d: "[?]" +0x107e: "[?]" +0x107f: "[?]" +0x1080: "[?]" +0x1081: "[?]" +0x1082: "[?]" +0x1083: "[?]" +0x1084: "[?]" +0x1085: "[?]" +0x1086: "[?]" +0x1087: "[?]" +0x1088: "[?]" +0x1089: "[?]" +0x108a: "[?]" +0x108b: "[?]" +0x108c: "[?]" +0x108d: "[?]" +0x108e: "[?]" +0x108f: "[?]" +0x1090: "[?]" +0x1091: "[?]" +0x1092: "[?]" +0x1093: "[?]" +0x1094: "[?]" +0x1095: "[?]" +0x1096: "[?]" +0x1097: "[?]" +0x1098: "[?]" +0x1099: "[?]" +0x109a: "[?]" +0x109b: "[?]" +0x109c: "[?]" +0x109d: "[?]" +0x109e: "[?]" +0x109f: "[?]" +0x10a0: "A" +0x10a1: "B" +0x10a2: "G" +0x10a3: "D" +0x10a4: "E" +0x10a5: "V" +0x10a6: "Z" +0x10a7: "T`" +0x10a8: "I" +0x10a9: "K" +0x10aa: "L" +0x10ab: "M" +0x10ac: "N" +0x10ad: "O" +0x10ae: "P" +0x10af: "Zh" +0x10b0: "R" +0x10b1: "S" +0x10b2: "T" +0x10b3: "U" +0x10b4: "P`" +0x10b5: "K`" +0x10b6: "G'" +0x10b7: "Q" +0x10b8: "Sh" +0x10b9: "Ch`" +0x10ba: "C`" +0x10bb: "Z'" +0x10bc: "C" +0x10bd: "Ch" +0x10be: "X" +0x10bf: "J" +0x10c0: "H" +0x10c1: "E" +0x10c2: "Y" +0x10c3: "W" +0x10c4: "Xh" +0x10c5: "OE" +0x10c6: "[?]" +0x10c7: "[?]" +0x10c8: "[?]" +0x10c9: "[?]" +0x10ca: "[?]" +0x10cb: "[?]" +0x10cc: "[?]" +0x10cd: "[?]" +0x10ce: "[?]" +0x10cf: "[?]" +0x10d0: "a" +0x10d1: "b" +0x10d2: "g" +0x10d3: "d" +0x10d4: "e" +0x10d5: "v" +0x10d6: "z" +0x10d7: "t`" +0x10d8: "i" +0x10d9: "k" +0x10da: "l" +0x10db: "m" +0x10dc: "n" +0x10dd: "o" +0x10de: "p" +0x10df: "zh" +0x10e0: "r" +0x10e1: "s" +0x10e2: "t" +0x10e3: "u" +0x10e4: "p`" +0x10e5: "k`" +0x10e6: "g'" +0x10e7: "q" +0x10e8: "sh" +0x10e9: "ch`" +0x10ea: "c`" +0x10eb: "z'" +0x10ec: "c" +0x10ed: "ch" +0x10ee: "x" +0x10ef: "j" +0x10f0: "h" +0x10f1: "e" +0x10f2: "y" +0x10f3: "w" +0x10f4: "xh" +0x10f5: "oe" +0x10f6: "f" +0x10f7: "[?]" +0x10f8: "[?]" +0x10f9: "[?]" +0x10fa: "[?]" +0x10fb: " // " +0x10fc: "[?]" +0x10fd: "[?]" +0x10fe: "[?]" +/* x011 */ +0x1100: "g" +0x1101: "gg" +0x1102: "n" +0x1103: "d" +0x1104: "dd" +0x1105: "r" +0x1106: "m" +0x1107: "b" +0x1108: "bb" +0x1109: "s" +0x110a: "ss" +0x110b: "" +0x110c: "j" +0x110d: "jj" +0x110e: "c" +0x110f: "k" +0x1110: "t" +0x1111: "p" +0x1112: "h" +0x1113: "ng" +0x1114: "nn" +0x1115: "nd" +0x1116: "nb" +0x1117: "dg" +0x1118: "rn" +0x1119: "rr" +0x111a: "rh" +0x111b: "rN" +0x111c: "mb" +0x111d: "mN" +0x111e: "bg" +0x111f: "bn" +0x1120: "" +0x1121: "bs" +0x1122: "bsg" +0x1123: "bst" +0x1124: "bsb" +0x1125: "bss" +0x1126: "bsj" +0x1127: "bj" +0x1128: "bc" +0x1129: "bt" +0x112a: "bp" +0x112b: "bN" +0x112c: "bbN" +0x112d: "sg" +0x112e: "sn" +0x112f: "sd" +0x1130: "sr" +0x1131: "sm" +0x1132: "sb" +0x1133: "sbg" +0x1134: "sss" +0x1135: "s" +0x1136: "sj" +0x1137: "sc" +0x1138: "sk" +0x1139: "st" +0x113a: "sp" +0x113b: "sh" +0x113c: "" +0x113d: "" +0x113e: "" +0x113f: "" +0x1140: "Z" +0x1141: "g" +0x1142: "d" +0x1143: "m" +0x1144: "b" +0x1145: "s" +0x1146: "Z" +0x1147: "" +0x1148: "j" +0x1149: "c" +0x114a: "t" +0x114b: "p" +0x114c: "N" +0x114d: "j" +0x114e: "" +0x114f: "" +0x1150: "" +0x1151: "" +0x1152: "ck" +0x1153: "ch" +0x1154: "" +0x1155: "" +0x1156: "pb" +0x1157: "pN" +0x1158: "hh" +0x1159: "Q" +0x115a: "[?]" +0x115b: "[?]" +0x115c: "[?]" +0x115d: "[?]" +0x115e: "[?]" +0x115f: "" +0x1160: "" +0x1161: "a" +0x1162: "ae" +0x1163: "ya" +0x1164: "yae" +0x1165: "eo" +0x1166: "e" +0x1167: "yeo" +0x1168: "ye" +0x1169: "o" +0x116a: "wa" +0x116b: "wae" +0x116c: "oe" +0x116d: "yo" +0x116e: "u" +0x116f: "weo" +0x1170: "we" +0x1171: "wi" +0x1172: "yu" +0x1173: "eu" +0x1174: "yi" +0x1175: "i" +0x1176: "a-o" +0x1177: "a-u" +0x1178: "ya-o" +0x1179: "ya-yo" +0x117a: "eo-o" +0x117b: "eo-u" +0x117c: "eo-eu" +0x117d: "yeo-o" +0x117e: "yeo-u" +0x117f: "o-eo" +0x1180: "o-e" +0x1181: "o-ye" +0x1182: "o-o" +0x1183: "o-u" +0x1184: "yo-ya" +0x1185: "yo-yae" +0x1186: "yo-yeo" +0x1187: "yo-o" +0x1188: "yo-i" +0x1189: "u-a" +0x118a: "u-ae" +0x118b: "u-eo-eu" +0x118c: "u-ye" +0x118d: "u-u" +0x118e: "yu-a" +0x118f: "yu-eo" +0x1190: "yu-e" +0x1191: "yu-yeo" +0x1192: "yu-ye" +0x1193: "yu-u" +0x1194: "yu-i" +0x1195: "eu-u" +0x1196: "eu-eu" +0x1197: "yi-u" +0x1198: "i-a" +0x1199: "i-ya" +0x119a: "i-o" +0x119b: "i-u" +0x119c: "i-eu" +0x119d: "i-U" +0x119e: "U" +0x119f: "U-eo" +0x11a0: "U-u" +0x11a1: "U-i" +0x11a2: "UU" +0x11a3: "[?]" +0x11a4: "[?]" +0x11a5: "[?]" +0x11a6: "[?]" +0x11a7: "[?]" +0x11a8: "g" +0x11a9: "gg" +0x11aa: "gs" +0x11ab: "n" +0x11ac: "nj" +0x11ad: "nh" +0x11ae: "d" +0x11af: "l" +0x11b0: "lg" +0x11b1: "lm" +0x11b2: "lb" +0x11b3: "ls" +0x11b4: "lt" +0x11b5: "lp" +0x11b6: "lh" +0x11b7: "m" +0x11b8: "b" +0x11b9: "bs" +0x11ba: "s" +0x11bb: "ss" +0x11bc: "ng" +0x11bd: "j" +0x11be: "c" +0x11bf: "k" +0x11c0: "t" +0x11c1: "p" +0x11c2: "h" +0x11c3: "gl" +0x11c4: "gsg" +0x11c5: "ng" +0x11c6: "nd" +0x11c7: "ns" +0x11c8: "nZ" +0x11c9: "nt" +0x11ca: "dg" +0x11cb: "tl" +0x11cc: "lgs" +0x11cd: "ln" +0x11ce: "ld" +0x11cf: "lth" +0x11d0: "ll" +0x11d1: "lmg" +0x11d2: "lms" +0x11d3: "lbs" +0x11d4: "lbh" +0x11d5: "rNp" +0x11d6: "lss" +0x11d7: "lZ" +0x11d8: "lk" +0x11d9: "lQ" +0x11da: "mg" +0x11db: "ml" +0x11dc: "mb" +0x11dd: "ms" +0x11de: "mss" +0x11df: "mZ" +0x11e0: "mc" +0x11e1: "mh" +0x11e2: "mN" +0x11e3: "bl" +0x11e4: "bp" +0x11e5: "ph" +0x11e6: "pN" +0x11e7: "sg" +0x11e8: "sd" +0x11e9: "sl" +0x11ea: "sb" +0x11eb: "Z" +0x11ec: "g" +0x11ed: "ss" +0x11ee: "" +0x11ef: "kh" +0x11f0: "N" +0x11f1: "Ns" +0x11f2: "NZ" +0x11f3: "pb" +0x11f4: "pN" +0x11f5: "hn" +0x11f6: "hl" +0x11f7: "hm" +0x11f8: "hb" +0x11f9: "Q" +0x11fa: "[?]" +0x11fb: "[?]" +0x11fc: "[?]" +0x11fd: "[?]" +0x11fe: "[?]" +/* x012 */ +0x1200: "ha" +0x1201: "hu" +0x1202: "hi" +0x1203: "haa" +0x1204: "hee" +0x1205: "he" +0x1206: "ho" +0x1207: "[?]" +0x1208: "la" +0x1209: "lu" +0x120a: "li" +0x120b: "laa" +0x120c: "lee" +0x120d: "le" +0x120e: "lo" +0x120f: "lwa" +0x1210: "hha" +0x1211: "hhu" +0x1212: "hhi" +0x1213: "hhaa" +0x1214: "hhee" +0x1215: "hhe" +0x1216: "hho" +0x1217: "hhwa" +0x1218: "ma" +0x1219: "mu" +0x121a: "mi" +0x121b: "maa" +0x121c: "mee" +0x121d: "me" +0x121e: "mo" +0x121f: "mwa" +0x1220: "sza" +0x1221: "szu" +0x1222: "szi" +0x1223: "szaa" +0x1224: "szee" +0x1225: "sze" +0x1226: "szo" +0x1227: "szwa" +0x1228: "ra" +0x1229: "ru" +0x122a: "ri" +0x122b: "raa" +0x122c: "ree" +0x122d: "re" +0x122e: "ro" +0x122f: "rwa" +0x1230: "sa" +0x1231: "su" +0x1232: "si" +0x1233: "saa" +0x1234: "see" +0x1235: "se" +0x1236: "so" +0x1237: "swa" +0x1238: "sha" +0x1239: "shu" +0x123a: "shi" +0x123b: "shaa" +0x123c: "shee" +0x123d: "she" +0x123e: "sho" +0x123f: "shwa" +0x1240: "qa" +0x1241: "qu" +0x1242: "qi" +0x1243: "qaa" +0x1244: "qee" +0x1245: "qe" +0x1246: "qo" +0x1247: "[?]" +0x1248: "qwa" +0x1249: "[?]" +0x124a: "qwi" +0x124b: "qwaa" +0x124c: "qwee" +0x124d: "qwe" +0x124e: "[?]" +0x124f: "[?]" +0x1250: "qha" +0x1251: "qhu" +0x1252: "qhi" +0x1253: "qhaa" +0x1254: "qhee" +0x1255: "qhe" +0x1256: "qho" +0x1257: "[?]" +0x1258: "qhwa" +0x1259: "[?]" +0x125a: "qhwi" +0x125b: "qhwaa" +0x125c: "qhwee" +0x125d: "qhwe" +0x125e: "[?]" +0x125f: "[?]" +0x1260: "ba" +0x1261: "bu" +0x1262: "bi" +0x1263: "baa" +0x1264: "bee" +0x1265: "be" +0x1266: "bo" +0x1267: "bwa" +0x1268: "va" +0x1269: "vu" +0x126a: "vi" +0x126b: "vaa" +0x126c: "vee" +0x126d: "ve" +0x126e: "vo" +0x126f: "vwa" +0x1270: "ta" +0x1271: "tu" +0x1272: "ti" +0x1273: "taa" +0x1274: "tee" +0x1275: "te" +0x1276: "to" +0x1277: "twa" +0x1278: "ca" +0x1279: "cu" +0x127a: "ci" +0x127b: "caa" +0x127c: "cee" +0x127d: "ce" +0x127e: "co" +0x127f: "cwa" +0x1280: "xa" +0x1281: "xu" +0x1282: "xi" +0x1283: "xaa" +0x1284: "xee" +0x1285: "xe" +0x1286: "xo" +0x1287: "[?]" +0x1288: "xwa" +0x1289: "[?]" +0x128a: "xwi" +0x128b: "xwaa" +0x128c: "xwee" +0x128d: "xwe" +0x128e: "[?]" +0x128f: "[?]" +0x1290: "na" +0x1291: "nu" +0x1292: "ni" +0x1293: "naa" +0x1294: "nee" +0x1295: "ne" +0x1296: "no" +0x1297: "nwa" +0x1298: "nya" +0x1299: "nyu" +0x129a: "nyi" +0x129b: "nyaa" +0x129c: "nyee" +0x129d: "nye" +0x129e: "nyo" +0x129f: "nywa" +0x12a0: "'a" +0x12a1: "'u" +0x12a2: "[?]" +0x12a3: "'aa" +0x12a4: "'ee" +0x12a5: "'e" +0x12a6: "'o" +0x12a7: "'wa" +0x12a8: "ka" +0x12a9: "ku" +0x12aa: "ki" +0x12ab: "kaa" +0x12ac: "kee" +0x12ad: "ke" +0x12ae: "ko" +0x12af: "[?]" +0x12b0: "kwa" +0x12b1: "[?]" +0x12b2: "kwi" +0x12b3: "kwaa" +0x12b4: "kwee" +0x12b5: "kwe" +0x12b6: "[?]" +0x12b7: "[?]" +0x12b8: "kxa" +0x12b9: "kxu" +0x12ba: "kxi" +0x12bb: "kxaa" +0x12bc: "kxee" +0x12bd: "kxe" +0x12be: "kxo" +0x12bf: "[?]" +0x12c0: "kxwa" +0x12c1: "[?]" +0x12c2: "kxwi" +0x12c3: "kxwaa" +0x12c4: "kxwee" +0x12c5: "kxwe" +0x12c6: "[?]" +0x12c7: "[?]" +0x12c8: "wa" +0x12c9: "wu" +0x12ca: "wi" +0x12cb: "waa" +0x12cc: "wee" +0x12cd: "we" +0x12ce: "wo" +0x12cf: "[?]" +0x12d0: "`a" +0x12d1: "`u" +0x12d2: "`i" +0x12d3: "`aa" +0x12d4: "`ee" +0x12d5: "`e" +0x12d6: "`o" +0x12d7: "[?]" +0x12d8: "za" +0x12d9: "zu" +0x12da: "zi" +0x12db: "zaa" +0x12dc: "zee" +0x12dd: "ze" +0x12de: "zo" +0x12df: "zwa" +0x12e0: "zha" +0x12e1: "zhu" +0x12e2: "zhi" +0x12e3: "zhaa" +0x12e4: "zhee" +0x12e5: "zhe" +0x12e6: "zho" +0x12e7: "zhwa" +0x12e8: "ya" +0x12e9: "yu" +0x12ea: "yi" +0x12eb: "yaa" +0x12ec: "yee" +0x12ed: "ye" +0x12ee: "yo" +0x12ef: "[?]" +0x12f0: "da" +0x12f1: "du" +0x12f2: "di" +0x12f3: "daa" +0x12f4: "dee" +0x12f5: "de" +0x12f6: "do" +0x12f7: "dwa" +0x12f8: "dda" +0x12f9: "ddu" +0x12fa: "ddi" +0x12fb: "ddaa" +0x12fc: "ddee" +0x12fd: "dde" +0x12fe: "ddo" +0x12ff: "ddwa" +/* x013 */ +0x1300: "ja" +0x1301: "ju" +0x1302: "ji" +0x1303: "jaa" +0x1304: "jee" +0x1305: "je" +0x1306: "jo" +0x1307: "jwa" +0x1308: "ga" +0x1309: "gu" +0x130a: "gi" +0x130b: "gaa" +0x130c: "gee" +0x130d: "ge" +0x130e: "go" +0x130f: "[?]" +0x1310: "gwa" +0x1311: "[?]" +0x1312: "gwi" +0x1313: "gwaa" +0x1314: "gwee" +0x1315: "gwe" +0x1316: "[?]" +0x1317: "[?]" +0x1318: "gga" +0x1319: "ggu" +0x131a: "ggi" +0x131b: "ggaa" +0x131c: "ggee" +0x131d: "gge" +0x131e: "ggo" +0x131f: "[?]" +0x1320: "tha" +0x1321: "thu" +0x1322: "thi" +0x1323: "thaa" +0x1324: "thee" +0x1325: "the" +0x1326: "tho" +0x1327: "thwa" +0x1328: "cha" +0x1329: "chu" +0x132a: "chi" +0x132b: "chaa" +0x132c: "chee" +0x132d: "che" +0x132e: "cho" +0x132f: "chwa" +0x1330: "pha" +0x1331: "phu" +0x1332: "phi" +0x1333: "phaa" +0x1334: "phee" +0x1335: "phe" +0x1336: "pho" +0x1337: "phwa" +0x1338: "tsa" +0x1339: "tsu" +0x133a: "tsi" +0x133b: "tsaa" +0x133c: "tsee" +0x133d: "tse" +0x133e: "tso" +0x133f: "tswa" +0x1340: "tza" +0x1341: "tzu" +0x1342: "tzi" +0x1343: "tzaa" +0x1344: "tzee" +0x1345: "tze" +0x1346: "tzo" +0x1347: "[?]" +0x1348: "fa" +0x1349: "fu" +0x134a: "fi" +0x134b: "faa" +0x134c: "fee" +0x134d: "fe" +0x134e: "fo" +0x134f: "fwa" +0x1350: "pa" +0x1351: "pu" +0x1352: "pi" +0x1353: "paa" +0x1354: "pee" +0x1355: "pe" +0x1356: "po" +0x1357: "pwa" +0x1358: "rya" +0x1359: "mya" +0x135a: "fya" +0x135b: "[?]" +0x135c: "[?]" +0x135d: "[?]" +0x135e: "[?]" +0x135f: "[?]" +0x1360: "[?]" +0x1361: " " +0x1362: "." +0x1363: "," +0x1364: ";" +0x1365: ":" +0x1366: ":: " +0x1367: "?" +0x1368: "//" +0x1369: "1" +0x136a: "2" +0x136b: "3" +0x136c: "4" +0x136d: "5" +0x136e: "6" +0x136f: "7" +0x1370: "8" +0x1371: "9" +0x1372: "10+" +0x1373: "20+" +0x1374: "30+" +0x1375: "40+" +0x1376: "50+" +0x1377: "60+" +0x1378: "70+" +0x1379: "80+" +0x137a: "90+" +0x137b: "100+" +0x137c: "10,000+" +0x137d: "[?]" +0x137e: "[?]" +0x137f: "[?]" +0x1380: "[?]" +0x1381: "[?]" +0x1382: "[?]" +0x1383: "[?]" +0x1384: "[?]" +0x1385: "[?]" +0x1386: "[?]" +0x1387: "[?]" +0x1388: "[?]" +0x1389: "[?]" +0x138a: "[?]" +0x138b: "[?]" +0x138c: "[?]" +0x138d: "[?]" +0x138e: "[?]" +0x138f: "[?]" +0x1390: "[?]" +0x1391: "[?]" +0x1392: "[?]" +0x1393: "[?]" +0x1394: "[?]" +0x1395: "[?]" +0x1396: "[?]" +0x1397: "[?]" +0x1398: "[?]" +0x1399: "[?]" +0x139a: "[?]" +0x139b: "[?]" +0x139c: "[?]" +0x139d: "[?]" +0x139e: "[?]" +0x139f: "[?]" +0x13a0: "a" +0x13a1: "e" +0x13a2: "i" +0x13a3: "o" +0x13a4: "u" +0x13a5: "v" +0x13a6: "ga" +0x13a7: "ka" +0x13a8: "ge" +0x13a9: "gi" +0x13aa: "go" +0x13ab: "gu" +0x13ac: "gv" +0x13ad: "ha" +0x13ae: "he" +0x13af: "hi" +0x13b0: "ho" +0x13b1: "hu" +0x13b2: "hv" +0x13b3: "la" +0x13b4: "le" +0x13b5: "li" +0x13b6: "lo" +0x13b7: "lu" +0x13b8: "lv" +0x13b9: "ma" +0x13ba: "me" +0x13bb: "mi" +0x13bc: "mo" +0x13bd: "mu" +0x13be: "na" +0x13bf: "hna" +0x13c0: "nah" +0x13c1: "ne" +0x13c2: "ni" +0x13c3: "no" +0x13c4: "nu" +0x13c5: "nv" +0x13c6: "qua" +0x13c7: "que" +0x13c8: "qui" +0x13c9: "quo" +0x13ca: "quu" +0x13cb: "quv" +0x13cc: "sa" +0x13cd: "s" +0x13ce: "se" +0x13cf: "si" +0x13d0: "so" +0x13d1: "su" +0x13d2: "sv" +0x13d3: "da" +0x13d4: "ta" +0x13d5: "de" +0x13d6: "te" +0x13d7: "di" +0x13d8: "ti" +0x13d9: "do" +0x13da: "du" +0x13db: "dv" +0x13dc: "dla" +0x13dd: "tla" +0x13de: "tle" +0x13df: "tli" +0x13e0: "tlo" +0x13e1: "tlu" +0x13e2: "tlv" +0x13e3: "tsa" +0x13e4: "tse" +0x13e5: "tsi" +0x13e6: "tso" +0x13e7: "tsu" +0x13e8: "tsv" +0x13e9: "wa" +0x13ea: "we" +0x13eb: "wi" +0x13ec: "wo" +0x13ed: "wu" +0x13ee: "wv" +0x13ef: "ya" +0x13f0: "ye" +0x13f1: "yi" +0x13f2: "yo" +0x13f3: "yu" +0x13f4: "yv" +0x13f5: "[?]" +0x13f6: "[?]" +0x13f7: "[?]" +0x13f8: "[?]" +0x13f9: "[?]" +0x13fa: "[?]" +0x13fb: "[?]" +0x13fc: "[?]" +0x13fd: "[?]" +0x13fe: "[?]" +/* x014 */ +0x1400: "[?]" +0x1401: "e" +0x1402: "aai" +0x1403: "i" +0x1404: "ii" +0x1405: "o" +0x1406: "oo" +0x1407: "oo" +0x1408: "ee" +0x1409: "i" +0x140a: "a" +0x140b: "aa" +0x140c: "we" +0x140d: "we" +0x140e: "wi" +0x140f: "wi" +0x1410: "wii" +0x1411: "wii" +0x1412: "wo" +0x1413: "wo" +0x1414: "woo" +0x1415: "woo" +0x1416: "woo" +0x1417: "wa" +0x1418: "wa" +0x1419: "waa" +0x141a: "waa" +0x141b: "waa" +0x141c: "ai" +0x141d: "w" +0x141e: "'" +0x141f: "t" +0x1420: "k" +0x1421: "sh" +0x1422: "s" +0x1423: "n" +0x1424: "w" +0x1425: "n" +0x1426: "[?]" +0x1427: "w" +0x1428: "c" +0x1429: "?" +0x142a: "l" +0x142b: "en" +0x142c: "in" +0x142d: "on" +0x142e: "an" +0x142f: "pe" +0x1430: "paai" +0x1431: "pi" +0x1432: "pii" +0x1433: "po" +0x1434: "poo" +0x1435: "poo" +0x1436: "hee" +0x1437: "hi" +0x1438: "pa" +0x1439: "paa" +0x143a: "pwe" +0x143b: "pwe" +0x143c: "pwi" +0x143d: "pwi" +0x143e: "pwii" +0x143f: "pwii" +0x1440: "pwo" +0x1441: "pwo" +0x1442: "pwoo" +0x1443: "pwoo" +0x1444: "pwa" +0x1445: "pwa" +0x1446: "pwaa" +0x1447: "pwaa" +0x1448: "pwaa" +0x1449: "p" +0x144a: "p" +0x144b: "h" +0x144c: "te" +0x144d: "taai" +0x144e: "ti" +0x144f: "tii" +0x1450: "to" +0x1451: "too" +0x1452: "too" +0x1453: "dee" +0x1454: "di" +0x1455: "ta" +0x1456: "taa" +0x1457: "twe" +0x1458: "twe" +0x1459: "twi" +0x145a: "twi" +0x145b: "twii" +0x145c: "twii" +0x145d: "two" +0x145e: "two" +0x145f: "twoo" +0x1460: "twoo" +0x1461: "twa" +0x1462: "twa" +0x1463: "twaa" +0x1464: "twaa" +0x1465: "twaa" +0x1466: "t" +0x1467: "tte" +0x1468: "tti" +0x1469: "tto" +0x146a: "tta" +0x146b: "ke" +0x146c: "kaai" +0x146d: "ki" +0x146e: "kii" +0x146f: "ko" +0x1470: "koo" +0x1471: "koo" +0x1472: "ka" +0x1473: "kaa" +0x1474: "kwe" +0x1475: "kwe" +0x1476: "kwi" +0x1477: "kwi" +0x1478: "kwii" +0x1479: "kwii" +0x147a: "kwo" +0x147b: "kwo" +0x147c: "kwoo" +0x147d: "kwoo" +0x147e: "kwa" +0x147f: "kwa" +0x1480: "kwaa" +0x1481: "kwaa" +0x1482: "kwaa" +0x1483: "k" +0x1484: "kw" +0x1485: "keh" +0x1486: "kih" +0x1487: "koh" +0x1488: "kah" +0x1489: "ce" +0x148a: "caai" +0x148b: "ci" +0x148c: "cii" +0x148d: "co" +0x148e: "coo" +0x148f: "coo" +0x1490: "ca" +0x1491: "caa" +0x1492: "cwe" +0x1493: "cwe" +0x1494: "cwi" +0x1495: "cwi" +0x1496: "cwii" +0x1497: "cwii" +0x1498: "cwo" +0x1499: "cwo" +0x149a: "cwoo" +0x149b: "cwoo" +0x149c: "cwa" +0x149d: "cwa" +0x149e: "cwaa" +0x149f: "cwaa" +0x14a0: "cwaa" +0x14a1: "c" +0x14a2: "th" +0x14a3: "me" +0x14a4: "maai" +0x14a5: "mi" +0x14a6: "mii" +0x14a7: "mo" +0x14a8: "moo" +0x14a9: "moo" +0x14aa: "ma" +0x14ab: "maa" +0x14ac: "mwe" +0x14ad: "mwe" +0x14ae: "mwi" +0x14af: "mwi" +0x14b0: "mwii" +0x14b1: "mwii" +0x14b2: "mwo" +0x14b3: "mwo" +0x14b4: "mwoo" +0x14b5: "mwoo" +0x14b6: "mwa" +0x14b7: "mwa" +0x14b8: "mwaa" +0x14b9: "mwaa" +0x14ba: "mwaa" +0x14bb: "m" +0x14bc: "m" +0x14bd: "mh" +0x14be: "m" +0x14bf: "m" +0x14c0: "ne" +0x14c1: "naai" +0x14c2: "ni" +0x14c3: "nii" +0x14c4: "no" +0x14c5: "noo" +0x14c6: "noo" +0x14c7: "na" +0x14c8: "naa" +0x14c9: "nwe" +0x14ca: "nwe" +0x14cb: "nwa" +0x14cc: "nwa" +0x14cd: "nwaa" +0x14ce: "nwaa" +0x14cf: "nwaa" +0x14d0: "n" +0x14d1: "ng" +0x14d2: "nh" +0x14d3: "le" +0x14d4: "laai" +0x14d5: "li" +0x14d6: "lii" +0x14d7: "lo" +0x14d8: "loo" +0x14d9: "loo" +0x14da: "la" +0x14db: "laa" +0x14dc: "lwe" +0x14dd: "lwe" +0x14de: "lwi" +0x14df: "lwi" +0x14e0: "lwii" +0x14e1: "lwii" +0x14e2: "lwo" +0x14e3: "lwo" +0x14e4: "lwoo" +0x14e5: "lwoo" +0x14e6: "lwa" +0x14e7: "lwa" +0x14e8: "lwaa" +0x14e9: "lwaa" +0x14ea: "l" +0x14eb: "l" +0x14ec: "l" +0x14ed: "se" +0x14ee: "saai" +0x14ef: "si" +0x14f0: "sii" +0x14f1: "so" +0x14f2: "soo" +0x14f3: "soo" +0x14f4: "sa" +0x14f5: "saa" +0x14f6: "swe" +0x14f7: "swe" +0x14f8: "swi" +0x14f9: "swi" +0x14fa: "swii" +0x14fb: "swii" +0x14fc: "swo" +0x14fd: "swo" +0x14fe: "swoo" +0x14ff: "swoo" +/* x015 */ +0x1500: "swa" +0x1501: "swa" +0x1502: "swaa" +0x1503: "swaa" +0x1504: "swaa" +0x1505: "s" +0x1506: "s" +0x1507: "sw" +0x1508: "s" +0x1509: "sk" +0x150a: "skw" +0x150b: "sW" +0x150c: "spwa" +0x150d: "stwa" +0x150e: "skwa" +0x150f: "scwa" +0x1510: "she" +0x1511: "shi" +0x1512: "shii" +0x1513: "sho" +0x1514: "shoo" +0x1515: "sha" +0x1516: "shaa" +0x1517: "shwe" +0x1518: "shwe" +0x1519: "shwi" +0x151a: "shwi" +0x151b: "shwii" +0x151c: "shwii" +0x151d: "shwo" +0x151e: "shwo" +0x151f: "shwoo" +0x1520: "shwoo" +0x1521: "shwa" +0x1522: "shwa" +0x1523: "shwaa" +0x1524: "shwaa" +0x1525: "sh" +0x1526: "ye" +0x1527: "yaai" +0x1528: "yi" +0x1529: "yii" +0x152a: "yo" +0x152b: "yoo" +0x152c: "yoo" +0x152d: "ya" +0x152e: "yaa" +0x152f: "ywe" +0x1530: "ywe" +0x1531: "ywi" +0x1532: "ywi" +0x1533: "ywii" +0x1534: "ywii" +0x1535: "ywo" +0x1536: "ywo" +0x1537: "ywoo" +0x1538: "ywoo" +0x1539: "ywa" +0x153a: "ywa" +0x153b: "ywaa" +0x153c: "ywaa" +0x153d: "ywaa" +0x153e: "y" +0x153f: "y" +0x1540: "y" +0x1541: "yi" +0x1542: "re" +0x1543: "re" +0x1544: "le" +0x1545: "raai" +0x1546: "ri" +0x1547: "rii" +0x1548: "ro" +0x1549: "roo" +0x154a: "lo" +0x154b: "ra" +0x154c: "raa" +0x154d: "la" +0x154e: "rwaa" +0x154f: "rwaa" +0x1550: "r" +0x1551: "r" +0x1552: "r" +0x1553: "fe" +0x1554: "faai" +0x1555: "fi" +0x1556: "fii" +0x1557: "fo" +0x1558: "foo" +0x1559: "fa" +0x155a: "faa" +0x155b: "fwaa" +0x155c: "fwaa" +0x155d: "f" +0x155e: "the" +0x155f: "the" +0x1560: "thi" +0x1561: "thi" +0x1562: "thii" +0x1563: "thii" +0x1564: "tho" +0x1565: "thoo" +0x1566: "tha" +0x1567: "thaa" +0x1568: "thwaa" +0x1569: "thwaa" +0x156a: "th" +0x156b: "tthe" +0x156c: "tthi" +0x156d: "ttho" +0x156e: "ttha" +0x156f: "tth" +0x1570: "tye" +0x1571: "tyi" +0x1572: "tyo" +0x1573: "tya" +0x1574: "he" +0x1575: "hi" +0x1576: "hii" +0x1577: "ho" +0x1578: "hoo" +0x1579: "ha" +0x157a: "haa" +0x157b: "h" +0x157c: "h" +0x157d: "hk" +0x157e: "qaai" +0x157f: "qi" +0x1580: "qii" +0x1581: "qo" +0x1582: "qoo" +0x1583: "qa" +0x1584: "qaa" +0x1585: "q" +0x1586: "tlhe" +0x1587: "tlhi" +0x1588: "tlho" +0x1589: "tlha" +0x158a: "re" +0x158b: "ri" +0x158c: "ro" +0x158d: "ra" +0x158e: "ngaai" +0x158f: "ngi" +0x1590: "ngii" +0x1591: "ngo" +0x1592: "ngoo" +0x1593: "nga" +0x1594: "ngaa" +0x1595: "ng" +0x1596: "nng" +0x1597: "she" +0x1598: "shi" +0x1599: "sho" +0x159a: "sha" +0x159b: "the" +0x159c: "thi" +0x159d: "tho" +0x159e: "tha" +0x159f: "th" +0x15a0: "lhi" +0x15a1: "lhii" +0x15a2: "lho" +0x15a3: "lhoo" +0x15a4: "lha" +0x15a5: "lhaa" +0x15a6: "lh" +0x15a7: "the" +0x15a8: "thi" +0x15a9: "thii" +0x15aa: "tho" +0x15ab: "thoo" +0x15ac: "tha" +0x15ad: "thaa" +0x15ae: "th" +0x15af: "b" +0x15b0: "e" +0x15b1: "i" +0x15b2: "o" +0x15b3: "a" +0x15b4: "we" +0x15b5: "wi" +0x15b6: "wo" +0x15b7: "wa" +0x15b8: "ne" +0x15b9: "ni" +0x15ba: "no" +0x15bb: "na" +0x15bc: "ke" +0x15bd: "ki" +0x15be: "ko" +0x15bf: "ka" +0x15c0: "he" +0x15c1: "hi" +0x15c2: "ho" +0x15c3: "ha" +0x15c4: "ghu" +0x15c5: "gho" +0x15c6: "ghe" +0x15c7: "ghee" +0x15c8: "ghi" +0x15c9: "gha" +0x15ca: "ru" +0x15cb: "ro" +0x15cc: "re" +0x15cd: "ree" +0x15ce: "ri" +0x15cf: "ra" +0x15d0: "wu" +0x15d1: "wo" +0x15d2: "we" +0x15d3: "wee" +0x15d4: "wi" +0x15d5: "wa" +0x15d6: "hwu" +0x15d7: "hwo" +0x15d8: "hwe" +0x15d9: "hwee" +0x15da: "hwi" +0x15db: "hwa" +0x15dc: "thu" +0x15dd: "tho" +0x15de: "the" +0x15df: "thee" +0x15e0: "thi" +0x15e1: "tha" +0x15e2: "ttu" +0x15e3: "tto" +0x15e4: "tte" +0x15e5: "ttee" +0x15e6: "tti" +0x15e7: "tta" +0x15e8: "pu" +0x15e9: "po" +0x15ea: "pe" +0x15eb: "pee" +0x15ec: "pi" +0x15ed: "pa" +0x15ee: "p" +0x15ef: "gu" +0x15f0: "go" +0x15f1: "ge" +0x15f2: "gee" +0x15f3: "gi" +0x15f4: "ga" +0x15f5: "khu" +0x15f6: "kho" +0x15f7: "khe" +0x15f8: "khee" +0x15f9: "khi" +0x15fa: "kha" +0x15fb: "kku" +0x15fc: "kko" +0x15fd: "kke" +0x15fe: "kkee" +0x15ff: "kki" +/* x016 */ +0x1600: "kka" +0x1601: "kk" +0x1602: "nu" +0x1603: "no" +0x1604: "ne" +0x1605: "nee" +0x1606: "ni" +0x1607: "na" +0x1608: "mu" +0x1609: "mo" +0x160a: "me" +0x160b: "mee" +0x160c: "mi" +0x160d: "ma" +0x160e: "yu" +0x160f: "yo" +0x1610: "ye" +0x1611: "yee" +0x1612: "yi" +0x1613: "ya" +0x1614: "ju" +0x1615: "ju" +0x1616: "jo" +0x1617: "je" +0x1618: "jee" +0x1619: "ji" +0x161a: "ji" +0x161b: "ja" +0x161c: "jju" +0x161d: "jjo" +0x161e: "jje" +0x161f: "jjee" +0x1620: "jji" +0x1621: "jja" +0x1622: "lu" +0x1623: "lo" +0x1624: "le" +0x1625: "lee" +0x1626: "li" +0x1627: "la" +0x1628: "dlu" +0x1629: "dlo" +0x162a: "dle" +0x162b: "dlee" +0x162c: "dli" +0x162d: "dla" +0x162e: "lhu" +0x162f: "lho" +0x1630: "lhe" +0x1631: "lhee" +0x1632: "lhi" +0x1633: "lha" +0x1634: "tlhu" +0x1635: "tlho" +0x1636: "tlhe" +0x1637: "tlhee" +0x1638: "tlhi" +0x1639: "tlha" +0x163a: "tlu" +0x163b: "tlo" +0x163c: "tle" +0x163d: "tlee" +0x163e: "tli" +0x163f: "tla" +0x1640: "zu" +0x1641: "zo" +0x1642: "ze" +0x1643: "zee" +0x1644: "zi" +0x1645: "za" +0x1646: "z" +0x1647: "z" +0x1648: "dzu" +0x1649: "dzo" +0x164a: "dze" +0x164b: "dzee" +0x164c: "dzi" +0x164d: "dza" +0x164e: "su" +0x164f: "so" +0x1650: "se" +0x1651: "see" +0x1652: "si" +0x1653: "sa" +0x1654: "shu" +0x1655: "sho" +0x1656: "she" +0x1657: "shee" +0x1658: "shi" +0x1659: "sha" +0x165a: "sh" +0x165b: "tsu" +0x165c: "tso" +0x165d: "tse" +0x165e: "tsee" +0x165f: "tsi" +0x1660: "tsa" +0x1661: "chu" +0x1662: "cho" +0x1663: "che" +0x1664: "chee" +0x1665: "chi" +0x1666: "cha" +0x1667: "ttsu" +0x1668: "ttso" +0x1669: "ttse" +0x166a: "ttsee" +0x166b: "ttsi" +0x166c: "ttsa" +0x166d: "X" +0x166e: "." +0x166f: "qai" +0x1670: "ngai" +0x1671: "nngi" +0x1672: "nngii" +0x1673: "nngo" +0x1674: "nngoo" +0x1675: "nnga" +0x1676: "nngaa" +0x1677: "[?]" +0x1678: "[?]" +0x1679: "[?]" +0x167a: "[?]" +0x167b: "[?]" +0x167c: "[?]" +0x167d: "[?]" +0x167e: "[?]" +0x167f: "[?]" +0x1680: " " +0x1681: "b" +0x1682: "l" +0x1683: "f" +0x1684: "s" +0x1685: "n" +0x1686: "h" +0x1687: "d" +0x1688: "t" +0x1689: "c" +0x168a: "q" +0x168b: "m" +0x168c: "g" +0x168d: "ng" +0x168e: "z" +0x168f: "r" +0x1690: "a" +0x1691: "o" +0x1692: "u" +0x1693: "e" +0x1694: "i" +0x1695: "ch" +0x1696: "th" +0x1697: "ph" +0x1698: "p" +0x1699: "x" +0x169a: "p" +0x169b: "<" +0x169c: ">" +0x169d: "[?]" +0x169e: "[?]" +0x169f: "[?]" +0x16a0: "f" +0x16a1: "v" +0x16a2: "u" +0x16a3: "yr" +0x16a4: "y" +0x16a5: "w" +0x16a6: "th" +0x16a7: "th" +0x16a8: "a" +0x16a9: "o" +0x16aa: "ac" +0x16ab: "ae" +0x16ac: "o" +0x16ad: "o" +0x16ae: "o" +0x16af: "oe" +0x16b0: "on" +0x16b1: "r" +0x16b2: "k" +0x16b3: "c" +0x16b4: "k" +0x16b5: "g" +0x16b6: "ng" +0x16b7: "g" +0x16b8: "g" +0x16b9: "w" +0x16ba: "h" +0x16bb: "h" +0x16bc: "h" +0x16bd: "h" +0x16be: "n" +0x16bf: "n" +0x16c0: "n" +0x16c1: "i" +0x16c2: "e" +0x16c3: "j" +0x16c4: "g" +0x16c5: "ae" +0x16c6: "a" +0x16c7: "eo" +0x16c8: "p" +0x16c9: "z" +0x16ca: "s" +0x16cb: "s" +0x16cc: "s" +0x16cd: "c" +0x16ce: "z" +0x16cf: "t" +0x16d0: "t" +0x16d1: "d" +0x16d2: "b" +0x16d3: "b" +0x16d4: "p" +0x16d5: "p" +0x16d6: "e" +0x16d7: "m" +0x16d8: "m" +0x16d9: "m" +0x16da: "l" +0x16db: "l" +0x16dc: "ng" +0x16dd: "ng" +0x16de: "d" +0x16df: "o" +0x16e0: "ear" +0x16e1: "ior" +0x16e2: "qu" +0x16e3: "qu" +0x16e4: "qu" +0x16e5: "s" +0x16e6: "yr" +0x16e7: "yr" +0x16e8: "yr" +0x16e9: "q" +0x16ea: "x" +0x16eb: "." +0x16ec: ":" +0x16ed: "+" +0x16ee: "17" +0x16ef: "18" +0x16f0: "19" +0x16f1: "[?]" +0x16f2: "[?]" +0x16f3: "[?]" +0x16f4: "[?]" +0x16f5: "[?]" +0x16f6: "[?]" +0x16f7: "[?]" +0x16f8: "[?]" +0x16f9: "[?]" +0x16fa: "[?]" +0x16fb: "[?]" +0x16fc: "[?]" +0x16fd: "[?]" +0x16fe: "[?]" +/* x017 */ +0x1700: "[?]" +0x1701: "[?]" +0x1702: "[?]" +0x1703: "[?]" +0x1704: "[?]" +0x1705: "[?]" +0x1706: "[?]" +0x1707: "[?]" +0x1708: "[?]" +0x1709: "[?]" +0x170a: "[?]" +0x170b: "[?]" +0x170c: "[?]" +0x170d: "[?]" +0x170e: "[?]" +0x170f: "[?]" +0x1710: "[?]" +0x1711: "[?]" +0x1712: "[?]" +0x1713: "[?]" +0x1714: "[?]" +0x1715: "[?]" +0x1716: "[?]" +0x1717: "[?]" +0x1718: "[?]" +0x1719: "[?]" +0x171a: "[?]" +0x171b: "[?]" +0x171c: "[?]" +0x171d: "[?]" +0x171e: "[?]" +0x171f: "[?]" +0x1720: "[?]" +0x1721: "[?]" +0x1722: "[?]" +0x1723: "[?]" +0x1724: "[?]" +0x1725: "[?]" +0x1726: "[?]" +0x1727: "[?]" +0x1728: "[?]" +0x1729: "[?]" +0x172a: "[?]" +0x172b: "[?]" +0x172c: "[?]" +0x172d: "[?]" +0x172e: "[?]" +0x172f: "[?]" +0x1730: "[?]" +0x1731: "[?]" +0x1732: "[?]" +0x1733: "[?]" +0x1734: "[?]" +0x1735: "[?]" +0x1736: "[?]" +0x1737: "[?]" +0x1738: "[?]" +0x1739: "[?]" +0x173a: "[?]" +0x173b: "[?]" +0x173c: "[?]" +0x173d: "[?]" +0x173e: "[?]" +0x173f: "[?]" +0x1740: "[?]" +0x1741: "[?]" +0x1742: "[?]" +0x1743: "[?]" +0x1744: "[?]" +0x1745: "[?]" +0x1746: "[?]" +0x1747: "[?]" +0x1748: "[?]" +0x1749: "[?]" +0x174a: "[?]" +0x174b: "[?]" +0x174c: "[?]" +0x174d: "[?]" +0x174e: "[?]" +0x174f: "[?]" +0x1750: "[?]" +0x1751: "[?]" +0x1752: "[?]" +0x1753: "[?]" +0x1754: "[?]" +0x1755: "[?]" +0x1756: "[?]" +0x1757: "[?]" +0x1758: "[?]" +0x1759: "[?]" +0x175a: "[?]" +0x175b: "[?]" +0x175c: "[?]" +0x175d: "[?]" +0x175e: "[?]" +0x175f: "[?]" +0x1760: "[?]" +0x1761: "[?]" +0x1762: "[?]" +0x1763: "[?]" +0x1764: "[?]" +0x1765: "[?]" +0x1766: "[?]" +0x1767: "[?]" +0x1768: "[?]" +0x1769: "[?]" +0x176a: "[?]" +0x176b: "[?]" +0x176c: "[?]" +0x176d: "[?]" +0x176e: "[?]" +0x176f: "[?]" +0x1770: "[?]" +0x1771: "[?]" +0x1772: "[?]" +0x1773: "[?]" +0x1774: "[?]" +0x1775: "[?]" +0x1776: "[?]" +0x1777: "[?]" +0x1778: "[?]" +0x1779: "[?]" +0x177a: "[?]" +0x177b: "[?]" +0x177c: "[?]" +0x177d: "[?]" +0x177e: "[?]" +0x177f: "[?]" +0x1780: "k" +0x1781: "kh" +0x1782: "g" +0x1783: "gh" +0x1784: "ng" +0x1785: "c" +0x1786: "ch" +0x1787: "j" +0x1788: "jh" +0x1789: "ny" +0x178a: "t" +0x178b: "tth" +0x178c: "d" +0x178d: "ddh" +0x178e: "nn" +0x178f: "t" +0x1790: "th" +0x1791: "d" +0x1792: "dh" +0x1793: "n" +0x1794: "p" +0x1795: "ph" +0x1796: "b" +0x1797: "bh" +0x1798: "m" +0x1799: "y" +0x179a: "r" +0x179b: "l" +0x179c: "v" +0x179d: "sh" +0x179e: "ss" +0x179f: "s" +0x17a0: "h" +0x17a1: "l" +0x17a2: "q" +0x17a3: "a" +0x17a4: "aa" +0x17a5: "i" +0x17a6: "ii" +0x17a7: "u" +0x17a8: "uk" +0x17a9: "uu" +0x17aa: "uuv" +0x17ab: "ry" +0x17ac: "ryy" +0x17ad: "ly" +0x17ae: "lyy" +0x17af: "e" +0x17b0: "ai" +0x17b1: "oo" +0x17b2: "oo" +0x17b3: "au" +0x17b4: "a" +0x17b5: "aa" +0x17b6: "aa" +0x17b7: "i" +0x17b8: "ii" +0x17b9: "y" +0x17ba: "yy" +0x17bb: "u" +0x17bc: "uu" +0x17bd: "ua" +0x17be: "oe" +0x17bf: "ya" +0x17c0: "ie" +0x17c1: "e" +0x17c2: "ae" +0x17c3: "ai" +0x17c4: "oo" +0x17c5: "au" +0x17c6: "M" +0x17c7: "H" +0x17c8: "a`" +0x17c9: "" +0x17ca: "" +0x17cb: "" +0x17cc: "r" +0x17cd: "" +0x17ce: "!" +0x17cf: "" +0x17d0: "" +0x17d1: "" +0x17d2: "" +0x17d3: "" +0x17d4: "." +0x17d5: " // " +0x17d6: ":" +0x17d7: "+" +0x17d8: "++" +0x17d9: " * " +0x17da: " /// " +0x17db: "KR" +0x17dc: "'" +0x17dd: "[?]" +0x17de: "[?]" +0x17df: "[?]" +0x17e0: "0" +0x17e1: "1" +0x17e2: "2" +0x17e3: "3" +0x17e4: "4" +0x17e5: "5" +0x17e6: "6" +0x17e7: "7" +0x17e8: "8" +0x17e9: "9" +0x17ea: "[?]" +0x17eb: "[?]" +0x17ec: "[?]" +0x17ed: "[?]" +0x17ee: "[?]" +0x17ef: "[?]" +0x17f0: "[?]" +0x17f1: "[?]" +0x17f2: "[?]" +0x17f3: "[?]" +0x17f4: "[?]" +0x17f5: "[?]" +0x17f6: "[?]" +0x17f7: "[?]" +0x17f8: "[?]" +0x17f9: "[?]" +0x17fa: "[?]" +0x17fb: "[?]" +0x17fc: "[?]" +0x17fd: "[?]" +0x17fe: "[?]" +/* x018 */ +0x1800: " @ " +0x1801: " ... " +0x1802: ", " +0x1803: ". " +0x1804: ": " +0x1805: " // " +0x1806: "" +0x1807: "-" +0x1808: ", " +0x1809: ". " +0x180a: "" +0x180b: "" +0x180c: "" +0x180d: "" +0x180e: "" +0x180f: "[?]" +0x1810: "0" +0x1811: "1" +0x1812: "2" +0x1813: "3" +0x1814: "4" +0x1815: "5" +0x1816: "6" +0x1817: "7" +0x1818: "8" +0x1819: "9" +0x181a: "[?]" +0x181b: "[?]" +0x181c: "[?]" +0x181d: "[?]" +0x181e: "[?]" +0x181f: "[?]" +0x1820: "a" +0x1821: "e" +0x1822: "i" +0x1823: "o" +0x1824: "u" +0x1825: "O" +0x1826: "U" +0x1827: "ee" +0x1828: "n" +0x1829: "ng" +0x182a: "b" +0x182b: "p" +0x182c: "q" +0x182d: "g" +0x182e: "m" +0x182f: "l" +0x1830: "s" +0x1831: "sh" +0x1832: "t" +0x1833: "d" +0x1834: "ch" +0x1835: "j" +0x1836: "y" +0x1837: "r" +0x1838: "w" +0x1839: "f" +0x183a: "k" +0x183b: "kha" +0x183c: "ts" +0x183d: "z" +0x183e: "h" +0x183f: "zr" +0x1840: "lh" +0x1841: "zh" +0x1842: "ch" +0x1843: "-" +0x1844: "e" +0x1845: "i" +0x1846: "o" +0x1847: "u" +0x1848: "O" +0x1849: "U" +0x184a: "ng" +0x184b: "b" +0x184c: "p" +0x184d: "q" +0x184e: "g" +0x184f: "m" +0x1850: "t" +0x1851: "d" +0x1852: "ch" +0x1853: "j" +0x1854: "ts" +0x1855: "y" +0x1856: "w" +0x1857: "k" +0x1858: "g" +0x1859: "h" +0x185a: "jy" +0x185b: "ny" +0x185c: "dz" +0x185d: "e" +0x185e: "i" +0x185f: "iy" +0x1860: "U" +0x1861: "u" +0x1862: "ng" +0x1863: "k" +0x1864: "g" +0x1865: "h" +0x1866: "p" +0x1867: "sh" +0x1868: "t" +0x1869: "d" +0x186a: "j" +0x186b: "f" +0x186c: "g" +0x186d: "h" +0x186e: "ts" +0x186f: "z" +0x1870: "r" +0x1871: "ch" +0x1872: "zh" +0x1873: "i" +0x1874: "k" +0x1875: "r" +0x1876: "f" +0x1877: "zh" +0x1878: "[?]" +0x1879: "[?]" +0x187a: "[?]" +0x187b: "[?]" +0x187c: "[?]" +0x187d: "[?]" +0x187e: "[?]" +0x187f: "[?]" +0x1880: "[?]" +0x1881: "H" +0x1882: "X" +0x1883: "W" +0x1884: "M" +0x1885: " 3 " +0x1886: " 333 " +0x1887: "a" +0x1888: "i" +0x1889: "k" +0x188a: "ng" +0x188b: "c" +0x188c: "tt" +0x188d: "tth" +0x188e: "dd" +0x188f: "nn" +0x1890: "t" +0x1891: "d" +0x1892: "p" +0x1893: "ph" +0x1894: "ss" +0x1895: "zh" +0x1896: "z" +0x1897: "a" +0x1898: "t" +0x1899: "zh" +0x189a: "gh" +0x189b: "ng" +0x189c: "c" +0x189d: "jh" +0x189e: "tta" +0x189f: "ddh" +0x18a0: "t" +0x18a1: "dh" +0x18a2: "ss" +0x18a3: "cy" +0x18a4: "zh" +0x18a5: "z" +0x18a6: "u" +0x18a7: "y" +0x18a8: "bh" +0x18a9: "'" +0x18aa: "[?]" +0x18ab: "[?]" +0x18ac: "[?]" +0x18ad: "[?]" +0x18ae: "[?]" +0x18af: "[?]" +0x18b0: "[?]" +0x18b1: "[?]" +0x18b2: "[?]" +0x18b3: "[?]" +0x18b4: "[?]" +0x18b5: "[?]" +0x18b6: "[?]" +0x18b7: "[?]" +0x18b8: "[?]" +0x18b9: "[?]" +0x18ba: "[?]" +0x18bb: "[?]" +0x18bc: "[?]" +0x18bd: "[?]" +0x18be: "[?]" +0x18bf: "[?]" +0x18c0: "[?]" +0x18c1: "[?]" +0x18c2: "[?]" +0x18c3: "[?]" +0x18c4: "[?]" +0x18c5: "[?]" +0x18c6: "[?]" +0x18c7: "[?]" +0x18c8: "[?]" +0x18c9: "[?]" +0x18ca: "[?]" +0x18cb: "[?]" +0x18cc: "[?]" +0x18cd: "[?]" +0x18ce: "[?]" +0x18cf: "[?]" +0x18d0: "[?]" +0x18d1: "[?]" +0x18d2: "[?]" +0x18d3: "[?]" +0x18d4: "[?]" +0x18d5: "[?]" +0x18d6: "[?]" +0x18d7: "[?]" +0x18d8: "[?]" +0x18d9: "[?]" +0x18da: "[?]" +0x18db: "[?]" +0x18dc: "[?]" +0x18dd: "[?]" +0x18de: "[?]" +0x18df: "[?]" +0x18e0: "[?]" +0x18e1: "[?]" +0x18e2: "[?]" +0x18e3: "[?]" +0x18e4: "[?]" +0x18e5: "[?]" +0x18e6: "[?]" +0x18e7: "[?]" +0x18e8: "[?]" +0x18e9: "[?]" +0x18ea: "[?]" +0x18eb: "[?]" +0x18ec: "[?]" +0x18ed: "[?]" +0x18ee: "[?]" +0x18ef: "[?]" +0x18f0: "[?]" +0x18f1: "[?]" +0x18f2: "[?]" +0x18f3: "[?]" +0x18f4: "[?]" +0x18f5: "[?]" +0x18f6: "[?]" +0x18f7: "[?]" +0x18f8: "[?]" +0x18f9: "[?]" +0x18fa: "[?]" +0x18fb: "[?]" +0x18fc: "[?]" +0x18fd: "[?]" +0x18fe: "[?]" +/* x01d */ +0x1d00: "" +0x1d01: "" +0x1d02: "" +0x1d03: "" +0x1d04: "" +0x1d05: "" +0x1d06: "" +0x1d07: "" +0x1d08: "" +0x1d09: "" +0x1d0a: "" +0x1d0b: "" +0x1d0c: "" +0x1d0d: "" +0x1d0e: "" +0x1d0f: "" +0x1d10: "" +0x1d11: "" +0x1d12: "" +0x1d13: "" +0x1d14: "" +0x1d15: "" +0x1d16: "" +0x1d17: "" +0x1d18: "" +0x1d19: "" +0x1d1a: "" +0x1d1b: "" +0x1d1c: "" +0x1d1d: "" +0x1d1e: "" +0x1d1f: "" +0x1d20: "" +0x1d21: "" +0x1d22: "" +0x1d23: "" +0x1d24: "" +0x1d25: "" +0x1d26: "" +0x1d27: "" +0x1d28: "" +0x1d29: "" +0x1d2a: "" +0x1d2b: "" +0x1d2c: "" +0x1d2d: "" +0x1d2e: "" +0x1d2f: "" +0x1d30: "" +0x1d31: "" +0x1d32: "" +0x1d33: "" +0x1d34: "" +0x1d35: "" +0x1d36: "" +0x1d37: "" +0x1d38: "" +0x1d39: "" +0x1d3a: "" +0x1d3b: "" +0x1d3c: "" +0x1d3d: "" +0x1d3e: "" +0x1d3f: "" +0x1d40: "" +0x1d41: "" +0x1d42: "" +0x1d43: "" +0x1d44: "" +0x1d45: "" +0x1d46: "" +0x1d47: "" +0x1d48: "" +0x1d49: "" +0x1d4a: "" +0x1d4b: "" +0x1d4c: "" +0x1d4d: "" +0x1d4e: "" +0x1d4f: "" +0x1d50: "" +0x1d51: "" +0x1d52: "" +0x1d53: "" +0x1d54: "" +0x1d55: "" +0x1d56: "" +0x1d57: "" +0x1d58: "" +0x1d59: "" +0x1d5a: "" +0x1d5b: "" +0x1d5c: "" +0x1d5d: "" +0x1d5e: "" +0x1d5f: "" +0x1d60: "" +0x1d61: "" +0x1d62: "" +0x1d63: "" +0x1d64: "" +0x1d65: "" +0x1d66: "" +0x1d67: "" +0x1d68: "" +0x1d69: "" +0x1d6a: "" +0x1d6b: "" +0x1d6c: "b" +0x1d6d: "d" +0x1d6e: "f" +0x1d6f: "m" +0x1d70: "n" +0x1d71: "p" +0x1d72: "r" +0x1d73: "r" +0x1d74: "s" +0x1d75: "t" +0x1d76: "z" +0x1d77: "g" +0x1d78: "" +0x1d79: "" +0x1d7a: "" +0x1d7b: "" +0x1d7c: "" +0x1d7d: "p" +0x1d7e: "" +0x1d7f: "" +0x1d80: "b" +0x1d81: "d" +0x1d82: "f" +0x1d83: "g" +0x1d84: "k" +0x1d85: "l" +0x1d86: "m" +0x1d87: "n" +0x1d88: "p" +0x1d89: "r" +0x1d8a: "s" +0x1d8b: "" +0x1d8c: "v" +0x1d8d: "x" +0x1d8e: "z" +0x1d8f: "" +0x1d90: "" +0x1d91: "" +0x1d92: "" +0x1d93: "" +0x1d94: "" +0x1d95: "" +0x1d96: "" +0x1d97: "" +0x1d98: "" +0x1d99: "" +0x1d9a: "" +0x1d9b: "" +0x1d9c: "" +0x1d9d: "" +0x1d9e: "" +0x1d9f: "" +0x1da0: "" +0x1da1: "" +0x1da2: "" +0x1da3: "" +0x1da4: "" +0x1da5: "" +0x1da6: "" +0x1da7: "" +0x1da8: "" +0x1da9: "" +0x1daa: "" +0x1dab: "" +0x1dac: "" +0x1dad: "" +0x1dae: "" +0x1daf: "" +0x1db0: "" +0x1db1: "" +0x1db2: "" +0x1db3: "" +0x1db4: "" +0x1db5: "" +0x1db6: "" +0x1db7: "" +0x1db8: "" +0x1db9: "" +0x1dba: "" +0x1dbb: "" +0x1dbc: "" +0x1dbd: "" +0x1dbe: "" +0x1dbf: "" +0x1dc0: "" +0x1dc1: "" +0x1dc2: "" +0x1dc3: "" +0x1dc4: "" +0x1dc5: "" +0x1dc6: "" +0x1dc7: "" +0x1dc8: "" +0x1dc9: "" +0x1dca: "" +0x1dcb: "" +0x1dcc: "" +0x1dcd: "" +0x1dce: "" +0x1dcf: "" +0x1dd0: "" +0x1dd1: "" +0x1dd2: "" +0x1dd3: "" +0x1dd4: "" +0x1dd5: "" +0x1dd6: "" +0x1dd7: "" +0x1dd8: "" +0x1dd9: "" +0x1dda: "" +0x1ddb: "" +0x1ddc: "" +0x1ddd: "" +0x1dde: "" +0x1ddf: "" +0x1de0: "" +0x1de1: "" +0x1de2: "" +0x1de3: "" +0x1de4: "" +0x1de5: "" +0x1de6: "" +0x1de7: "" +0x1de8: "" +0x1de9: "" +0x1dea: "" +0x1deb: "" +0x1dec: "" +0x1ded: "" +0x1dee: "" +0x1def: "" +0x1df0: "" +0x1df1: "" +0x1df2: "" +0x1df3: "" +0x1df4: "" +0x1df5: "" +0x1df6: "" +0x1df7: "" +0x1df8: "" +0x1df9: "" +0x1dfa: "" +0x1dfb: "" +0x1dfc: "" +0x1dfd: "" +0x1dfe: "" +/* x01e */ +0x1e00: "A" +0x1e01: "a" +0x1e02: "B" +0x1e03: "b" +0x1e04: "B" +0x1e05: "b" +0x1e06: "B" +0x1e07: "b" +0x1e08: "C" +0x1e09: "c" +0x1e0a: "D" +0x1e0b: "d" +0x1e0c: "D" +0x1e0d: "d" +0x1e0e: "D" +0x1e0f: "d" +0x1e10: "D" +0x1e11: "d" +0x1e12: "D" +0x1e13: "d" +0x1e14: "E" +0x1e15: "e" +0x1e16: "E" +0x1e17: "e" +0x1e18: "E" +0x1e19: "e" +0x1e1a: "E" +0x1e1b: "e" +0x1e1c: "E" +0x1e1d: "e" +0x1e1e: "F" +0x1e1f: "f" +0x1e20: "G" +0x1e21: "g" +0x1e22: "H" +0x1e23: "h" +0x1e24: "H" +0x1e25: "h" +0x1e26: "H" +0x1e27: "h" +0x1e28: "H" +0x1e29: "h" +0x1e2a: "H" +0x1e2b: "h" +0x1e2c: "I" +0x1e2d: "i" +0x1e2e: "I" +0x1e2f: "i" +0x1e30: "K" +0x1e31: "k" +0x1e32: "K" +0x1e33: "k" +0x1e34: "K" +0x1e35: "k" +0x1e36: "L" +0x1e37: "l" +0x1e38: "L" +0x1e39: "l" +0x1e3a: "L" +0x1e3b: "l" +0x1e3c: "L" +0x1e3d: "l" +0x1e3e: "M" +0x1e3f: "m" +0x1e40: "M" +0x1e41: "m" +0x1e42: "M" +0x1e43: "m" +0x1e44: "N" +0x1e45: "n" +0x1e46: "N" +0x1e47: "n" +0x1e48: "N" +0x1e49: "n" +0x1e4a: "N" +0x1e4b: "n" +0x1e4c: "O" +0x1e4d: "o" +0x1e4e: "O" +0x1e4f: "o" +0x1e50: "O" +0x1e51: "o" +0x1e52: "O" +0x1e53: "o" +0x1e54: "P" +0x1e55: "p" +0x1e56: "P" +0x1e57: "p" +0x1e58: "R" +0x1e59: "r" +0x1e5a: "R" +0x1e5b: "r" +0x1e5c: "R" +0x1e5d: "r" +0x1e5e: "R" +0x1e5f: "r" +0x1e60: "S" +0x1e61: "s" +0x1e62: "S" +0x1e63: "s" +0x1e64: "S" +0x1e65: "s" +0x1e66: "S" +0x1e67: "s" +0x1e68: "S" +0x1e69: "s" +0x1e6a: "T" +0x1e6b: "t" +0x1e6c: "T" +0x1e6d: "t" +0x1e6e: "T" +0x1e6f: "t" +0x1e70: "T" +0x1e71: "t" +0x1e72: "U" +0x1e73: "u" +0x1e74: "U" +0x1e75: "u" +0x1e76: "U" +0x1e77: "u" +0x1e78: "U" +0x1e79: "u" +0x1e7a: "U" +0x1e7b: "u" +0x1e7c: "V" +0x1e7d: "v" +0x1e7e: "V" +0x1e7f: "v" +0x1e80: "W" +0x1e81: "w" +0x1e82: "W" +0x1e83: "w" +0x1e84: "W" +0x1e85: "w" +0x1e86: "W" +0x1e87: "w" +0x1e88: "W" +0x1e89: "w" +0x1e8a: "X" +0x1e8b: "x" +0x1e8c: "X" +0x1e8d: "x" +0x1e8e: "Y" +0x1e8f: "y" +0x1e90: "Z" +0x1e91: "z" +0x1e92: "Z" +0x1e93: "z" +0x1e94: "Z" +0x1e95: "z" +0x1e96: "h" +0x1e97: "t" +0x1e98: "w" +0x1e99: "y" +0x1e9a: "a" +0x1e9b: "S" +0x1e9c: "[?]" +0x1e9d: "[?]" +0x1e9e: "Ss" +0x1e9f: "[?]" +0x1ea0: "A" +0x1ea1: "a" +0x1ea2: "A" +0x1ea3: "a" +0x1ea4: "A" +0x1ea5: "a" +0x1ea6: "A" +0x1ea7: "a" +0x1ea8: "A" +0x1ea9: "a" +0x1eaa: "A" +0x1eab: "a" +0x1eac: "A" +0x1ead: "a" +0x1eae: "A" +0x1eaf: "a" +0x1eb0: "A" +0x1eb1: "a" +0x1eb2: "A" +0x1eb3: "a" +0x1eb4: "A" +0x1eb5: "a" +0x1eb6: "A" +0x1eb7: "a" +0x1eb8: "E" +0x1eb9: "e" +0x1eba: "E" +0x1ebb: "e" +0x1ebc: "E" +0x1ebd: "e" +0x1ebe: "E" +0x1ebf: "e" +0x1ec0: "E" +0x1ec1: "e" +0x1ec2: "E" +0x1ec3: "e" +0x1ec4: "E" +0x1ec5: "e" +0x1ec6: "E" +0x1ec7: "e" +0x1ec8: "I" +0x1ec9: "i" +0x1eca: "I" +0x1ecb: "i" +0x1ecc: "O" +0x1ecd: "o" +0x1ece: "O" +0x1ecf: "o" +0x1ed0: "O" +0x1ed1: "o" +0x1ed2: "O" +0x1ed3: "o" +0x1ed4: "O" +0x1ed5: "o" +0x1ed6: "O" +0x1ed7: "o" +0x1ed8: "O" +0x1ed9: "o" +0x1eda: "O" +0x1edb: "o" +0x1edc: "O" +0x1edd: "o" +0x1ede: "O" +0x1edf: "o" +0x1ee0: "O" +0x1ee1: "o" +0x1ee2: "O" +0x1ee3: "o" +0x1ee4: "U" +0x1ee5: "u" +0x1ee6: "U" +0x1ee7: "u" +0x1ee8: "U" +0x1ee9: "u" +0x1eea: "U" +0x1eeb: "u" +0x1eec: "U" +0x1eed: "u" +0x1eee: "U" +0x1eef: "u" +0x1ef0: "U" +0x1ef1: "u" +0x1ef2: "Y" +0x1ef3: "y" +0x1ef4: "Y" +0x1ef5: "y" +0x1ef6: "Y" +0x1ef7: "y" +0x1ef8: "Y" +0x1ef9: "y" +0x1efa: "[?]" +0x1efb: "[?]" +0x1efc: "[?]" +0x1efd: "[?]" +0x1efe: "[?]" +/* x01f */ +0x1f00: "a" +0x1f01: "a" +0x1f02: "a" +0x1f03: "a" +0x1f04: "a" +0x1f05: "a" +0x1f06: "a" +0x1f07: "a" +0x1f08: "A" +0x1f09: "A" +0x1f0a: "A" +0x1f0b: "A" +0x1f0c: "A" +0x1f0d: "A" +0x1f0e: "A" +0x1f0f: "A" +0x1f10: "e" +0x1f11: "e" +0x1f12: "e" +0x1f13: "e" +0x1f14: "e" +0x1f15: "e" +0x1f16: "[?]" +0x1f17: "[?]" +0x1f18: "E" +0x1f19: "E" +0x1f1a: "E" +0x1f1b: "E" +0x1f1c: "E" +0x1f1d: "E" +0x1f1e: "[?]" +0x1f1f: "[?]" +0x1f20: "e" +0x1f21: "e" +0x1f22: "e" +0x1f23: "e" +0x1f24: "e" +0x1f25: "e" +0x1f26: "e" +0x1f27: "e" +0x1f28: "E" +0x1f29: "E" +0x1f2a: "E" +0x1f2b: "E" +0x1f2c: "E" +0x1f2d: "E" +0x1f2e: "E" +0x1f2f: "E" +0x1f30: "i" +0x1f31: "i" +0x1f32: "i" +0x1f33: "i" +0x1f34: "i" +0x1f35: "i" +0x1f36: "i" +0x1f37: "i" +0x1f38: "I" +0x1f39: "I" +0x1f3a: "I" +0x1f3b: "I" +0x1f3c: "I" +0x1f3d: "I" +0x1f3e: "I" +0x1f3f: "I" +0x1f40: "o" +0x1f41: "o" +0x1f42: "o" +0x1f43: "o" +0x1f44: "o" +0x1f45: "o" +0x1f46: "[?]" +0x1f47: "[?]" +0x1f48: "O" +0x1f49: "O" +0x1f4a: "O" +0x1f4b: "O" +0x1f4c: "O" +0x1f4d: "O" +0x1f4e: "[?]" +0x1f4f: "[?]" +0x1f50: "u" +0x1f51: "u" +0x1f52: "u" +0x1f53: "u" +0x1f54: "u" +0x1f55: "u" +0x1f56: "u" +0x1f57: "u" +0x1f58: "[?]" +0x1f59: "U" +0x1f5a: "[?]" +0x1f5b: "U" +0x1f5c: "[?]" +0x1f5d: "U" +0x1f5e: "[?]" +0x1f5f: "U" +0x1f60: "o" +0x1f61: "o" +0x1f62: "o" +0x1f63: "o" +0x1f64: "o" +0x1f65: "o" +0x1f66: "o" +0x1f67: "o" +0x1f68: "O" +0x1f69: "O" +0x1f6a: "O" +0x1f6b: "O" +0x1f6c: "O" +0x1f6d: "O" +0x1f6e: "O" +0x1f6f: "O" +0x1f70: "a" +0x1f71: "a" +0x1f72: "e" +0x1f73: "e" +0x1f74: "e" +0x1f75: "e" +0x1f76: "i" +0x1f77: "i" +0x1f78: "o" +0x1f79: "o" +0x1f7a: "u" +0x1f7b: "u" +0x1f7c: "o" +0x1f7d: "o" +0x1f7e: "[?]" +0x1f7f: "[?]" +0x1f80: "a" +0x1f81: "a" +0x1f82: "a" +0x1f83: "a" +0x1f84: "a" +0x1f85: "a" +0x1f86: "a" +0x1f87: "a" +0x1f88: "A" +0x1f89: "A" +0x1f8a: "A" +0x1f8b: "A" +0x1f8c: "A" +0x1f8d: "A" +0x1f8e: "A" +0x1f8f: "A" +0x1f90: "e" +0x1f91: "e" +0x1f92: "e" +0x1f93: "e" +0x1f94: "e" +0x1f95: "e" +0x1f96: "e" +0x1f97: "e" +0x1f98: "E" +0x1f99: "E" +0x1f9a: "E" +0x1f9b: "E" +0x1f9c: "E" +0x1f9d: "E" +0x1f9e: "E" +0x1f9f: "E" +0x1fa0: "o" +0x1fa1: "o" +0x1fa2: "o" +0x1fa3: "o" +0x1fa4: "o" +0x1fa5: "o" +0x1fa6: "o" +0x1fa7: "o" +0x1fa8: "O" +0x1fa9: "O" +0x1faa: "O" +0x1fab: "O" +0x1fac: "O" +0x1fad: "O" +0x1fae: "O" +0x1faf: "O" +0x1fb0: "a" +0x1fb1: "a" +0x1fb2: "a" +0x1fb3: "a" +0x1fb4: "a" +0x1fb5: "[?]" +0x1fb6: "a" +0x1fb7: "a" +0x1fb8: "A" +0x1fb9: "A" +0x1fba: "A" +0x1fbb: "A" +0x1fbc: "A" +0x1fbd: "'" +0x1fbe: "i" +0x1fbf: "'" +0x1fc0: "~" +0x1fc1: "\"~" +0x1fc2: "e" +0x1fc3: "e" +0x1fc4: "e" +0x1fc5: "[?]" +0x1fc6: "e" +0x1fc7: "e" +0x1fc8: "E" +0x1fc9: "E" +0x1fca: "E" +0x1fcb: "E" +0x1fcc: "E" +0x1fcd: "'`" +0x1fce: "''" +0x1fcf: "'~" +0x1fd0: "i" +0x1fd1: "i" +0x1fd2: "i" +0x1fd3: "i" +0x1fd4: "[?]" +0x1fd5: "[?]" +0x1fd6: "i" +0x1fd7: "i" +0x1fd8: "I" +0x1fd9: "I" +0x1fda: "I" +0x1fdb: "I" +0x1fdc: "[?]" +0x1fdd: "`'" +0x1fde: "`'" +0x1fdf: "`~" +0x1fe0: "u" +0x1fe1: "u" +0x1fe2: "u" +0x1fe3: "u" +0x1fe4: "R" +0x1fe5: "R" +0x1fe6: "u" +0x1fe7: "u" +0x1fe8: "U" +0x1fe9: "U" +0x1fea: "U" +0x1feb: "U" +0x1fec: "R" +0x1fed: "\"`" +0x1fee: "\"'" +0x1fef: "`" +0x1ff0: "[?]" +0x1ff1: "[?]" +0x1ff2: "o" +0x1ff3: "o" +0x1ff4: "o" +0x1ff5: "[?]" +0x1ff6: "o" +0x1ff7: "o" +0x1ff8: "O" +0x1ff9: "O" +0x1ffa: "O" +0x1ffb: "O" +0x1ffc: "O" +0x1ffd: "'" +0x1ffe: "`" +/* x020 */ +0x2000: " " +0x2001: " " +0x2002: " " +0x2003: " " +0x2004: " " +0x2005: " " +0x2006: " " +0x2007: " " +0x2008: " " +0x2009: " " +0x200a: " " +0x200b: " " +0x200c: "" +0x200d: "" +0x200e: "" +0x200f: "" +0x2010: "-" +0x2011: "-" +0x2012: "-" +0x2013: "-" +0x2014: "--" +0x2015: "--" +0x2016: "||" +0x2017: "_" +0x2018: "'" +0x2019: "'" +0x201a: "," +0x201b: "'" +0x201c: "\"" +0x201d: "\"" +0x201e: ",," +0x201f: "\"" +0x2020: "+" +0x2021: "++" +0x2022: "*" +0x2023: "*>" +0x2024: "." +0x2025: ".." +0x2026: "..." +0x2027: "." +0x2028: "\n" +0x2029: "\n\n" +0x202a: "" +0x202b: "" +0x202c: "" +0x202d: "" +0x202e: "" +0x202f: " " +0x2030: "%0" +0x2031: "%00" +0x2032: "'" +0x2033: "''" +0x2034: "'''" +0x2035: "`" +0x2036: "``" +0x2037: "```" +0x2038: "^" +0x2039: "<" +0x203a: ">" +0x203b: "*" +0x203c: "!!" +0x203d: "!?" +0x203e: "-" +0x203f: "_" +0x2040: "-" +0x2041: "^" +0x2042: "***" +0x2043: "--" +0x2044: "/" +0x2045: "-[" +0x2046: "]-" +0x2047: "[?]" +0x2048: "?!" +0x2049: "!?" +0x204a: "7" +0x204b: "PP" +0x204c: "(]" +0x204d: "[)" +0x204e: "[?]" +0x204f: "[?]" +0x2050: "[?]" +0x2051: "[?]" +0x2052: "[?]" +0x2053: "[?]" +0x2054: "[?]" +0x2055: "[?]" +0x2056: "[?]" +0x2057: "[?]" +0x2058: "[?]" +0x2059: "[?]" +0x205a: "[?]" +0x205b: "[?]" +0x205c: "[?]" +0x205d: "[?]" +0x205e: "[?]" +0x205f: "[?]" +0x2060: "[?]" +0x2061: "[?]" +0x2062: "[?]" +0x2063: "[?]" +0x2064: "[?]" +0x2065: "[?]" +0x2066: "[?]" +0x2067: "[?]" +0x2068: "[?]" +0x2069: "[?]" +0x206a: "" +0x206b: "" +0x206c: "" +0x206d: "" +0x206e: "" +0x206f: "" +0x2070: "0" +0x2071: "" +0x2072: "" +0x2073: "" +0x2074: "4" +0x2075: "5" +0x2076: "6" +0x2077: "7" +0x2078: "8" +0x2079: "9" +0x207a: "+" +0x207b: "-" +0x207c: "=" +0x207d: "(" +0x207e: ")" +0x207f: "n" +0x2080: "0" +0x2081: "1" +0x2082: "2" +0x2083: "3" +0x2084: "4" +0x2085: "5" +0x2086: "6" +0x2087: "7" +0x2088: "8" +0x2089: "9" +0x208a: "+" +0x208b: "-" +0x208c: "=" +0x208d: "(" +0x208e: ")" +0x208f: "[?]" +0x2090: "[?]" +0x2091: "[?]" +0x2092: "[?]" +0x2093: "[?]" +0x2094: "[?]" +0x2095: "[?]" +0x2096: "[?]" +0x2097: "[?]" +0x2098: "[?]" +0x2099: "[?]" +0x209a: "[?]" +0x209b: "[?]" +0x209c: "[?]" +0x209d: "[?]" +0x209e: "[?]" +0x209f: "[?]" +0x20a0: "ECU" +0x20a1: "CL" +0x20a2: "Cr" +0x20a3: "FF" +0x20a4: "L" +0x20a5: "mil" +0x20a6: "N" +0x20a7: "Pts" +0x20a8: "Rs" +0x20a9: "W" +0x20aa: "NS" +0x20ab: "D" +0x20ac: "EU" +0x20ad: "K" +0x20ae: "T" +0x20af: "Dr" +0x20b0: "[?]" +0x20b1: "[?]" +0x20b2: "[?]" +0x20b3: "[?]" +0x20b4: "[?]" +0x20b5: "[?]" +0x20b6: "[?]" +0x20b7: "[?]" +0x20b8: "[?]" +0x20b9: "[?]" +0x20ba: "[?]" +0x20bb: "[?]" +0x20bc: "[?]" +0x20bd: "[?]" +0x20be: "[?]" +0x20bf: "[?]" +0x20c0: "[?]" +0x20c1: "[?]" +0x20c2: "[?]" +0x20c3: "[?]" +0x20c4: "[?]" +0x20c5: "[?]" +0x20c6: "[?]" +0x20c7: "[?]" +0x20c8: "[?]" +0x20c9: "[?]" +0x20ca: "[?]" +0x20cb: "[?]" +0x20cc: "[?]" +0x20cd: "[?]" +0x20ce: "[?]" +0x20cf: "[?]" +0x20d0: "" +0x20d1: "" +0x20d2: "" +0x20d3: "" +0x20d4: "" +0x20d5: "" +0x20d6: "" +0x20d7: "" +0x20d8: "" +0x20d9: "" +0x20da: "" +0x20db: "" +0x20dc: "" +0x20dd: "" +0x20de: "" +0x20df: "" +0x20e0: "" +0x20e1: "" +0x20e2: "" +0x20e3: "" +0x20e4: "[?]" +0x20e5: "[?]" +0x20e6: "[?]" +0x20e7: "[?]" +0x20e8: "[?]" +0x20e9: "[?]" +0x20ea: "[?]" +0x20eb: "[?]" +0x20ec: "[?]" +0x20ed: "[?]" +0x20ee: "[?]" +0x20ef: "[?]" +0x20f0: "[?]" +0x20f1: "[?]" +0x20f2: "[?]" +0x20f3: "[?]" +0x20f4: "[?]" +0x20f5: "[?]" +0x20f6: "[?]" +0x20f7: "[?]" +0x20f8: "[?]" +0x20f9: "[?]" +0x20fa: "[?]" +0x20fb: "[?]" +0x20fc: "[?]" +0x20fd: "[?]" +0x20fe: "[?]" +/* x021 */ +0x2100: "" +0x2101: "" +0x2102: "" +0x2103: "" +0x2104: "" +0x2105: "" +0x2106: "" +0x2107: "" +0x2108: "" +0x2109: "" +0x210a: "" +0x210b: "" +0x210c: "" +0x210d: "" +0x210e: "" +0x210f: "" +0x2110: "" +0x2111: "" +0x2112: "" +0x2113: "" +0x2114: "" +0x2115: "" +0x2116: "" +0x2117: "" +0x2118: "" +0x2119: "" +0x211a: "" +0x211b: "" +0x211c: "" +0x211d: "" +0x211e: "" +0x211f: "" +0x2120: "" +0x2121: "" +0x2122: "" +0x2123: "" +0x2124: "" +0x2125: "" +0x2126: "" +0x2127: "" +0x2128: "" +0x2129: "" +0x212a: "K" +0x212b: "A" +0x212c: "" +0x212d: "" +0x212e: "" +0x212f: "" +0x2130: "" +0x2131: "" +0x2132: "F" +0x2133: "" +0x2134: "" +0x2135: "" +0x2136: "" +0x2137: "" +0x2138: "" +0x2139: "" +0x213a: "" +0x213b: "[?]" +0x213c: "[?]" +0x213d: "[?]" +0x213e: "[?]" +0x213f: "[?]" +0x2140: "[?]" +0x2141: "[?]" +0x2142: "[?]" +0x2143: "[?]" +0x2144: "[?]" +0x2145: "[?]" +0x2146: "[?]" +0x2147: "[?]" +0x2148: "[?]" +0x2149: "[?]" +0x214a: "[?]" +0x214b: "[?]" +0x214c: "[?]" +0x214d: "[?]" +0x214e: "F" +0x214f: "[?]" +0x2150: "[?]" +0x2151: "[?]" +0x2152: "[?]" +0x2153: " 1/3 " +0x2154: " 2/3 " +0x2155: " 1/5 " +0x2156: " 2/5 " +0x2157: " 3/5 " +0x2158: " 4/5 " +0x2159: " 1/6 " +0x215a: " 5/6 " +0x215b: " 1/8 " +0x215c: " 3/8 " +0x215d: " 5/8 " +0x215e: " 7/8 " +0x215f: " 1/" +0x2160: "I" +0x2161: "II" +0x2162: "III" +0x2163: "IV" +0x2164: "V" +0x2165: "VI" +0x2166: "VII" +0x2167: "VIII" +0x2168: "IX" +0x2169: "X" +0x216a: "XI" +0x216b: "XII" +0x216c: "L" +0x216d: "C" +0x216e: "D" +0x216f: "M" +0x2170: "i" +0x2171: "ii" +0x2172: "iii" +0x2173: "iv" +0x2174: "v" +0x2175: "vi" +0x2176: "vii" +0x2177: "viii" +0x2178: "ix" +0x2179: "x" +0x217a: "xi" +0x217b: "xii" +0x217c: "l" +0x217d: "c" +0x217e: "d" +0x217f: "m" +0x2180: "(D" +0x2181: "D)" +0x2182: "((|))" +0x2183: ")" +0x2184: "[?]" +0x2185: "[?]" +0x2186: "[?]" +0x2187: "[?]" +0x2188: "[?]" +0x2189: "[?]" +0x218a: "[?]" +0x218b: "[?]" +0x218c: "[?]" +0x218d: "[?]" +0x218e: "[?]" +0x218f: "[?]" +0x2190: "-" +0x2191: "|" +0x2192: "-" +0x2193: "|" +0x2194: "-" +0x2195: "|" +0x2196: "\\" +0x2197: "/" +0x2198: "\\" +0x2199: "/" +0x219a: "-" +0x219b: "-" +0x219c: "~" +0x219d: "~" +0x219e: "-" +0x219f: "|" +0x21a0: "-" +0x21a1: "|" +0x21a2: "-" +0x21a3: "-" +0x21a4: "-" +0x21a5: "|" +0x21a6: "-" +0x21a7: "|" +0x21a8: "|" +0x21a9: "-" +0x21aa: "-" +0x21ab: "-" +0x21ac: "-" +0x21ad: "-" +0x21ae: "-" +0x21af: "|" +0x21b0: "|" +0x21b1: "|" +0x21b2: "|" +0x21b3: "|" +0x21b4: "|" +0x21b5: "|" +0x21b6: "^" +0x21b7: "V" +0x21b8: "\\" +0x21b9: "=" +0x21ba: "V" +0x21bb: "^" +0x21bc: "-" +0x21bd: "-" +0x21be: "|" +0x21bf: "|" +0x21c0: "-" +0x21c1: "-" +0x21c2: "|" +0x21c3: "|" +0x21c4: "=" +0x21c5: "|" +0x21c6: "=" +0x21c7: "=" +0x21c8: "|" +0x21c9: "=" +0x21ca: "|" +0x21cb: "=" +0x21cc: "=" +0x21cd: "=" +0x21ce: "=" +0x21cf: "=" +0x21d0: "=" +0x21d1: "|" +0x21d2: "=" +0x21d3: "|" +0x21d4: "=" +0x21d5: "|" +0x21d6: "\\" +0x21d7: "/" +0x21d8: "\\" +0x21d9: "/" +0x21da: "=" +0x21db: "=" +0x21dc: "~" +0x21dd: "~" +0x21de: "|" +0x21df: "|" +0x21e0: "-" +0x21e1: "|" +0x21e2: "-" +0x21e3: "|" +0x21e4: "-" +0x21e5: "-" +0x21e6: "-" +0x21e7: "|" +0x21e8: "-" +0x21e9: "|" +0x21ea: "|" +0x21eb: "|" +0x21ec: "|" +0x21ed: "|" +0x21ee: "|" +0x21ef: "|" +0x21f0: "-" +0x21f1: "\\" +0x21f2: "\\" +0x21f3: "|" +0x21f4: "[?]" +0x21f5: "[?]" +0x21f6: "[?]" +0x21f7: "[?]" +0x21f8: "[?]" +0x21f9: "[?]" +0x21fa: "[?]" +0x21fb: "[?]" +0x21fc: "[?]" +0x21fd: "[?]" +0x21fe: "[?]" +/* x022 */ +0x2200: "[?]" +0x2201: "[?]" +0x2202: "[?]" +0x2203: "[?]" +0x2204: "[?]" +0x2205: "[?]" +0x2206: "[?]" +0x2207: "[?]" +0x2208: "[?]" +0x2209: "[?]" +0x220a: "[?]" +0x220b: "[?]" +0x220c: "[?]" +0x220d: "[?]" +0x220e: "[?]" +0x220f: "[?]" +0x2210: "[?]" +0x2211: "[?]" +0x2212: "[?]" +0x2213: "[?]" +0x2214: "[?]" +0x2215: "[?]" +0x2216: "[?]" +0x2217: "[?]" +0x2218: "[?]" +0x2219: "[?]" +0x221a: "[?]" +0x221b: "[?]" +0x221c: "[?]" +0x221d: "[?]" +0x221e: "[?]" +0x221f: "[?]" +0x2220: "[?]" +0x2221: "[?]" +0x2222: "[?]" +0x2223: "[?]" +0x2224: "[?]" +0x2225: "[?]" +0x2226: "[?]" +0x2227: "[?]" +0x2228: "[?]" +0x2229: "[?]" +0x222a: "[?]" +0x222b: "[?]" +0x222c: "[?]" +0x222d: "[?]" +0x222e: "[?]" +0x222f: "[?]" +0x2230: "[?]" +0x2231: "[?]" +0x2232: "[?]" +0x2233: "[?]" +0x2234: "[?]" +0x2235: "[?]" +0x2236: "[?]" +0x2237: "[?]" +0x2238: "[?]" +0x2239: "[?]" +0x223a: "[?]" +0x223b: "[?]" +0x223c: "[?]" +0x223d: "[?]" +0x223e: "[?]" +0x223f: "[?]" +0x2240: "[?]" +0x2241: "[?]" +0x2242: "[?]" +0x2243: "[?]" +0x2244: "[?]" +0x2245: "[?]" +0x2246: "[?]" +0x2247: "[?]" +0x2248: "[?]" +0x2249: "[?]" +0x224a: "[?]" +0x224b: "[?]" +0x224c: "[?]" +0x224d: "[?]" +0x224e: "[?]" +0x224f: "[?]" +0x2250: "[?]" +0x2251: "[?]" +0x2252: "[?]" +0x2253: "[?]" +0x2254: "[?]" +0x2255: "[?]" +0x2256: "[?]" +0x2257: "[?]" +0x2258: "[?]" +0x2259: "[?]" +0x225a: "[?]" +0x225b: "[?]" +0x225c: "[?]" +0x225d: "[?]" +0x225e: "[?]" +0x225f: "[?]" +0x2260: "[?]" +0x2261: "[?]" +0x2262: "[?]" +0x2263: "[?]" +0x2264: "[?]" +0x2265: "[?]" +0x2266: "[?]" +0x2267: "[?]" +0x2268: "[?]" +0x2269: "[?]" +0x226a: "[?]" +0x226b: "[?]" +0x226c: "[?]" +0x226d: "[?]" +0x226e: "[?]" +0x226f: "[?]" +0x2270: "[?]" +0x2271: "[?]" +0x2272: "[?]" +0x2273: "[?]" +0x2274: "[?]" +0x2275: "[?]" +0x2276: "[?]" +0x2277: "[?]" +0x2278: "[?]" +0x2279: "[?]" +0x227a: "[?]" +0x227b: "[?]" +0x227c: "[?]" +0x227d: "[?]" +0x227e: "[?]" +0x227f: "[?]" +0x2280: "[?]" +0x2281: "[?]" +0x2282: "[?]" +0x2283: "[?]" +0x2284: "[?]" +0x2285: "[?]" +0x2286: "[?]" +0x2287: "[?]" +0x2288: "[?]" +0x2289: "[?]" +0x228a: "[?]" +0x228b: "[?]" +0x228c: "[?]" +0x228d: "[?]" +0x228e: "[?]" +0x228f: "[?]" +0x2290: "[?]" +0x2291: "[?]" +0x2292: "[?]" +0x2293: "[?]" +0x2294: "[?]" +0x2295: "[?]" +0x2296: "[?]" +0x2297: "[?]" +0x2298: "[?]" +0x2299: "[?]" +0x229a: "[?]" +0x229b: "[?]" +0x229c: "[?]" +0x229d: "[?]" +0x229e: "[?]" +0x229f: "[?]" +0x22a0: "[?]" +0x22a1: "[?]" +0x22a2: "[?]" +0x22a3: "[?]" +0x22a4: "[?]" +0x22a5: "[?]" +0x22a6: "[?]" +0x22a7: "[?]" +0x22a8: "[?]" +0x22a9: "[?]" +0x22aa: "[?]" +0x22ab: "[?]" +0x22ac: "[?]" +0x22ad: "[?]" +0x22ae: "[?]" +0x22af: "[?]" +0x22b0: "[?]" +0x22b1: "[?]" +0x22b2: "[?]" +0x22b3: "[?]" +0x22b4: "[?]" +0x22b5: "[?]" +0x22b6: "[?]" +0x22b7: "[?]" +0x22b8: "[?]" +0x22b9: "[?]" +0x22ba: "[?]" +0x22bb: "[?]" +0x22bc: "[?]" +0x22bd: "[?]" +0x22be: "[?]" +0x22bf: "[?]" +0x22c0: "[?]" +0x22c1: "[?]" +0x22c2: "[?]" +0x22c3: "[?]" +0x22c4: "[?]" +0x22c5: "[?]" +0x22c6: "[?]" +0x22c7: "[?]" +0x22c8: "[?]" +0x22c9: "[?]" +0x22ca: "[?]" +0x22cb: "[?]" +0x22cc: "[?]" +0x22cd: "[?]" +0x22ce: "[?]" +0x22cf: "[?]" +0x22d0: "[?]" +0x22d1: "[?]" +0x22d2: "[?]" +0x22d3: "[?]" +0x22d4: "[?]" +0x22d5: "[?]" +0x22d6: "[?]" +0x22d7: "[?]" +0x22d8: "[?]" +0x22d9: "[?]" +0x22da: "[?]" +0x22db: "[?]" +0x22dc: "[?]" +0x22dd: "[?]" +0x22de: "[?]" +0x22df: "[?]" +0x22e0: "[?]" +0x22e1: "[?]" +0x22e2: "[?]" +0x22e3: "[?]" +0x22e4: "[?]" +0x22e5: "[?]" +0x22e6: "[?]" +0x22e7: "[?]" +0x22e8: "[?]" +0x22e9: "[?]" +0x22ea: "[?]" +0x22eb: "[?]" +0x22ec: "[?]" +0x22ed: "[?]" +0x22ee: "[?]" +0x22ef: "[?]" +0x22f0: "[?]" +0x22f1: "[?]" +0x22f2: "[?]" +0x22f3: "[?]" +0x22f4: "[?]" +0x22f5: "[?]" +0x22f6: "[?]" +0x22f7: "[?]" +0x22f8: "[?]" +0x22f9: "[?]" +0x22fa: "[?]" +0x22fb: "[?]" +0x22fc: "[?]" +0x22fd: "[?]" +0x22fe: "[?]" +/* x023 */ +0x2300: "[?]" +0x2301: "[?]" +0x2302: "[?]" +0x2303: "[?]" +0x2304: "[?]" +0x2305: "[?]" +0x2306: "[?]" +0x2307: "[?]" +0x2308: "[?]" +0x2309: "[?]" +0x230a: "[?]" +0x230b: "[?]" +0x230c: "[?]" +0x230d: "[?]" +0x230e: "[?]" +0x230f: "[?]" +0x2310: "[?]" +0x2311: "[?]" +0x2312: "[?]" +0x2313: "[?]" +0x2314: "[?]" +0x2315: "[?]" +0x2316: "[?]" +0x2317: "[?]" +0x2318: "[?]" +0x2319: "[?]" +0x231a: "[?]" +0x231b: "[?]" +0x231c: "[?]" +0x231d: "[?]" +0x231e: "[?]" +0x231f: "[?]" +0x2320: "[?]" +0x2321: "[?]" +0x2322: "[?]" +0x2323: "[?]" +0x2324: "[?]" +0x2325: "[?]" +0x2326: "[?]" +0x2327: "[?]" +0x2328: "[?]" +0x2329: "[?]" +0x232a: "[?]" +0x232b: "[?]" +0x232c: "[?]" +0x232d: "[?]" +0x232e: "[?]" +0x232f: "[?]" +0x2330: "[?]" +0x2331: "[?]" +0x2332: "[?]" +0x2333: "[?]" +0x2334: "[?]" +0x2335: "[?]" +0x2336: "[?]" +0x2337: "[?]" +0x2338: "[?]" +0x2339: "[?]" +0x233a: "[?]" +0x233b: "[?]" +0x233c: "[?]" +0x233d: "[?]" +0x233e: "[?]" +0x233f: "[?]" +0x2340: "[?]" +0x2341: "[?]" +0x2342: "[?]" +0x2343: "[?]" +0x2344: "[?]" +0x2345: "[?]" +0x2346: "[?]" +0x2347: "[?]" +0x2348: "[?]" +0x2349: "[?]" +0x234a: "[?]" +0x234b: "[?]" +0x234c: "[?]" +0x234d: "[?]" +0x234e: "[?]" +0x234f: "[?]" +0x2350: "[?]" +0x2351: "[?]" +0x2352: "[?]" +0x2353: "[?]" +0x2354: "[?]" +0x2355: "[?]" +0x2356: "[?]" +0x2357: "[?]" +0x2358: "[?]" +0x2359: "[?]" +0x235a: "[?]" +0x235b: "[?]" +0x235c: "[?]" +0x235d: "[?]" +0x235e: "[?]" +0x235f: "[?]" +0x2360: "[?]" +0x2361: "[?]" +0x2362: "[?]" +0x2363: "[?]" +0x2364: "[?]" +0x2365: "[?]" +0x2366: "[?]" +0x2367: "[?]" +0x2368: "[?]" +0x2369: "[?]" +0x236a: "[?]" +0x236b: "[?]" +0x236c: "[?]" +0x236d: "[?]" +0x236e: "[?]" +0x236f: "[?]" +0x2370: "[?]" +0x2371: "[?]" +0x2372: "[?]" +0x2373: "[?]" +0x2374: "[?]" +0x2375: "[?]" +0x2376: "[?]" +0x2377: "[?]" +0x2378: "[?]" +0x2379: "[?]" +0x237a: "[?]" +0x237b: "[?]" +0x237c: "[?]" +0x237d: "[?]" +0x237e: "[?]" +0x237f: "[?]" +0x2380: "[?]" +0x2381: "[?]" +0x2382: "[?]" +0x2383: "[?]" +0x2384: "[?]" +0x2385: "[?]" +0x2386: "[?]" +0x2387: "[?]" +0x2388: "[?]" +0x2389: "[?]" +0x238a: "[?]" +0x238b: "[?]" +0x238c: "[?]" +0x238d: "[?]" +0x238e: "[?]" +0x238f: "[?]" +0x2390: "[?]" +0x2391: "[?]" +0x2392: "[?]" +0x2393: "[?]" +0x2394: "[?]" +0x2395: "[?]" +0x2396: "[?]" +0x2397: "[?]" +0x2398: "[?]" +0x2399: "[?]" +0x239a: "[?]" +0x239b: "[?]" +0x239c: "[?]" +0x239d: "[?]" +0x239e: "[?]" +0x239f: "[?]" +0x23a0: "[?]" +0x23a1: "[?]" +0x23a2: "[?]" +0x23a3: "[?]" +0x23a4: "[?]" +0x23a5: "[?]" +0x23a6: "[?]" +0x23a7: "[?]" +0x23a8: "[?]" +0x23a9: "[?]" +0x23aa: "[?]" +0x23ab: "[?]" +0x23ac: "[?]" +0x23ad: "[?]" +0x23ae: "[?]" +0x23af: "[?]" +0x23b0: "[?]" +0x23b1: "[?]" +0x23b2: "[?]" +0x23b3: "[?]" +0x23b4: "[?]" +0x23b5: "[?]" +0x23b6: "[?]" +0x23b7: "[?]" +0x23b8: "[?]" +0x23b9: "[?]" +0x23ba: "[?]" +0x23bb: "[?]" +0x23bc: "[?]" +0x23bd: "[?]" +0x23be: "[?]" +0x23bf: "[?]" +0x23c0: "[?]" +0x23c1: "[?]" +0x23c2: "[?]" +0x23c3: "[?]" +0x23c4: "[?]" +0x23c5: "[?]" +0x23c6: "[?]" +0x23c7: "[?]" +0x23c8: "[?]" +0x23c9: "[?]" +0x23ca: "[?]" +0x23cb: "[?]" +0x23cc: "[?]" +0x23cd: "[?]" +0x23ce: "[?]" +0x23cf: "[?]" +0x23d0: "[?]" +0x23d1: "[?]" +0x23d2: "[?]" +0x23d3: "[?]" +0x23d4: "[?]" +0x23d5: "[?]" +0x23d6: "[?]" +0x23d7: "[?]" +0x23d8: "[?]" +0x23d9: "[?]" +0x23da: "[?]" +0x23db: "[?]" +0x23dc: "[?]" +0x23dd: "[?]" +0x23de: "[?]" +0x23df: "[?]" +0x23e0: "[?]" +0x23e1: "[?]" +0x23e2: "[?]" +0x23e3: "[?]" +0x23e4: "[?]" +0x23e5: "[?]" +0x23e6: "[?]" +0x23e7: "[?]" +0x23e8: "[?]" +0x23e9: "[?]" +0x23ea: "[?]" +0x23eb: "[?]" +0x23ec: "[?]" +0x23ed: "[?]" +0x23ee: "[?]" +0x23ef: "[?]" +0x23f0: "[?]" +0x23f1: "[?]" +0x23f2: "[?]" +0x23f3: "[?]" +0x23f4: "[?]" +0x23f5: "[?]" +0x23f6: "[?]" +0x23f7: "[?]" +0x23f8: "[?]" +0x23f9: "[?]" +0x23fa: "[?]" +0x23fb: "[?]" +0x23fc: "[?]" +0x23fd: "[?]" +0x23fe: "[?]" +/* x024 */ +0x2400: "" +0x2401: "" +0x2402: "" +0x2403: "" +0x2404: "" +0x2405: "" +0x2406: "" +0x2407: "" +0x2408: "" +0x2409: "" +0x240a: "" +0x240b: "" +0x240c: "" +0x240d: "" +0x240e: "" +0x240f: "" +0x2410: "" +0x2411: "" +0x2412: "" +0x2413: "" +0x2414: "" +0x2415: "" +0x2416: "" +0x2417: "" +0x2418: "" +0x2419: "" +0x241a: "" +0x241b: "" +0x241c: "" +0x241d: "" +0x241e: "" +0x241f: "" +0x2420: "" +0x2421: "" +0x2422: "" +0x2423: "" +0x2424: "" +0x2425: "" +0x2426: "" +0x2427: "[?]" +0x2428: "[?]" +0x2429: "[?]" +0x242a: "[?]" +0x242b: "[?]" +0x242c: "[?]" +0x242d: "[?]" +0x242e: "[?]" +0x242f: "[?]" +0x2430: "[?]" +0x2431: "[?]" +0x2432: "[?]" +0x2433: "[?]" +0x2434: "[?]" +0x2435: "[?]" +0x2436: "[?]" +0x2437: "[?]" +0x2438: "[?]" +0x2439: "[?]" +0x243a: "[?]" +0x243b: "[?]" +0x243c: "[?]" +0x243d: "[?]" +0x243e: "[?]" +0x243f: "[?]" +0x2440: "" +0x2441: "" +0x2442: "" +0x2443: "" +0x2444: "" +0x2445: "" +0x2446: "" +0x2447: "" +0x2448: "" +0x2449: "" +0x244a: "" +0x244b: "[?]" +0x244c: "[?]" +0x244d: "[?]" +0x244e: "[?]" +0x244f: "[?]" +0x2450: "[?]" +0x2451: "[?]" +0x2452: "[?]" +0x2453: "[?]" +0x2454: "[?]" +0x2455: "[?]" +0x2456: "[?]" +0x2457: "[?]" +0x2458: "[?]" +0x2459: "[?]" +0x245a: "[?]" +0x245b: "[?]" +0x245c: "[?]" +0x245d: "[?]" +0x245e: "[?]" +0x245f: "[?]" +0x2460: "" +0x2461: "" +0x2462: "" +0x2463: "" +0x2464: "" +0x2465: "" +0x2466: "" +0x2467: "" +0x2468: "" +0x2469: "" +0x246a: "" +0x246b: "" +0x246c: "" +0x246d: "" +0x246e: "" +0x246f: "" +0x2470: "" +0x2471: "" +0x2472: "" +0x2473: "" +0x2474: "" +0x2475: "" +0x2476: "" +0x2477: "" +0x2478: "" +0x2479: "" +0x247a: "" +0x247b: "" +0x247c: "" +0x247d: "" +0x247e: "" +0x247f: "" +0x2480: "" +0x2481: "" +0x2482: "" +0x2483: "" +0x2484: "" +0x2485: "" +0x2486: "" +0x2487: "" +0x2488: "" +0x2489: "" +0x248a: "" +0x248b: "" +0x248c: "" +0x248d: "" +0x248e: "" +0x248f: "" +0x2490: "" +0x2491: "" +0x2492: "" +0x2493: "" +0x2494: "" +0x2495: "" +0x2496: "" +0x2497: "" +0x2498: "" +0x2499: "" +0x249a: "" +0x249b: "" +0x249c: "" +0x249d: "" +0x249e: "" +0x249f: "" +0x24a0: "" +0x24a1: "" +0x24a2: "" +0x24a3: "" +0x24a4: "" +0x24a5: "" +0x24a6: "" +0x24a7: "" +0x24a8: "" +0x24a9: "" +0x24aa: "" +0x24ab: "" +0x24ac: "" +0x24ad: "" +0x24ae: "" +0x24af: "" +0x24b0: "" +0x24b1: "" +0x24b2: "" +0x24b3: "" +0x24b4: "" +0x24b5: "" +0x24b6: "" +0x24b7: "" +0x24b8: "" +0x24b9: "" +0x24ba: "" +0x24bb: "" +0x24bc: "" +0x24bd: "" +0x24be: "" +0x24bf: "" +0x24c0: "" +0x24c1: "" +0x24c2: "" +0x24c3: "" +0x24c4: "" +0x24c5: "" +0x24c6: "" +0x24c7: "" +0x24c8: "" +0x24c9: "" +0x24ca: "" +0x24cb: "" +0x24cc: "" +0x24cd: "" +0x24ce: "" +0x24cf: "" +0x24d0: "a" +0x24d1: "b" +0x24d2: "c" +0x24d3: "d" +0x24d4: "e" +0x24d5: "f" +0x24d6: "g" +0x24d7: "h" +0x24d8: "i" +0x24d9: "j" +0x24da: "k" +0x24db: "l" +0x24dc: "m" +0x24dd: "n" +0x24de: "o" +0x24df: "p" +0x24e0: "q" +0x24e1: "r" +0x24e2: "s" +0x24e3: "t" +0x24e4: "u" +0x24e5: "v" +0x24e6: "w" +0x24e7: "x" +0x24e8: "y" +0x24e9: "z" +0x24ea: "0" +0x24eb: "[?]" +0x24ec: "[?]" +0x24ed: "[?]" +0x24ee: "[?]" +0x24ef: "[?]" +0x24f0: "[?]" +0x24f1: "[?]" +0x24f2: "[?]" +0x24f3: "[?]" +0x24f4: "[?]" +0x24f5: "[?]" +0x24f6: "[?]" +0x24f7: "[?]" +0x24f8: "[?]" +0x24f9: "[?]" +0x24fa: "[?]" +0x24fb: "[?]" +0x24fc: "[?]" +0x24fd: "[?]" +0x24fe: "[?]" +/* x025 */ +0x2500: "-" +0x2501: "-" +0x2502: "|" +0x2503: "|" +0x2504: "-" +0x2505: "-" +0x2506: "|" +0x2507: "|" +0x2508: "-" +0x2509: "-" +0x250a: "|" +0x250b: "|" +0x250c: "+" +0x250d: "+" +0x250e: "+" +0x250f: "+" +0x2510: "+" +0x2511: "+" +0x2512: "+" +0x2513: "+" +0x2514: "+" +0x2515: "+" +0x2516: "+" +0x2517: "+" +0x2518: "+" +0x2519: "+" +0x251a: "+" +0x251b: "+" +0x251c: "+" +0x251d: "+" +0x251e: "+" +0x251f: "+" +0x2520: "+" +0x2521: "+" +0x2522: "+" +0x2523: "+" +0x2524: "+" +0x2525: "+" +0x2526: "+" +0x2527: "+" +0x2528: "+" +0x2529: "+" +0x252a: "+" +0x252b: "+" +0x252c: "+" +0x252d: "+" +0x252e: "+" +0x252f: "+" +0x2530: "+" +0x2531: "+" +0x2532: "+" +0x2533: "+" +0x2534: "+" +0x2535: "+" +0x2536: "+" +0x2537: "+" +0x2538: "+" +0x2539: "+" +0x253a: "+" +0x253b: "+" +0x253c: "+" +0x253d: "+" +0x253e: "+" +0x253f: "+" +0x2540: "+" +0x2541: "+" +0x2542: "+" +0x2543: "+" +0x2544: "+" +0x2545: "+" +0x2546: "+" +0x2547: "+" +0x2548: "+" +0x2549: "+" +0x254a: "+" +0x254b: "+" +0x254c: "-" +0x254d: "-" +0x254e: "|" +0x254f: "|" +0x2550: "-" +0x2551: "|" +0x2552: "+" +0x2553: "+" +0x2554: "+" +0x2555: "+" +0x2556: "+" +0x2557: "+" +0x2558: "+" +0x2559: "+" +0x255a: "+" +0x255b: "+" +0x255c: "+" +0x255d: "+" +0x255e: "+" +0x255f: "+" +0x2560: "+" +0x2561: "+" +0x2562: "+" +0x2563: "+" +0x2564: "+" +0x2565: "+" +0x2566: "+" +0x2567: "+" +0x2568: "+" +0x2569: "+" +0x256a: "+" +0x256b: "+" +0x256c: "+" +0x256d: "+" +0x256e: "+" +0x256f: "+" +0x2570: "+" +0x2571: "/" +0x2572: "\\" +0x2573: "X" +0x2574: "-" +0x2575: "|" +0x2576: "-" +0x2577: "|" +0x2578: "-" +0x2579: "|" +0x257a: "-" +0x257b: "|" +0x257c: "-" +0x257d: "|" +0x257e: "-" +0x257f: "|" +0x2580: "#" +0x2581: "#" +0x2582: "#" +0x2583: "#" +0x2584: "#" +0x2585: "#" +0x2586: "#" +0x2587: "#" +0x2588: "#" +0x2589: "#" +0x258a: "#" +0x258b: "#" +0x258c: "#" +0x258d: "#" +0x258e: "#" +0x258f: "#" +0x2590: "#" +0x2591: "#" +0x2592: "#" +0x2593: "#" +0x2594: "-" +0x2595: "|" +0x2596: "[?]" +0x2597: "[?]" +0x2598: "[?]" +0x2599: "[?]" +0x259a: "[?]" +0x259b: "[?]" +0x259c: "[?]" +0x259d: "[?]" +0x259e: "[?]" +0x259f: "[?]" +0x25a0: "#" +0x25a1: "#" +0x25a2: "#" +0x25a3: "#" +0x25a4: "#" +0x25a5: "#" +0x25a6: "#" +0x25a7: "#" +0x25a8: "#" +0x25a9: "#" +0x25aa: "#" +0x25ab: "#" +0x25ac: "#" +0x25ad: "#" +0x25ae: "#" +0x25af: "#" +0x25b0: "#" +0x25b1: "#" +0x25b2: "^" +0x25b3: "^" +0x25b4: "^" +0x25b5: "^" +0x25b6: ">" +0x25b7: ">" +0x25b8: ">" +0x25b9: ">" +0x25ba: ">" +0x25bb: ">" +0x25bc: "V" +0x25bd: "V" +0x25be: "V" +0x25bf: "V" +0x25c0: "<" +0x25c1: "<" +0x25c2: "<" +0x25c3: "<" +0x25c4: "<" +0x25c5: "<" +0x25c6: "*" +0x25c7: "*" +0x25c8: "*" +0x25c9: "*" +0x25ca: "*" +0x25cb: "*" +0x25cc: "*" +0x25cd: "*" +0x25ce: "*" +0x25cf: "*" +0x25d0: "*" +0x25d1: "*" +0x25d2: "*" +0x25d3: "*" +0x25d4: "*" +0x25d5: "*" +0x25d6: "*" +0x25d7: "*" +0x25d8: "*" +0x25d9: "*" +0x25da: "*" +0x25db: "*" +0x25dc: "*" +0x25dd: "*" +0x25de: "*" +0x25df: "*" +0x25e0: "*" +0x25e1: "*" +0x25e2: "*" +0x25e3: "*" +0x25e4: "*" +0x25e5: "*" +0x25e6: "*" +0x25e7: "#" +0x25e8: "#" +0x25e9: "#" +0x25ea: "#" +0x25eb: "#" +0x25ec: "^" +0x25ed: "^" +0x25ee: "^" +0x25ef: "O" +0x25f0: "#" +0x25f1: "#" +0x25f2: "#" +0x25f3: "#" +0x25f4: "#" +0x25f5: "#" +0x25f6: "#" +0x25f7: "#" +0x25f8: "[?]" +0x25f9: "[?]" +0x25fa: "[?]" +0x25fb: "[?]" +0x25fc: "[?]" +0x25fd: "[?]" +0x25fe: "[?]" +/* x026 */ +0x2600: "" +0x2601: "" +0x2602: "" +0x2603: "" +0x2604: "" +0x2605: "" +0x2606: "" +0x2607: "" +0x2608: "" +0x2609: "" +0x260a: "" +0x260b: "" +0x260c: "" +0x260d: "" +0x260e: "" +0x260f: "" +0x2610: "" +0x2611: "" +0x2612: "" +0x2613: "" +0x2614: "[?]" +0x2615: "[?]" +0x2616: "[?]" +0x2617: "[?]" +0x2618: "[?]" +0x2619: "" +0x261a: "" +0x261b: "" +0x261c: "" +0x261d: "" +0x261e: "" +0x261f: "" +0x2620: "" +0x2621: "" +0x2622: "" +0x2623: "" +0x2624: "" +0x2625: "" +0x2626: "" +0x2627: "" +0x2628: "" +0x2629: "" +0x262a: "" +0x262b: "" +0x262c: "" +0x262d: "" +0x262e: "" +0x262f: "" +0x2630: "" +0x2631: "" +0x2632: "" +0x2633: "" +0x2634: "" +0x2635: "" +0x2636: "" +0x2637: "" +0x2638: "" +0x2639: "" +0x263a: "" +0x263b: "" +0x263c: "" +0x263d: "" +0x263e: "" +0x263f: "" +0x2640: "" +0x2641: "" +0x2642: "" +0x2643: "" +0x2644: "" +0x2645: "" +0x2646: "" +0x2647: "" +0x2648: "" +0x2649: "" +0x264a: "" +0x264b: "" +0x264c: "" +0x264d: "" +0x264e: "" +0x264f: "" +0x2650: "" +0x2651: "" +0x2652: "" +0x2653: "" +0x2654: "" +0x2655: "" +0x2656: "" +0x2657: "" +0x2658: "" +0x2659: "" +0x265a: "" +0x265b: "" +0x265c: "" +0x265d: "" +0x265e: "" +0x265f: "" +0x2660: "" +0x2661: "" +0x2662: "" +0x2663: "" +0x2664: "" +0x2665: "" +0x2666: "" +0x2667: "" +0x2668: "" +0x2669: "" +0x266a: "" +0x266b: "" +0x266c: "" +0x266d: "" +0x266e: "" +0x266f: "" +0x2670: "" +0x2671: "" +0x2672: "[?]" +0x2673: "[?]" +0x2674: "[?]" +0x2675: "[?]" +0x2676: "[?]" +0x2677: "[?]" +0x2678: "[?]" +0x2679: "[?]" +0x267a: "[?]" +0x267b: "[?]" +0x267c: "[?]" +0x267d: "[?]" +0x267e: "[?]" +0x267f: "[?]" +0x2680: "[?]" +0x2681: "[?]" +0x2682: "[?]" +0x2683: "[?]" +0x2684: "[?]" +0x2685: "[?]" +0x2686: "[?]" +0x2687: "[?]" +0x2688: "[?]" +0x2689: "[?]" +0x268a: "[?]" +0x268b: "[?]" +0x268c: "[?]" +0x268d: "[?]" +0x268e: "[?]" +0x268f: "[?]" +0x2690: "[?]" +0x2691: "[?]" +0x2692: "[?]" +0x2693: "[?]" +0x2694: "[?]" +0x2695: "[?]" +0x2696: "[?]" +0x2697: "[?]" +0x2698: "[?]" +0x2699: "[?]" +0x269a: "[?]" +0x269b: "[?]" +0x269c: "[?]" +0x269d: "[?]" +0x269e: "[?]" +0x269f: "[?]" +0x26a0: "[?]" +0x26a1: "[?]" +0x26a2: "[?]" +0x26a3: "[?]" +0x26a4: "[?]" +0x26a5: "[?]" +0x26a6: "[?]" +0x26a7: "[?]" +0x26a8: "[?]" +0x26a9: "[?]" +0x26aa: "[?]" +0x26ab: "[?]" +0x26ac: "[?]" +0x26ad: "[?]" +0x26ae: "[?]" +0x26af: "[?]" +0x26b0: "[?]" +0x26b1: "[?]" +0x26b2: "[?]" +0x26b3: "[?]" +0x26b4: "[?]" +0x26b5: "[?]" +0x26b6: "[?]" +0x26b7: "[?]" +0x26b8: "[?]" +0x26b9: "[?]" +0x26ba: "[?]" +0x26bb: "[?]" +0x26bc: "[?]" +0x26bd: "[?]" +0x26be: "[?]" +0x26bf: "[?]" +0x26c0: "[?]" +0x26c1: "[?]" +0x26c2: "[?]" +0x26c3: "[?]" +0x26c4: "[?]" +0x26c5: "[?]" +0x26c6: "[?]" +0x26c7: "[?]" +0x26c8: "[?]" +0x26c9: "[?]" +0x26ca: "[?]" +0x26cb: "[?]" +0x26cc: "[?]" +0x26cd: "[?]" +0x26ce: "[?]" +0x26cf: "[?]" +0x26d0: "[?]" +0x26d1: "[?]" +0x26d2: "[?]" +0x26d3: "[?]" +0x26d4: "[?]" +0x26d5: "[?]" +0x26d6: "[?]" +0x26d7: "[?]" +0x26d8: "[?]" +0x26d9: "[?]" +0x26da: "[?]" +0x26db: "[?]" +0x26dc: "[?]" +0x26dd: "[?]" +0x26de: "[?]" +0x26df: "[?]" +0x26e0: "[?]" +0x26e1: "[?]" +0x26e2: "[?]" +0x26e3: "[?]" +0x26e4: "[?]" +0x26e5: "[?]" +0x26e6: "[?]" +0x26e7: "[?]" +0x26e8: "[?]" +0x26e9: "[?]" +0x26ea: "[?]" +0x26eb: "[?]" +0x26ec: "[?]" +0x26ed: "[?]" +0x26ee: "[?]" +0x26ef: "[?]" +0x26f0: "[?]" +0x26f1: "[?]" +0x26f2: "[?]" +0x26f3: "[?]" +0x26f4: "[?]" +0x26f5: "[?]" +0x26f6: "[?]" +0x26f7: "[?]" +0x26f8: "[?]" +0x26f9: "[?]" +0x26fa: "[?]" +0x26fb: "[?]" +0x26fc: "[?]" +0x26fd: "[?]" +0x26fe: "[?]" +/* x027 */ +0x2700: "[?]" +0x2701: "" +0x2702: "" +0x2703: "" +0x2704: "" +0x2705: "" +0x2706: "" +0x2707: "" +0x2708: "" +0x2709: "" +0x270a: "" +0x270b: "" +0x270c: "" +0x270d: "" +0x270e: "" +0x270f: "" +0x2710: "" +0x2711: "" +0x2712: "" +0x2713: "" +0x2714: "" +0x2715: "" +0x2716: "" +0x2717: "" +0x2718: "" +0x2719: "" +0x271a: "" +0x271b: "" +0x271c: "" +0x271d: "" +0x271e: "" +0x271f: "" +0x2720: "" +0x2721: "" +0x2722: "" +0x2723: "" +0x2724: "" +0x2725: "" +0x2726: "" +0x2727: "" +0x2728: "" +0x2729: "" +0x272a: "" +0x272b: "" +0x272c: "" +0x272d: "" +0x272e: "" +0x272f: "" +0x2730: "" +0x2731: "" +0x2732: "" +0x2733: "" +0x2734: "" +0x2735: "" +0x2736: "" +0x2737: "" +0x2738: "" +0x2739: "" +0x273a: "" +0x273b: "" +0x273c: "" +0x273d: "" +0x273e: "" +0x273f: "" +0x2740: "" +0x2741: "" +0x2742: "" +0x2743: "" +0x2744: "" +0x2745: "" +0x2746: "" +0x2747: "" +0x2748: "" +0x2749: "" +0x274a: "" +0x274b: "" +0x274c: "" +0x274d: "" +0x274e: "" +0x274f: "" +0x2750: "" +0x2751: "" +0x2752: "" +0x2753: "" +0x2754: "" +0x2755: "" +0x2756: "" +0x2757: "" +0x2758: "" +0x2759: "" +0x275a: "" +0x275b: "" +0x275c: "" +0x275d: "" +0x275e: "" +0x275f: "[?]" +0x2760: "[?]" +0x2761: "" +0x2762: "" +0x2763: "" +0x2764: "" +0x2765: "" +0x2766: "" +0x2767: "" +0x2768: "" +0x2769: "" +0x276a: "" +0x276b: "" +0x276c: "" +0x276d: "" +0x276e: "" +0x276f: "" +0x2770: "" +0x2771: "" +0x2772: "" +0x2773: "" +0x2774: "" +0x2775: "" +0x2776: "" +0x2777: "" +0x2778: "" +0x2779: "" +0x277a: "" +0x277b: "" +0x277c: "" +0x277d: "" +0x277e: "" +0x277f: "" +0x2780: "" +0x2781: "" +0x2782: "" +0x2783: "" +0x2784: "" +0x2785: "" +0x2786: "" +0x2787: "" +0x2788: "" +0x2789: "" +0x278a: "" +0x278b: "" +0x278c: "" +0x278d: "" +0x278e: "" +0x278f: "" +0x2790: "" +0x2791: "" +0x2792: "" +0x2793: "" +0x2794: "" +0x2795: "" +0x2796: "" +0x2797: "" +0x2798: "" +0x2799: "" +0x279a: "" +0x279b: "" +0x279c: "" +0x279d: "" +0x279e: "" +0x279f: "" +0x27a0: "" +0x27a1: "" +0x27a2: "" +0x27a3: "" +0x27a4: "" +0x27a5: "" +0x27a6: "" +0x27a7: "" +0x27a8: "" +0x27a9: "" +0x27aa: "" +0x27ab: "" +0x27ac: "" +0x27ad: "" +0x27ae: "" +0x27af: "" +0x27b0: "[?]" +0x27b1: "" +0x27b2: "" +0x27b3: "" +0x27b4: "" +0x27b5: "" +0x27b6: "" +0x27b7: "" +0x27b8: "" +0x27b9: "" +0x27ba: "" +0x27bb: "" +0x27bc: "" +0x27bd: "" +0x27be: "" +0x27bf: "[?]" +0x27c0: "[?]" +0x27c1: "[?]" +0x27c2: "[?]" +0x27c3: "[?]" +0x27c4: "[?]" +0x27c5: "[?]" +0x27c6: "[?]" +0x27c7: "[?]" +0x27c8: "[?]" +0x27c9: "[?]" +0x27ca: "[?]" +0x27cb: "[?]" +0x27cc: "[?]" +0x27cd: "[?]" +0x27ce: "[?]" +0x27cf: "[?]" +0x27d0: "[?]" +0x27d1: "[?]" +0x27d2: "[?]" +0x27d3: "[?]" +0x27d4: "[?]" +0x27d5: "[?]" +0x27d6: "[?]" +0x27d7: "[?]" +0x27d8: "[?]" +0x27d9: "[?]" +0x27da: "[?]" +0x27db: "[?]" +0x27dc: "[?]" +0x27dd: "[?]" +0x27de: "[?]" +0x27df: "[?]" +0x27e0: "[?]" +0x27e1: "[?]" +0x27e2: "[?]" +0x27e3: "[?]" +0x27e4: "[?]" +0x27e5: "[?]" +0x27e6: "[?]" +0x27e7: "[?]" +0x27e8: "[?]" +0x27e9: "[?]" +0x27ea: "[?]" +0x27eb: "[?]" +0x27ec: "[?]" +0x27ed: "[?]" +0x27ee: "[?]" +0x27ef: "[?]" +0x27f0: "[?]" +0x27f1: "[?]" +0x27f2: "[?]" +0x27f3: "[?]" +0x27f4: "[?]" +0x27f5: "[?]" +0x27f6: "[?]" +0x27f7: "[?]" +0x27f8: "[?]" +0x27f9: "[?]" +0x27fa: "[?]" +0x27fb: "[?]" +0x27fc: "[?]" +0x27fd: "[?]" +0x27fe: "[?]" +/* x028 */ +0x2800: " " +0x2801: "a" +0x2802: "1" +0x2803: "b" +0x2804: "'" +0x2805: "k" +0x2806: "2" +0x2807: "l" +0x2808: "@" +0x2809: "c" +0x280a: "i" +0x280b: "f" +0x280c: "/" +0x280d: "m" +0x280e: "s" +0x280f: "p" +0x2810: "\"" +0x2811: "e" +0x2812: "3" +0x2813: "h" +0x2814: "9" +0x2815: "o" +0x2816: "6" +0x2817: "r" +0x2818: "^" +0x2819: "d" +0x281a: "j" +0x281b: "g" +0x281c: ">" +0x281d: "n" +0x281e: "t" +0x281f: "q" +0x2820: "," +0x2821: "*" +0x2822: "5" +0x2823: "<" +0x2824: "-" +0x2825: "u" +0x2826: "8" +0x2827: "v" +0x2828: "." +0x2829: "%" +0x282a: "[" +0x282b: "$" +0x282c: "+" +0x282d: "x" +0x282e: "!" +0x282f: "&" +0x2830: ";" +0x2831: ":" +0x2832: "4" +0x2833: "\\" +0x2834: "0" +0x2835: "z" +0x2836: "7" +0x2837: "(" +0x2838: "_" +0x2839: "?" +0x283a: "w" +0x283b: "]" +0x283c: "#" +0x283d: "y" +0x283e: ")" +0x283f: "=" +0x2840: "[d7]" +0x2841: "[d17]" +0x2842: "[d27]" +0x2843: "[d127]" +0x2844: "[d37]" +0x2845: "[d137]" +0x2846: "[d237]" +0x2847: "[d1237]" +0x2848: "[d47]" +0x2849: "[d147]" +0x284a: "[d247]" +0x284b: "[d1247]" +0x284c: "[d347]" +0x284d: "[d1347]" +0x284e: "[d2347]" +0x284f: "[d12347]" +0x2850: "[d57]" +0x2851: "[d157]" +0x2852: "[d257]" +0x2853: "[d1257]" +0x2854: "[d357]" +0x2855: "[d1357]" +0x2856: "[d2357]" +0x2857: "[d12357]" +0x2858: "[d457]" +0x2859: "[d1457]" +0x285a: "[d2457]" +0x285b: "[d12457]" +0x285c: "[d3457]" +0x285d: "[d13457]" +0x285e: "[d23457]" +0x285f: "[d123457]" +0x2860: "[d67]" +0x2861: "[d167]" +0x2862: "[d267]" +0x2863: "[d1267]" +0x2864: "[d367]" +0x2865: "[d1367]" +0x2866: "[d2367]" +0x2867: "[d12367]" +0x2868: "[d467]" +0x2869: "[d1467]" +0x286a: "[d2467]" +0x286b: "[d12467]" +0x286c: "[d3467]" +0x286d: "[d13467]" +0x286e: "[d23467]" +0x286f: "[d123467]" +0x2870: "[d567]" +0x2871: "[d1567]" +0x2872: "[d2567]" +0x2873: "[d12567]" +0x2874: "[d3567]" +0x2875: "[d13567]" +0x2876: "[d23567]" +0x2877: "[d123567]" +0x2878: "[d4567]" +0x2879: "[d14567]" +0x287a: "[d24567]" +0x287b: "[d124567]" +0x287c: "[d34567]" +0x287d: "[d134567]" +0x287e: "[d234567]" +0x287f: "[d1234567]" +0x2880: "[d8]" +0x2881: "[d18]" +0x2882: "[d28]" +0x2883: "[d128]" +0x2884: "[d38]" +0x2885: "[d138]" +0x2886: "[d238]" +0x2887: "[d1238]" +0x2888: "[d48]" +0x2889: "[d148]" +0x288a: "[d248]" +0x288b: "[d1248]" +0x288c: "[d348]" +0x288d: "[d1348]" +0x288e: "[d2348]" +0x288f: "[d12348]" +0x2890: "[d58]" +0x2891: "[d158]" +0x2892: "[d258]" +0x2893: "[d1258]" +0x2894: "[d358]" +0x2895: "[d1358]" +0x2896: "[d2358]" +0x2897: "[d12358]" +0x2898: "[d458]" +0x2899: "[d1458]" +0x289a: "[d2458]" +0x289b: "[d12458]" +0x289c: "[d3458]" +0x289d: "[d13458]" +0x289e: "[d23458]" +0x289f: "[d123458]" +0x28a0: "[d68]" +0x28a1: "[d168]" +0x28a2: "[d268]" +0x28a3: "[d1268]" +0x28a4: "[d368]" +0x28a5: "[d1368]" +0x28a6: "[d2368]" +0x28a7: "[d12368]" +0x28a8: "[d468]" +0x28a9: "[d1468]" +0x28aa: "[d2468]" +0x28ab: "[d12468]" +0x28ac: "[d3468]" +0x28ad: "[d13468]" +0x28ae: "[d23468]" +0x28af: "[d123468]" +0x28b0: "[d568]" +0x28b1: "[d1568]" +0x28b2: "[d2568]" +0x28b3: "[d12568]" +0x28b4: "[d3568]" +0x28b5: "[d13568]" +0x28b6: "[d23568]" +0x28b7: "[d123568]" +0x28b8: "[d4568]" +0x28b9: "[d14568]" +0x28ba: "[d24568]" +0x28bb: "[d124568]" +0x28bc: "[d34568]" +0x28bd: "[d134568]" +0x28be: "[d234568]" +0x28bf: "[d1234568]" +0x28c0: "[d78]" +0x28c1: "[d178]" +0x28c2: "[d278]" +0x28c3: "[d1278]" +0x28c4: "[d378]" +0x28c5: "[d1378]" +0x28c6: "[d2378]" +0x28c7: "[d12378]" +0x28c8: "[d478]" +0x28c9: "[d1478]" +0x28ca: "[d2478]" +0x28cb: "[d12478]" +0x28cc: "[d3478]" +0x28cd: "[d13478]" +0x28ce: "[d23478]" +0x28cf: "[d123478]" +0x28d0: "[d578]" +0x28d1: "[d1578]" +0x28d2: "[d2578]" +0x28d3: "[d12578]" +0x28d4: "[d3578]" +0x28d5: "[d13578]" +0x28d6: "[d23578]" +0x28d7: "[d123578]" +0x28d8: "[d4578]" +0x28d9: "[d14578]" +0x28da: "[d24578]" +0x28db: "[d124578]" +0x28dc: "[d34578]" +0x28dd: "[d134578]" +0x28de: "[d234578]" +0x28df: "[d1234578]" +0x28e0: "[d678]" +0x28e1: "[d1678]" +0x28e2: "[d2678]" +0x28e3: "[d12678]" +0x28e4: "[d3678]" +0x28e5: "[d13678]" +0x28e6: "[d23678]" +0x28e7: "[d123678]" +0x28e8: "[d4678]" +0x28e9: "[d14678]" +0x28ea: "[d24678]" +0x28eb: "[d124678]" +0x28ec: "[d34678]" +0x28ed: "[d134678]" +0x28ee: "[d234678]" +0x28ef: "[d1234678]" +0x28f0: "[d5678]" +0x28f1: "[d15678]" +0x28f2: "[d25678]" +0x28f3: "[d125678]" +0x28f4: "[d35678]" +0x28f5: "[d135678]" +0x28f6: "[d235678]" +0x28f7: "[d1235678]" +0x28f8: "[d45678]" +0x28f9: "[d145678]" +0x28fa: "[d245678]" +0x28fb: "[d1245678]" +0x28fc: "[d345678]" +0x28fd: "[d1345678]" +0x28fe: "[d2345678]" +0x28ff: "[d12345678]" +/* x02c */ +0x2c00: "" +0x2c01: "" +0x2c02: "" +0x2c03: "" +0x2c04: "" +0x2c05: "" +0x2c06: "" +0x2c07: "" +0x2c08: "" +0x2c09: "" +0x2c0a: "" +0x2c0b: "" +0x2c0c: "" +0x2c0d: "" +0x2c0e: "" +0x2c0f: "" +0x2c10: "" +0x2c11: "" +0x2c12: "" +0x2c13: "" +0x2c14: "" +0x2c15: "" +0x2c16: "" +0x2c17: "" +0x2c18: "" +0x2c19: "" +0x2c1a: "" +0x2c1b: "" +0x2c1c: "" +0x2c1d: "" +0x2c1e: "" +0x2c1f: "" +0x2c20: "" +0x2c21: "" +0x2c22: "" +0x2c23: "" +0x2c24: "" +0x2c25: "" +0x2c26: "" +0x2c27: "" +0x2c28: "" +0x2c29: "" +0x2c2a: "" +0x2c2b: "" +0x2c2c: "" +0x2c2d: "" +0x2c2e: "" +0x2c2f: "" +0x2c30: "" +0x2c31: "" +0x2c32: "" +0x2c33: "" +0x2c34: "" +0x2c35: "" +0x2c36: "" +0x2c37: "" +0x2c38: "" +0x2c39: "" +0x2c3a: "" +0x2c3b: "" +0x2c3c: "" +0x2c3d: "" +0x2c3e: "" +0x2c3f: "" +0x2c40: "" +0x2c41: "" +0x2c42: "" +0x2c43: "" +0x2c44: "" +0x2c45: "" +0x2c46: "" +0x2c47: "" +0x2c48: "" +0x2c49: "" +0x2c4a: "" +0x2c4b: "" +0x2c4c: "" +0x2c4d: "" +0x2c4e: "" +0x2c4f: "" +0x2c50: "" +0x2c51: "" +0x2c52: "" +0x2c53: "" +0x2c54: "" +0x2c55: "" +0x2c56: "" +0x2c57: "" +0x2c58: "" +0x2c59: "" +0x2c5a: "" +0x2c5b: "" +0x2c5c: "" +0x2c5d: "" +0x2c5e: "" +0x2c5f: "" +0x2c60: "L" +0x2c61: "l" +0x2c62: "L" +0x2c63: "P" +0x2c64: "R" +0x2c65: "a" +0x2c66: "t" +0x2c67: "H" +0x2c68: "h" +0x2c69: "K" +0x2c6a: "k" +0x2c6b: "Z" +0x2c6c: "z" +0x2c6d: "" +0x2c6e: "M" +0x2c6f: "A" +0x2c70: "" +0x2c71: "" +0x2c72: "" +0x2c73: "" +0x2c74: "" +0x2c75: "" +0x2c76: "" +0x2c77: "" +0x2c78: "" +0x2c79: "" +0x2c7a: "" +0x2c7b: "" +0x2c7c: "" +0x2c7d: "" +0x2c7e: "" +0x2c7f: "" +0x2c80: "" +0x2c81: "" +0x2c82: "" +0x2c83: "" +0x2c84: "" +0x2c85: "" +0x2c86: "" +0x2c87: "" +0x2c88: "" +0x2c89: "" +0x2c8a: "" +0x2c8b: "" +0x2c8c: "" +0x2c8d: "" +0x2c8e: "" +0x2c8f: "" +0x2c90: "" +0x2c91: "" +0x2c92: "" +0x2c93: "" +0x2c94: "" +0x2c95: "" +0x2c96: "" +0x2c97: "" +0x2c98: "" +0x2c99: "" +0x2c9a: "" +0x2c9b: "" +0x2c9c: "" +0x2c9d: "" +0x2c9e: "" +0x2c9f: "" +0x2ca0: "" +0x2ca1: "" +0x2ca2: "" +0x2ca3: "" +0x2ca4: "" +0x2ca5: "" +0x2ca6: "" +0x2ca7: "" +0x2ca8: "" +0x2ca9: "" +0x2caa: "" +0x2cab: "" +0x2cac: "" +0x2cad: "" +0x2cae: "" +0x2caf: "" +0x2cb0: "" +0x2cb1: "" +0x2cb2: "" +0x2cb3: "" +0x2cb4: "" +0x2cb5: "" +0x2cb6: "" +0x2cb7: "" +0x2cb8: "" +0x2cb9: "" +0x2cba: "" +0x2cbb: "" +0x2cbc: "" +0x2cbd: "" +0x2cbe: "" +0x2cbf: "" +0x2cc0: "" +0x2cc1: "" +0x2cc2: "" +0x2cc3: "" +0x2cc4: "" +0x2cc5: "" +0x2cc6: "" +0x2cc7: "" +0x2cc8: "" +0x2cc9: "" +0x2cca: "" +0x2ccb: "" +0x2ccc: "" +0x2ccd: "" +0x2cce: "" +0x2ccf: "" +0x2cd0: "" +0x2cd1: "" +0x2cd2: "" +0x2cd3: "" +0x2cd4: "" +0x2cd5: "" +0x2cd6: "" +0x2cd7: "" +0x2cd8: "" +0x2cd9: "" +0x2cda: "" +0x2cdb: "" +0x2cdc: "" +0x2cdd: "" +0x2cde: "" +0x2cdf: "" +0x2ce0: "" +0x2ce1: "" +0x2ce2: "" +0x2ce3: "" +0x2ce4: "" +0x2ce5: "" +0x2ce6: "" +0x2ce7: "" +0x2ce8: "" +0x2ce9: "" +0x2cea: "" +0x2ceb: "" +0x2cec: "" +0x2ced: "" +0x2cee: "" +0x2cef: "" +0x2cf0: "" +0x2cf1: "" +0x2cf2: "" +0x2cf3: "" +0x2cf4: "" +0x2cf5: "" +0x2cf6: "" +0x2cf7: "" +0x2cf8: "" +0x2cf9: "" +0x2cfa: "" +0x2cfb: "" +0x2cfc: "" +0x2cfd: "" +0x2cfe: "" +/* x02e */ +0x2e00: "[?]" +0x2e01: "[?]" +0x2e02: "[?]" +0x2e03: "[?]" +0x2e04: "[?]" +0x2e05: "[?]" +0x2e06: "[?]" +0x2e07: "[?]" +0x2e08: "[?]" +0x2e09: "[?]" +0x2e0a: "[?]" +0x2e0b: "[?]" +0x2e0c: "[?]" +0x2e0d: "[?]" +0x2e0e: "[?]" +0x2e0f: "[?]" +0x2e10: "[?]" +0x2e11: "[?]" +0x2e12: "[?]" +0x2e13: "[?]" +0x2e14: "[?]" +0x2e15: "[?]" +0x2e16: "[?]" +0x2e17: "[?]" +0x2e18: "[?]" +0x2e19: "[?]" +0x2e1a: "[?]" +0x2e1b: "[?]" +0x2e1c: "[?]" +0x2e1d: "[?]" +0x2e1e: "[?]" +0x2e1f: "[?]" +0x2e20: "[?]" +0x2e21: "[?]" +0x2e22: "[?]" +0x2e23: "[?]" +0x2e24: "[?]" +0x2e25: "[?]" +0x2e26: "[?]" +0x2e27: "[?]" +0x2e28: "[?]" +0x2e29: "[?]" +0x2e2a: "[?]" +0x2e2b: "[?]" +0x2e2c: "[?]" +0x2e2d: "[?]" +0x2e2e: "[?]" +0x2e2f: "[?]" +0x2e30: "[?]" +0x2e31: "[?]" +0x2e32: "[?]" +0x2e33: "[?]" +0x2e34: "[?]" +0x2e35: "[?]" +0x2e36: "[?]" +0x2e37: "[?]" +0x2e38: "[?]" +0x2e39: "[?]" +0x2e3a: "[?]" +0x2e3b: "[?]" +0x2e3c: "[?]" +0x2e3d: "[?]" +0x2e3e: "[?]" +0x2e3f: "[?]" +0x2e40: "[?]" +0x2e41: "[?]" +0x2e42: "[?]" +0x2e43: "[?]" +0x2e44: "[?]" +0x2e45: "[?]" +0x2e46: "[?]" +0x2e47: "[?]" +0x2e48: "[?]" +0x2e49: "[?]" +0x2e4a: "[?]" +0x2e4b: "[?]" +0x2e4c: "[?]" +0x2e4d: "[?]" +0x2e4e: "[?]" +0x2e4f: "[?]" +0x2e50: "[?]" +0x2e51: "[?]" +0x2e52: "[?]" +0x2e53: "[?]" +0x2e54: "[?]" +0x2e55: "[?]" +0x2e56: "[?]" +0x2e57: "[?]" +0x2e58: "[?]" +0x2e59: "[?]" +0x2e5a: "[?]" +0x2e5b: "[?]" +0x2e5c: "[?]" +0x2e5d: "[?]" +0x2e5e: "[?]" +0x2e5f: "[?]" +0x2e60: "[?]" +0x2e61: "[?]" +0x2e62: "[?]" +0x2e63: "[?]" +0x2e64: "[?]" +0x2e65: "[?]" +0x2e66: "[?]" +0x2e67: "[?]" +0x2e68: "[?]" +0x2e69: "[?]" +0x2e6a: "[?]" +0x2e6b: "[?]" +0x2e6c: "[?]" +0x2e6d: "[?]" +0x2e6e: "[?]" +0x2e6f: "[?]" +0x2e70: "[?]" +0x2e71: "[?]" +0x2e72: "[?]" +0x2e73: "[?]" +0x2e74: "[?]" +0x2e75: "[?]" +0x2e76: "[?]" +0x2e77: "[?]" +0x2e78: "[?]" +0x2e79: "[?]" +0x2e7a: "[?]" +0x2e7b: "[?]" +0x2e7c: "[?]" +0x2e7d: "[?]" +0x2e7e: "[?]" +0x2e7f: "[?]" +0x2e80: "[?] " +0x2e81: "[?] " +0x2e82: "[?] " +0x2e83: "[?] " +0x2e84: "[?] " +0x2e85: "[?] " +0x2e86: "[?] " +0x2e87: "[?] " +0x2e88: "[?] " +0x2e89: "[?] " +0x2e8a: "[?] " +0x2e8b: "[?] " +0x2e8c: "[?] " +0x2e8d: "[?] " +0x2e8e: "[?] " +0x2e8f: "[?] " +0x2e90: "[?] " +0x2e91: "[?] " +0x2e92: "[?] " +0x2e93: "[?] " +0x2e94: "[?] " +0x2e95: "[?] " +0x2e96: "[?] " +0x2e97: "[?] " +0x2e98: "[?] " +0x2e99: "[?] " +0x2e9a: "[?]" +0x2e9b: "[?] " +0x2e9c: "[?] " +0x2e9d: "[?] " +0x2e9e: "[?] " +0x2e9f: "[?] " +0x2ea0: "[?] " +0x2ea1: "[?] " +0x2ea2: "[?] " +0x2ea3: "[?] " +0x2ea4: "[?] " +0x2ea5: "[?] " +0x2ea6: "[?] " +0x2ea7: "[?] " +0x2ea8: "[?] " +0x2ea9: "[?] " +0x2eaa: "[?] " +0x2eab: "[?] " +0x2eac: "[?] " +0x2ead: "[?] " +0x2eae: "[?] " +0x2eaf: "[?] " +0x2eb0: "[?] " +0x2eb1: "[?] " +0x2eb2: "[?] " +0x2eb3: "[?] " +0x2eb4: "[?] " +0x2eb5: "[?] " +0x2eb6: "[?] " +0x2eb7: "[?] " +0x2eb8: "[?] " +0x2eb9: "[?] " +0x2eba: "[?] " +0x2ebb: "[?] " +0x2ebc: "[?] " +0x2ebd: "[?] " +0x2ebe: "[?] " +0x2ebf: "[?] " +0x2ec0: "[?] " +0x2ec1: "[?] " +0x2ec2: "[?] " +0x2ec3: "[?] " +0x2ec4: "[?] " +0x2ec5: "[?] " +0x2ec6: "[?] " +0x2ec7: "[?] " +0x2ec8: "[?] " +0x2ec9: "[?] " +0x2eca: "[?] " +0x2ecb: "[?] " +0x2ecc: "[?] " +0x2ecd: "[?] " +0x2ece: "[?] " +0x2ecf: "[?] " +0x2ed0: "[?] " +0x2ed1: "[?] " +0x2ed2: "[?] " +0x2ed3: "[?] " +0x2ed4: "[?] " +0x2ed5: "[?] " +0x2ed6: "[?] " +0x2ed7: "[?] " +0x2ed8: "[?] " +0x2ed9: "[?] " +0x2eda: "[?] " +0x2edb: "[?] " +0x2edc: "[?] " +0x2edd: "[?] " +0x2ede: "[?] " +0x2edf: "[?] " +0x2ee0: "[?] " +0x2ee1: "[?] " +0x2ee2: "[?] " +0x2ee3: "[?] " +0x2ee4: "[?] " +0x2ee5: "[?] " +0x2ee6: "[?] " +0x2ee7: "[?] " +0x2ee8: "[?] " +0x2ee9: "[?] " +0x2eea: "[?] " +0x2eeb: "[?] " +0x2eec: "[?] " +0x2eed: "[?] " +0x2eee: "[?] " +0x2eef: "[?] " +0x2ef0: "[?] " +0x2ef1: "[?] " +0x2ef2: "[?] " +0x2ef3: "[?] " +0x2ef4: "[?]" +0x2ef5: "[?]" +0x2ef6: "[?]" +0x2ef7: "[?]" +0x2ef8: "[?]" +0x2ef9: "[?]" +0x2efa: "[?]" +0x2efb: "[?]" +0x2efc: "[?]" +0x2efd: "[?]" +0x2efe: "[?]" +/* x02f */ +0x2f00: "[?] " +0x2f01: "[?] " +0x2f02: "[?] " +0x2f03: "[?] " +0x2f04: "[?] " +0x2f05: "[?] " +0x2f06: "[?] " +0x2f07: "[?] " +0x2f08: "[?] " +0x2f09: "[?] " +0x2f0a: "[?] " +0x2f0b: "[?] " +0x2f0c: "[?] " +0x2f0d: "[?] " +0x2f0e: "[?] " +0x2f0f: "[?] " +0x2f10: "[?] " +0x2f11: "[?] " +0x2f12: "[?] " +0x2f13: "[?] " +0x2f14: "[?] " +0x2f15: "[?] " +0x2f16: "[?] " +0x2f17: "[?] " +0x2f18: "[?] " +0x2f19: "[?] " +0x2f1a: "[?] " +0x2f1b: "[?] " +0x2f1c: "[?] " +0x2f1d: "[?] " +0x2f1e: "[?] " +0x2f1f: "[?] " +0x2f20: "[?] " +0x2f21: "[?] " +0x2f22: "[?] " +0x2f23: "[?] " +0x2f24: "[?] " +0x2f25: "[?] " +0x2f26: "[?] " +0x2f27: "[?] " +0x2f28: "[?] " +0x2f29: "[?] " +0x2f2a: "[?] " +0x2f2b: "[?] " +0x2f2c: "[?] " +0x2f2d: "[?] " +0x2f2e: "[?] " +0x2f2f: "[?] " +0x2f30: "[?] " +0x2f31: "[?] " +0x2f32: "[?] " +0x2f33: "[?] " +0x2f34: "[?] " +0x2f35: "[?] " +0x2f36: "[?] " +0x2f37: "[?] " +0x2f38: "[?] " +0x2f39: "[?] " +0x2f3a: "[?] " +0x2f3b: "[?] " +0x2f3c: "[?] " +0x2f3d: "[?] " +0x2f3e: "[?] " +0x2f3f: "[?] " +0x2f40: "[?] " +0x2f41: "[?] " +0x2f42: "[?] " +0x2f43: "[?] " +0x2f44: "[?] " +0x2f45: "[?] " +0x2f46: "[?] " +0x2f47: "[?] " +0x2f48: "[?] " +0x2f49: "[?] " +0x2f4a: "[?] " +0x2f4b: "[?] " +0x2f4c: "[?] " +0x2f4d: "[?] " +0x2f4e: "[?] " +0x2f4f: "[?] " +0x2f50: "[?] " +0x2f51: "[?] " +0x2f52: "[?] " +0x2f53: "[?] " +0x2f54: "[?] " +0x2f55: "[?] " +0x2f56: "[?] " +0x2f57: "[?] " +0x2f58: "[?] " +0x2f59: "[?] " +0x2f5a: "[?] " +0x2f5b: "[?] " +0x2f5c: "[?] " +0x2f5d: "[?] " +0x2f5e: "[?] " +0x2f5f: "[?] " +0x2f60: "[?] " +0x2f61: "[?] " +0x2f62: "[?] " +0x2f63: "[?] " +0x2f64: "[?] " +0x2f65: "[?] " +0x2f66: "[?] " +0x2f67: "[?] " +0x2f68: "[?] " +0x2f69: "[?] " +0x2f6a: "[?] " +0x2f6b: "[?] " +0x2f6c: "[?] " +0x2f6d: "[?] " +0x2f6e: "[?] " +0x2f6f: "[?] " +0x2f70: "[?] " +0x2f71: "[?] " +0x2f72: "[?] " +0x2f73: "[?] " +0x2f74: "[?] " +0x2f75: "[?] " +0x2f76: "[?] " +0x2f77: "[?] " +0x2f78: "[?] " +0x2f79: "[?] " +0x2f7a: "[?] " +0x2f7b: "[?] " +0x2f7c: "[?] " +0x2f7d: "[?] " +0x2f7e: "[?] " +0x2f7f: "[?] " +0x2f80: "[?] " +0x2f81: "[?] " +0x2f82: "[?] " +0x2f83: "[?] " +0x2f84: "[?] " +0x2f85: "[?] " +0x2f86: "[?] " +0x2f87: "[?] " +0x2f88: "[?] " +0x2f89: "[?] " +0x2f8a: "[?] " +0x2f8b: "[?] " +0x2f8c: "[?] " +0x2f8d: "[?] " +0x2f8e: "[?] " +0x2f8f: "[?] " +0x2f90: "[?] " +0x2f91: "[?] " +0x2f92: "[?] " +0x2f93: "[?] " +0x2f94: "[?] " +0x2f95: "[?] " +0x2f96: "[?] " +0x2f97: "[?] " +0x2f98: "[?] " +0x2f99: "[?] " +0x2f9a: "[?] " +0x2f9b: "[?] " +0x2f9c: "[?] " +0x2f9d: "[?] " +0x2f9e: "[?] " +0x2f9f: "[?] " +0x2fa0: "[?] " +0x2fa1: "[?] " +0x2fa2: "[?] " +0x2fa3: "[?] " +0x2fa4: "[?] " +0x2fa5: "[?] " +0x2fa6: "[?] " +0x2fa7: "[?] " +0x2fa8: "[?] " +0x2fa9: "[?] " +0x2faa: "[?] " +0x2fab: "[?] " +0x2fac: "[?] " +0x2fad: "[?] " +0x2fae: "[?] " +0x2faf: "[?] " +0x2fb0: "[?] " +0x2fb1: "[?] " +0x2fb2: "[?] " +0x2fb3: "[?] " +0x2fb4: "[?] " +0x2fb5: "[?] " +0x2fb6: "[?] " +0x2fb7: "[?] " +0x2fb8: "[?] " +0x2fb9: "[?] " +0x2fba: "[?] " +0x2fbb: "[?] " +0x2fbc: "[?] " +0x2fbd: "[?] " +0x2fbe: "[?] " +0x2fbf: "[?] " +0x2fc0: "[?] " +0x2fc1: "[?] " +0x2fc2: "[?] " +0x2fc3: "[?] " +0x2fc4: "[?] " +0x2fc5: "[?] " +0x2fc6: "[?] " +0x2fc7: "[?] " +0x2fc8: "[?] " +0x2fc9: "[?] " +0x2fca: "[?] " +0x2fcb: "[?] " +0x2fcc: "[?] " +0x2fcd: "[?] " +0x2fce: "[?] " +0x2fcf: "[?] " +0x2fd0: "[?] " +0x2fd1: "[?] " +0x2fd2: "[?] " +0x2fd3: "[?] " +0x2fd4: "[?] " +0x2fd5: "[?] " +0x2fd6: "[?]" +0x2fd7: "[?]" +0x2fd8: "[?]" +0x2fd9: "[?]" +0x2fda: "[?]" +0x2fdb: "[?]" +0x2fdc: "[?]" +0x2fdd: "[?]" +0x2fde: "[?]" +0x2fdf: "[?]" +0x2fe0: "[?]" +0x2fe1: "[?]" +0x2fe2: "[?]" +0x2fe3: "[?]" +0x2fe4: "[?]" +0x2fe5: "[?]" +0x2fe6: "[?]" +0x2fe7: "[?]" +0x2fe8: "[?]" +0x2fe9: "[?]" +0x2fea: "[?]" +0x2feb: "[?]" +0x2fec: "[?]" +0x2fed: "[?]" +0x2fee: "[?]" +0x2fef: "[?]" +0x2ff0: "[?] " +0x2ff1: "[?] " +0x2ff2: "[?] " +0x2ff3: "[?] " +0x2ff4: "[?] " +0x2ff5: "[?] " +0x2ff6: "[?] " +0x2ff7: "[?] " +0x2ff8: "[?] " +0x2ff9: "[?] " +0x2ffa: "[?] " +0x2ffb: "[?] " +0x2ffc: "[?]" +0x2ffd: "[?]" +0x2ffe: "[?]" +/* x030 */ +0x3000: " " +0x3001: ", " +0x3002: ". " +0x3003: "\"" +0x3004: "[JIS]" +0x3005: "\"" +0x3006: "/" +0x3007: "0" +0x3008: "<" +0x3009: "> " +0x300a: "<<" +0x300b: ">> " +0x300c: "[" +0x300d: "] " +0x300e: "{" +0x300f: "} " +0x3010: "[(" +0x3011: ")] " +0x3012: "@" +0x3013: "X " +0x3014: "[" +0x3015: "] " +0x3016: "[[" +0x3017: "]] " +0x3018: "((" +0x3019: ")) " +0x301a: "[[" +0x301b: "]] " +0x301c: "~ " +0x301d: "``" +0x301e: "''" +0x301f: ",," +0x3020: "@" +0x3021: "1" +0x3022: "2" +0x3023: "3" +0x3024: "4" +0x3025: "5" +0x3026: "6" +0x3027: "7" +0x3028: "8" +0x3029: "9" +0x302a: "" +0x302b: "" +0x302c: "" +0x302d: "" +0x302e: "" +0x302f: "" +0x3030: "~" +0x3031: "+" +0x3032: "+" +0x3033: "+" +0x3034: "+" +0x3035: "" +0x3036: "@" +0x3037: " // " +0x3038: "+10+" +0x3039: "+20+" +0x303a: "+30+" +0x303b: "[?]" +0x303c: "[?]" +0x303d: "[?]" +0x303e: "" +0x303f: "" +0x3040: "[?]" +0x3041: "a" +0x3042: "a" +0x3043: "i" +0x3044: "i" +0x3045: "u" +0x3046: "u" +0x3047: "e" +0x3048: "e" +0x3049: "o" +0x304a: "o" +0x304b: "ka" +0x304c: "ga" +0x304d: "ki" +0x304e: "gi" +0x304f: "ku" +0x3050: "gu" +0x3051: "ke" +0x3052: "ge" +0x3053: "ko" +0x3054: "go" +0x3055: "sa" +0x3056: "za" +0x3057: "shi" +0x3058: "zi" +0x3059: "su" +0x305a: "zu" +0x305b: "se" +0x305c: "ze" +0x305d: "so" +0x305e: "zo" +0x305f: "ta" +0x3060: "da" +0x3061: "chi" +0x3062: "di" +0x3063: "tsu" +0x3064: "tsu" +0x3065: "du" +0x3066: "te" +0x3067: "de" +0x3068: "to" +0x3069: "do" +0x306a: "na" +0x306b: "ni" +0x306c: "nu" +0x306d: "ne" +0x306e: "no" +0x306f: "ha" +0x3070: "ba" +0x3071: "pa" +0x3072: "hi" +0x3073: "bi" +0x3074: "pi" +0x3075: "hu" +0x3076: "bu" +0x3077: "pu" +0x3078: "he" +0x3079: "be" +0x307a: "pe" +0x307b: "ho" +0x307c: "bo" +0x307d: "po" +0x307e: "ma" +0x307f: "mi" +0x3080: "mu" +0x3081: "me" +0x3082: "mo" +0x3083: "ya" +0x3084: "ya" +0x3085: "yu" +0x3086: "yu" +0x3087: "yo" +0x3088: "yo" +0x3089: "ra" +0x308a: "ri" +0x308b: "ru" +0x308c: "re" +0x308d: "ro" +0x308e: "wa" +0x308f: "wa" +0x3090: "wi" +0x3091: "we" +0x3092: "wo" +0x3093: "n" +0x3094: "vu" +0x3095: "[?]" +0x3096: "[?]" +0x3097: "[?]" +0x3098: "[?]" +0x3099: "" +0x309a: "" +0x309b: "" +0x309c: "" +0x309d: "\"" +0x309e: "\"" +0x309f: "[?]" +0x30a0: "[?]" +0x30a1: "a" +0x30a2: "a" +0x30a3: "i" +0x30a4: "i" +0x30a5: "u" +0x30a6: "u" +0x30a7: "e" +0x30a8: "e" +0x30a9: "o" +0x30aa: "o" +0x30ab: "ka" +0x30ac: "ga" +0x30ad: "ki" +0x30ae: "gi" +0x30af: "ku" +0x30b0: "gu" +0x30b1: "ke" +0x30b2: "ge" +0x30b3: "ko" +0x30b4: "go" +0x30b5: "sa" +0x30b6: "za" +0x30b7: "shi" +0x30b8: "zi" +0x30b9: "su" +0x30ba: "zu" +0x30bb: "se" +0x30bc: "ze" +0x30bd: "so" +0x30be: "zo" +0x30bf: "ta" +0x30c0: "da" +0x30c1: "chi" +0x30c2: "di" +0x30c3: "tsu" +0x30c4: "tsu" +0x30c5: "du" +0x30c6: "te" +0x30c7: "de" +0x30c8: "to" +0x30c9: "do" +0x30ca: "na" +0x30cb: "ni" +0x30cc: "nu" +0x30cd: "ne" +0x30ce: "no" +0x30cf: "ha" +0x30d0: "ba" +0x30d1: "pa" +0x30d2: "hi" +0x30d3: "bi" +0x30d4: "pi" +0x30d5: "hu" +0x30d6: "bu" +0x30d7: "pu" +0x30d8: "he" +0x30d9: "be" +0x30da: "pe" +0x30db: "ho" +0x30dc: "bo" +0x30dd: "po" +0x30de: "ma" +0x30df: "mi" +0x30e0: "mu" +0x30e1: "me" +0x30e2: "mo" +0x30e3: "ya" +0x30e4: "ya" +0x30e5: "yu" +0x30e6: "yu" +0x30e7: "yo" +0x30e8: "yo" +0x30e9: "ra" +0x30ea: "ri" +0x30eb: "ru" +0x30ec: "re" +0x30ed: "ro" +0x30ee: "wa" +0x30ef: "wa" +0x30f0: "wi" +0x30f1: "we" +0x30f2: "wo" +0x30f3: "n" +0x30f4: "vu" +0x30f5: "ka" +0x30f6: "ke" +0x30f7: "va" +0x30f8: "vi" +0x30f9: "ve" +0x30fa: "vo" +0x30fb: "" +0x30fc: "" +0x30fd: "\"" +0x30fe: "\"" +/* x031 */ +0x3100: "[?]" +0x3101: "[?]" +0x3102: "[?]" +0x3103: "[?]" +0x3104: "[?]" +0x3105: "B" +0x3106: "P" +0x3107: "M" +0x3108: "F" +0x3109: "D" +0x310a: "T" +0x310b: "N" +0x310c: "L" +0x310d: "G" +0x310e: "K" +0x310f: "H" +0x3110: "J" +0x3111: "Q" +0x3112: "X" +0x3113: "ZH" +0x3114: "CH" +0x3115: "SH" +0x3116: "R" +0x3117: "Z" +0x3118: "C" +0x3119: "S" +0x311a: "A" +0x311b: "O" +0x311c: "E" +0x311d: "EH" +0x311e: "AI" +0x311f: "EI" +0x3120: "AU" +0x3121: "OU" +0x3122: "AN" +0x3123: "EN" +0x3124: "ANG" +0x3125: "ENG" +0x3126: "ER" +0x3127: "I" +0x3128: "U" +0x3129: "IU" +0x312a: "V" +0x312b: "NG" +0x312c: "GN" +0x312d: "[?]" +0x312e: "[?]" +0x312f: "[?]" +0x3130: "[?]" +0x3131: "g" +0x3132: "gg" +0x3133: "gs" +0x3134: "n" +0x3135: "nj" +0x3136: "nh" +0x3137: "d" +0x3138: "dd" +0x3139: "r" +0x313a: "lg" +0x313b: "lm" +0x313c: "lb" +0x313d: "ls" +0x313e: "lt" +0x313f: "lp" +0x3140: "rh" +0x3141: "m" +0x3142: "b" +0x3143: "bb" +0x3144: "bs" +0x3145: "s" +0x3146: "ss" +0x3147: "" +0x3148: "j" +0x3149: "jj" +0x314a: "c" +0x314b: "k" +0x314c: "t" +0x314d: "p" +0x314e: "h" +0x314f: "a" +0x3150: "ae" +0x3151: "ya" +0x3152: "yae" +0x3153: "eo" +0x3154: "e" +0x3155: "yeo" +0x3156: "ye" +0x3157: "o" +0x3158: "wa" +0x3159: "wae" +0x315a: "oe" +0x315b: "yo" +0x315c: "u" +0x315d: "weo" +0x315e: "we" +0x315f: "wi" +0x3160: "yu" +0x3161: "eu" +0x3162: "yi" +0x3163: "i" +0x3164: "" +0x3165: "nn" +0x3166: "nd" +0x3167: "ns" +0x3168: "nZ" +0x3169: "lgs" +0x316a: "ld" +0x316b: "lbs" +0x316c: "lZ" +0x316d: "lQ" +0x316e: "mb" +0x316f: "ms" +0x3170: "mZ" +0x3171: "mN" +0x3172: "bg" +0x3173: "" +0x3174: "bsg" +0x3175: "bst" +0x3176: "bj" +0x3177: "bt" +0x3178: "bN" +0x3179: "bbN" +0x317a: "sg" +0x317b: "sn" +0x317c: "sd" +0x317d: "sb" +0x317e: "sj" +0x317f: "Z" +0x3180: "" +0x3181: "N" +0x3182: "Ns" +0x3183: "NZ" +0x3184: "pN" +0x3185: "hh" +0x3186: "Q" +0x3187: "yo-ya" +0x3188: "yo-yae" +0x3189: "yo-i" +0x318a: "yu-yeo" +0x318b: "yu-ye" +0x318c: "yu-i" +0x318d: "U" +0x318e: "U-i" +0x318f: "[?]" +0x3190: "" +0x3191: "" +0x3192: "" +0x3193: "" +0x3194: "" +0x3195: "" +0x3196: "" +0x3197: "" +0x3198: "" +0x3199: "" +0x319a: "" +0x319b: "" +0x319c: "" +0x319d: "" +0x319e: "" +0x319f: "" +0x31a0: "BU" +0x31a1: "ZI" +0x31a2: "JI" +0x31a3: "GU" +0x31a4: "EE" +0x31a5: "ENN" +0x31a6: "OO" +0x31a7: "ONN" +0x31a8: "IR" +0x31a9: "ANN" +0x31aa: "INN" +0x31ab: "UNN" +0x31ac: "IM" +0x31ad: "NGG" +0x31ae: "AINN" +0x31af: "AUNN" +0x31b0: "AM" +0x31b1: "OM" +0x31b2: "ONG" +0x31b3: "INNN" +0x31b4: "P" +0x31b5: "T" +0x31b6: "K" +0x31b7: "H" +0x31b8: "[?]" +0x31b9: "[?]" +0x31ba: "[?]" +0x31bb: "[?]" +0x31bc: "[?]" +0x31bd: "[?]" +0x31be: "[?]" +0x31bf: "[?]" +0x31c0: "[?]" +0x31c1: "[?]" +0x31c2: "[?]" +0x31c3: "[?]" +0x31c4: "[?]" +0x31c5: "[?]" +0x31c6: "[?]" +0x31c7: "[?]" +0x31c8: "[?]" +0x31c9: "[?]" +0x31ca: "[?]" +0x31cb: "[?]" +0x31cc: "[?]" +0x31cd: "[?]" +0x31ce: "[?]" +0x31cf: "[?]" +0x31d0: "[?]" +0x31d1: "[?]" +0x31d2: "[?]" +0x31d3: "[?]" +0x31d4: "[?]" +0x31d5: "[?]" +0x31d6: "[?]" +0x31d7: "[?]" +0x31d8: "[?]" +0x31d9: "[?]" +0x31da: "[?]" +0x31db: "[?]" +0x31dc: "[?]" +0x31dd: "[?]" +0x31de: "[?]" +0x31df: "[?]" +0x31e0: "[?]" +0x31e1: "[?]" +0x31e2: "[?]" +0x31e3: "[?]" +0x31e4: "[?]" +0x31e5: "[?]" +0x31e6: "[?]" +0x31e7: "[?]" +0x31e8: "[?]" +0x31e9: "[?]" +0x31ea: "[?]" +0x31eb: "[?]" +0x31ec: "[?]" +0x31ed: "[?]" +0x31ee: "[?]" +0x31ef: "[?]" +0x31f0: "[?]" +0x31f1: "[?]" +0x31f2: "[?]" +0x31f3: "[?]" +0x31f4: "[?]" +0x31f5: "[?]" +0x31f6: "[?]" +0x31f7: "[?]" +0x31f8: "[?]" +0x31f9: "[?]" +0x31fa: "[?]" +0x31fb: "[?]" +0x31fc: "[?]" +0x31fd: "[?]" +0x31fe: "[?]" +/* x032 */ +0x3200: "(g)" +0x3201: "(n)" +0x3202: "(d)" +0x3203: "(r)" +0x3204: "(m)" +0x3205: "(b)" +0x3206: "(s)" +0x3207: "()" +0x3208: "(j)" +0x3209: "(c)" +0x320a: "(k)" +0x320b: "(t)" +0x320c: "(p)" +0x320d: "(h)" +0x320e: "(ga)" +0x320f: "(na)" +0x3210: "(da)" +0x3211: "(ra)" +0x3212: "(ma)" +0x3213: "(ba)" +0x3214: "(sa)" +0x3215: "(a)" +0x3216: "(ja)" +0x3217: "(ca)" +0x3218: "(ka)" +0x3219: "(ta)" +0x321a: "(pa)" +0x321b: "(ha)" +0x321c: "(ju)" +0x321d: "[?]" +0x321e: "[?]" +0x321f: "[?]" +0x3220: "(1) " +0x3221: "(2) " +0x3222: "(3) " +0x3223: "(4) " +0x3224: "(5) " +0x3225: "(6) " +0x3226: "(7) " +0x3227: "(8) " +0x3228: "(9) " +0x3229: "(10) " +0x322a: "(Yue) " +0x322b: "(Huo) " +0x322c: "(Shui) " +0x322d: "(Mu) " +0x322e: "(Jin) " +0x322f: "(Tu) " +0x3230: "(Ri) " +0x3231: "(Zhu) " +0x3232: "(You) " +0x3233: "(She) " +0x3234: "(Ming) " +0x3235: "(Te) " +0x3236: "(Cai) " +0x3237: "(Zhu) " +0x3238: "(Lao) " +0x3239: "(Dai) " +0x323a: "(Hu) " +0x323b: "(Xue) " +0x323c: "(Jian) " +0x323d: "(Qi) " +0x323e: "(Zi) " +0x323f: "(Xie) " +0x3240: "(Ji) " +0x3241: "(Xiu) " +0x3242: "<<" +0x3243: ">>" +0x3244: "[?]" +0x3245: "[?]" +0x3246: "[?]" +0x3247: "[?]" +0x3248: "[?]" +0x3249: "[?]" +0x324a: "[?]" +0x324b: "[?]" +0x324c: "[?]" +0x324d: "[?]" +0x324e: "[?]" +0x324f: "[?]" +0x3250: "[?]" +0x3251: "[?]" +0x3252: "[?]" +0x3253: "[?]" +0x3254: "[?]" +0x3255: "[?]" +0x3256: "[?]" +0x3257: "[?]" +0x3258: "[?]" +0x3259: "[?]" +0x325a: "[?]" +0x325b: "[?]" +0x325c: "[?]" +0x325d: "[?]" +0x325e: "[?]" +0x325f: "[?]" +0x3260: "(g)" +0x3261: "(n)" +0x3262: "(d)" +0x3263: "(r)" +0x3264: "(m)" +0x3265: "(b)" +0x3266: "(s)" +0x3267: "()" +0x3268: "(j)" +0x3269: "(c)" +0x326a: "(k)" +0x326b: "(t)" +0x326c: "(p)" +0x326d: "(h)" +0x326e: "(ga)" +0x326f: "(na)" +0x3270: "(da)" +0x3271: "(ra)" +0x3272: "(ma)" +0x3273: "(ba)" +0x3274: "(sa)" +0x3275: "(a)" +0x3276: "(ja)" +0x3277: "(ca)" +0x3278: "(ka)" +0x3279: "(ta)" +0x327a: "(pa)" +0x327b: "(ha)" +0x327c: "[?]" +0x327d: "[?]" +0x327e: "[?]" +0x327f: "KIS " +0x3280: "(1) " +0x3281: "(2) " +0x3282: "(3) " +0x3283: "(4) " +0x3284: "(5) " +0x3285: "(6) " +0x3286: "(7) " +0x3287: "(8) " +0x3288: "(9) " +0x3289: "(10) " +0x328a: "(Yue) " +0x328b: "(Huo) " +0x328c: "(Shui) " +0x328d: "(Mu) " +0x328e: "(Jin) " +0x328f: "(Tu) " +0x3290: "(Ri) " +0x3291: "(Zhu) " +0x3292: "(You) " +0x3293: "(She) " +0x3294: "(Ming) " +0x3295: "(Te) " +0x3296: "(Cai) " +0x3297: "(Zhu) " +0x3298: "(Lao) " +0x3299: "(Mi) " +0x329a: "(Nan) " +0x329b: "(Nu) " +0x329c: "(Shi) " +0x329d: "(You) " +0x329e: "(Yin) " +0x329f: "(Zhu) " +0x32a0: "(Xiang) " +0x32a1: "(Xiu) " +0x32a2: "(Xie) " +0x32a3: "(Zheng) " +0x32a4: "(Shang) " +0x32a5: "(Zhong) " +0x32a6: "(Xia) " +0x32a7: "(Zuo) " +0x32a8: "(You) " +0x32a9: "(Yi) " +0x32aa: "(Zong) " +0x32ab: "(Xue) " +0x32ac: "(Jian) " +0x32ad: "(Qi) " +0x32ae: "(Zi) " +0x32af: "(Xie) " +0x32b0: "(Ye) " +0x32b1: "[?]" +0x32b2: "[?]" +0x32b3: "[?]" +0x32b4: "[?]" +0x32b5: "[?]" +0x32b6: "[?]" +0x32b7: "[?]" +0x32b8: "[?]" +0x32b9: "[?]" +0x32ba: "[?]" +0x32bb: "[?]" +0x32bc: "[?]" +0x32bd: "[?]" +0x32be: "[?]" +0x32bf: "[?]" +0x32c0: "1M" +0x32c1: "2M" +0x32c2: "3M" +0x32c3: "4M" +0x32c4: "5M" +0x32c5: "6M" +0x32c6: "7M" +0x32c7: "8M" +0x32c8: "9M" +0x32c9: "10M" +0x32ca: "11M" +0x32cb: "12M" +0x32cc: "[?]" +0x32cd: "[?]" +0x32ce: "[?]" +0x32cf: "[?]" +0x32d0: "a" +0x32d1: "i" +0x32d2: "u" +0x32d3: "u" +0x32d4: "o" +0x32d5: "ka" +0x32d6: "ki" +0x32d7: "ku" +0x32d8: "ke" +0x32d9: "ko" +0x32da: "sa" +0x32db: "si" +0x32dc: "su" +0x32dd: "se" +0x32de: "so" +0x32df: "ta" +0x32e0: "ti" +0x32e1: "tu" +0x32e2: "te" +0x32e3: "to" +0x32e4: "na" +0x32e5: "ni" +0x32e6: "nu" +0x32e7: "ne" +0x32e8: "no" +0x32e9: "ha" +0x32ea: "hi" +0x32eb: "hu" +0x32ec: "he" +0x32ed: "ho" +0x32ee: "ma" +0x32ef: "mi" +0x32f0: "mu" +0x32f1: "me" +0x32f2: "mo" +0x32f3: "ya" +0x32f4: "yu" +0x32f5: "yo" +0x32f6: "ra" +0x32f7: "ri" +0x32f8: "ru" +0x32f9: "re" +0x32fa: "ro" +0x32fb: "wa" +0x32fc: "wi" +0x32fd: "we" +0x32fe: "wo" +/* x033 */ +0x3300: "apartment" +0x3301: "alpha" +0x3302: "ampere" +0x3303: "are" +0x3304: "inning" +0x3305: "inch" +0x3306: "won" +0x3307: "escudo" +0x3308: "acre" +0x3309: "ounce" +0x330a: "ohm" +0x330b: "kai-ri" +0x330c: "carat" +0x330d: "calorie" +0x330e: "gallon" +0x330f: "gamma" +0x3310: "giga" +0x3311: "guinea" +0x3312: "curie" +0x3313: "guilder" +0x3314: "kilo" +0x3315: "kilogram" +0x3316: "kilometer" +0x3317: "kilowatt" +0x3318: "gram" +0x3319: "gram ton" +0x331a: "cruzeiro" +0x331b: "krone" +0x331c: "case" +0x331d: "koruna" +0x331e: "co-op" +0x331f: "cycle" +0x3320: "centime" +0x3321: "shilling" +0x3322: "centi" +0x3323: "cent" +0x3324: "dozen" +0x3325: "desi" +0x3326: "dollar" +0x3327: "ton" +0x3328: "nano" +0x3329: "knot" +0x332a: "heights" +0x332b: "percent" +0x332c: "parts" +0x332d: "barrel" +0x332e: "piaster" +0x332f: "picul" +0x3330: "pico" +0x3331: "building" +0x3332: "farad" +0x3333: "feet" +0x3334: "bushel" +0x3335: "franc" +0x3336: "hectare" +0x3337: "peso" +0x3338: "pfennig" +0x3339: "hertz" +0x333a: "pence" +0x333b: "page" +0x333c: "beta" +0x333d: "point" +0x333e: "volt" +0x333f: "hon" +0x3340: "pound" +0x3341: "hall" +0x3342: "horn" +0x3343: "micro" +0x3344: "mile" +0x3345: "mach" +0x3346: "mark" +0x3347: "mansion" +0x3348: "micron" +0x3349: "milli" +0x334a: "millibar" +0x334b: "mega" +0x334c: "megaton" +0x334d: "meter" +0x334e: "yard" +0x334f: "yard" +0x3350: "yuan" +0x3351: "liter" +0x3352: "lira" +0x3353: "rupee" +0x3354: "ruble" +0x3355: "rem" +0x3356: "roentgen" +0x3357: "watt" +0x3358: "0h" +0x3359: "1h" +0x335a: "2h" +0x335b: "3h" +0x335c: "4h" +0x335d: "5h" +0x335e: "6h" +0x335f: "7h" +0x3360: "8h" +0x3361: "9h" +0x3362: "10h" +0x3363: "11h" +0x3364: "12h" +0x3365: "13h" +0x3366: "14h" +0x3367: "15h" +0x3368: "16h" +0x3369: "17h" +0x336a: "18h" +0x336b: "19h" +0x336c: "20h" +0x336d: "21h" +0x336e: "22h" +0x336f: "23h" +0x3370: "24h" +0x3371: "HPA" +0x3372: "da" +0x3373: "AU" +0x3374: "bar" +0x3375: "oV" +0x3376: "pc" +0x3377: "[?]" +0x3378: "[?]" +0x3379: "[?]" +0x337a: "[?]" +0x337b: "Heisei" +0x337c: "Syouwa" +0x337d: "Taisyou" +0x337e: "Meiji" +0x337f: "Inc." +0x3380: "pA" +0x3381: "nA" +0x3382: "microamp" +0x3383: "mA" +0x3384: "kA" +0x3385: "kB" +0x3386: "MB" +0x3387: "GB" +0x3388: "cal" +0x3389: "kcal" +0x338a: "pF" +0x338b: "nF" +0x338c: "microFarad" +0x338d: "microgram" +0x338e: "mg" +0x338f: "kg" +0x3390: "Hz" +0x3391: "kHz" +0x3392: "MHz" +0x3393: "GHz" +0x3394: "THz" +0x3395: "microliter" +0x3396: "ml" +0x3397: "dl" +0x3398: "kl" +0x3399: "fm" +0x339a: "nm" +0x339b: "micrometer" +0x339c: "mm" +0x339d: "cm" +0x339e: "km" +0x339f: "mm^2" +0x33a0: "cm^2" +0x33a1: "m^2" +0x33a2: "km^2" +0x33a3: "mm^4" +0x33a4: "cm^3" +0x33a5: "m^3" +0x33a6: "km^3" +0x33a7: "m/s" +0x33a8: "m/s^2" +0x33a9: "Pa" +0x33aa: "kPa" +0x33ab: "MPa" +0x33ac: "GPa" +0x33ad: "rad" +0x33ae: "rad/s" +0x33af: "rad/s^2" +0x33b0: "ps" +0x33b1: "ns" +0x33b2: "microsecond" +0x33b3: "ms" +0x33b4: "pV" +0x33b5: "nV" +0x33b6: "microvolt" +0x33b7: "mV" +0x33b8: "kV" +0x33b9: "MV" +0x33ba: "pW" +0x33bb: "nW" +0x33bc: "microwatt" +0x33bd: "mW" +0x33be: "kW" +0x33bf: "MW" +0x33c0: "kOhm" +0x33c1: "MOhm" +0x33c2: "a.m." +0x33c3: "Bq" +0x33c4: "cc" +0x33c5: "cd" +0x33c6: "C/kg" +0x33c7: "Co." +0x33c8: "dB" +0x33c9: "Gy" +0x33ca: "ha" +0x33cb: "HP" +0x33cc: "in" +0x33cd: "K.K." +0x33ce: "KM" +0x33cf: "kt" +0x33d0: "lm" +0x33d1: "ln" +0x33d2: "log" +0x33d3: "lx" +0x33d4: "mb" +0x33d5: "mil" +0x33d6: "mol" +0x33d7: "pH" +0x33d8: "p.m." +0x33d9: "PPM" +0x33da: "PR" +0x33db: "sr" +0x33dc: "Sv" +0x33dd: "Wb" +0x33de: "[?]" +0x33df: "[?]" +0x33e0: "1d" +0x33e1: "2d" +0x33e2: "3d" +0x33e3: "4d" +0x33e4: "5d" +0x33e5: "6d" +0x33e6: "7d" +0x33e7: "8d" +0x33e8: "9d" +0x33e9: "10d" +0x33ea: "11d" +0x33eb: "12d" +0x33ec: "13d" +0x33ed: "14d" +0x33ee: "15d" +0x33ef: "16d" +0x33f0: "17d" +0x33f1: "18d" +0x33f2: "19d" +0x33f3: "20d" +0x33f4: "21d" +0x33f5: "22d" +0x33f6: "23d" +0x33f7: "24d" +0x33f8: "25d" +0x33f9: "26d" +0x33fa: "27d" +0x33fb: "28d" +0x33fc: "29d" +0x33fd: "30d" +0x33fe: "31d" +/* x04d */ +0x4d00: "[?] " +0x4d01: "[?] " +0x4d02: "[?] " +0x4d03: "[?] " +0x4d04: "[?] " +0x4d05: "[?] " +0x4d06: "[?] " +0x4d07: "[?] " +0x4d08: "[?] " +0x4d09: "[?] " +0x4d0a: "[?] " +0x4d0b: "[?] " +0x4d0c: "[?] " +0x4d0d: "[?] " +0x4d0e: "[?] " +0x4d0f: "[?] " +0x4d10: "[?] " +0x4d11: "[?] " +0x4d12: "[?] " +0x4d13: "[?] " +0x4d14: "[?] " +0x4d15: "[?] " +0x4d16: "[?] " +0x4d17: "[?] " +0x4d18: "[?] " +0x4d19: "[?] " +0x4d1a: "[?] " +0x4d1b: "[?] " +0x4d1c: "[?] " +0x4d1d: "[?] " +0x4d1e: "[?] " +0x4d1f: "[?] " +0x4d20: "[?] " +0x4d21: "[?] " +0x4d22: "[?] " +0x4d23: "[?] " +0x4d24: "[?] " +0x4d25: "[?] " +0x4d26: "[?] " +0x4d27: "[?] " +0x4d28: "[?] " +0x4d29: "[?] " +0x4d2a: "[?] " +0x4d2b: "[?] " +0x4d2c: "[?] " +0x4d2d: "[?] " +0x4d2e: "[?] " +0x4d2f: "[?] " +0x4d30: "[?] " +0x4d31: "[?] " +0x4d32: "[?] " +0x4d33: "[?] " +0x4d34: "[?] " +0x4d35: "[?] " +0x4d36: "[?] " +0x4d37: "[?] " +0x4d38: "[?] " +0x4d39: "[?] " +0x4d3a: "[?] " +0x4d3b: "[?] " +0x4d3c: "[?] " +0x4d3d: "[?] " +0x4d3e: "[?] " +0x4d3f: "[?] " +0x4d40: "[?] " +0x4d41: "[?] " +0x4d42: "[?] " +0x4d43: "[?] " +0x4d44: "[?] " +0x4d45: "[?] " +0x4d46: "[?] " +0x4d47: "[?] " +0x4d48: "[?] " +0x4d49: "[?] " +0x4d4a: "[?] " +0x4d4b: "[?] " +0x4d4c: "[?] " +0x4d4d: "[?] " +0x4d4e: "[?] " +0x4d4f: "[?] " +0x4d50: "[?] " +0x4d51: "[?] " +0x4d52: "[?] " +0x4d53: "[?] " +0x4d54: "[?] " +0x4d55: "[?] " +0x4d56: "[?] " +0x4d57: "[?] " +0x4d58: "[?] " +0x4d59: "[?] " +0x4d5a: "[?] " +0x4d5b: "[?] " +0x4d5c: "[?] " +0x4d5d: "[?] " +0x4d5e: "[?] " +0x4d5f: "[?] " +0x4d60: "[?] " +0x4d61: "[?] " +0x4d62: "[?] " +0x4d63: "[?] " +0x4d64: "[?] " +0x4d65: "[?] " +0x4d66: "[?] " +0x4d67: "[?] " +0x4d68: "[?] " +0x4d69: "[?] " +0x4d6a: "[?] " +0x4d6b: "[?] " +0x4d6c: "[?] " +0x4d6d: "[?] " +0x4d6e: "[?] " +0x4d6f: "[?] " +0x4d70: "[?] " +0x4d71: "[?] " +0x4d72: "[?] " +0x4d73: "[?] " +0x4d74: "[?] " +0x4d75: "[?] " +0x4d76: "[?] " +0x4d77: "[?] " +0x4d78: "[?] " +0x4d79: "[?] " +0x4d7a: "[?] " +0x4d7b: "[?] " +0x4d7c: "[?] " +0x4d7d: "[?] " +0x4d7e: "[?] " +0x4d7f: "[?] " +0x4d80: "[?] " +0x4d81: "[?] " +0x4d82: "[?] " +0x4d83: "[?] " +0x4d84: "[?] " +0x4d85: "[?] " +0x4d86: "[?] " +0x4d87: "[?] " +0x4d88: "[?] " +0x4d89: "[?] " +0x4d8a: "[?] " +0x4d8b: "[?] " +0x4d8c: "[?] " +0x4d8d: "[?] " +0x4d8e: "[?] " +0x4d8f: "[?] " +0x4d90: "[?] " +0x4d91: "[?] " +0x4d92: "[?] " +0x4d93: "[?] " +0x4d94: "[?] " +0x4d95: "[?] " +0x4d96: "[?] " +0x4d97: "[?] " +0x4d98: "[?] " +0x4d99: "[?] " +0x4d9a: "[?] " +0x4d9b: "[?] " +0x4d9c: "[?] " +0x4d9d: "[?] " +0x4d9e: "[?] " +0x4d9f: "[?] " +0x4da0: "[?] " +0x4da1: "[?] " +0x4da2: "[?] " +0x4da3: "[?] " +0x4da4: "[?] " +0x4da5: "[?] " +0x4da6: "[?] " +0x4da7: "[?] " +0x4da8: "[?] " +0x4da9: "[?] " +0x4daa: "[?] " +0x4dab: "[?] " +0x4dac: "[?] " +0x4dad: "[?] " +0x4dae: "[?] " +0x4daf: "[?] " +0x4db0: "[?] " +0x4db1: "[?] " +0x4db2: "[?] " +0x4db3: "[?] " +0x4db4: "[?] " +0x4db5: "[?] " +0x4db6: "[?]" +0x4db7: "[?]" +0x4db8: "[?]" +0x4db9: "[?]" +0x4dba: "[?]" +0x4dbb: "[?]" +0x4dbc: "[?]" +0x4dbd: "[?]" +0x4dbe: "[?]" +0x4dbf: "[?]" +0x4dc0: "[?]" +0x4dc1: "[?]" +0x4dc2: "[?]" +0x4dc3: "[?]" +0x4dc4: "[?]" +0x4dc5: "[?]" +0x4dc6: "[?]" +0x4dc7: "[?]" +0x4dc8: "[?]" +0x4dc9: "[?]" +0x4dca: "[?]" +0x4dcb: "[?]" +0x4dcc: "[?]" +0x4dcd: "[?]" +0x4dce: "[?]" +0x4dcf: "[?]" +0x4dd0: "[?]" +0x4dd1: "[?]" +0x4dd2: "[?]" +0x4dd3: "[?]" +0x4dd4: "[?]" +0x4dd5: "[?]" +0x4dd6: "[?]" +0x4dd7: "[?]" +0x4dd8: "[?]" +0x4dd9: "[?]" +0x4dda: "[?]" +0x4ddb: "[?]" +0x4ddc: "[?]" +0x4ddd: "[?]" +0x4dde: "[?]" +0x4ddf: "[?]" +0x4de0: "[?]" +0x4de1: "[?]" +0x4de2: "[?]" +0x4de3: "[?]" +0x4de4: "[?]" +0x4de5: "[?]" +0x4de6: "[?]" +0x4de7: "[?]" +0x4de8: "[?]" +0x4de9: "[?]" +0x4dea: "[?]" +0x4deb: "[?]" +0x4dec: "[?]" +0x4ded: "[?]" +0x4dee: "[?]" +0x4def: "[?]" +0x4df0: "[?]" +0x4df1: "[?]" +0x4df2: "[?]" +0x4df3: "[?]" +0x4df4: "[?]" +0x4df5: "[?]" +0x4df6: "[?]" +0x4df7: "[?]" +0x4df8: "[?]" +0x4df9: "[?]" +0x4dfa: "[?]" +0x4dfb: "[?]" +0x4dfc: "[?]" +0x4dfd: "[?]" +0x4dfe: "[?]" +/* x04e */ +0x4e00: "[?] " +0x4e01: "Ding " +0x4e02: "Kao " +0x4e03: "Qi " +0x4e04: "Shang " +0x4e05: "Xia " +0x4e06: "[?] " +0x4e07: "Mo " +0x4e08: "Zhang " +0x4e09: "San " +0x4e0a: "Shang " +0x4e0b: "Xia " +0x4e0c: "Ji " +0x4e0d: "Bu " +0x4e0e: "Yu " +0x4e0f: "Mian " +0x4e10: "Gai " +0x4e11: "Chou " +0x4e12: "Chou " +0x4e13: "Zhuan " +0x4e14: "Qie " +0x4e15: "Pi " +0x4e16: "Shi " +0x4e17: "Shi " +0x4e18: "Qiu " +0x4e19: "Bing " +0x4e1a: "Ye " +0x4e1b: "Cong " +0x4e1c: "Dong " +0x4e1d: "Si " +0x4e1e: "Cheng " +0x4e1f: "Diu " +0x4e20: "Qiu " +0x4e21: "Liang " +0x4e22: "Diu " +0x4e23: "You " +0x4e24: "Liang " +0x4e25: "Yan " +0x4e26: "Bing " +0x4e27: "Sang " +0x4e28: "Gun " +0x4e29: "Jiu " +0x4e2a: "Ge " +0x4e2b: "Ya " +0x4e2c: "Qiang " +0x4e2d: "Zhong " +0x4e2e: "Ji " +0x4e2f: "Jie " +0x4e30: "Feng " +0x4e31: "Guan " +0x4e32: "Chuan " +0x4e33: "Chan " +0x4e34: "Lin " +0x4e35: "Zhuo " +0x4e36: "Zhu " +0x4e37: "Ha " +0x4e38: "Wan " +0x4e39: "Dan " +0x4e3a: "Wei " +0x4e3b: "Zhu " +0x4e3c: "Jing " +0x4e3d: "Li " +0x4e3e: "Ju " +0x4e3f: "Pie " +0x4e40: "Fu " +0x4e41: "Yi " +0x4e42: "Yi " +0x4e43: "Nai " +0x4e44: "Shime " +0x4e45: "Jiu " +0x4e46: "Jiu " +0x4e47: "Zhe " +0x4e48: "Yao " +0x4e49: "Yi " +0x4e4a: "[?] " +0x4e4b: "Zhi " +0x4e4c: "Wu " +0x4e4d: "Zha " +0x4e4e: "Hu " +0x4e4f: "Fa " +0x4e50: "Le " +0x4e51: "Zhong " +0x4e52: "Ping " +0x4e53: "Pang " +0x4e54: "Qiao " +0x4e55: "Hu " +0x4e56: "Guai " +0x4e57: "Cheng " +0x4e58: "Cheng " +0x4e59: "Yi " +0x4e5a: "Yin " +0x4e5b: "[?] " +0x4e5c: "Mie " +0x4e5d: "Jiu " +0x4e5e: "Qi " +0x4e5f: "Ye " +0x4e60: "Xi " +0x4e61: "Xiang " +0x4e62: "Gai " +0x4e63: "Diu " +0x4e64: "Hal " +0x4e65: "[?] " +0x4e66: "Shu " +0x4e67: "Twul " +0x4e68: "Shi " +0x4e69: "Ji " +0x4e6a: "Nang " +0x4e6b: "Jia " +0x4e6c: "Kel " +0x4e6d: "Shi " +0x4e6e: "[?] " +0x4e6f: "Ol " +0x4e70: "Mai " +0x4e71: "Luan " +0x4e72: "Cal " +0x4e73: "Ru " +0x4e74: "Xue " +0x4e75: "Yan " +0x4e76: "Fu " +0x4e77: "Sha " +0x4e78: "Na " +0x4e79: "Gan " +0x4e7a: "Sol " +0x4e7b: "El " +0x4e7c: "Cwul " +0x4e7d: "[?] " +0x4e7e: "Gan " +0x4e7f: "Chi " +0x4e80: "Gui " +0x4e81: "Gan " +0x4e82: "Luan " +0x4e83: "Lin " +0x4e84: "Yi " +0x4e85: "Jue " +0x4e86: "Liao " +0x4e87: "Ma " +0x4e88: "Yu " +0x4e89: "Zheng " +0x4e8a: "Shi " +0x4e8b: "Shi " +0x4e8c: "Er " +0x4e8d: "Chu " +0x4e8e: "Yu " +0x4e8f: "Yu " +0x4e90: "Yu " +0x4e91: "Yun " +0x4e92: "Hu " +0x4e93: "Qi " +0x4e94: "Wu " +0x4e95: "Jing " +0x4e96: "Si " +0x4e97: "Sui " +0x4e98: "Gen " +0x4e99: "Gen " +0x4e9a: "Ya " +0x4e9b: "Xie " +0x4e9c: "Ya " +0x4e9d: "Qi " +0x4e9e: "Ya " +0x4e9f: "Ji " +0x4ea0: "Tou " +0x4ea1: "Wang " +0x4ea2: "Kang " +0x4ea3: "Ta " +0x4ea4: "Jiao " +0x4ea5: "Hai " +0x4ea6: "Yi " +0x4ea7: "Chan " +0x4ea8: "Heng " +0x4ea9: "Mu " +0x4eaa: "[?] " +0x4eab: "Xiang " +0x4eac: "Jing " +0x4ead: "Ting " +0x4eae: "Liang " +0x4eaf: "Xiang " +0x4eb0: "Jing " +0x4eb1: "Ye " +0x4eb2: "Qin " +0x4eb3: "Bo " +0x4eb4: "You " +0x4eb5: "Xie " +0x4eb6: "Dan " +0x4eb7: "Lian " +0x4eb8: "Duo " +0x4eb9: "Wei " +0x4eba: "Ren " +0x4ebb: "Ren " +0x4ebc: "Ji " +0x4ebd: "La " +0x4ebe: "Wang " +0x4ebf: "Yi " +0x4ec0: "Shi " +0x4ec1: "Ren " +0x4ec2: "Le " +0x4ec3: "Ding " +0x4ec4: "Ze " +0x4ec5: "Jin " +0x4ec6: "Pu " +0x4ec7: "Chou " +0x4ec8: "Ba " +0x4ec9: "Zhang " +0x4eca: "Jin " +0x4ecb: "Jie " +0x4ecc: "Bing " +0x4ecd: "Reng " +0x4ece: "Cong " +0x4ecf: "Fo " +0x4ed0: "San " +0x4ed1: "Lun " +0x4ed2: "Sya " +0x4ed3: "Cang " +0x4ed4: "Zi " +0x4ed5: "Shi " +0x4ed6: "Ta " +0x4ed7: "Zhang " +0x4ed8: "Fu " +0x4ed9: "Xian " +0x4eda: "Xian " +0x4edb: "Tuo " +0x4edc: "Hong " +0x4edd: "Tong " +0x4ede: "Ren " +0x4edf: "Qian " +0x4ee0: "Gan " +0x4ee1: "Yi " +0x4ee2: "Di " +0x4ee3: "Dai " +0x4ee4: "Ling " +0x4ee5: "Yi " +0x4ee6: "Chao " +0x4ee7: "Chang " +0x4ee8: "Sa " +0x4ee9: "[?] " +0x4eea: "Yi " +0x4eeb: "Mu " +0x4eec: "Men " +0x4eed: "Ren " +0x4eee: "Jia " +0x4eef: "Chao " +0x4ef0: "Yang " +0x4ef1: "Qian " +0x4ef2: "Zhong " +0x4ef3: "Pi " +0x4ef4: "Wan " +0x4ef5: "Wu " +0x4ef6: "Jian " +0x4ef7: "Jie " +0x4ef8: "Yao " +0x4ef9: "Feng " +0x4efa: "Cang " +0x4efb: "Ren " +0x4efc: "Wang " +0x4efd: "Fen " +0x4efe: "Di " +0x4eff: "Fang " +/* x04f */ +0x4f00: "Zhong " +0x4f01: "Qi " +0x4f02: "Pei " +0x4f03: "Yu " +0x4f04: "Diao " +0x4f05: "Dun " +0x4f06: "Wen " +0x4f07: "Yi " +0x4f08: "Xin " +0x4f09: "Kang " +0x4f0a: "Yi " +0x4f0b: "Ji " +0x4f0c: "Ai " +0x4f0d: "Wu " +0x4f0e: "Ji " +0x4f0f: "Fu " +0x4f10: "Fa " +0x4f11: "Xiu " +0x4f12: "Jin " +0x4f13: "Bei " +0x4f14: "Dan " +0x4f15: "Fu " +0x4f16: "Tang " +0x4f17: "Zhong " +0x4f18: "You " +0x4f19: "Huo " +0x4f1a: "Hui " +0x4f1b: "Yu " +0x4f1c: "Cui " +0x4f1d: "Chuan " +0x4f1e: "San " +0x4f1f: "Wei " +0x4f20: "Chuan " +0x4f21: "Che " +0x4f22: "Ya " +0x4f23: "Xian " +0x4f24: "Shang " +0x4f25: "Chang " +0x4f26: "Lun " +0x4f27: "Cang " +0x4f28: "Xun " +0x4f29: "Xin " +0x4f2a: "Wei " +0x4f2b: "Zhu " +0x4f2c: "[?] " +0x4f2d: "Xuan " +0x4f2e: "Nu " +0x4f2f: "Bo " +0x4f30: "Gu " +0x4f31: "Ni " +0x4f32: "Ni " +0x4f33: "Xie " +0x4f34: "Ban " +0x4f35: "Xu " +0x4f36: "Ling " +0x4f37: "Zhou " +0x4f38: "Shen " +0x4f39: "Qu " +0x4f3a: "Si " +0x4f3b: "Beng " +0x4f3c: "Si " +0x4f3d: "Jia " +0x4f3e: "Pi " +0x4f3f: "Yi " +0x4f40: "Si " +0x4f41: "Ai " +0x4f42: "Zheng " +0x4f43: "Dian " +0x4f44: "Han " +0x4f45: "Mai " +0x4f46: "Dan " +0x4f47: "Zhu " +0x4f48: "Bu " +0x4f49: "Qu " +0x4f4a: "Bi " +0x4f4b: "Shao " +0x4f4c: "Ci " +0x4f4d: "Wei " +0x4f4e: "Di " +0x4f4f: "Zhu " +0x4f50: "Zuo " +0x4f51: "You " +0x4f52: "Yang " +0x4f53: "Ti " +0x4f54: "Zhan " +0x4f55: "He " +0x4f56: "Bi " +0x4f57: "Tuo " +0x4f58: "She " +0x4f59: "Yu " +0x4f5a: "Yi " +0x4f5b: "Fo " +0x4f5c: "Zuo " +0x4f5d: "Kou " +0x4f5e: "Ning " +0x4f5f: "Tong " +0x4f60: "Ni " +0x4f61: "Xuan " +0x4f62: "Qu " +0x4f63: "Yong " +0x4f64: "Wa " +0x4f65: "Qian " +0x4f66: "[?] " +0x4f67: "Ka " +0x4f68: "[?] " +0x4f69: "Pei " +0x4f6a: "Huai " +0x4f6b: "He " +0x4f6c: "Lao " +0x4f6d: "Xiang " +0x4f6e: "Ge " +0x4f6f: "Yang " +0x4f70: "Bai " +0x4f71: "Fa " +0x4f72: "Ming " +0x4f73: "Jia " +0x4f74: "Er " +0x4f75: "Bing " +0x4f76: "Ji " +0x4f77: "Hen " +0x4f78: "Huo " +0x4f79: "Gui " +0x4f7a: "Quan " +0x4f7b: "Tiao " +0x4f7c: "Jiao " +0x4f7d: "Ci " +0x4f7e: "Yi " +0x4f7f: "Shi " +0x4f80: "Xing " +0x4f81: "Shen " +0x4f82: "Tuo " +0x4f83: "Kan " +0x4f84: "Zhi " +0x4f85: "Gai " +0x4f86: "Lai " +0x4f87: "Yi " +0x4f88: "Chi " +0x4f89: "Kua " +0x4f8a: "Guang " +0x4f8b: "Li " +0x4f8c: "Yin " +0x4f8d: "Shi " +0x4f8e: "Mi " +0x4f8f: "Zhu " +0x4f90: "Xu " +0x4f91: "You " +0x4f92: "An " +0x4f93: "Lu " +0x4f94: "Mou " +0x4f95: "Er " +0x4f96: "Lun " +0x4f97: "Tong " +0x4f98: "Cha " +0x4f99: "Chi " +0x4f9a: "Xun " +0x4f9b: "Gong " +0x4f9c: "Zhou " +0x4f9d: "Yi " +0x4f9e: "Ru " +0x4f9f: "Jian " +0x4fa0: "Xia " +0x4fa1: "Jia " +0x4fa2: "Zai " +0x4fa3: "Lu " +0x4fa4: "Ko " +0x4fa5: "Jiao " +0x4fa6: "Zhen " +0x4fa7: "Ce " +0x4fa8: "Qiao " +0x4fa9: "Kuai " +0x4faa: "Chai " +0x4fab: "Ning " +0x4fac: "Nong " +0x4fad: "Jin " +0x4fae: "Wu " +0x4faf: "Hou " +0x4fb0: "Jiong " +0x4fb1: "Cheng " +0x4fb2: "Zhen " +0x4fb3: "Zuo " +0x4fb4: "Chou " +0x4fb5: "Qin " +0x4fb6: "Lu " +0x4fb7: "Ju " +0x4fb8: "Shu " +0x4fb9: "Ting " +0x4fba: "Shen " +0x4fbb: "Tuo " +0x4fbc: "Bo " +0x4fbd: "Nan " +0x4fbe: "Hao " +0x4fbf: "Bian " +0x4fc0: "Tui " +0x4fc1: "Yu " +0x4fc2: "Xi " +0x4fc3: "Cu " +0x4fc4: "E " +0x4fc5: "Qiu " +0x4fc6: "Xu " +0x4fc7: "Kuang " +0x4fc8: "Ku " +0x4fc9: "Wu " +0x4fca: "Jun " +0x4fcb: "Yi " +0x4fcc: "Fu " +0x4fcd: "Lang " +0x4fce: "Zu " +0x4fcf: "Qiao " +0x4fd0: "Li " +0x4fd1: "Yong " +0x4fd2: "Hun " +0x4fd3: "Jing " +0x4fd4: "Xian " +0x4fd5: "San " +0x4fd6: "Pai " +0x4fd7: "Su " +0x4fd8: "Fu " +0x4fd9: "Xi " +0x4fda: "Li " +0x4fdb: "Fu " +0x4fdc: "Ping " +0x4fdd: "Bao " +0x4fde: "Yu " +0x4fdf: "Si " +0x4fe0: "Xia " +0x4fe1: "Xin " +0x4fe2: "Xiu " +0x4fe3: "Yu " +0x4fe4: "Ti " +0x4fe5: "Che " +0x4fe6: "Chou " +0x4fe7: "[?] " +0x4fe8: "Yan " +0x4fe9: "Lia " +0x4fea: "Li " +0x4feb: "Lai " +0x4fec: "[?] " +0x4fed: "Jian " +0x4fee: "Xiu " +0x4fef: "Fu " +0x4ff0: "He " +0x4ff1: "Ju " +0x4ff2: "Xiao " +0x4ff3: "Pai " +0x4ff4: "Jian " +0x4ff5: "Biao " +0x4ff6: "Chu " +0x4ff7: "Fei " +0x4ff8: "Feng " +0x4ff9: "Ya " +0x4ffa: "An " +0x4ffb: "Bei " +0x4ffc: "Yu " +0x4ffd: "Xin " +0x4ffe: "Bi " +0x4fff: "Jian " +/* x050 */ +0x5000: "Chang " +0x5001: "Chi " +0x5002: "Bing " +0x5003: "Zan " +0x5004: "Yao " +0x5005: "Cui " +0x5006: "Lia " +0x5007: "Wan " +0x5008: "Lai " +0x5009: "Cang " +0x500a: "Zong " +0x500b: "Ge " +0x500c: "Guan " +0x500d: "Bei " +0x500e: "Tian " +0x500f: "Shu " +0x5010: "Shu " +0x5011: "Men " +0x5012: "Dao " +0x5013: "Tan " +0x5014: "Jue " +0x5015: "Chui " +0x5016: "Xing " +0x5017: "Peng " +0x5018: "Tang " +0x5019: "Hou " +0x501a: "Yi " +0x501b: "Qi " +0x501c: "Ti " +0x501d: "Gan " +0x501e: "Jing " +0x501f: "Jie " +0x5020: "Sui " +0x5021: "Chang " +0x5022: "Jie " +0x5023: "Fang " +0x5024: "Zhi " +0x5025: "Kong " +0x5026: "Juan " +0x5027: "Zong " +0x5028: "Ju " +0x5029: "Qian " +0x502a: "Ni " +0x502b: "Lun " +0x502c: "Zhuo " +0x502d: "Wei " +0x502e: "Luo " +0x502f: "Song " +0x5030: "Leng " +0x5031: "Hun " +0x5032: "Dong " +0x5033: "Zi " +0x5034: "Ben " +0x5035: "Wu " +0x5036: "Ju " +0x5037: "Nai " +0x5038: "Cai " +0x5039: "Jian " +0x503a: "Zhai " +0x503b: "Ye " +0x503c: "Zhi " +0x503d: "Sha " +0x503e: "Qing " +0x503f: "[?] " +0x5040: "Ying " +0x5041: "Cheng " +0x5042: "Jian " +0x5043: "Yan " +0x5044: "Nuan " +0x5045: "Zhong " +0x5046: "Chun " +0x5047: "Jia " +0x5048: "Jie " +0x5049: "Wei " +0x504a: "Yu " +0x504b: "Bing " +0x504c: "Ruo " +0x504d: "Ti " +0x504e: "Wei " +0x504f: "Pian " +0x5050: "Yan " +0x5051: "Feng " +0x5052: "Tang " +0x5053: "Wo " +0x5054: "E " +0x5055: "Xie " +0x5056: "Che " +0x5057: "Sheng " +0x5058: "Kan " +0x5059: "Di " +0x505a: "Zuo " +0x505b: "Cha " +0x505c: "Ting " +0x505d: "Bei " +0x505e: "Ye " +0x505f: "Huang " +0x5060: "Yao " +0x5061: "Zhan " +0x5062: "Chou " +0x5063: "Yan " +0x5064: "You " +0x5065: "Jian " +0x5066: "Xu " +0x5067: "Zha " +0x5068: "Ci " +0x5069: "Fu " +0x506a: "Bi " +0x506b: "Zhi " +0x506c: "Zong " +0x506d: "Mian " +0x506e: "Ji " +0x506f: "Yi " +0x5070: "Xie " +0x5071: "Xun " +0x5072: "Si " +0x5073: "Duan " +0x5074: "Ce " +0x5075: "Zhen " +0x5076: "Ou " +0x5077: "Tou " +0x5078: "Tou " +0x5079: "Bei " +0x507a: "Za " +0x507b: "Lu " +0x507c: "Jie " +0x507d: "Wei " +0x507e: "Fen " +0x507f: "Chang " +0x5080: "Gui " +0x5081: "Sou " +0x5082: "Zhi " +0x5083: "Su " +0x5084: "Xia " +0x5085: "Fu " +0x5086: "Yuan " +0x5087: "Rong " +0x5088: "Li " +0x5089: "Ru " +0x508a: "Yun " +0x508b: "Gou " +0x508c: "Ma " +0x508d: "Bang " +0x508e: "Dian " +0x508f: "Tang " +0x5090: "Hao " +0x5091: "Jie " +0x5092: "Xi " +0x5093: "Shan " +0x5094: "Qian " +0x5095: "Jue " +0x5096: "Cang " +0x5097: "Chu " +0x5098: "San " +0x5099: "Bei " +0x509a: "Xiao " +0x509b: "Yong " +0x509c: "Yao " +0x509d: "Tan " +0x509e: "Suo " +0x509f: "Yang " +0x50a0: "Fa " +0x50a1: "Bing " +0x50a2: "Jia " +0x50a3: "Dai " +0x50a4: "Zai " +0x50a5: "Tang " +0x50a6: "[?] " +0x50a7: "Bin " +0x50a8: "Chu " +0x50a9: "Nuo " +0x50aa: "Can " +0x50ab: "Lei " +0x50ac: "Cui " +0x50ad: "Yong " +0x50ae: "Zao " +0x50af: "Zong " +0x50b0: "Peng " +0x50b1: "Song " +0x50b2: "Ao " +0x50b3: "Chuan " +0x50b4: "Yu " +0x50b5: "Zhai " +0x50b6: "Cou " +0x50b7: "Shang " +0x50b8: "Qiang " +0x50b9: "Jing " +0x50ba: "Chi " +0x50bb: "Sha " +0x50bc: "Han " +0x50bd: "Zhang " +0x50be: "Qing " +0x50bf: "Yan " +0x50c0: "Di " +0x50c1: "Xi " +0x50c2: "Lu " +0x50c3: "Bei " +0x50c4: "Piao " +0x50c5: "Jin " +0x50c6: "Lian " +0x50c7: "Lu " +0x50c8: "Man " +0x50c9: "Qian " +0x50ca: "Xian " +0x50cb: "Tan " +0x50cc: "Ying " +0x50cd: "Dong " +0x50ce: "Zhuan " +0x50cf: "Xiang " +0x50d0: "Shan " +0x50d1: "Qiao " +0x50d2: "Jiong " +0x50d3: "Tui " +0x50d4: "Zun " +0x50d5: "Pu " +0x50d6: "Xi " +0x50d7: "Lao " +0x50d8: "Chang " +0x50d9: "Guang " +0x50da: "Liao " +0x50db: "Qi " +0x50dc: "Deng " +0x50dd: "Chan " +0x50de: "Wei " +0x50df: "Ji " +0x50e0: "Fan " +0x50e1: "Hui " +0x50e2: "Chuan " +0x50e3: "Jian " +0x50e4: "Dan " +0x50e5: "Jiao " +0x50e6: "Jiu " +0x50e7: "Seng " +0x50e8: "Fen " +0x50e9: "Xian " +0x50ea: "Jue " +0x50eb: "E " +0x50ec: "Jiao " +0x50ed: "Jian " +0x50ee: "Tong " +0x50ef: "Lin " +0x50f0: "Bo " +0x50f1: "Gu " +0x50f2: "[?] " +0x50f3: "Su " +0x50f4: "Xian " +0x50f5: "Jiang " +0x50f6: "Min " +0x50f7: "Ye " +0x50f8: "Jin " +0x50f9: "Jia " +0x50fa: "Qiao " +0x50fb: "Pi " +0x50fc: "Feng " +0x50fd: "Zhou " +0x50fe: "Ai " +0x50ff: "Sai " +/* x051 */ +0x5100: "Yi " +0x5101: "Jun " +0x5102: "Nong " +0x5103: "Chan " +0x5104: "Yi " +0x5105: "Dang " +0x5106: "Jing " +0x5107: "Xuan " +0x5108: "Kuai " +0x5109: "Jian " +0x510a: "Chu " +0x510b: "Dan " +0x510c: "Jiao " +0x510d: "Sha " +0x510e: "Zai " +0x510f: "[?] " +0x5110: "Bin " +0x5111: "An " +0x5112: "Ru " +0x5113: "Tai " +0x5114: "Chou " +0x5115: "Chai " +0x5116: "Lan " +0x5117: "Ni " +0x5118: "Jin " +0x5119: "Qian " +0x511a: "Meng " +0x511b: "Wu " +0x511c: "Ning " +0x511d: "Qiong " +0x511e: "Ni " +0x511f: "Chang " +0x5120: "Lie " +0x5121: "Lei " +0x5122: "Lu " +0x5123: "Kuang " +0x5124: "Bao " +0x5125: "Du " +0x5126: "Biao " +0x5127: "Zan " +0x5128: "Zhi " +0x5129: "Si " +0x512a: "You " +0x512b: "Hao " +0x512c: "Chen " +0x512d: "Chen " +0x512e: "Li " +0x512f: "Teng " +0x5130: "Wei " +0x5131: "Long " +0x5132: "Chu " +0x5133: "Chan " +0x5134: "Rang " +0x5135: "Shu " +0x5136: "Hui " +0x5137: "Li " +0x5138: "Luo " +0x5139: "Zan " +0x513a: "Nuo " +0x513b: "Tang " +0x513c: "Yan " +0x513d: "Lei " +0x513e: "Nang " +0x513f: "Er " +0x5140: "Wu " +0x5141: "Yun " +0x5142: "Zan " +0x5143: "Yuan " +0x5144: "Xiong " +0x5145: "Chong " +0x5146: "Zhao " +0x5147: "Xiong " +0x5148: "Xian " +0x5149: "Guang " +0x514a: "Dui " +0x514b: "Ke " +0x514c: "Dui " +0x514d: "Mian " +0x514e: "Tu " +0x514f: "Chang " +0x5150: "Er " +0x5151: "Dui " +0x5152: "Er " +0x5153: "Xin " +0x5154: "Tu " +0x5155: "Si " +0x5156: "Yan " +0x5157: "Yan " +0x5158: "Shi " +0x5159: "Shi " +0x515a: "Dang " +0x515b: "Qian " +0x515c: "Dou " +0x515d: "Fen " +0x515e: "Mao " +0x515f: "Shen " +0x5160: "Dou " +0x5161: "Bai " +0x5162: "Jing " +0x5163: "Li " +0x5164: "Huang " +0x5165: "Ru " +0x5166: "Wang " +0x5167: "Nei " +0x5168: "Quan " +0x5169: "Liang " +0x516a: "Yu " +0x516b: "Ba " +0x516c: "Gong " +0x516d: "Liu " +0x516e: "Xi " +0x516f: "[?] " +0x5170: "Lan " +0x5171: "Gong " +0x5172: "Tian " +0x5173: "Guan " +0x5174: "Xing " +0x5175: "Bing " +0x5176: "Qi " +0x5177: "Ju " +0x5178: "Dian " +0x5179: "Zi " +0x517a: "Ppwun " +0x517b: "Yang " +0x517c: "Jian " +0x517d: "Shou " +0x517e: "Ji " +0x517f: "Yi " +0x5180: "Ji " +0x5181: "Chan " +0x5182: "Jiong " +0x5183: "Mao " +0x5184: "Ran " +0x5185: "Nei " +0x5186: "Yuan " +0x5187: "Mao " +0x5188: "Gang " +0x5189: "Ran " +0x518a: "Ce " +0x518b: "Jiong " +0x518c: "Ce " +0x518d: "Zai " +0x518e: "Gua " +0x518f: "Jiong " +0x5190: "Mao " +0x5191: "Zhou " +0x5192: "Mou " +0x5193: "Gou " +0x5194: "Xu " +0x5195: "Mian " +0x5196: "Mi " +0x5197: "Rong " +0x5198: "Yin " +0x5199: "Xie " +0x519a: "Kan " +0x519b: "Jun " +0x519c: "Nong " +0x519d: "Yi " +0x519e: "Mi " +0x519f: "Shi " +0x51a0: "Guan " +0x51a1: "Meng " +0x51a2: "Zhong " +0x51a3: "Ju " +0x51a4: "Yuan " +0x51a5: "Ming " +0x51a6: "Kou " +0x51a7: "Lam " +0x51a8: "Fu " +0x51a9: "Xie " +0x51aa: "Mi " +0x51ab: "Bing " +0x51ac: "Dong " +0x51ad: "Tai " +0x51ae: "Gang " +0x51af: "Feng " +0x51b0: "Bing " +0x51b1: "Hu " +0x51b2: "Chong " +0x51b3: "Jue " +0x51b4: "Hu " +0x51b5: "Kuang " +0x51b6: "Ye " +0x51b7: "Leng " +0x51b8: "Pan " +0x51b9: "Fu " +0x51ba: "Min " +0x51bb: "Dong " +0x51bc: "Xian " +0x51bd: "Lie " +0x51be: "Xia " +0x51bf: "Jian " +0x51c0: "Jing " +0x51c1: "Shu " +0x51c2: "Mei " +0x51c3: "Tu " +0x51c4: "Qi " +0x51c5: "Gu " +0x51c6: "Zhun " +0x51c7: "Song " +0x51c8: "Jing " +0x51c9: "Liang " +0x51ca: "Qing " +0x51cb: "Diao " +0x51cc: "Ling " +0x51cd: "Dong " +0x51ce: "Gan " +0x51cf: "Jian " +0x51d0: "Yin " +0x51d1: "Cou " +0x51d2: "Yi " +0x51d3: "Li " +0x51d4: "Cang " +0x51d5: "Ming " +0x51d6: "Zhuen " +0x51d7: "Cui " +0x51d8: "Si " +0x51d9: "Duo " +0x51da: "Jin " +0x51db: "Lin " +0x51dc: "Lin " +0x51dd: "Ning " +0x51de: "Xi " +0x51df: "Du " +0x51e0: "Ji " +0x51e1: "Fan " +0x51e2: "Fan " +0x51e3: "Fan " +0x51e4: "Feng " +0x51e5: "Ju " +0x51e6: "Chu " +0x51e7: "Tako " +0x51e8: "Feng " +0x51e9: "Mok " +0x51ea: "Ci " +0x51eb: "Fu " +0x51ec: "Feng " +0x51ed: "Ping " +0x51ee: "Feng " +0x51ef: "Kai " +0x51f0: "Huang " +0x51f1: "Kai " +0x51f2: "Gan " +0x51f3: "Deng " +0x51f4: "Ping " +0x51f5: "Qu " +0x51f6: "Xiong " +0x51f7: "Kuai " +0x51f8: "Tu " +0x51f9: "Ao " +0x51fa: "Chu " +0x51fb: "Ji " +0x51fc: "Dang " +0x51fd: "Han " +0x51fe: "Han " +0x51ff: "Zao " +/* x052 */ +0x5200: "Dao " +0x5201: "Diao " +0x5202: "Dao " +0x5203: "Ren " +0x5204: "Ren " +0x5205: "Chuang " +0x5206: "Fen " +0x5207: "Qie " +0x5208: "Yi " +0x5209: "Ji " +0x520a: "Kan " +0x520b: "Qian " +0x520c: "Cun " +0x520d: "Chu " +0x520e: "Wen " +0x520f: "Ji " +0x5210: "Dan " +0x5211: "Xing " +0x5212: "Hua " +0x5213: "Wan " +0x5214: "Jue " +0x5215: "Li " +0x5216: "Yue " +0x5217: "Lie " +0x5218: "Liu " +0x5219: "Ze " +0x521a: "Gang " +0x521b: "Chuang " +0x521c: "Fu " +0x521d: "Chu " +0x521e: "Qu " +0x521f: "Ju " +0x5220: "Shan " +0x5221: "Min " +0x5222: "Ling " +0x5223: "Zhong " +0x5224: "Pan " +0x5225: "Bie " +0x5226: "Jie " +0x5227: "Jie " +0x5228: "Bao " +0x5229: "Li " +0x522a: "Shan " +0x522b: "Bie " +0x522c: "Chan " +0x522d: "Jing " +0x522e: "Gua " +0x522f: "Gen " +0x5230: "Dao " +0x5231: "Chuang " +0x5232: "Kui " +0x5233: "Ku " +0x5234: "Duo " +0x5235: "Er " +0x5236: "Zhi " +0x5237: "Shua " +0x5238: "Quan " +0x5239: "Cha " +0x523a: "Ci " +0x523b: "Ke " +0x523c: "Jie " +0x523d: "Gui " +0x523e: "Ci " +0x523f: "Gui " +0x5240: "Kai " +0x5241: "Duo " +0x5242: "Ji " +0x5243: "Ti " +0x5244: "Jing " +0x5245: "Lou " +0x5246: "Gen " +0x5247: "Ze " +0x5248: "Yuan " +0x5249: "Cuo " +0x524a: "Xue " +0x524b: "Ke " +0x524c: "La " +0x524d: "Qian " +0x524e: "Cha " +0x524f: "Chuang " +0x5250: "Gua " +0x5251: "Jian " +0x5252: "Cuo " +0x5253: "Li " +0x5254: "Ti " +0x5255: "Fei " +0x5256: "Pou " +0x5257: "Chan " +0x5258: "Qi " +0x5259: "Chuang " +0x525a: "Zi " +0x525b: "Gang " +0x525c: "Wan " +0x525d: "Bo " +0x525e: "Ji " +0x525f: "Duo " +0x5260: "Qing " +0x5261: "Yan " +0x5262: "Zhuo " +0x5263: "Jian " +0x5264: "Ji " +0x5265: "Bo " +0x5266: "Yan " +0x5267: "Ju " +0x5268: "Huo " +0x5269: "Sheng " +0x526a: "Jian " +0x526b: "Duo " +0x526c: "Duan " +0x526d: "Wu " +0x526e: "Gua " +0x526f: "Fu " +0x5270: "Sheng " +0x5271: "Jian " +0x5272: "Ge " +0x5273: "Zha " +0x5274: "Kai " +0x5275: "Chuang " +0x5276: "Juan " +0x5277: "Chan " +0x5278: "Tuan " +0x5279: "Lu " +0x527a: "Li " +0x527b: "Fou " +0x527c: "Shan " +0x527d: "Piao " +0x527e: "Kou " +0x527f: "Jiao " +0x5280: "Gua " +0x5281: "Qiao " +0x5282: "Jue " +0x5283: "Hua " +0x5284: "Zha " +0x5285: "Zhuo " +0x5286: "Lian " +0x5287: "Ju " +0x5288: "Pi " +0x5289: "Liu " +0x528a: "Gui " +0x528b: "Jiao " +0x528c: "Gui " +0x528d: "Jian " +0x528e: "Jian " +0x528f: "Tang " +0x5290: "Huo " +0x5291: "Ji " +0x5292: "Jian " +0x5293: "Yi " +0x5294: "Jian " +0x5295: "Zhi " +0x5296: "Chan " +0x5297: "Cuan " +0x5298: "Mo " +0x5299: "Li " +0x529a: "Zhu " +0x529b: "Li " +0x529c: "Ya " +0x529d: "Quan " +0x529e: "Ban " +0x529f: "Gong " +0x52a0: "Jia " +0x52a1: "Wu " +0x52a2: "Mai " +0x52a3: "Lie " +0x52a4: "Jin " +0x52a5: "Keng " +0x52a6: "Xie " +0x52a7: "Zhi " +0x52a8: "Dong " +0x52a9: "Zhu " +0x52aa: "Nu " +0x52ab: "Jie " +0x52ac: "Qu " +0x52ad: "Shao " +0x52ae: "Yi " +0x52af: "Zhu " +0x52b0: "Miao " +0x52b1: "Li " +0x52b2: "Jing " +0x52b3: "Lao " +0x52b4: "Lao " +0x52b5: "Juan " +0x52b6: "Kou " +0x52b7: "Yang " +0x52b8: "Wa " +0x52b9: "Xiao " +0x52ba: "Mou " +0x52bb: "Kuang " +0x52bc: "Jie " +0x52bd: "Lie " +0x52be: "He " +0x52bf: "Shi " +0x52c0: "Ke " +0x52c1: "Jing " +0x52c2: "Hao " +0x52c3: "Bo " +0x52c4: "Min " +0x52c5: "Chi " +0x52c6: "Lang " +0x52c7: "Yong " +0x52c8: "Yong " +0x52c9: "Mian " +0x52ca: "Ke " +0x52cb: "Xun " +0x52cc: "Juan " +0x52cd: "Qing " +0x52ce: "Lu " +0x52cf: "Pou " +0x52d0: "Meng " +0x52d1: "Lai " +0x52d2: "Le " +0x52d3: "Kai " +0x52d4: "Mian " +0x52d5: "Dong " +0x52d6: "Xu " +0x52d7: "Xu " +0x52d8: "Kan " +0x52d9: "Wu " +0x52da: "Yi " +0x52db: "Xun " +0x52dc: "Weng " +0x52dd: "Sheng " +0x52de: "Lao " +0x52df: "Mu " +0x52e0: "Lu " +0x52e1: "Piao " +0x52e2: "Shi " +0x52e3: "Ji " +0x52e4: "Qin " +0x52e5: "Qiang " +0x52e6: "Jiao " +0x52e7: "Quan " +0x52e8: "Yang " +0x52e9: "Yi " +0x52ea: "Jue " +0x52eb: "Fan " +0x52ec: "Juan " +0x52ed: "Tong " +0x52ee: "Ju " +0x52ef: "Dan " +0x52f0: "Xie " +0x52f1: "Mai " +0x52f2: "Xun " +0x52f3: "Xun " +0x52f4: "Lu " +0x52f5: "Li " +0x52f6: "Che " +0x52f7: "Rang " +0x52f8: "Quan " +0x52f9: "Bao " +0x52fa: "Shao " +0x52fb: "Yun " +0x52fc: "Jiu " +0x52fd: "Bao " +0x52fe: "Gou " +0x52ff: "Wu " +/* x053 */ +0x5300: "Yun " +0x5301: "Mwun " +0x5302: "Nay " +0x5303: "Gai " +0x5304: "Gai " +0x5305: "Bao " +0x5306: "Cong " +0x5307: "[?] " +0x5308: "Xiong " +0x5309: "Peng " +0x530a: "Ju " +0x530b: "Tao " +0x530c: "Ge " +0x530d: "Pu " +0x530e: "An " +0x530f: "Pao " +0x5310: "Fu " +0x5311: "Gong " +0x5312: "Da " +0x5313: "Jiu " +0x5314: "Qiong " +0x5315: "Bi " +0x5316: "Hua " +0x5317: "Bei " +0x5318: "Nao " +0x5319: "Chi " +0x531a: "Fang " +0x531b: "Jiu " +0x531c: "Yi " +0x531d: "Za " +0x531e: "Jiang " +0x531f: "Kang " +0x5320: "Jiang " +0x5321: "Kuang " +0x5322: "Hu " +0x5323: "Xia " +0x5324: "Qu " +0x5325: "Bian " +0x5326: "Gui " +0x5327: "Qie " +0x5328: "Zang " +0x5329: "Kuang " +0x532a: "Fei " +0x532b: "Hu " +0x532c: "Tou " +0x532d: "Gui " +0x532e: "Gui " +0x532f: "Hui " +0x5330: "Dan " +0x5331: "Gui " +0x5332: "Lian " +0x5333: "Lian " +0x5334: "Suan " +0x5335: "Du " +0x5336: "Jiu " +0x5337: "Qu " +0x5338: "Xi " +0x5339: "Pi " +0x533a: "Qu " +0x533b: "Yi " +0x533c: "Qia " +0x533d: "Yan " +0x533e: "Bian " +0x533f: "Ni " +0x5340: "Qu " +0x5341: "Shi " +0x5342: "Xin " +0x5343: "Qian " +0x5344: "Nian " +0x5345: "Sa " +0x5346: "Zu " +0x5347: "Sheng " +0x5348: "Wu " +0x5349: "Hui " +0x534a: "Ban " +0x534b: "Shi " +0x534c: "Xi " +0x534d: "Wan " +0x534e: "Hua " +0x534f: "Xie " +0x5350: "Wan " +0x5351: "Bei " +0x5352: "Zu " +0x5353: "Zhuo " +0x5354: "Xie " +0x5355: "Dan " +0x5356: "Mai " +0x5357: "Nan " +0x5358: "Dan " +0x5359: "Ji " +0x535a: "Bo " +0x535b: "Shuai " +0x535c: "Bu " +0x535d: "Kuang " +0x535e: "Bian " +0x535f: "Bu " +0x5360: "Zhan " +0x5361: "Qia " +0x5362: "Lu " +0x5363: "You " +0x5364: "Lu " +0x5365: "Xi " +0x5366: "Gua " +0x5367: "Wo " +0x5368: "Xie " +0x5369: "Jie " +0x536a: "Jie " +0x536b: "Wei " +0x536c: "Ang " +0x536d: "Qiong " +0x536e: "Zhi " +0x536f: "Mao " +0x5370: "Yin " +0x5371: "Wei " +0x5372: "Shao " +0x5373: "Ji " +0x5374: "Que " +0x5375: "Luan " +0x5376: "Shi " +0x5377: "Juan " +0x5378: "Xie " +0x5379: "Xu " +0x537a: "Jin " +0x537b: "Que " +0x537c: "Wu " +0x537d: "Ji " +0x537e: "E " +0x537f: "Qing " +0x5380: "Xi " +0x5381: "[?] " +0x5382: "Han " +0x5383: "Zhan " +0x5384: "E " +0x5385: "Ting " +0x5386: "Li " +0x5387: "Zhe " +0x5388: "Han " +0x5389: "Li " +0x538a: "Ya " +0x538b: "Ya " +0x538c: "Yan " +0x538d: "She " +0x538e: "Zhi " +0x538f: "Zha " +0x5390: "Pang " +0x5391: "[?] " +0x5392: "He " +0x5393: "Ya " +0x5394: "Zhi " +0x5395: "Ce " +0x5396: "Pang " +0x5397: "Ti " +0x5398: "Li " +0x5399: "She " +0x539a: "Hou " +0x539b: "Ting " +0x539c: "Zui " +0x539d: "Cuo " +0x539e: "Fei " +0x539f: "Yuan " +0x53a0: "Ce " +0x53a1: "Yuan " +0x53a2: "Xiang " +0x53a3: "Yan " +0x53a4: "Li " +0x53a5: "Jue " +0x53a6: "Sha " +0x53a7: "Dian " +0x53a8: "Chu " +0x53a9: "Jiu " +0x53aa: "Qin " +0x53ab: "Ao " +0x53ac: "Gui " +0x53ad: "Yan " +0x53ae: "Si " +0x53af: "Li " +0x53b0: "Chang " +0x53b1: "Lan " +0x53b2: "Li " +0x53b3: "Yan " +0x53b4: "Yan " +0x53b5: "Yuan " +0x53b6: "Si " +0x53b7: "Gong " +0x53b8: "Lin " +0x53b9: "Qiu " +0x53ba: "Qu " +0x53bb: "Qu " +0x53bc: "Uk " +0x53bd: "Lei " +0x53be: "Du " +0x53bf: "Xian " +0x53c0: "Zhuan " +0x53c1: "San " +0x53c2: "Can " +0x53c3: "Can " +0x53c4: "Can " +0x53c5: "Can " +0x53c6: "Ai " +0x53c7: "Dai " +0x53c8: "You " +0x53c9: "Cha " +0x53ca: "Ji " +0x53cb: "You " +0x53cc: "Shuang " +0x53cd: "Fan " +0x53ce: "Shou " +0x53cf: "Guai " +0x53d0: "Ba " +0x53d1: "Fa " +0x53d2: "Ruo " +0x53d3: "Shi " +0x53d4: "Shu " +0x53d5: "Zhuo " +0x53d6: "Qu " +0x53d7: "Shou " +0x53d8: "Bian " +0x53d9: "Xu " +0x53da: "Jia " +0x53db: "Pan " +0x53dc: "Sou " +0x53dd: "Gao " +0x53de: "Wei " +0x53df: "Sou " +0x53e0: "Die " +0x53e1: "Rui " +0x53e2: "Cong " +0x53e3: "Kou " +0x53e4: "Gu " +0x53e5: "Ju " +0x53e6: "Ling " +0x53e7: "Gua " +0x53e8: "Tao " +0x53e9: "Kou " +0x53ea: "Zhi " +0x53eb: "Jiao " +0x53ec: "Zhao " +0x53ed: "Ba " +0x53ee: "Ding " +0x53ef: "Ke " +0x53f0: "Tai " +0x53f1: "Chi " +0x53f2: "Shi " +0x53f3: "You " +0x53f4: "Qiu " +0x53f5: "Po " +0x53f6: "Xie " +0x53f7: "Hao " +0x53f8: "Si " +0x53f9: "Tan " +0x53fa: "Chi " +0x53fb: "Le " +0x53fc: "Diao " +0x53fd: "Ji " +0x53fe: "[?] " +0x53ff: "Hong " +/* x054 */ +0x5400: "Mie " +0x5401: "Xu " +0x5402: "Mang " +0x5403: "Chi " +0x5404: "Ge " +0x5405: "Xuan " +0x5406: "Yao " +0x5407: "Zi " +0x5408: "He " +0x5409: "Ji " +0x540a: "Diao " +0x540b: "Cun " +0x540c: "Tong " +0x540d: "Ming " +0x540e: "Hou " +0x540f: "Li " +0x5410: "Tu " +0x5411: "Xiang " +0x5412: "Zha " +0x5413: "Xia " +0x5414: "Ye " +0x5415: "Lu " +0x5416: "A " +0x5417: "Ma " +0x5418: "Ou " +0x5419: "Xue " +0x541a: "Yi " +0x541b: "Jun " +0x541c: "Chou " +0x541d: "Lin " +0x541e: "Tun " +0x541f: "Yin " +0x5420: "Fei " +0x5421: "Bi " +0x5422: "Qin " +0x5423: "Qin " +0x5424: "Jie " +0x5425: "Bu " +0x5426: "Fou " +0x5427: "Ba " +0x5428: "Dun " +0x5429: "Fen " +0x542a: "E " +0x542b: "Han " +0x542c: "Ting " +0x542d: "Hang " +0x542e: "Shun " +0x542f: "Qi " +0x5430: "Hong " +0x5431: "Zhi " +0x5432: "Shen " +0x5433: "Wu " +0x5434: "Wu " +0x5435: "Chao " +0x5436: "Ne " +0x5437: "Xue " +0x5438: "Xi " +0x5439: "Chui " +0x543a: "Dou " +0x543b: "Wen " +0x543c: "Hou " +0x543d: "Ou " +0x543e: "Wu " +0x543f: "Gao " +0x5440: "Ya " +0x5441: "Jun " +0x5442: "Lu " +0x5443: "E " +0x5444: "Ge " +0x5445: "Mei " +0x5446: "Ai " +0x5447: "Qi " +0x5448: "Cheng " +0x5449: "Wu " +0x544a: "Gao " +0x544b: "Fu " +0x544c: "Jiao " +0x544d: "Hong " +0x544e: "Chi " +0x544f: "Sheng " +0x5450: "Ne " +0x5451: "Tun " +0x5452: "Fu " +0x5453: "Yi " +0x5454: "Dai " +0x5455: "Ou " +0x5456: "Li " +0x5457: "Bai " +0x5458: "Yuan " +0x5459: "Kuai " +0x545a: "[?] " +0x545b: "Qiang " +0x545c: "Wu " +0x545d: "E " +0x545e: "Shi " +0x545f: "Quan " +0x5460: "Pen " +0x5461: "Wen " +0x5462: "Ni " +0x5463: "M " +0x5464: "Ling " +0x5465: "Ran " +0x5466: "You " +0x5467: "Di " +0x5468: "Zhou " +0x5469: "Shi " +0x546a: "Zhou " +0x546b: "Tie " +0x546c: "Xi " +0x546d: "Yi " +0x546e: "Qi " +0x546f: "Ping " +0x5470: "Zi " +0x5471: "Gu " +0x5472: "Zi " +0x5473: "Wei " +0x5474: "Xu " +0x5475: "He " +0x5476: "Nao " +0x5477: "Xia " +0x5478: "Pei " +0x5479: "Yi " +0x547a: "Xiao " +0x547b: "Shen " +0x547c: "Hu " +0x547d: "Ming " +0x547e: "Da " +0x547f: "Qu " +0x5480: "Ju " +0x5481: "Gem " +0x5482: "Za " +0x5483: "Tuo " +0x5484: "Duo " +0x5485: "Pou " +0x5486: "Pao " +0x5487: "Bi " +0x5488: "Fu " +0x5489: "Yang " +0x548a: "He " +0x548b: "Zha " +0x548c: "He " +0x548d: "Hai " +0x548e: "Jiu " +0x548f: "Yong " +0x5490: "Fu " +0x5491: "Que " +0x5492: "Zhou " +0x5493: "Wa " +0x5494: "Ka " +0x5495: "Gu " +0x5496: "Ka " +0x5497: "Zuo " +0x5498: "Bu " +0x5499: "Long " +0x549a: "Dong " +0x549b: "Ning " +0x549c: "Tha " +0x549d: "Si " +0x549e: "Xian " +0x549f: "Huo " +0x54a0: "Qi " +0x54a1: "Er " +0x54a2: "E " +0x54a3: "Guang " +0x54a4: "Zha " +0x54a5: "Xi " +0x54a6: "Yi " +0x54a7: "Lie " +0x54a8: "Zi " +0x54a9: "Mie " +0x54aa: "Mi " +0x54ab: "Zhi " +0x54ac: "Yao " +0x54ad: "Ji " +0x54ae: "Zhou " +0x54af: "Ge " +0x54b0: "Shuai " +0x54b1: "Zan " +0x54b2: "Xiao " +0x54b3: "Ke " +0x54b4: "Hui " +0x54b5: "Kua " +0x54b6: "Huai " +0x54b7: "Tao " +0x54b8: "Xian " +0x54b9: "E " +0x54ba: "Xuan " +0x54bb: "Xiu " +0x54bc: "Wai " +0x54bd: "Yan " +0x54be: "Lao " +0x54bf: "Yi " +0x54c0: "Ai " +0x54c1: "Pin " +0x54c2: "Shen " +0x54c3: "Tong " +0x54c4: "Hong " +0x54c5: "Xiong " +0x54c6: "Chi " +0x54c7: "Wa " +0x54c8: "Ha " +0x54c9: "Zai " +0x54ca: "Yu " +0x54cb: "Di " +0x54cc: "Pai " +0x54cd: "Xiang " +0x54ce: "Ai " +0x54cf: "Hen " +0x54d0: "Kuang " +0x54d1: "Ya " +0x54d2: "Da " +0x54d3: "Xiao " +0x54d4: "Bi " +0x54d5: "Yue " +0x54d6: "[?] " +0x54d7: "Hua " +0x54d8: "Sasou " +0x54d9: "Kuai " +0x54da: "Duo " +0x54db: "[?] " +0x54dc: "Ji " +0x54dd: "Nong " +0x54de: "Mou " +0x54df: "Yo " +0x54e0: "Hao " +0x54e1: "Yuan " +0x54e2: "Long " +0x54e3: "Pou " +0x54e4: "Mang " +0x54e5: "Ge " +0x54e6: "E " +0x54e7: "Chi " +0x54e8: "Shao " +0x54e9: "Li " +0x54ea: "Na " +0x54eb: "Zu " +0x54ec: "He " +0x54ed: "Ku " +0x54ee: "Xiao " +0x54ef: "Xian " +0x54f0: "Lao " +0x54f1: "Bo " +0x54f2: "Zhe " +0x54f3: "Zha " +0x54f4: "Liang " +0x54f5: "Ba " +0x54f6: "Mie " +0x54f7: "Le " +0x54f8: "Sui " +0x54f9: "Fou " +0x54fa: "Bu " +0x54fb: "Han " +0x54fc: "Heng " +0x54fd: "Geng " +0x54fe: "Shuo " +0x54ff: "Ge " +/* x055 */ +0x5500: "You " +0x5501: "Yan " +0x5502: "Gu " +0x5503: "Gu " +0x5504: "Bai " +0x5505: "Han " +0x5506: "Suo " +0x5507: "Chun " +0x5508: "Yi " +0x5509: "Ai " +0x550a: "Jia " +0x550b: "Tu " +0x550c: "Xian " +0x550d: "Huan " +0x550e: "Li " +0x550f: "Xi " +0x5510: "Tang " +0x5511: "Zuo " +0x5512: "Qiu " +0x5513: "Che " +0x5514: "Wu " +0x5515: "Zao " +0x5516: "Ya " +0x5517: "Dou " +0x5518: "Qi " +0x5519: "Di " +0x551a: "Qin " +0x551b: "Ma " +0x551c: "Mal " +0x551d: "Hong " +0x551e: "Dou " +0x551f: "Kes " +0x5520: "Lao " +0x5521: "Liang " +0x5522: "Suo " +0x5523: "Zao " +0x5524: "Huan " +0x5525: "Lang " +0x5526: "Sha " +0x5527: "Ji " +0x5528: "Zuo " +0x5529: "Wo " +0x552a: "Feng " +0x552b: "Yin " +0x552c: "Hu " +0x552d: "Qi " +0x552e: "Shou " +0x552f: "Wei " +0x5530: "Shua " +0x5531: "Chang " +0x5532: "Er " +0x5533: "Li " +0x5534: "Qiang " +0x5535: "An " +0x5536: "Jie " +0x5537: "Yo " +0x5538: "Nian " +0x5539: "Yu " +0x553a: "Tian " +0x553b: "Lai " +0x553c: "Sha " +0x553d: "Xi " +0x553e: "Tuo " +0x553f: "Hu " +0x5540: "Ai " +0x5541: "Zhou " +0x5542: "Nou " +0x5543: "Ken " +0x5544: "Zhuo " +0x5545: "Zhuo " +0x5546: "Shang " +0x5547: "Di " +0x5548: "Heng " +0x5549: "Lan " +0x554a: "A " +0x554b: "Xiao " +0x554c: "Xiang " +0x554d: "Tun " +0x554e: "Wu " +0x554f: "Wen " +0x5550: "Cui " +0x5551: "Sha " +0x5552: "Hu " +0x5553: "Qi " +0x5554: "Qi " +0x5555: "Tao " +0x5556: "Dan " +0x5557: "Dan " +0x5558: "Ye " +0x5559: "Zi " +0x555a: "Bi " +0x555b: "Cui " +0x555c: "Chuo " +0x555d: "He " +0x555e: "Ya " +0x555f: "Qi " +0x5560: "Zhe " +0x5561: "Pei " +0x5562: "Liang " +0x5563: "Xian " +0x5564: "Pi " +0x5565: "Sha " +0x5566: "La " +0x5567: "Ze " +0x5568: "Qing " +0x5569: "Gua " +0x556a: "Pa " +0x556b: "Zhe " +0x556c: "Se " +0x556d: "Zhuan " +0x556e: "Nie " +0x556f: "Guo " +0x5570: "Luo " +0x5571: "Yan " +0x5572: "Di " +0x5573: "Quan " +0x5574: "Tan " +0x5575: "Bo " +0x5576: "Ding " +0x5577: "Lang " +0x5578: "Xiao " +0x5579: "[?] " +0x557a: "Tang " +0x557b: "Chi " +0x557c: "Ti " +0x557d: "An " +0x557e: "Jiu " +0x557f: "Dan " +0x5580: "Ke " +0x5581: "Yong " +0x5582: "Wei " +0x5583: "Nan " +0x5584: "Shan " +0x5585: "Yu " +0x5586: "Zhe " +0x5587: "La " +0x5588: "Jie " +0x5589: "Hou " +0x558a: "Han " +0x558b: "Die " +0x558c: "Zhou " +0x558d: "Chai " +0x558e: "Wai " +0x558f: "Re " +0x5590: "Yu " +0x5591: "Yin " +0x5592: "Zan " +0x5593: "Yao " +0x5594: "Wo " +0x5595: "Mian " +0x5596: "Hu " +0x5597: "Yun " +0x5598: "Chuan " +0x5599: "Hui " +0x559a: "Huan " +0x559b: "Huan " +0x559c: "Xi " +0x559d: "He " +0x559e: "Ji " +0x559f: "Kui " +0x55a0: "Zhong " +0x55a1: "Wei " +0x55a2: "Sha " +0x55a3: "Xu " +0x55a4: "Huang " +0x55a5: "Du " +0x55a6: "Nie " +0x55a7: "Xuan " +0x55a8: "Liang " +0x55a9: "Yu " +0x55aa: "Sang " +0x55ab: "Chi " +0x55ac: "Qiao " +0x55ad: "Yan " +0x55ae: "Dan " +0x55af: "Pen " +0x55b0: "Can " +0x55b1: "Li " +0x55b2: "Yo " +0x55b3: "Zha " +0x55b4: "Wei " +0x55b5: "Miao " +0x55b6: "Ying " +0x55b7: "Pen " +0x55b8: "Phos " +0x55b9: "Kui " +0x55ba: "Xi " +0x55bb: "Yu " +0x55bc: "Jie " +0x55bd: "Lou " +0x55be: "Ku " +0x55bf: "Sao " +0x55c0: "Huo " +0x55c1: "Ti " +0x55c2: "Yao " +0x55c3: "He " +0x55c4: "A " +0x55c5: "Xiu " +0x55c6: "Qiang " +0x55c7: "Se " +0x55c8: "Yong " +0x55c9: "Su " +0x55ca: "Hong " +0x55cb: "Xie " +0x55cc: "Yi " +0x55cd: "Suo " +0x55ce: "Ma " +0x55cf: "Cha " +0x55d0: "Hai " +0x55d1: "Ke " +0x55d2: "Ta " +0x55d3: "Sang " +0x55d4: "Tian " +0x55d5: "Ru " +0x55d6: "Sou " +0x55d7: "Wa " +0x55d8: "Ji " +0x55d9: "Pang " +0x55da: "Wu " +0x55db: "Xian " +0x55dc: "Shi " +0x55dd: "Ge " +0x55de: "Zi " +0x55df: "Jie " +0x55e0: "Luo " +0x55e1: "Weng " +0x55e2: "Wa " +0x55e3: "Si " +0x55e4: "Chi " +0x55e5: "Hao " +0x55e6: "Suo " +0x55e7: "Jia " +0x55e8: "Hai " +0x55e9: "Suo " +0x55ea: "Qin " +0x55eb: "Nie " +0x55ec: "He " +0x55ed: "Cis " +0x55ee: "Sai " +0x55ef: "Ng " +0x55f0: "Ge " +0x55f1: "Na " +0x55f2: "Dia " +0x55f3: "Ai " +0x55f4: "[?] " +0x55f5: "Tong " +0x55f6: "Bi " +0x55f7: "Ao " +0x55f8: "Ao " +0x55f9: "Lian " +0x55fa: "Cui " +0x55fb: "Zhe " +0x55fc: "Mo " +0x55fd: "Sou " +0x55fe: "Sou " +0x55ff: "Tan " +/* x056 */ +0x5600: "Di " +0x5601: "Qi " +0x5602: "Jiao " +0x5603: "Chong " +0x5604: "Jiao " +0x5605: "Kai " +0x5606: "Tan " +0x5607: "San " +0x5608: "Cao " +0x5609: "Jia " +0x560a: "Ai " +0x560b: "Xiao " +0x560c: "Piao " +0x560d: "Lou " +0x560e: "Ga " +0x560f: "Gu " +0x5610: "Xiao " +0x5611: "Hu " +0x5612: "Hui " +0x5613: "Guo " +0x5614: "Ou " +0x5615: "Xian " +0x5616: "Ze " +0x5617: "Chang " +0x5618: "Xu " +0x5619: "Po " +0x561a: "De " +0x561b: "Ma " +0x561c: "Ma " +0x561d: "Hu " +0x561e: "Lei " +0x561f: "Du " +0x5620: "Ga " +0x5621: "Tang " +0x5622: "Ye " +0x5623: "Beng " +0x5624: "Ying " +0x5625: "Saai " +0x5626: "Jiao " +0x5627: "Mi " +0x5628: "Xiao " +0x5629: "Hua " +0x562a: "Mai " +0x562b: "Ran " +0x562c: "Zuo " +0x562d: "Peng " +0x562e: "Lao " +0x562f: "Xiao " +0x5630: "Ji " +0x5631: "Zhu " +0x5632: "Chao " +0x5633: "Kui " +0x5634: "Zui " +0x5635: "Xiao " +0x5636: "Si " +0x5637: "Hao " +0x5638: "Fu " +0x5639: "Liao " +0x563a: "Qiao " +0x563b: "Xi " +0x563c: "Xiu " +0x563d: "Tan " +0x563e: "Tan " +0x563f: "Mo " +0x5640: "Xun " +0x5641: "E " +0x5642: "Zun " +0x5643: "Fan " +0x5644: "Chi " +0x5645: "Hui " +0x5646: "Zan " +0x5647: "Chuang " +0x5648: "Cu " +0x5649: "Dan " +0x564a: "Yu " +0x564b: "Tun " +0x564c: "Cheng " +0x564d: "Jiao " +0x564e: "Ye " +0x564f: "Xi " +0x5650: "Qi " +0x5651: "Hao " +0x5652: "Lian " +0x5653: "Xu " +0x5654: "Deng " +0x5655: "Hui " +0x5656: "Yin " +0x5657: "Pu " +0x5658: "Jue " +0x5659: "Qin " +0x565a: "Xun " +0x565b: "Nie " +0x565c: "Lu " +0x565d: "Si " +0x565e: "Yan " +0x565f: "Ying " +0x5660: "Da " +0x5661: "Dan " +0x5662: "Yu " +0x5663: "Zhou " +0x5664: "Jin " +0x5665: "Nong " +0x5666: "Yue " +0x5667: "Hui " +0x5668: "Qi " +0x5669: "E " +0x566a: "Zao " +0x566b: "Yi " +0x566c: "Shi " +0x566d: "Jiao " +0x566e: "Yuan " +0x566f: "Ai " +0x5670: "Yong " +0x5671: "Jue " +0x5672: "Kuai " +0x5673: "Yu " +0x5674: "Pen " +0x5675: "Dao " +0x5676: "Ge " +0x5677: "Xin " +0x5678: "Dun " +0x5679: "Dang " +0x567a: "Sin " +0x567b: "Sai " +0x567c: "Pi " +0x567d: "Pi " +0x567e: "Yin " +0x567f: "Zui " +0x5680: "Ning " +0x5681: "Di " +0x5682: "Lan " +0x5683: "Ta " +0x5684: "Huo " +0x5685: "Ru " +0x5686: "Hao " +0x5687: "Xia " +0x5688: "Ya " +0x5689: "Duo " +0x568a: "Xi " +0x568b: "Chou " +0x568c: "Ji " +0x568d: "Jin " +0x568e: "Hao " +0x568f: "Ti " +0x5690: "Chang " +0x5691: "[?] " +0x5692: "[?] " +0x5693: "Ca " +0x5694: "Ti " +0x5695: "Lu " +0x5696: "Hui " +0x5697: "Bo " +0x5698: "You " +0x5699: "Nie " +0x569a: "Yin " +0x569b: "Hu " +0x569c: "Mo " +0x569d: "Huang " +0x569e: "Zhe " +0x569f: "Li " +0x56a0: "Liu " +0x56a1: "Haai " +0x56a2: "Nang " +0x56a3: "Xiao " +0x56a4: "Mo " +0x56a5: "Yan " +0x56a6: "Li " +0x56a7: "Lu " +0x56a8: "Long " +0x56a9: "Fu " +0x56aa: "Dan " +0x56ab: "Chen " +0x56ac: "Pin " +0x56ad: "Pi " +0x56ae: "Xiang " +0x56af: "Huo " +0x56b0: "Mo " +0x56b1: "Xi " +0x56b2: "Duo " +0x56b3: "Ku " +0x56b4: "Yan " +0x56b5: "Chan " +0x56b6: "Ying " +0x56b7: "Rang " +0x56b8: "Dian " +0x56b9: "La " +0x56ba: "Ta " +0x56bb: "Xiao " +0x56bc: "Jiao " +0x56bd: "Chuo " +0x56be: "Huan " +0x56bf: "Huo " +0x56c0: "Zhuan " +0x56c1: "Nie " +0x56c2: "Xiao " +0x56c3: "Ca " +0x56c4: "Li " +0x56c5: "Chan " +0x56c6: "Chai " +0x56c7: "Li " +0x56c8: "Yi " +0x56c9: "Luo " +0x56ca: "Nang " +0x56cb: "Zan " +0x56cc: "Su " +0x56cd: "Xi " +0x56ce: "So " +0x56cf: "Jian " +0x56d0: "Za " +0x56d1: "Zhu " +0x56d2: "Lan " +0x56d3: "Nie " +0x56d4: "Nang " +0x56d5: "[?] " +0x56d6: "[?] " +0x56d7: "Wei " +0x56d8: "Hui " +0x56d9: "Yin " +0x56da: "Qiu " +0x56db: "Si " +0x56dc: "Nin " +0x56dd: "Jian " +0x56de: "Hui " +0x56df: "Xin " +0x56e0: "Yin " +0x56e1: "Nan " +0x56e2: "Tuan " +0x56e3: "Tuan " +0x56e4: "Dun " +0x56e5: "Kang " +0x56e6: "Yuan " +0x56e7: "Jiong " +0x56e8: "Pian " +0x56e9: "Yun " +0x56ea: "Cong " +0x56eb: "Hu " +0x56ec: "Hui " +0x56ed: "Yuan " +0x56ee: "You " +0x56ef: "Guo " +0x56f0: "Kun " +0x56f1: "Cong " +0x56f2: "Wei " +0x56f3: "Tu " +0x56f4: "Wei " +0x56f5: "Lun " +0x56f6: "Guo " +0x56f7: "Qun " +0x56f8: "Ri " +0x56f9: "Ling " +0x56fa: "Gu " +0x56fb: "Guo " +0x56fc: "Tai " +0x56fd: "Guo " +0x56fe: "Tu " +0x56ff: "You " +/* x057 */ +0x5700: "Guo " +0x5701: "Yin " +0x5702: "Hun " +0x5703: "Pu " +0x5704: "Yu " +0x5705: "Han " +0x5706: "Yuan " +0x5707: "Lun " +0x5708: "Quan " +0x5709: "Yu " +0x570a: "Qing " +0x570b: "Guo " +0x570c: "Chuan " +0x570d: "Wei " +0x570e: "Yuan " +0x570f: "Quan " +0x5710: "Ku " +0x5711: "Fu " +0x5712: "Yuan " +0x5713: "Yuan " +0x5714: "E " +0x5715: "Tu " +0x5716: "Tu " +0x5717: "Tu " +0x5718: "Tuan " +0x5719: "Lue " +0x571a: "Hui " +0x571b: "Yi " +0x571c: "Yuan " +0x571d: "Luan " +0x571e: "Luan " +0x571f: "Tu " +0x5720: "Ya " +0x5721: "Tu " +0x5722: "Ting " +0x5723: "Sheng " +0x5724: "Pu " +0x5725: "Lu " +0x5726: "Iri " +0x5727: "Ya " +0x5728: "Zai " +0x5729: "Wei " +0x572a: "Ge " +0x572b: "Yu " +0x572c: "Wu " +0x572d: "Gui " +0x572e: "Pi " +0x572f: "Yi " +0x5730: "Di " +0x5731: "Qian " +0x5732: "Qian " +0x5733: "Zhen " +0x5734: "Zhuo " +0x5735: "Dang " +0x5736: "Qia " +0x5737: "Akutsu " +0x5738: "Yama " +0x5739: "Kuang " +0x573a: "Chang " +0x573b: "Qi " +0x573c: "Nie " +0x573d: "Mo " +0x573e: "Ji " +0x573f: "Jia " +0x5740: "Zhi " +0x5741: "Zhi " +0x5742: "Ban " +0x5743: "Xun " +0x5744: "Tou " +0x5745: "Qin " +0x5746: "Fen " +0x5747: "Jun " +0x5748: "Keng " +0x5749: "Tun " +0x574a: "Fang " +0x574b: "Fen " +0x574c: "Ben " +0x574d: "Tan " +0x574e: "Kan " +0x574f: "Pi " +0x5750: "Zuo " +0x5751: "Keng " +0x5752: "Bi " +0x5753: "Xing " +0x5754: "Di " +0x5755: "Jing " +0x5756: "Ji " +0x5757: "Kuai " +0x5758: "Di " +0x5759: "Jing " +0x575a: "Jian " +0x575b: "Tan " +0x575c: "Li " +0x575d: "Ba " +0x575e: "Wu " +0x575f: "Fen " +0x5760: "Zhui " +0x5761: "Po " +0x5762: "Pan " +0x5763: "Tang " +0x5764: "Kun " +0x5765: "Qu " +0x5766: "Tan " +0x5767: "Zhi " +0x5768: "Tuo " +0x5769: "Gan " +0x576a: "Ping " +0x576b: "Dian " +0x576c: "Gua " +0x576d: "Ni " +0x576e: "Tai " +0x576f: "Pi " +0x5770: "Jiong " +0x5771: "Yang " +0x5772: "Fo " +0x5773: "Ao " +0x5774: "Liu " +0x5775: "Qiu " +0x5776: "Mu " +0x5777: "Ke " +0x5778: "Gou " +0x5779: "Xue " +0x577a: "Ba " +0x577b: "Chi " +0x577c: "Che " +0x577d: "Ling " +0x577e: "Zhu " +0x577f: "Fu " +0x5780: "Hu " +0x5781: "Zhi " +0x5782: "Chui " +0x5783: "La " +0x5784: "Long " +0x5785: "Long " +0x5786: "Lu " +0x5787: "Ao " +0x5788: "Tay " +0x5789: "Pao " +0x578a: "[?] " +0x578b: "Xing " +0x578c: "Dong " +0x578d: "Ji " +0x578e: "Ke " +0x578f: "Lu " +0x5790: "Ci " +0x5791: "Chi " +0x5792: "Lei " +0x5793: "Gai " +0x5794: "Yin " +0x5795: "Hou " +0x5796: "Dui " +0x5797: "Zhao " +0x5798: "Fu " +0x5799: "Guang " +0x579a: "Yao " +0x579b: "Duo " +0x579c: "Duo " +0x579d: "Gui " +0x579e: "Cha " +0x579f: "Yang " +0x57a0: "Yin " +0x57a1: "Fa " +0x57a2: "Gou " +0x57a3: "Yuan " +0x57a4: "Die " +0x57a5: "Xie " +0x57a6: "Ken " +0x57a7: "Jiong " +0x57a8: "Shou " +0x57a9: "E " +0x57aa: "Ha " +0x57ab: "Dian " +0x57ac: "Hong " +0x57ad: "Wu " +0x57ae: "Kua " +0x57af: "[?] " +0x57b0: "Tao " +0x57b1: "Dang " +0x57b2: "Kai " +0x57b3: "Gake " +0x57b4: "Nao " +0x57b5: "An " +0x57b6: "Xing " +0x57b7: "Xian " +0x57b8: "Huan " +0x57b9: "Bang " +0x57ba: "Pei " +0x57bb: "Ba " +0x57bc: "Yi " +0x57bd: "Yin " +0x57be: "Han " +0x57bf: "Xu " +0x57c0: "Chui " +0x57c1: "Cen " +0x57c2: "Geng " +0x57c3: "Ai " +0x57c4: "Peng " +0x57c5: "Fang " +0x57c6: "Que " +0x57c7: "Yong " +0x57c8: "Xun " +0x57c9: "Jia " +0x57ca: "Di " +0x57cb: "Mai " +0x57cc: "Lang " +0x57cd: "Xuan " +0x57ce: "Cheng " +0x57cf: "Yan " +0x57d0: "Jin " +0x57d1: "Zhe " +0x57d2: "Lei " +0x57d3: "Lie " +0x57d4: "Bu " +0x57d5: "Cheng " +0x57d6: "Gomi " +0x57d7: "Bu " +0x57d8: "Shi " +0x57d9: "Xun " +0x57da: "Guo " +0x57db: "Jiong " +0x57dc: "Ye " +0x57dd: "Nian " +0x57de: "Di " +0x57df: "Yu " +0x57e0: "Bu " +0x57e1: "Ya " +0x57e2: "Juan " +0x57e3: "Sui " +0x57e4: "Pi " +0x57e5: "Cheng " +0x57e6: "Wan " +0x57e7: "Ju " +0x57e8: "Lun " +0x57e9: "Zheng " +0x57ea: "Kong " +0x57eb: "Chong " +0x57ec: "Dong " +0x57ed: "Dai " +0x57ee: "Tan " +0x57ef: "An " +0x57f0: "Cai " +0x57f1: "Shu " +0x57f2: "Beng " +0x57f3: "Kan " +0x57f4: "Zhi " +0x57f5: "Duo " +0x57f6: "Yi " +0x57f7: "Zhi " +0x57f8: "Yi " +0x57f9: "Pei " +0x57fa: "Ji " +0x57fb: "Zhun " +0x57fc: "Qi " +0x57fd: "Sao " +0x57fe: "Ju " +0x57ff: "Ni " +/* x058 */ +0x5800: "Ku " +0x5801: "Ke " +0x5802: "Tang " +0x5803: "Kun " +0x5804: "Ni " +0x5805: "Jian " +0x5806: "Dui " +0x5807: "Jin " +0x5808: "Gang " +0x5809: "Yu " +0x580a: "E " +0x580b: "Peng " +0x580c: "Gu " +0x580d: "Tu " +0x580e: "Leng " +0x580f: "[?] " +0x5810: "Ya " +0x5811: "Qian " +0x5812: "[?] " +0x5813: "An " +0x5814: "[?] " +0x5815: "Duo " +0x5816: "Nao " +0x5817: "Tu " +0x5818: "Cheng " +0x5819: "Yin " +0x581a: "Hun " +0x581b: "Bi " +0x581c: "Lian " +0x581d: "Guo " +0x581e: "Die " +0x581f: "Zhuan " +0x5820: "Hou " +0x5821: "Bao " +0x5822: "Bao " +0x5823: "Yu " +0x5824: "Di " +0x5825: "Mao " +0x5826: "Jie " +0x5827: "Ruan " +0x5828: "E " +0x5829: "Geng " +0x582a: "Kan " +0x582b: "Zong " +0x582c: "Yu " +0x582d: "Huang " +0x582e: "E " +0x582f: "Yao " +0x5830: "Yan " +0x5831: "Bao " +0x5832: "Ji " +0x5833: "Mei " +0x5834: "Chang " +0x5835: "Du " +0x5836: "Tuo " +0x5837: "Yin " +0x5838: "Feng " +0x5839: "Zhong " +0x583a: "Jie " +0x583b: "Zhen " +0x583c: "Feng " +0x583d: "Gang " +0x583e: "Chuan " +0x583f: "Jian " +0x5840: "Pyeng " +0x5841: "Toride " +0x5842: "Xiang " +0x5843: "Huang " +0x5844: "Leng " +0x5845: "Duan " +0x5846: "[?] " +0x5847: "Xuan " +0x5848: "Ji " +0x5849: "Ji " +0x584a: "Kuai " +0x584b: "Ying " +0x584c: "Ta " +0x584d: "Cheng " +0x584e: "Yong " +0x584f: "Kai " +0x5850: "Su " +0x5851: "Su " +0x5852: "Shi " +0x5853: "Mi " +0x5854: "Ta " +0x5855: "Weng " +0x5856: "Cheng " +0x5857: "Tu " +0x5858: "Tang " +0x5859: "Que " +0x585a: "Zhong " +0x585b: "Li " +0x585c: "Peng " +0x585d: "Bang " +0x585e: "Sai " +0x585f: "Zang " +0x5860: "Dui " +0x5861: "Tian " +0x5862: "Wu " +0x5863: "Cheng " +0x5864: "Xun " +0x5865: "Ge " +0x5866: "Zhen " +0x5867: "Ai " +0x5868: "Gong " +0x5869: "Yan " +0x586a: "Kan " +0x586b: "Tian " +0x586c: "Yuan " +0x586d: "Wen " +0x586e: "Xie " +0x586f: "Liu " +0x5870: "Ama " +0x5871: "Lang " +0x5872: "Chang " +0x5873: "Peng " +0x5874: "Beng " +0x5875: "Chen " +0x5876: "Cu " +0x5877: "Lu " +0x5878: "Ou " +0x5879: "Qian " +0x587a: "Mei " +0x587b: "Mo " +0x587c: "Zhuan " +0x587d: "Shuang " +0x587e: "Shu " +0x587f: "Lou " +0x5880: "Chi " +0x5881: "Man " +0x5882: "Biao " +0x5883: "Jing " +0x5884: "Qi " +0x5885: "Shu " +0x5886: "Di " +0x5887: "Zhang " +0x5888: "Kan " +0x5889: "Yong " +0x588a: "Dian " +0x588b: "Chen " +0x588c: "Zhi " +0x588d: "Xi " +0x588e: "Guo " +0x588f: "Qiang " +0x5890: "Jin " +0x5891: "Di " +0x5892: "Shang " +0x5893: "Mu " +0x5894: "Cui " +0x5895: "Yan " +0x5896: "Ta " +0x5897: "Zeng " +0x5898: "Qi " +0x5899: "Qiang " +0x589a: "Liang " +0x589b: "[?] " +0x589c: "Zhui " +0x589d: "Qiao " +0x589e: "Zeng " +0x589f: "Xu " +0x58a0: "Shan " +0x58a1: "Shan " +0x58a2: "Ba " +0x58a3: "Pu " +0x58a4: "Kuai " +0x58a5: "Dong " +0x58a6: "Fan " +0x58a7: "Que " +0x58a8: "Mo " +0x58a9: "Dun " +0x58aa: "Dun " +0x58ab: "Dun " +0x58ac: "Di " +0x58ad: "Sheng " +0x58ae: "Duo " +0x58af: "Duo " +0x58b0: "Tan " +0x58b1: "Deng " +0x58b2: "Wu " +0x58b3: "Fen " +0x58b4: "Huang " +0x58b5: "Tan " +0x58b6: "Da " +0x58b7: "Ye " +0x58b8: "Sho " +0x58b9: "Mama " +0x58ba: "Yu " +0x58bb: "Qiang " +0x58bc: "Ji " +0x58bd: "Qiao " +0x58be: "Ken " +0x58bf: "Yi " +0x58c0: "Pi " +0x58c1: "Bi " +0x58c2: "Dian " +0x58c3: "Jiang " +0x58c4: "Ye " +0x58c5: "Yong " +0x58c6: "Bo " +0x58c7: "Tan " +0x58c8: "Lan " +0x58c9: "Ju " +0x58ca: "Huai " +0x58cb: "Dang " +0x58cc: "Rang " +0x58cd: "Qian " +0x58ce: "Xun " +0x58cf: "Lan " +0x58d0: "Xi " +0x58d1: "He " +0x58d2: "Ai " +0x58d3: "Ya " +0x58d4: "Dao " +0x58d5: "Hao " +0x58d6: "Ruan " +0x58d7: "Mama " +0x58d8: "Lei " +0x58d9: "Kuang " +0x58da: "Lu " +0x58db: "Yan " +0x58dc: "Tan " +0x58dd: "Wei " +0x58de: "Huai " +0x58df: "Long " +0x58e0: "Long " +0x58e1: "Rui " +0x58e2: "Li " +0x58e3: "Lin " +0x58e4: "Rang " +0x58e5: "Ten " +0x58e6: "Xun " +0x58e7: "Yan " +0x58e8: "Lei " +0x58e9: "Ba " +0x58ea: "[?] " +0x58eb: "Shi " +0x58ec: "Ren " +0x58ed: "[?] " +0x58ee: "Zhuang " +0x58ef: "Zhuang " +0x58f0: "Sheng " +0x58f1: "Yi " +0x58f2: "Mai " +0x58f3: "Ke " +0x58f4: "Zhu " +0x58f5: "Zhuang " +0x58f6: "Hu " +0x58f7: "Hu " +0x58f8: "Kun " +0x58f9: "Yi " +0x58fa: "Hu " +0x58fb: "Xu " +0x58fc: "Kun " +0x58fd: "Shou " +0x58fe: "Mang " +0x58ff: "Zun " +/* x059 */ +0x5900: "Shou " +0x5901: "Yi " +0x5902: "Zhi " +0x5903: "Gu " +0x5904: "Chu " +0x5905: "Jiang " +0x5906: "Feng " +0x5907: "Bei " +0x5908: "Cay " +0x5909: "Bian " +0x590a: "Sui " +0x590b: "Qun " +0x590c: "Ling " +0x590d: "Fu " +0x590e: "Zuo " +0x590f: "Xia " +0x5910: "Xiong " +0x5911: "[?] " +0x5912: "Nao " +0x5913: "Xia " +0x5914: "Kui " +0x5915: "Xi " +0x5916: "Wai " +0x5917: "Yuan " +0x5918: "Mao " +0x5919: "Su " +0x591a: "Duo " +0x591b: "Duo " +0x591c: "Ye " +0x591d: "Qing " +0x591e: "Uys " +0x591f: "Gou " +0x5920: "Gou " +0x5921: "Qi " +0x5922: "Meng " +0x5923: "Meng " +0x5924: "Yin " +0x5925: "Huo " +0x5926: "Chen " +0x5927: "Da " +0x5928: "Ze " +0x5929: "Tian " +0x592a: "Tai " +0x592b: "Fu " +0x592c: "Guai " +0x592d: "Yao " +0x592e: "Yang " +0x592f: "Hang " +0x5930: "Gao " +0x5931: "Shi " +0x5932: "Ben " +0x5933: "Tai " +0x5934: "Tou " +0x5935: "Yan " +0x5936: "Bi " +0x5937: "Yi " +0x5938: "Kua " +0x5939: "Jia " +0x593a: "Duo " +0x593b: "Kwu " +0x593c: "Kuang " +0x593d: "Yun " +0x593e: "Jia " +0x593f: "Pa " +0x5940: "En " +0x5941: "Lian " +0x5942: "Huan " +0x5943: "Di " +0x5944: "Yan " +0x5945: "Pao " +0x5946: "Quan " +0x5947: "Qi " +0x5948: "Nai " +0x5949: "Feng " +0x594a: "Xie " +0x594b: "Fen " +0x594c: "Dian " +0x594d: "[?] " +0x594e: "Kui " +0x594f: "Zou " +0x5950: "Huan " +0x5951: "Qi " +0x5952: "Kai " +0x5953: "Zha " +0x5954: "Ben " +0x5955: "Yi " +0x5956: "Jiang " +0x5957: "Tao " +0x5958: "Zang " +0x5959: "Ben " +0x595a: "Xi " +0x595b: "Xiang " +0x595c: "Fei " +0x595d: "Diao " +0x595e: "Xun " +0x595f: "Keng " +0x5960: "Dian " +0x5961: "Ao " +0x5962: "She " +0x5963: "Weng " +0x5964: "Pan " +0x5965: "Ao " +0x5966: "Wu " +0x5967: "Ao " +0x5968: "Jiang " +0x5969: "Lian " +0x596a: "Duo " +0x596b: "Yun " +0x596c: "Jiang " +0x596d: "Shi " +0x596e: "Fen " +0x596f: "Huo " +0x5970: "Bi " +0x5971: "Lian " +0x5972: "Duo " +0x5973: "Nu " +0x5974: "Nu " +0x5975: "Ding " +0x5976: "Nai " +0x5977: "Qian " +0x5978: "Jian " +0x5979: "Ta " +0x597a: "Jiu " +0x597b: "Nan " +0x597c: "Cha " +0x597d: "Hao " +0x597e: "Xian " +0x597f: "Fan " +0x5980: "Ji " +0x5981: "Shuo " +0x5982: "Ru " +0x5983: "Fei " +0x5984: "Wang " +0x5985: "Hong " +0x5986: "Zhuang " +0x5987: "Fu " +0x5988: "Ma " +0x5989: "Dan " +0x598a: "Ren " +0x598b: "Fu " +0x598c: "Jing " +0x598d: "Yan " +0x598e: "Xie " +0x598f: "Wen " +0x5990: "Zhong " +0x5991: "Pa " +0x5992: "Du " +0x5993: "Ji " +0x5994: "Keng " +0x5995: "Zhong " +0x5996: "Yao " +0x5997: "Jin " +0x5998: "Yun " +0x5999: "Miao " +0x599a: "Pei " +0x599b: "Shi " +0x599c: "Yue " +0x599d: "Zhuang " +0x599e: "Niu " +0x599f: "Yan " +0x59a0: "Na " +0x59a1: "Xin " +0x59a2: "Fen " +0x59a3: "Bi " +0x59a4: "Yu " +0x59a5: "Tuo " +0x59a6: "Feng " +0x59a7: "Yuan " +0x59a8: "Fang " +0x59a9: "Wu " +0x59aa: "Yu " +0x59ab: "Gui " +0x59ac: "Du " +0x59ad: "Ba " +0x59ae: "Ni " +0x59af: "Zhou " +0x59b0: "Zhuo " +0x59b1: "Zhao " +0x59b2: "Da " +0x59b3: "Nai " +0x59b4: "Yuan " +0x59b5: "Tou " +0x59b6: "Xuan " +0x59b7: "Zhi " +0x59b8: "E " +0x59b9: "Mei " +0x59ba: "Mo " +0x59bb: "Qi " +0x59bc: "Bi " +0x59bd: "Shen " +0x59be: "Qie " +0x59bf: "E " +0x59c0: "He " +0x59c1: "Xu " +0x59c2: "Fa " +0x59c3: "Zheng " +0x59c4: "Min " +0x59c5: "Ban " +0x59c6: "Mu " +0x59c7: "Fu " +0x59c8: "Ling " +0x59c9: "Zi " +0x59ca: "Zi " +0x59cb: "Shi " +0x59cc: "Ran " +0x59cd: "Shan " +0x59ce: "Yang " +0x59cf: "Man " +0x59d0: "Jie " +0x59d1: "Gu " +0x59d2: "Si " +0x59d3: "Xing " +0x59d4: "Wei " +0x59d5: "Zi " +0x59d6: "Ju " +0x59d7: "Shan " +0x59d8: "Pin " +0x59d9: "Ren " +0x59da: "Yao " +0x59db: "Tong " +0x59dc: "Jiang " +0x59dd: "Shu " +0x59de: "Ji " +0x59df: "Gai " +0x59e0: "Shang " +0x59e1: "Kuo " +0x59e2: "Juan " +0x59e3: "Jiao " +0x59e4: "Gou " +0x59e5: "Mu " +0x59e6: "Jian " +0x59e7: "Jian " +0x59e8: "Yi " +0x59e9: "Nian " +0x59ea: "Zhi " +0x59eb: "Ji " +0x59ec: "Ji " +0x59ed: "Xian " +0x59ee: "Heng " +0x59ef: "Guang " +0x59f0: "Jun " +0x59f1: "Kua " +0x59f2: "Yan " +0x59f3: "Ming " +0x59f4: "Lie " +0x59f5: "Pei " +0x59f6: "Yan " +0x59f7: "You " +0x59f8: "Yan " +0x59f9: "Cha " +0x59fa: "Shen " +0x59fb: "Yin " +0x59fc: "Chi " +0x59fd: "Gui " +0x59fe: "Quan " +0x59ff: "Zi " +/* x05a */ +0x5a00: "Song " +0x5a01: "Wei " +0x5a02: "Hong " +0x5a03: "Wa " +0x5a04: "Lou " +0x5a05: "Ya " +0x5a06: "Rao " +0x5a07: "Jiao " +0x5a08: "Luan " +0x5a09: "Ping " +0x5a0a: "Xian " +0x5a0b: "Shao " +0x5a0c: "Li " +0x5a0d: "Cheng " +0x5a0e: "Xiao " +0x5a0f: "Mang " +0x5a10: "Fu " +0x5a11: "Suo " +0x5a12: "Wu " +0x5a13: "Wei " +0x5a14: "Ke " +0x5a15: "Lai " +0x5a16: "Chuo " +0x5a17: "Ding " +0x5a18: "Niang " +0x5a19: "Xing " +0x5a1a: "Nan " +0x5a1b: "Yu " +0x5a1c: "Nuo " +0x5a1d: "Pei " +0x5a1e: "Nei " +0x5a1f: "Juan " +0x5a20: "Shen " +0x5a21: "Zhi " +0x5a22: "Han " +0x5a23: "Di " +0x5a24: "Zhuang " +0x5a25: "E " +0x5a26: "Pin " +0x5a27: "Tui " +0x5a28: "Han " +0x5a29: "Mian " +0x5a2a: "Wu " +0x5a2b: "Yan " +0x5a2c: "Wu " +0x5a2d: "Xi " +0x5a2e: "Yan " +0x5a2f: "Yu " +0x5a30: "Si " +0x5a31: "Yu " +0x5a32: "Wa " +0x5a33: "[?] " +0x5a34: "Xian " +0x5a35: "Ju " +0x5a36: "Qu " +0x5a37: "Shui " +0x5a38: "Qi " +0x5a39: "Xian " +0x5a3a: "Zhui " +0x5a3b: "Dong " +0x5a3c: "Chang " +0x5a3d: "Lu " +0x5a3e: "Ai " +0x5a3f: "E " +0x5a40: "E " +0x5a41: "Lou " +0x5a42: "Mian " +0x5a43: "Cong " +0x5a44: "Pou " +0x5a45: "Ju " +0x5a46: "Po " +0x5a47: "Cai " +0x5a48: "Ding " +0x5a49: "Wan " +0x5a4a: "Biao " +0x5a4b: "Xiao " +0x5a4c: "Shu " +0x5a4d: "Qi " +0x5a4e: "Hui " +0x5a4f: "Fu " +0x5a50: "E " +0x5a51: "Wo " +0x5a52: "Tan " +0x5a53: "Fei " +0x5a54: "Wei " +0x5a55: "Jie " +0x5a56: "Tian " +0x5a57: "Ni " +0x5a58: "Quan " +0x5a59: "Jing " +0x5a5a: "Hun " +0x5a5b: "Jing " +0x5a5c: "Qian " +0x5a5d: "Dian " +0x5a5e: "Xing " +0x5a5f: "Hu " +0x5a60: "Wa " +0x5a61: "Lai " +0x5a62: "Bi " +0x5a63: "Yin " +0x5a64: "Chou " +0x5a65: "Chuo " +0x5a66: "Fu " +0x5a67: "Jing " +0x5a68: "Lun " +0x5a69: "Yan " +0x5a6a: "Lan " +0x5a6b: "Kun " +0x5a6c: "Yin " +0x5a6d: "Ya " +0x5a6e: "Ju " +0x5a6f: "Li " +0x5a70: "Dian " +0x5a71: "Xian " +0x5a72: "Hwa " +0x5a73: "Hua " +0x5a74: "Ying " +0x5a75: "Chan " +0x5a76: "Shen " +0x5a77: "Ting " +0x5a78: "Dang " +0x5a79: "Yao " +0x5a7a: "Wu " +0x5a7b: "Nan " +0x5a7c: "Ruo " +0x5a7d: "Jia " +0x5a7e: "Tou " +0x5a7f: "Xu " +0x5a80: "Yu " +0x5a81: "Wei " +0x5a82: "Ti " +0x5a83: "Rou " +0x5a84: "Mei " +0x5a85: "Dan " +0x5a86: "Ruan " +0x5a87: "Qin " +0x5a88: "Hui " +0x5a89: "Wu " +0x5a8a: "Qian " +0x5a8b: "Chun " +0x5a8c: "Mao " +0x5a8d: "Fu " +0x5a8e: "Jie " +0x5a8f: "Duan " +0x5a90: "Xi " +0x5a91: "Zhong " +0x5a92: "Mei " +0x5a93: "Huang " +0x5a94: "Mian " +0x5a95: "An " +0x5a96: "Ying " +0x5a97: "Xuan " +0x5a98: "Jie " +0x5a99: "Wei " +0x5a9a: "Mei " +0x5a9b: "Yuan " +0x5a9c: "Zhen " +0x5a9d: "Qiu " +0x5a9e: "Ti " +0x5a9f: "Xie " +0x5aa0: "Tuo " +0x5aa1: "Lian " +0x5aa2: "Mao " +0x5aa3: "Ran " +0x5aa4: "Si " +0x5aa5: "Pian " +0x5aa6: "Wei " +0x5aa7: "Wa " +0x5aa8: "Jiu " +0x5aa9: "Hu " +0x5aaa: "Ao " +0x5aab: "[?] " +0x5aac: "Bou " +0x5aad: "Xu " +0x5aae: "Tou " +0x5aaf: "Gui " +0x5ab0: "Zou " +0x5ab1: "Yao " +0x5ab2: "Pi " +0x5ab3: "Xi " +0x5ab4: "Yuan " +0x5ab5: "Ying " +0x5ab6: "Rong " +0x5ab7: "Ru " +0x5ab8: "Chi " +0x5ab9: "Liu " +0x5aba: "Mei " +0x5abb: "Pan " +0x5abc: "Ao " +0x5abd: "Ma " +0x5abe: "Gou " +0x5abf: "Kui " +0x5ac0: "Qin " +0x5ac1: "Jia " +0x5ac2: "Sao " +0x5ac3: "Zhen " +0x5ac4: "Yuan " +0x5ac5: "Cha " +0x5ac6: "Yong " +0x5ac7: "Ming " +0x5ac8: "Ying " +0x5ac9: "Ji " +0x5aca: "Su " +0x5acb: "Niao " +0x5acc: "Xian " +0x5acd: "Tao " +0x5ace: "Pang " +0x5acf: "Lang " +0x5ad0: "Nao " +0x5ad1: "Bao " +0x5ad2: "Ai " +0x5ad3: "Pi " +0x5ad4: "Pin " +0x5ad5: "Yi " +0x5ad6: "Piao " +0x5ad7: "Yu " +0x5ad8: "Lei " +0x5ad9: "Xuan " +0x5ada: "Man " +0x5adb: "Yi " +0x5adc: "Zhang " +0x5add: "Kang " +0x5ade: "Yong " +0x5adf: "Ni " +0x5ae0: "Li " +0x5ae1: "Di " +0x5ae2: "Gui " +0x5ae3: "Yan " +0x5ae4: "Jin " +0x5ae5: "Zhuan " +0x5ae6: "Chang " +0x5ae7: "Ce " +0x5ae8: "Han " +0x5ae9: "Nen " +0x5aea: "Lao " +0x5aeb: "Mo " +0x5aec: "Zhe " +0x5aed: "Hu " +0x5aee: "Hu " +0x5aef: "Ao " +0x5af0: "Nen " +0x5af1: "Qiang " +0x5af2: "Ma " +0x5af3: "Pie " +0x5af4: "Gu " +0x5af5: "Wu " +0x5af6: "Jiao " +0x5af7: "Tuo " +0x5af8: "Zhan " +0x5af9: "Mao " +0x5afa: "Xian " +0x5afb: "Xian " +0x5afc: "Mo " +0x5afd: "Liao " +0x5afe: "Lian " +0x5aff: "Hua " +/* x05b */ +0x5b00: "Gui " +0x5b01: "Deng " +0x5b02: "Zhi " +0x5b03: "Xu " +0x5b04: "Yi " +0x5b05: "Hua " +0x5b06: "Xi " +0x5b07: "Hui " +0x5b08: "Rao " +0x5b09: "Xi " +0x5b0a: "Yan " +0x5b0b: "Chan " +0x5b0c: "Jiao " +0x5b0d: "Mei " +0x5b0e: "Fan " +0x5b0f: "Fan " +0x5b10: "Xian " +0x5b11: "Yi " +0x5b12: "Wei " +0x5b13: "Jiao " +0x5b14: "Fu " +0x5b15: "Shi " +0x5b16: "Bi " +0x5b17: "Shan " +0x5b18: "Sui " +0x5b19: "Qiang " +0x5b1a: "Lian " +0x5b1b: "Huan " +0x5b1c: "Xin " +0x5b1d: "Niao " +0x5b1e: "Dong " +0x5b1f: "Yi " +0x5b20: "Can " +0x5b21: "Ai " +0x5b22: "Niang " +0x5b23: "Neng " +0x5b24: "Ma " +0x5b25: "Tiao " +0x5b26: "Chou " +0x5b27: "Jin " +0x5b28: "Ci " +0x5b29: "Yu " +0x5b2a: "Pin " +0x5b2b: "Yong " +0x5b2c: "Xu " +0x5b2d: "Nai " +0x5b2e: "Yan " +0x5b2f: "Tai " +0x5b30: "Ying " +0x5b31: "Can " +0x5b32: "Niao " +0x5b33: "Wo " +0x5b34: "Ying " +0x5b35: "Mian " +0x5b36: "Kaka " +0x5b37: "Ma " +0x5b38: "Shen " +0x5b39: "Xing " +0x5b3a: "Ni " +0x5b3b: "Du " +0x5b3c: "Liu " +0x5b3d: "Yuan " +0x5b3e: "Lan " +0x5b3f: "Yan " +0x5b40: "Shuang " +0x5b41: "Ling " +0x5b42: "Jiao " +0x5b43: "Niang " +0x5b44: "Lan " +0x5b45: "Xian " +0x5b46: "Ying " +0x5b47: "Shuang " +0x5b48: "Shuai " +0x5b49: "Quan " +0x5b4a: "Mi " +0x5b4b: "Li " +0x5b4c: "Luan " +0x5b4d: "Yan " +0x5b4e: "Zhu " +0x5b4f: "Lan " +0x5b50: "Zi " +0x5b51: "Jie " +0x5b52: "Jue " +0x5b53: "Jue " +0x5b54: "Kong " +0x5b55: "Yun " +0x5b56: "Zi " +0x5b57: "Zi " +0x5b58: "Cun " +0x5b59: "Sun " +0x5b5a: "Fu " +0x5b5b: "Bei " +0x5b5c: "Zi " +0x5b5d: "Xiao " +0x5b5e: "Xin " +0x5b5f: "Meng " +0x5b60: "Si " +0x5b61: "Tai " +0x5b62: "Bao " +0x5b63: "Ji " +0x5b64: "Gu " +0x5b65: "Nu " +0x5b66: "Xue " +0x5b67: "[?] " +0x5b68: "Zhuan " +0x5b69: "Hai " +0x5b6a: "Luan " +0x5b6b: "Sun " +0x5b6c: "Huai " +0x5b6d: "Mie " +0x5b6e: "Cong " +0x5b6f: "Qian " +0x5b70: "Shu " +0x5b71: "Chan " +0x5b72: "Ya " +0x5b73: "Zi " +0x5b74: "Ni " +0x5b75: "Fu " +0x5b76: "Zi " +0x5b77: "Li " +0x5b78: "Xue " +0x5b79: "Bo " +0x5b7a: "Ru " +0x5b7b: "Lai " +0x5b7c: "Nie " +0x5b7d: "Nie " +0x5b7e: "Ying " +0x5b7f: "Luan " +0x5b80: "Mian " +0x5b81: "Zhu " +0x5b82: "Rong " +0x5b83: "Ta " +0x5b84: "Gui " +0x5b85: "Zhai " +0x5b86: "Qiong " +0x5b87: "Yu " +0x5b88: "Shou " +0x5b89: "An " +0x5b8a: "Tu " +0x5b8b: "Song " +0x5b8c: "Wan " +0x5b8d: "Rou " +0x5b8e: "Yao " +0x5b8f: "Hong " +0x5b90: "Yi " +0x5b91: "Jing " +0x5b92: "Zhun " +0x5b93: "Mi " +0x5b94: "Zhu " +0x5b95: "Dang " +0x5b96: "Hong " +0x5b97: "Zong " +0x5b98: "Guan " +0x5b99: "Zhou " +0x5b9a: "Ding " +0x5b9b: "Wan " +0x5b9c: "Yi " +0x5b9d: "Bao " +0x5b9e: "Shi " +0x5b9f: "Shi " +0x5ba0: "Chong " +0x5ba1: "Shen " +0x5ba2: "Ke " +0x5ba3: "Xuan " +0x5ba4: "Shi " +0x5ba5: "You " +0x5ba6: "Huan " +0x5ba7: "Yi " +0x5ba8: "Tiao " +0x5ba9: "Shi " +0x5baa: "Xian " +0x5bab: "Gong " +0x5bac: "Cheng " +0x5bad: "Qun " +0x5bae: "Gong " +0x5baf: "Xiao " +0x5bb0: "Zai " +0x5bb1: "Zha " +0x5bb2: "Bao " +0x5bb3: "Hai " +0x5bb4: "Yan " +0x5bb5: "Xiao " +0x5bb6: "Jia " +0x5bb7: "Shen " +0x5bb8: "Chen " +0x5bb9: "Rong " +0x5bba: "Huang " +0x5bbb: "Mi " +0x5bbc: "Kou " +0x5bbd: "Kuan " +0x5bbe: "Bin " +0x5bbf: "Su " +0x5bc0: "Cai " +0x5bc1: "Zan " +0x5bc2: "Ji " +0x5bc3: "Yuan " +0x5bc4: "Ji " +0x5bc5: "Yin " +0x5bc6: "Mi " +0x5bc7: "Kou " +0x5bc8: "Qing " +0x5bc9: "Que " +0x5bca: "Zhen " +0x5bcb: "Jian " +0x5bcc: "Fu " +0x5bcd: "Ning " +0x5bce: "Bing " +0x5bcf: "Huan " +0x5bd0: "Mei " +0x5bd1: "Qin " +0x5bd2: "Han " +0x5bd3: "Yu " +0x5bd4: "Shi " +0x5bd5: "Ning " +0x5bd6: "Qin " +0x5bd7: "Ning " +0x5bd8: "Zhi " +0x5bd9: "Yu " +0x5bda: "Bao " +0x5bdb: "Kuan " +0x5bdc: "Ning " +0x5bdd: "Qin " +0x5bde: "Mo " +0x5bdf: "Cha " +0x5be0: "Ju " +0x5be1: "Gua " +0x5be2: "Qin " +0x5be3: "Hu " +0x5be4: "Wu " +0x5be5: "Liao " +0x5be6: "Shi " +0x5be7: "Zhu " +0x5be8: "Zhai " +0x5be9: "Shen " +0x5bea: "Wei " +0x5beb: "Xie " +0x5bec: "Kuan " +0x5bed: "Hui " +0x5bee: "Liao " +0x5bef: "Jun " +0x5bf0: "Huan " +0x5bf1: "Yi " +0x5bf2: "Yi " +0x5bf3: "Bao " +0x5bf4: "Qin " +0x5bf5: "Chong " +0x5bf6: "Bao " +0x5bf7: "Feng " +0x5bf8: "Cun " +0x5bf9: "Dui " +0x5bfa: "Si " +0x5bfb: "Xun " +0x5bfc: "Dao " +0x5bfd: "Lu " +0x5bfe: "Dui " +0x5bff: "Shou " +/* x05c */ +0x5c00: "Po " +0x5c01: "Feng " +0x5c02: "Zhuan " +0x5c03: "Fu " +0x5c04: "She " +0x5c05: "Ke " +0x5c06: "Jiang " +0x5c07: "Jiang " +0x5c08: "Zhuan " +0x5c09: "Wei " +0x5c0a: "Zun " +0x5c0b: "Xun " +0x5c0c: "Shu " +0x5c0d: "Dui " +0x5c0e: "Dao " +0x5c0f: "Xiao " +0x5c10: "Ji " +0x5c11: "Shao " +0x5c12: "Er " +0x5c13: "Er " +0x5c14: "Er " +0x5c15: "Ga " +0x5c16: "Jian " +0x5c17: "Shu " +0x5c18: "Chen " +0x5c19: "Shang " +0x5c1a: "Shang " +0x5c1b: "Mo " +0x5c1c: "Ga " +0x5c1d: "Chang " +0x5c1e: "Liao " +0x5c1f: "Xian " +0x5c20: "Xian " +0x5c21: "[?] " +0x5c22: "Wang " +0x5c23: "Wang " +0x5c24: "You " +0x5c25: "Liao " +0x5c26: "Liao " +0x5c27: "Yao " +0x5c28: "Mang " +0x5c29: "Wang " +0x5c2a: "Wang " +0x5c2b: "Wang " +0x5c2c: "Ga " +0x5c2d: "Yao " +0x5c2e: "Duo " +0x5c2f: "Kui " +0x5c30: "Zhong " +0x5c31: "Jiu " +0x5c32: "Gan " +0x5c33: "Gu " +0x5c34: "Gan " +0x5c35: "Tui " +0x5c36: "Gan " +0x5c37: "Gan " +0x5c38: "Shi " +0x5c39: "Yin " +0x5c3a: "Chi " +0x5c3b: "Kao " +0x5c3c: "Ni " +0x5c3d: "Jin " +0x5c3e: "Wei " +0x5c3f: "Niao " +0x5c40: "Ju " +0x5c41: "Pi " +0x5c42: "Ceng " +0x5c43: "Xi " +0x5c44: "Bi " +0x5c45: "Ju " +0x5c46: "Jie " +0x5c47: "Tian " +0x5c48: "Qu " +0x5c49: "Ti " +0x5c4a: "Jie " +0x5c4b: "Wu " +0x5c4c: "Diao " +0x5c4d: "Shi " +0x5c4e: "Shi " +0x5c4f: "Ping " +0x5c50: "Ji " +0x5c51: "Xie " +0x5c52: "Chen " +0x5c53: "Xi " +0x5c54: "Ni " +0x5c55: "Zhan " +0x5c56: "Xi " +0x5c57: "[?] " +0x5c58: "Man " +0x5c59: "E " +0x5c5a: "Lou " +0x5c5b: "Ping " +0x5c5c: "Ti " +0x5c5d: "Fei " +0x5c5e: "Shu " +0x5c5f: "Xie " +0x5c60: "Tu " +0x5c61: "Lu " +0x5c62: "Lu " +0x5c63: "Xi " +0x5c64: "Ceng " +0x5c65: "Lu " +0x5c66: "Ju " +0x5c67: "Xie " +0x5c68: "Ju " +0x5c69: "Jue " +0x5c6a: "Liao " +0x5c6b: "Jue " +0x5c6c: "Shu " +0x5c6d: "Xi " +0x5c6e: "Che " +0x5c6f: "Tun " +0x5c70: "Ni " +0x5c71: "Shan " +0x5c72: "[?] " +0x5c73: "Xian " +0x5c74: "Li " +0x5c75: "Xue " +0x5c76: "Nata " +0x5c77: "[?] " +0x5c78: "Long " +0x5c79: "Yi " +0x5c7a: "Qi " +0x5c7b: "Ren " +0x5c7c: "Wu " +0x5c7d: "Han " +0x5c7e: "Shen " +0x5c7f: "Yu " +0x5c80: "Chu " +0x5c81: "Sui " +0x5c82: "Qi " +0x5c83: "[?] " +0x5c84: "Yue " +0x5c85: "Ban " +0x5c86: "Yao " +0x5c87: "Ang " +0x5c88: "Ya " +0x5c89: "Wu " +0x5c8a: "Jie " +0x5c8b: "E " +0x5c8c: "Ji " +0x5c8d: "Qian " +0x5c8e: "Fen " +0x5c8f: "Yuan " +0x5c90: "Qi " +0x5c91: "Cen " +0x5c92: "Qian " +0x5c93: "Qi " +0x5c94: "Cha " +0x5c95: "Jie " +0x5c96: "Qu " +0x5c97: "Gang " +0x5c98: "Xian " +0x5c99: "Ao " +0x5c9a: "Lan " +0x5c9b: "Dao " +0x5c9c: "Ba " +0x5c9d: "Zuo " +0x5c9e: "Zuo " +0x5c9f: "Yang " +0x5ca0: "Ju " +0x5ca1: "Gang " +0x5ca2: "Ke " +0x5ca3: "Gou " +0x5ca4: "Xue " +0x5ca5: "Bei " +0x5ca6: "Li " +0x5ca7: "Tiao " +0x5ca8: "Ju " +0x5ca9: "Yan " +0x5caa: "Fu " +0x5cab: "Xiu " +0x5cac: "Jia " +0x5cad: "Ling " +0x5cae: "Tuo " +0x5caf: "Pei " +0x5cb0: "You " +0x5cb1: "Dai " +0x5cb2: "Kuang " +0x5cb3: "Yue " +0x5cb4: "Qu " +0x5cb5: "Hu " +0x5cb6: "Po " +0x5cb7: "Min " +0x5cb8: "An " +0x5cb9: "Tiao " +0x5cba: "Ling " +0x5cbb: "Chi " +0x5cbc: "Yuri " +0x5cbd: "Dong " +0x5cbe: "Cem " +0x5cbf: "Kui " +0x5cc0: "Xiu " +0x5cc1: "Mao " +0x5cc2: "Tong " +0x5cc3: "Xue " +0x5cc4: "Yi " +0x5cc5: "Kura " +0x5cc6: "He " +0x5cc7: "Ke " +0x5cc8: "Luo " +0x5cc9: "E " +0x5cca: "Fu " +0x5ccb: "Xun " +0x5ccc: "Die " +0x5ccd: "Lu " +0x5cce: "An " +0x5ccf: "Er " +0x5cd0: "Gai " +0x5cd1: "Quan " +0x5cd2: "Tong " +0x5cd3: "Yi " +0x5cd4: "Mu " +0x5cd5: "Shi " +0x5cd6: "An " +0x5cd7: "Wei " +0x5cd8: "Hu " +0x5cd9: "Zhi " +0x5cda: "Mi " +0x5cdb: "Li " +0x5cdc: "Ji " +0x5cdd: "Tong " +0x5cde: "Wei " +0x5cdf: "You " +0x5ce0: "Sang " +0x5ce1: "Xia " +0x5ce2: "Li " +0x5ce3: "Yao " +0x5ce4: "Jiao " +0x5ce5: "Zheng " +0x5ce6: "Luan " +0x5ce7: "Jiao " +0x5ce8: "E " +0x5ce9: "E " +0x5cea: "Yu " +0x5ceb: "Ye " +0x5cec: "Bu " +0x5ced: "Qiao " +0x5cee: "Qun " +0x5cef: "Feng " +0x5cf0: "Feng " +0x5cf1: "Nao " +0x5cf2: "Li " +0x5cf3: "You " +0x5cf4: "Xian " +0x5cf5: "Hong " +0x5cf6: "Dao " +0x5cf7: "Shen " +0x5cf8: "Cheng " +0x5cf9: "Tu " +0x5cfa: "Geng " +0x5cfb: "Jun " +0x5cfc: "Hao " +0x5cfd: "Xia " +0x5cfe: "Yin " +0x5cff: "Yu " +/* x05d */ +0x5d00: "Lang " +0x5d01: "Kan " +0x5d02: "Lao " +0x5d03: "Lai " +0x5d04: "Xian " +0x5d05: "Que " +0x5d06: "Kong " +0x5d07: "Chong " +0x5d08: "Chong " +0x5d09: "Ta " +0x5d0a: "Lin " +0x5d0b: "Hua " +0x5d0c: "Ju " +0x5d0d: "Lai " +0x5d0e: "Qi " +0x5d0f: "Min " +0x5d10: "Kun " +0x5d11: "Kun " +0x5d12: "Zu " +0x5d13: "Gu " +0x5d14: "Cui " +0x5d15: "Ya " +0x5d16: "Ya " +0x5d17: "Gang " +0x5d18: "Lun " +0x5d19: "Lun " +0x5d1a: "Leng " +0x5d1b: "Jue " +0x5d1c: "Duo " +0x5d1d: "Zheng " +0x5d1e: "Guo " +0x5d1f: "Yin " +0x5d20: "Dong " +0x5d21: "Han " +0x5d22: "Zheng " +0x5d23: "Wei " +0x5d24: "Yao " +0x5d25: "Pi " +0x5d26: "Yan " +0x5d27: "Song " +0x5d28: "Jie " +0x5d29: "Beng " +0x5d2a: "Zu " +0x5d2b: "Jue " +0x5d2c: "Dong " +0x5d2d: "Zhan " +0x5d2e: "Gu " +0x5d2f: "Yin " +0x5d30: "[?] " +0x5d31: "Ze " +0x5d32: "Huang " +0x5d33: "Yu " +0x5d34: "Wei " +0x5d35: "Yang " +0x5d36: "Feng " +0x5d37: "Qiu " +0x5d38: "Dun " +0x5d39: "Ti " +0x5d3a: "Yi " +0x5d3b: "Zhi " +0x5d3c: "Shi " +0x5d3d: "Zai " +0x5d3e: "Yao " +0x5d3f: "E " +0x5d40: "Zhu " +0x5d41: "Kan " +0x5d42: "Lu " +0x5d43: "Yan " +0x5d44: "Mei " +0x5d45: "Gan " +0x5d46: "Ji " +0x5d47: "Ji " +0x5d48: "Huan " +0x5d49: "Ting " +0x5d4a: "Sheng " +0x5d4b: "Mei " +0x5d4c: "Qian " +0x5d4d: "Wu " +0x5d4e: "Yu " +0x5d4f: "Zong " +0x5d50: "Lan " +0x5d51: "Jue " +0x5d52: "Yan " +0x5d53: "Yan " +0x5d54: "Wei " +0x5d55: "Zong " +0x5d56: "Cha " +0x5d57: "Sui " +0x5d58: "Rong " +0x5d59: "Yamashina " +0x5d5a: "Qin " +0x5d5b: "Yu " +0x5d5c: "Kewashii " +0x5d5d: "Lou " +0x5d5e: "Tu " +0x5d5f: "Dui " +0x5d60: "Xi " +0x5d61: "Weng " +0x5d62: "Cang " +0x5d63: "Dang " +0x5d64: "Hong " +0x5d65: "Jie " +0x5d66: "Ai " +0x5d67: "Liu " +0x5d68: "Wu " +0x5d69: "Song " +0x5d6a: "Qiao " +0x5d6b: "Zi " +0x5d6c: "Wei " +0x5d6d: "Beng " +0x5d6e: "Dian " +0x5d6f: "Cuo " +0x5d70: "Qian " +0x5d71: "Yong " +0x5d72: "Nie " +0x5d73: "Cuo " +0x5d74: "Ji " +0x5d75: "[?] " +0x5d76: "Tao " +0x5d77: "Song " +0x5d78: "Zong " +0x5d79: "Jiang " +0x5d7a: "Liao " +0x5d7b: "Kang " +0x5d7c: "Chan " +0x5d7d: "Die " +0x5d7e: "Cen " +0x5d7f: "Ding " +0x5d80: "Tu " +0x5d81: "Lou " +0x5d82: "Zhang " +0x5d83: "Zhan " +0x5d84: "Zhan " +0x5d85: "Ao " +0x5d86: "Cao " +0x5d87: "Qu " +0x5d88: "Qiang " +0x5d89: "Zui " +0x5d8a: "Zui " +0x5d8b: "Dao " +0x5d8c: "Dao " +0x5d8d: "Xi " +0x5d8e: "Yu " +0x5d8f: "Bo " +0x5d90: "Long " +0x5d91: "Xiang " +0x5d92: "Ceng " +0x5d93: "Bo " +0x5d94: "Qin " +0x5d95: "Jiao " +0x5d96: "Yan " +0x5d97: "Lao " +0x5d98: "Zhan " +0x5d99: "Lin " +0x5d9a: "Liao " +0x5d9b: "Liao " +0x5d9c: "Jin " +0x5d9d: "Deng " +0x5d9e: "Duo " +0x5d9f: "Zun " +0x5da0: "Jiao " +0x5da1: "Gui " +0x5da2: "Yao " +0x5da3: "Qiao " +0x5da4: "Yao " +0x5da5: "Jue " +0x5da6: "Zhan " +0x5da7: "Yi " +0x5da8: "Xue " +0x5da9: "Nao " +0x5daa: "Ye " +0x5dab: "Ye " +0x5dac: "Yi " +0x5dad: "E " +0x5dae: "Xian " +0x5daf: "Ji " +0x5db0: "Xie " +0x5db1: "Ke " +0x5db2: "Xi " +0x5db3: "Di " +0x5db4: "Ao " +0x5db5: "Zui " +0x5db6: "[?] " +0x5db7: "Ni " +0x5db8: "Rong " +0x5db9: "Dao " +0x5dba: "Ling " +0x5dbb: "Za " +0x5dbc: "Yu " +0x5dbd: "Yue " +0x5dbe: "Yin " +0x5dbf: "[?] " +0x5dc0: "Jie " +0x5dc1: "Li " +0x5dc2: "Sui " +0x5dc3: "Long " +0x5dc4: "Long " +0x5dc5: "Dian " +0x5dc6: "Ying " +0x5dc7: "Xi " +0x5dc8: "Ju " +0x5dc9: "Chan " +0x5dca: "Ying " +0x5dcb: "Kui " +0x5dcc: "Yan " +0x5dcd: "Wei " +0x5dce: "Nao " +0x5dcf: "Quan " +0x5dd0: "Chao " +0x5dd1: "Cuan " +0x5dd2: "Luan " +0x5dd3: "Dian " +0x5dd4: "Dian " +0x5dd5: "[?] " +0x5dd6: "Yan " +0x5dd7: "Yan " +0x5dd8: "Yan " +0x5dd9: "Nao " +0x5dda: "Yan " +0x5ddb: "Chuan " +0x5ddc: "Gui " +0x5ddd: "Chuan " +0x5dde: "Zhou " +0x5ddf: "Huang " +0x5de0: "Jing " +0x5de1: "Xun " +0x5de2: "Chao " +0x5de3: "Chao " +0x5de4: "Lie " +0x5de5: "Gong " +0x5de6: "Zuo " +0x5de7: "Qiao " +0x5de8: "Ju " +0x5de9: "Gong " +0x5dea: "Kek " +0x5deb: "Wu " +0x5dec: "Pwu " +0x5ded: "Pwu " +0x5dee: "Chai " +0x5def: "Qiu " +0x5df0: "Qiu " +0x5df1: "Ji " +0x5df2: "Yi " +0x5df3: "Si " +0x5df4: "Ba " +0x5df5: "Zhi " +0x5df6: "Zhao " +0x5df7: "Xiang " +0x5df8: "Yi " +0x5df9: "Jin " +0x5dfa: "Xun " +0x5dfb: "Juan " +0x5dfc: "Phas " +0x5dfd: "Xun " +0x5dfe: "Jin " +0x5dff: "Fu " +/* x05e */ +0x5e00: "Za " +0x5e01: "Bi " +0x5e02: "Shi " +0x5e03: "Bu " +0x5e04: "Ding " +0x5e05: "Shuai " +0x5e06: "Fan " +0x5e07: "Nie " +0x5e08: "Shi " +0x5e09: "Fen " +0x5e0a: "Pa " +0x5e0b: "Zhi " +0x5e0c: "Xi " +0x5e0d: "Hu " +0x5e0e: "Dan " +0x5e0f: "Wei " +0x5e10: "Zhang " +0x5e11: "Tang " +0x5e12: "Dai " +0x5e13: "Ma " +0x5e14: "Pei " +0x5e15: "Pa " +0x5e16: "Tie " +0x5e17: "Fu " +0x5e18: "Lian " +0x5e19: "Zhi " +0x5e1a: "Zhou " +0x5e1b: "Bo " +0x5e1c: "Zhi " +0x5e1d: "Di " +0x5e1e: "Mo " +0x5e1f: "Yi " +0x5e20: "Yi " +0x5e21: "Ping " +0x5e22: "Qia " +0x5e23: "Juan " +0x5e24: "Ru " +0x5e25: "Shuai " +0x5e26: "Dai " +0x5e27: "Zheng " +0x5e28: "Shui " +0x5e29: "Qiao " +0x5e2a: "Zhen " +0x5e2b: "Shi " +0x5e2c: "Qun " +0x5e2d: "Xi " +0x5e2e: "Bang " +0x5e2f: "Dai " +0x5e30: "Gui " +0x5e31: "Chou " +0x5e32: "Ping " +0x5e33: "Zhang " +0x5e34: "Sha " +0x5e35: "Wan " +0x5e36: "Dai " +0x5e37: "Wei " +0x5e38: "Chang " +0x5e39: "Sha " +0x5e3a: "Qi " +0x5e3b: "Ze " +0x5e3c: "Guo " +0x5e3d: "Mao " +0x5e3e: "Du " +0x5e3f: "Hou " +0x5e40: "Zheng " +0x5e41: "Xu " +0x5e42: "Mi " +0x5e43: "Wei " +0x5e44: "Wo " +0x5e45: "Fu " +0x5e46: "Yi " +0x5e47: "Bang " +0x5e48: "Ping " +0x5e49: "Tazuna " +0x5e4a: "Gong " +0x5e4b: "Pan " +0x5e4c: "Huang " +0x5e4d: "Dao " +0x5e4e: "Mi " +0x5e4f: "Jia " +0x5e50: "Teng " +0x5e51: "Hui " +0x5e52: "Zhong " +0x5e53: "Shan " +0x5e54: "Man " +0x5e55: "Mu " +0x5e56: "Biao " +0x5e57: "Guo " +0x5e58: "Ze " +0x5e59: "Mu " +0x5e5a: "Bang " +0x5e5b: "Zhang " +0x5e5c: "Jiong " +0x5e5d: "Chan " +0x5e5e: "Fu " +0x5e5f: "Zhi " +0x5e60: "Hu " +0x5e61: "Fan " +0x5e62: "Chuang " +0x5e63: "Bi " +0x5e64: "Hei " +0x5e65: "[?] " +0x5e66: "Mi " +0x5e67: "Qiao " +0x5e68: "Chan " +0x5e69: "Fen " +0x5e6a: "Meng " +0x5e6b: "Bang " +0x5e6c: "Chou " +0x5e6d: "Mie " +0x5e6e: "Chu " +0x5e6f: "Jie " +0x5e70: "Xian " +0x5e71: "Lan " +0x5e72: "Gan " +0x5e73: "Ping " +0x5e74: "Nian " +0x5e75: "Qian " +0x5e76: "Bing " +0x5e77: "Bing " +0x5e78: "Xing " +0x5e79: "Gan " +0x5e7a: "Yao " +0x5e7b: "Huan " +0x5e7c: "You " +0x5e7d: "You " +0x5e7e: "Ji " +0x5e7f: "Yan " +0x5e80: "Pi " +0x5e81: "Ting " +0x5e82: "Ze " +0x5e83: "Guang " +0x5e84: "Zhuang " +0x5e85: "Mo " +0x5e86: "Qing " +0x5e87: "Bi " +0x5e88: "Qin " +0x5e89: "Dun " +0x5e8a: "Chuang " +0x5e8b: "Gui " +0x5e8c: "Ya " +0x5e8d: "Bai " +0x5e8e: "Jie " +0x5e8f: "Xu " +0x5e90: "Lu " +0x5e91: "Wu " +0x5e92: "[?] " +0x5e93: "Ku " +0x5e94: "Ying " +0x5e95: "Di " +0x5e96: "Pao " +0x5e97: "Dian " +0x5e98: "Ya " +0x5e99: "Miao " +0x5e9a: "Geng " +0x5e9b: "Ci " +0x5e9c: "Fu " +0x5e9d: "Tong " +0x5e9e: "Pang " +0x5e9f: "Fei " +0x5ea0: "Xiang " +0x5ea1: "Yi " +0x5ea2: "Zhi " +0x5ea3: "Tiao " +0x5ea4: "Zhi " +0x5ea5: "Xiu " +0x5ea6: "Du " +0x5ea7: "Zuo " +0x5ea8: "Xiao " +0x5ea9: "Tu " +0x5eaa: "Gui " +0x5eab: "Ku " +0x5eac: "Pang " +0x5ead: "Ting " +0x5eae: "You " +0x5eaf: "Bu " +0x5eb0: "Ding " +0x5eb1: "Cheng " +0x5eb2: "Lai " +0x5eb3: "Bei " +0x5eb4: "Ji " +0x5eb5: "An " +0x5eb6: "Shu " +0x5eb7: "Kang " +0x5eb8: "Yong " +0x5eb9: "Tuo " +0x5eba: "Song " +0x5ebb: "Shu " +0x5ebc: "Qing " +0x5ebd: "Yu " +0x5ebe: "Yu " +0x5ebf: "Miao " +0x5ec0: "Sou " +0x5ec1: "Ce " +0x5ec2: "Xiang " +0x5ec3: "Fei " +0x5ec4: "Jiu " +0x5ec5: "He " +0x5ec6: "Hui " +0x5ec7: "Liu " +0x5ec8: "Sha " +0x5ec9: "Lian " +0x5eca: "Lang " +0x5ecb: "Sou " +0x5ecc: "Jian " +0x5ecd: "Pou " +0x5ece: "Qing " +0x5ecf: "Jiu " +0x5ed0: "Jiu " +0x5ed1: "Qin " +0x5ed2: "Ao " +0x5ed3: "Kuo " +0x5ed4: "Lou " +0x5ed5: "Yin " +0x5ed6: "Liao " +0x5ed7: "Dai " +0x5ed8: "Lu " +0x5ed9: "Yi " +0x5eda: "Chu " +0x5edb: "Chan " +0x5edc: "Tu " +0x5edd: "Si " +0x5ede: "Xin " +0x5edf: "Miao " +0x5ee0: "Chang " +0x5ee1: "Wu " +0x5ee2: "Fei " +0x5ee3: "Guang " +0x5ee4: "Koc " +0x5ee5: "Kuai " +0x5ee6: "Bi " +0x5ee7: "Qiang " +0x5ee8: "Xie " +0x5ee9: "Lin " +0x5eea: "Lin " +0x5eeb: "Liao " +0x5eec: "Lu " +0x5eed: "[?] " +0x5eee: "Ying " +0x5eef: "Xian " +0x5ef0: "Ting " +0x5ef1: "Yong " +0x5ef2: "Li " +0x5ef3: "Ting " +0x5ef4: "Yin " +0x5ef5: "Xun " +0x5ef6: "Yan " +0x5ef7: "Ting " +0x5ef8: "Di " +0x5ef9: "Po " +0x5efa: "Jian " +0x5efb: "Hui " +0x5efc: "Nai " +0x5efd: "Hui " +0x5efe: "Gong " +0x5eff: "Nian " +/* x05f */ +0x5f00: "Kai " +0x5f01: "Bian " +0x5f02: "Yi " +0x5f03: "Qi " +0x5f04: "Nong " +0x5f05: "Fen " +0x5f06: "Ju " +0x5f07: "Yan " +0x5f08: "Yi " +0x5f09: "Zang " +0x5f0a: "Bi " +0x5f0b: "Yi " +0x5f0c: "Yi " +0x5f0d: "Er " +0x5f0e: "San " +0x5f0f: "Shi " +0x5f10: "Er " +0x5f11: "Shi " +0x5f12: "Shi " +0x5f13: "Gong " +0x5f14: "Diao " +0x5f15: "Yin " +0x5f16: "Hu " +0x5f17: "Fu " +0x5f18: "Hong " +0x5f19: "Wu " +0x5f1a: "Tui " +0x5f1b: "Chi " +0x5f1c: "Jiang " +0x5f1d: "Ba " +0x5f1e: "Shen " +0x5f1f: "Di " +0x5f20: "Zhang " +0x5f21: "Jue " +0x5f22: "Tao " +0x5f23: "Fu " +0x5f24: "Di " +0x5f25: "Mi " +0x5f26: "Xian " +0x5f27: "Hu " +0x5f28: "Chao " +0x5f29: "Nu " +0x5f2a: "Jing " +0x5f2b: "Zhen " +0x5f2c: "Yi " +0x5f2d: "Mi " +0x5f2e: "Quan " +0x5f2f: "Wan " +0x5f30: "Shao " +0x5f31: "Ruo " +0x5f32: "Xuan " +0x5f33: "Jing " +0x5f34: "Dun " +0x5f35: "Zhang " +0x5f36: "Jiang " +0x5f37: "Qiang " +0x5f38: "Peng " +0x5f39: "Dan " +0x5f3a: "Qiang " +0x5f3b: "Bi " +0x5f3c: "Bi " +0x5f3d: "She " +0x5f3e: "Dan " +0x5f3f: "Jian " +0x5f40: "Gou " +0x5f41: "Sei " +0x5f42: "Fa " +0x5f43: "Bi " +0x5f44: "Kou " +0x5f45: "Nagi " +0x5f46: "Bie " +0x5f47: "Xiao " +0x5f48: "Dan " +0x5f49: "Kuo " +0x5f4a: "Qiang " +0x5f4b: "Hong " +0x5f4c: "Mi " +0x5f4d: "Kuo " +0x5f4e: "Wan " +0x5f4f: "Jue " +0x5f50: "Ji " +0x5f51: "Ji " +0x5f52: "Gui " +0x5f53: "Dang " +0x5f54: "Lu " +0x5f55: "Lu " +0x5f56: "Tuan " +0x5f57: "Hui " +0x5f58: "Zhi " +0x5f59: "Hui " +0x5f5a: "Hui " +0x5f5b: "Yi " +0x5f5c: "Yi " +0x5f5d: "Yi " +0x5f5e: "Yi " +0x5f5f: "Huo " +0x5f60: "Huo " +0x5f61: "Shan " +0x5f62: "Xing " +0x5f63: "Wen " +0x5f64: "Tong " +0x5f65: "Yan " +0x5f66: "Yan " +0x5f67: "Yu " +0x5f68: "Chi " +0x5f69: "Cai " +0x5f6a: "Biao " +0x5f6b: "Diao " +0x5f6c: "Bin " +0x5f6d: "Peng " +0x5f6e: "Yong " +0x5f6f: "Piao " +0x5f70: "Zhang " +0x5f71: "Ying " +0x5f72: "Chi " +0x5f73: "Chi " +0x5f74: "Zhuo " +0x5f75: "Tuo " +0x5f76: "Ji " +0x5f77: "Pang " +0x5f78: "Zhong " +0x5f79: "Yi " +0x5f7a: "Wang " +0x5f7b: "Che " +0x5f7c: "Bi " +0x5f7d: "Chi " +0x5f7e: "Ling " +0x5f7f: "Fu " +0x5f80: "Wang " +0x5f81: "Zheng " +0x5f82: "Cu " +0x5f83: "Wang " +0x5f84: "Jing " +0x5f85: "Dai " +0x5f86: "Xi " +0x5f87: "Xun " +0x5f88: "Hen " +0x5f89: "Yang " +0x5f8a: "Huai " +0x5f8b: "Lu " +0x5f8c: "Hou " +0x5f8d: "Wa " +0x5f8e: "Cheng " +0x5f8f: "Zhi " +0x5f90: "Xu " +0x5f91: "Jing " +0x5f92: "Tu " +0x5f93: "Cong " +0x5f94: "[?] " +0x5f95: "Lai " +0x5f96: "Cong " +0x5f97: "De " +0x5f98: "Pai " +0x5f99: "Xi " +0x5f9a: "[?] " +0x5f9b: "Qi " +0x5f9c: "Chang " +0x5f9d: "Zhi " +0x5f9e: "Cong " +0x5f9f: "Zhou " +0x5fa0: "Lai " +0x5fa1: "Yu " +0x5fa2: "Xie " +0x5fa3: "Jie " +0x5fa4: "Jian " +0x5fa5: "Chi " +0x5fa6: "Jia " +0x5fa7: "Bian " +0x5fa8: "Huang " +0x5fa9: "Fu " +0x5faa: "Xun " +0x5fab: "Wei " +0x5fac: "Pang " +0x5fad: "Yao " +0x5fae: "Wei " +0x5faf: "Xi " +0x5fb0: "Zheng " +0x5fb1: "Piao " +0x5fb2: "Chi " +0x5fb3: "De " +0x5fb4: "Zheng " +0x5fb5: "Zheng " +0x5fb6: "Bie " +0x5fb7: "De " +0x5fb8: "Chong " +0x5fb9: "Che " +0x5fba: "Jiao " +0x5fbb: "Wei " +0x5fbc: "Jiao " +0x5fbd: "Hui " +0x5fbe: "Mei " +0x5fbf: "Long " +0x5fc0: "Xiang " +0x5fc1: "Bao " +0x5fc2: "Qu " +0x5fc3: "Xin " +0x5fc4: "Shu " +0x5fc5: "Bi " +0x5fc6: "Yi " +0x5fc7: "Le " +0x5fc8: "Ren " +0x5fc9: "Dao " +0x5fca: "Ding " +0x5fcb: "Gai " +0x5fcc: "Ji " +0x5fcd: "Ren " +0x5fce: "Ren " +0x5fcf: "Chan " +0x5fd0: "Tan " +0x5fd1: "Te " +0x5fd2: "Te " +0x5fd3: "Gan " +0x5fd4: "Qi " +0x5fd5: "Shi " +0x5fd6: "Cun " +0x5fd7: "Zhi " +0x5fd8: "Wang " +0x5fd9: "Mang " +0x5fda: "Xi " +0x5fdb: "Fan " +0x5fdc: "Ying " +0x5fdd: "Tian " +0x5fde: "Min " +0x5fdf: "Min " +0x5fe0: "Zhong " +0x5fe1: "Chong " +0x5fe2: "Wu " +0x5fe3: "Ji " +0x5fe4: "Wu " +0x5fe5: "Xi " +0x5fe6: "Ye " +0x5fe7: "You " +0x5fe8: "Wan " +0x5fe9: "Cong " +0x5fea: "Zhong " +0x5feb: "Kuai " +0x5fec: "Yu " +0x5fed: "Bian " +0x5fee: "Zhi " +0x5fef: "Qi " +0x5ff0: "Cui " +0x5ff1: "Chen " +0x5ff2: "Tai " +0x5ff3: "Tun " +0x5ff4: "Qian " +0x5ff5: "Nian " +0x5ff6: "Hun " +0x5ff7: "Xiong " +0x5ff8: "Niu " +0x5ff9: "Wang " +0x5ffa: "Xian " +0x5ffb: "Xin " +0x5ffc: "Kang " +0x5ffd: "Hu " +0x5ffe: "Kai " +0x5fff: "Fen " +/* x060 */ +0x6000: "Huai " +0x6001: "Tai " +0x6002: "Song " +0x6003: "Wu " +0x6004: "Ou " +0x6005: "Chang " +0x6006: "Chuang " +0x6007: "Ju " +0x6008: "Yi " +0x6009: "Bao " +0x600a: "Chao " +0x600b: "Min " +0x600c: "Pei " +0x600d: "Zuo " +0x600e: "Zen " +0x600f: "Yang " +0x6010: "Kou " +0x6011: "Ban " +0x6012: "Nu " +0x6013: "Nao " +0x6014: "Zheng " +0x6015: "Pa " +0x6016: "Bu " +0x6017: "Tie " +0x6018: "Gu " +0x6019: "Hu " +0x601a: "Ju " +0x601b: "Da " +0x601c: "Lian " +0x601d: "Si " +0x601e: "Chou " +0x601f: "Di " +0x6020: "Dai " +0x6021: "Yi " +0x6022: "Tu " +0x6023: "You " +0x6024: "Fu " +0x6025: "Ji " +0x6026: "Peng " +0x6027: "Xing " +0x6028: "Yuan " +0x6029: "Ni " +0x602a: "Guai " +0x602b: "Fu " +0x602c: "Xi " +0x602d: "Bi " +0x602e: "You " +0x602f: "Qie " +0x6030: "Xuan " +0x6031: "Cong " +0x6032: "Bing " +0x6033: "Huang " +0x6034: "Xu " +0x6035: "Chu " +0x6036: "Pi " +0x6037: "Xi " +0x6038: "Xi " +0x6039: "Tan " +0x603a: "Koraeru " +0x603b: "Zong " +0x603c: "Dui " +0x603d: "[?] " +0x603e: "Ki " +0x603f: "Yi " +0x6040: "Chi " +0x6041: "Ren " +0x6042: "Xun " +0x6043: "Shi " +0x6044: "Xi " +0x6045: "Lao " +0x6046: "Heng " +0x6047: "Kuang " +0x6048: "Mu " +0x6049: "Zhi " +0x604a: "Xie " +0x604b: "Lian " +0x604c: "Tiao " +0x604d: "Huang " +0x604e: "Die " +0x604f: "Hao " +0x6050: "Kong " +0x6051: "Gui " +0x6052: "Heng " +0x6053: "Xi " +0x6054: "Xiao " +0x6055: "Shu " +0x6056: "S " +0x6057: "Kua " +0x6058: "Qiu " +0x6059: "Yang " +0x605a: "Hui " +0x605b: "Hui " +0x605c: "Chi " +0x605d: "Jia " +0x605e: "Yi " +0x605f: "Xiong " +0x6060: "Guai " +0x6061: "Lin " +0x6062: "Hui " +0x6063: "Zi " +0x6064: "Xu " +0x6065: "Chi " +0x6066: "Xiang " +0x6067: "Nu " +0x6068: "Hen " +0x6069: "En " +0x606a: "Ke " +0x606b: "Tong " +0x606c: "Tian " +0x606d: "Gong " +0x606e: "Quan " +0x606f: "Xi " +0x6070: "Qia " +0x6071: "Yue " +0x6072: "Peng " +0x6073: "Ken " +0x6074: "De " +0x6075: "Hui " +0x6076: "E " +0x6077: "Kyuu " +0x6078: "Tong " +0x6079: "Yan " +0x607a: "Kai " +0x607b: "Ce " +0x607c: "Nao " +0x607d: "Yun " +0x607e: "Mang " +0x607f: "Yong " +0x6080: "Yong " +0x6081: "Yuan " +0x6082: "Pi " +0x6083: "Kun " +0x6084: "Qiao " +0x6085: "Yue " +0x6086: "Yu " +0x6087: "Yu " +0x6088: "Jie " +0x6089: "Xi " +0x608a: "Zhe " +0x608b: "Lin " +0x608c: "Ti " +0x608d: "Han " +0x608e: "Hao " +0x608f: "Qie " +0x6090: "Ti " +0x6091: "Bu " +0x6092: "Yi " +0x6093: "Qian " +0x6094: "Hui " +0x6095: "Xi " +0x6096: "Bei " +0x6097: "Man " +0x6098: "Yi " +0x6099: "Heng " +0x609a: "Song " +0x609b: "Quan " +0x609c: "Cheng " +0x609d: "Hui " +0x609e: "Wu " +0x609f: "Wu " +0x60a0: "You " +0x60a1: "Li " +0x60a2: "Liang " +0x60a3: "Huan " +0x60a4: "Cong " +0x60a5: "Yi " +0x60a6: "Yue " +0x60a7: "Li " +0x60a8: "Nin " +0x60a9: "Nao " +0x60aa: "E " +0x60ab: "Que " +0x60ac: "Xuan " +0x60ad: "Qian " +0x60ae: "Wu " +0x60af: "Min " +0x60b0: "Cong " +0x60b1: "Fei " +0x60b2: "Bei " +0x60b3: "Duo " +0x60b4: "Cui " +0x60b5: "Chang " +0x60b6: "Men " +0x60b7: "Li " +0x60b8: "Ji " +0x60b9: "Guan " +0x60ba: "Guan " +0x60bb: "Xing " +0x60bc: "Dao " +0x60bd: "Qi " +0x60be: "Kong " +0x60bf: "Tian " +0x60c0: "Lun " +0x60c1: "Xi " +0x60c2: "Kan " +0x60c3: "Kun " +0x60c4: "Ni " +0x60c5: "Qing " +0x60c6: "Chou " +0x60c7: "Dun " +0x60c8: "Guo " +0x60c9: "Chan " +0x60ca: "Liang " +0x60cb: "Wan " +0x60cc: "Yuan " +0x60cd: "Jin " +0x60ce: "Ji " +0x60cf: "Lin " +0x60d0: "Yu " +0x60d1: "Huo " +0x60d2: "He " +0x60d3: "Quan " +0x60d4: "Tan " +0x60d5: "Ti " +0x60d6: "Ti " +0x60d7: "Nie " +0x60d8: "Wang " +0x60d9: "Chuo " +0x60da: "Bu " +0x60db: "Hun " +0x60dc: "Xi " +0x60dd: "Tang " +0x60de: "Xin " +0x60df: "Wei " +0x60e0: "Hui " +0x60e1: "E " +0x60e2: "Rui " +0x60e3: "Zong " +0x60e4: "Jian " +0x60e5: "Yong " +0x60e6: "Dian " +0x60e7: "Ju " +0x60e8: "Can " +0x60e9: "Cheng " +0x60ea: "De " +0x60eb: "Bei " +0x60ec: "Qie " +0x60ed: "Can " +0x60ee: "Dan " +0x60ef: "Guan " +0x60f0: "Duo " +0x60f1: "Nao " +0x60f2: "Yun " +0x60f3: "Xiang " +0x60f4: "Zhui " +0x60f5: "Die " +0x60f6: "Huang " +0x60f7: "Chun " +0x60f8: "Qiong " +0x60f9: "Re " +0x60fa: "Xing " +0x60fb: "Ce " +0x60fc: "Bian " +0x60fd: "Hun " +0x60fe: "Zong " +0x60ff: "Ti " +/* x061 */ +0x6100: "Qiao " +0x6101: "Chou " +0x6102: "Bei " +0x6103: "Xuan " +0x6104: "Wei " +0x6105: "Ge " +0x6106: "Qian " +0x6107: "Wei " +0x6108: "Yu " +0x6109: "Yu " +0x610a: "Bi " +0x610b: "Xuan " +0x610c: "Huan " +0x610d: "Min " +0x610e: "Bi " +0x610f: "Yi " +0x6110: "Mian " +0x6111: "Yong " +0x6112: "Kai " +0x6113: "Dang " +0x6114: "Yin " +0x6115: "E " +0x6116: "Chen " +0x6117: "Mou " +0x6118: "Ke " +0x6119: "Ke " +0x611a: "Yu " +0x611b: "Ai " +0x611c: "Qie " +0x611d: "Yan " +0x611e: "Nuo " +0x611f: "Gan " +0x6120: "Yun " +0x6121: "Zong " +0x6122: "Sai " +0x6123: "Leng " +0x6124: "Fen " +0x6125: "[?] " +0x6126: "Kui " +0x6127: "Kui " +0x6128: "Que " +0x6129: "Gong " +0x612a: "Yun " +0x612b: "Su " +0x612c: "Su " +0x612d: "Qi " +0x612e: "Yao " +0x612f: "Song " +0x6130: "Huang " +0x6131: "Ji " +0x6132: "Gu " +0x6133: "Ju " +0x6134: "Chuang " +0x6135: "Ni " +0x6136: "Xie " +0x6137: "Kai " +0x6138: "Zheng " +0x6139: "Yong " +0x613a: "Cao " +0x613b: "Sun " +0x613c: "Shen " +0x613d: "Bo " +0x613e: "Kai " +0x613f: "Yuan " +0x6140: "Xie " +0x6141: "Hun " +0x6142: "Yong " +0x6143: "Yang " +0x6144: "Li " +0x6145: "Sao " +0x6146: "Tao " +0x6147: "Yin " +0x6148: "Ci " +0x6149: "Xu " +0x614a: "Qian " +0x614b: "Tai " +0x614c: "Huang " +0x614d: "Yun " +0x614e: "Shen " +0x614f: "Ming " +0x6150: "[?] " +0x6151: "She " +0x6152: "Cong " +0x6153: "Piao " +0x6154: "Mo " +0x6155: "Mu " +0x6156: "Guo " +0x6157: "Chi " +0x6158: "Can " +0x6159: "Can " +0x615a: "Can " +0x615b: "Cui " +0x615c: "Min " +0x615d: "Te " +0x615e: "Zhang " +0x615f: "Tong " +0x6160: "Ao " +0x6161: "Shuang " +0x6162: "Man " +0x6163: "Guan " +0x6164: "Que " +0x6165: "Zao " +0x6166: "Jiu " +0x6167: "Hui " +0x6168: "Kai " +0x6169: "Lian " +0x616a: "Ou " +0x616b: "Song " +0x616c: "Jin " +0x616d: "Yin " +0x616e: "Lu " +0x616f: "Shang " +0x6170: "Wei " +0x6171: "Tuan " +0x6172: "Man " +0x6173: "Qian " +0x6174: "She " +0x6175: "Yong " +0x6176: "Qing " +0x6177: "Kang " +0x6178: "Di " +0x6179: "Zhi " +0x617a: "Lou " +0x617b: "Juan " +0x617c: "Qi " +0x617d: "Qi " +0x617e: "Yu " +0x617f: "Ping " +0x6180: "Liao " +0x6181: "Cong " +0x6182: "You " +0x6183: "Chong " +0x6184: "Zhi " +0x6185: "Tong " +0x6186: "Cheng " +0x6187: "Qi " +0x6188: "Qu " +0x6189: "Peng " +0x618a: "Bei " +0x618b: "Bie " +0x618c: "Chun " +0x618d: "Jiao " +0x618e: "Zeng " +0x618f: "Chi " +0x6190: "Lian " +0x6191: "Ping " +0x6192: "Kui " +0x6193: "Hui " +0x6194: "Qiao " +0x6195: "Cheng " +0x6196: "Yin " +0x6197: "Yin " +0x6198: "Xi " +0x6199: "Xi " +0x619a: "Dan " +0x619b: "Tan " +0x619c: "Duo " +0x619d: "Dui " +0x619e: "Dui " +0x619f: "Su " +0x61a0: "Jue " +0x61a1: "Ce " +0x61a2: "Xiao " +0x61a3: "Fan " +0x61a4: "Fen " +0x61a5: "Lao " +0x61a6: "Lao " +0x61a7: "Chong " +0x61a8: "Han " +0x61a9: "Qi " +0x61aa: "Xian " +0x61ab: "Min " +0x61ac: "Jing " +0x61ad: "Liao " +0x61ae: "Wu " +0x61af: "Can " +0x61b0: "Jue " +0x61b1: "Cu " +0x61b2: "Xian " +0x61b3: "Tan " +0x61b4: "Sheng " +0x61b5: "Pi " +0x61b6: "Yi " +0x61b7: "Chu " +0x61b8: "Xian " +0x61b9: "Nao " +0x61ba: "Dan " +0x61bb: "Tan " +0x61bc: "Jing " +0x61bd: "Song " +0x61be: "Han " +0x61bf: "Jiao " +0x61c0: "Wai " +0x61c1: "Huan " +0x61c2: "Dong " +0x61c3: "Qin " +0x61c4: "Qin " +0x61c5: "Qu " +0x61c6: "Cao " +0x61c7: "Ken " +0x61c8: "Xie " +0x61c9: "Ying " +0x61ca: "Ao " +0x61cb: "Mao " +0x61cc: "Yi " +0x61cd: "Lin " +0x61ce: "Se " +0x61cf: "Jun " +0x61d0: "Huai " +0x61d1: "Men " +0x61d2: "Lan " +0x61d3: "Ai " +0x61d4: "Lin " +0x61d5: "Yan " +0x61d6: "Gua " +0x61d7: "Xia " +0x61d8: "Chi " +0x61d9: "Yu " +0x61da: "Yin " +0x61db: "Dai " +0x61dc: "Meng " +0x61dd: "Ai " +0x61de: "Meng " +0x61df: "Dui " +0x61e0: "Qi " +0x61e1: "Mo " +0x61e2: "Lan " +0x61e3: "Men " +0x61e4: "Chou " +0x61e5: "Zhi " +0x61e6: "Nuo " +0x61e7: "Nuo " +0x61e8: "Yan " +0x61e9: "Yang " +0x61ea: "Bo " +0x61eb: "Zhi " +0x61ec: "Kuang " +0x61ed: "Kuang " +0x61ee: "You " +0x61ef: "Fu " +0x61f0: "Liu " +0x61f1: "Mie " +0x61f2: "Cheng " +0x61f3: "[?] " +0x61f4: "Chan " +0x61f5: "Meng " +0x61f6: "Lan " +0x61f7: "Huai " +0x61f8: "Xuan " +0x61f9: "Rang " +0x61fa: "Chan " +0x61fb: "Ji " +0x61fc: "Ju " +0x61fd: "Huan " +0x61fe: "She " +0x61ff: "Yi " +/* x062 */ +0x6200: "Lian " +0x6201: "Nan " +0x6202: "Mi " +0x6203: "Tang " +0x6204: "Jue " +0x6205: "Gang " +0x6206: "Gang " +0x6207: "Gang " +0x6208: "Ge " +0x6209: "Yue " +0x620a: "Wu " +0x620b: "Jian " +0x620c: "Xu " +0x620d: "Shu " +0x620e: "Rong " +0x620f: "Xi " +0x6210: "Cheng " +0x6211: "Wo " +0x6212: "Jie " +0x6213: "Ge " +0x6214: "Jian " +0x6215: "Qiang " +0x6216: "Huo " +0x6217: "Qiang " +0x6218: "Zhan " +0x6219: "Dong " +0x621a: "Qi " +0x621b: "Jia " +0x621c: "Die " +0x621d: "Zei " +0x621e: "Jia " +0x621f: "Ji " +0x6220: "Shi " +0x6221: "Kan " +0x6222: "Ji " +0x6223: "Kui " +0x6224: "Gai " +0x6225: "Deng " +0x6226: "Zhan " +0x6227: "Chuang " +0x6228: "Ge " +0x6229: "Jian " +0x622a: "Jie " +0x622b: "Yu " +0x622c: "Jian " +0x622d: "Yan " +0x622e: "Lu " +0x622f: "Xi " +0x6230: "Zhan " +0x6231: "Xi " +0x6232: "Xi " +0x6233: "Chuo " +0x6234: "Dai " +0x6235: "Qu " +0x6236: "Hu " +0x6237: "Hu " +0x6238: "Hu " +0x6239: "E " +0x623a: "Shi " +0x623b: "Li " +0x623c: "Mao " +0x623d: "Hu " +0x623e: "Li " +0x623f: "Fang " +0x6240: "Suo " +0x6241: "Bian " +0x6242: "Dian " +0x6243: "Jiong " +0x6244: "Shang " +0x6245: "Yi " +0x6246: "Yi " +0x6247: "Shan " +0x6248: "Hu " +0x6249: "Fei " +0x624a: "Yan " +0x624b: "Shou " +0x624c: "T " +0x624d: "Cai " +0x624e: "Zha " +0x624f: "Qiu " +0x6250: "Le " +0x6251: "Bu " +0x6252: "Ba " +0x6253: "Da " +0x6254: "Reng " +0x6255: "Fu " +0x6256: "Hameru " +0x6257: "Zai " +0x6258: "Tuo " +0x6259: "Zhang " +0x625a: "Diao " +0x625b: "Kang " +0x625c: "Yu " +0x625d: "Ku " +0x625e: "Han " +0x625f: "Shen " +0x6260: "Cha " +0x6261: "Yi " +0x6262: "Gu " +0x6263: "Kou " +0x6264: "Wu " +0x6265: "Tuo " +0x6266: "Qian " +0x6267: "Zhi " +0x6268: "Ren " +0x6269: "Kuo " +0x626a: "Men " +0x626b: "Sao " +0x626c: "Yang " +0x626d: "Niu " +0x626e: "Ban " +0x626f: "Che " +0x6270: "Rao " +0x6271: "Xi " +0x6272: "Qian " +0x6273: "Ban " +0x6274: "Jia " +0x6275: "Yu " +0x6276: "Fu " +0x6277: "Ao " +0x6278: "Xi " +0x6279: "Pi " +0x627a: "Zhi " +0x627b: "Zi " +0x627c: "E " +0x627d: "Dun " +0x627e: "Zhao " +0x627f: "Cheng " +0x6280: "Ji " +0x6281: "Yan " +0x6282: "Kuang " +0x6283: "Bian " +0x6284: "Chao " +0x6285: "Ju " +0x6286: "Wen " +0x6287: "Hu " +0x6288: "Yue " +0x6289: "Jue " +0x628a: "Ba " +0x628b: "Qin " +0x628c: "Zhen " +0x628d: "Zheng " +0x628e: "Yun " +0x628f: "Wan " +0x6290: "Nu " +0x6291: "Yi " +0x6292: "Shu " +0x6293: "Zhua " +0x6294: "Pou " +0x6295: "Tou " +0x6296: "Dou " +0x6297: "Kang " +0x6298: "Zhe " +0x6299: "Pou " +0x629a: "Fu " +0x629b: "Pao " +0x629c: "Ba " +0x629d: "Ao " +0x629e: "Ze " +0x629f: "Tuan " +0x62a0: "Kou " +0x62a1: "Lun " +0x62a2: "Qiang " +0x62a3: "[?] " +0x62a4: "Hu " +0x62a5: "Bao " +0x62a6: "Bing " +0x62a7: "Zhi " +0x62a8: "Peng " +0x62a9: "Tan " +0x62aa: "Pu " +0x62ab: "Pi " +0x62ac: "Tai " +0x62ad: "Yao " +0x62ae: "Zhen " +0x62af: "Zha " +0x62b0: "Yang " +0x62b1: "Bao " +0x62b2: "He " +0x62b3: "Ni " +0x62b4: "Yi " +0x62b5: "Di " +0x62b6: "Chi " +0x62b7: "Pi " +0x62b8: "Za " +0x62b9: "Mo " +0x62ba: "Mo " +0x62bb: "Shen " +0x62bc: "Ya " +0x62bd: "Chou " +0x62be: "Qu " +0x62bf: "Min " +0x62c0: "Chu " +0x62c1: "Jia " +0x62c2: "Fu " +0x62c3: "Zhan " +0x62c4: "Zhu " +0x62c5: "Dan " +0x62c6: "Chai " +0x62c7: "Mu " +0x62c8: "Nian " +0x62c9: "La " +0x62ca: "Fu " +0x62cb: "Pao " +0x62cc: "Ban " +0x62cd: "Pai " +0x62ce: "Ling " +0x62cf: "Na " +0x62d0: "Guai " +0x62d1: "Qian " +0x62d2: "Ju " +0x62d3: "Tuo " +0x62d4: "Ba " +0x62d5: "Tuo " +0x62d6: "Tuo " +0x62d7: "Ao " +0x62d8: "Ju " +0x62d9: "Zhuo " +0x62da: "Pan " +0x62db: "Zhao " +0x62dc: "Bai " +0x62dd: "Bai " +0x62de: "Di " +0x62df: "Ni " +0x62e0: "Ju " +0x62e1: "Kuo " +0x62e2: "Long " +0x62e3: "Jian " +0x62e4: "[?] " +0x62e5: "Yong " +0x62e6: "Lan " +0x62e7: "Ning " +0x62e8: "Bo " +0x62e9: "Ze " +0x62ea: "Qian " +0x62eb: "Hen " +0x62ec: "Gua " +0x62ed: "Shi " +0x62ee: "Jie " +0x62ef: "Zheng " +0x62f0: "Nin " +0x62f1: "Gong " +0x62f2: "Gong " +0x62f3: "Quan " +0x62f4: "Shuan " +0x62f5: "Cun " +0x62f6: "Zan " +0x62f7: "Kao " +0x62f8: "Chi " +0x62f9: "Xie " +0x62fa: "Ce " +0x62fb: "Hui " +0x62fc: "Pin " +0x62fd: "Zhuai " +0x62fe: "Shi " +0x62ff: "Na " +/* x063 */ +0x6300: "Bo " +0x6301: "Chi " +0x6302: "Gua " +0x6303: "Zhi " +0x6304: "Kuo " +0x6305: "Duo " +0x6306: "Duo " +0x6307: "Zhi " +0x6308: "Qie " +0x6309: "An " +0x630a: "Nong " +0x630b: "Zhen " +0x630c: "Ge " +0x630d: "Jiao " +0x630e: "Ku " +0x630f: "Dong " +0x6310: "Ru " +0x6311: "Tiao " +0x6312: "Lie " +0x6313: "Zha " +0x6314: "Lu " +0x6315: "Die " +0x6316: "Wa " +0x6317: "Jue " +0x6318: "Mushiru " +0x6319: "Ju " +0x631a: "Zhi " +0x631b: "Luan " +0x631c: "Ya " +0x631d: "Zhua " +0x631e: "Ta " +0x631f: "Xie " +0x6320: "Nao " +0x6321: "Dang " +0x6322: "Jiao " +0x6323: "Zheng " +0x6324: "Ji " +0x6325: "Hui " +0x6326: "Xun " +0x6327: "Ku " +0x6328: "Ai " +0x6329: "Tuo " +0x632a: "Nuo " +0x632b: "Cuo " +0x632c: "Bo " +0x632d: "Geng " +0x632e: "Ti " +0x632f: "Zhen " +0x6330: "Cheng " +0x6331: "Suo " +0x6332: "Suo " +0x6333: "Keng " +0x6334: "Mei " +0x6335: "Long " +0x6336: "Ju " +0x6337: "Peng " +0x6338: "Jian " +0x6339: "Yi " +0x633a: "Ting " +0x633b: "Shan " +0x633c: "Nuo " +0x633d: "Wan " +0x633e: "Xie " +0x633f: "Cha " +0x6340: "Feng " +0x6341: "Jiao " +0x6342: "Wu " +0x6343: "Jun " +0x6344: "Jiu " +0x6345: "Tong " +0x6346: "Kun " +0x6347: "Huo " +0x6348: "Tu " +0x6349: "Zhuo " +0x634a: "Pou " +0x634b: "Le " +0x634c: "Ba " +0x634d: "Han " +0x634e: "Shao " +0x634f: "Nie " +0x6350: "Juan " +0x6351: "Ze " +0x6352: "Song " +0x6353: "Ye " +0x6354: "Jue " +0x6355: "Bu " +0x6356: "Huan " +0x6357: "Bu " +0x6358: "Zun " +0x6359: "Yi " +0x635a: "Zhai " +0x635b: "Lu " +0x635c: "Sou " +0x635d: "Tuo " +0x635e: "Lao " +0x635f: "Sun " +0x6360: "Bang " +0x6361: "Jian " +0x6362: "Huan " +0x6363: "Dao " +0x6364: "[?] " +0x6365: "Wan " +0x6366: "Qin " +0x6367: "Peng " +0x6368: "She " +0x6369: "Lie " +0x636a: "Min " +0x636b: "Men " +0x636c: "Fu " +0x636d: "Bai " +0x636e: "Ju " +0x636f: "Dao " +0x6370: "Wo " +0x6371: "Ai " +0x6372: "Juan " +0x6373: "Yue " +0x6374: "Zong " +0x6375: "Chen " +0x6376: "Chui " +0x6377: "Jie " +0x6378: "Tu " +0x6379: "Ben " +0x637a: "Na " +0x637b: "Nian " +0x637c: "Nuo " +0x637d: "Zu " +0x637e: "Wo " +0x637f: "Xi " +0x6380: "Xian " +0x6381: "Cheng " +0x6382: "Dian " +0x6383: "Sao " +0x6384: "Lun " +0x6385: "Qing " +0x6386: "Gang " +0x6387: "Duo " +0x6388: "Shou " +0x6389: "Diao " +0x638a: "Pou " +0x638b: "Di " +0x638c: "Zhang " +0x638d: "Gun " +0x638e: "Ji " +0x638f: "Tao " +0x6390: "Qia " +0x6391: "Qi " +0x6392: "Pai " +0x6393: "Shu " +0x6394: "Qian " +0x6395: "Ling " +0x6396: "Yi " +0x6397: "Ya " +0x6398: "Jue " +0x6399: "Zheng " +0x639a: "Liang " +0x639b: "Gua " +0x639c: "Yi " +0x639d: "Huo " +0x639e: "Shan " +0x639f: "Zheng " +0x63a0: "Lue " +0x63a1: "Cai " +0x63a2: "Tan " +0x63a3: "Che " +0x63a4: "Bing " +0x63a5: "Jie " +0x63a6: "Ti " +0x63a7: "Kong " +0x63a8: "Tui " +0x63a9: "Yan " +0x63aa: "Cuo " +0x63ab: "Zou " +0x63ac: "Ju " +0x63ad: "Tian " +0x63ae: "Qian " +0x63af: "Ken " +0x63b0: "Bai " +0x63b1: "Shou " +0x63b2: "Jie " +0x63b3: "Lu " +0x63b4: "Guo " +0x63b5: "Haba " +0x63b6: "[?] " +0x63b7: "Zhi " +0x63b8: "Dan " +0x63b9: "Mang " +0x63ba: "Xian " +0x63bb: "Sao " +0x63bc: "Guan " +0x63bd: "Peng " +0x63be: "Yuan " +0x63bf: "Nuo " +0x63c0: "Jian " +0x63c1: "Zhen " +0x63c2: "Jiu " +0x63c3: "Jian " +0x63c4: "Yu " +0x63c5: "Yan " +0x63c6: "Kui " +0x63c7: "Nan " +0x63c8: "Hong " +0x63c9: "Rou " +0x63ca: "Pi " +0x63cb: "Wei " +0x63cc: "Sai " +0x63cd: "Zou " +0x63ce: "Xuan " +0x63cf: "Miao " +0x63d0: "Ti " +0x63d1: "Nie " +0x63d2: "Cha " +0x63d3: "Shi " +0x63d4: "Zong " +0x63d5: "Zhen " +0x63d6: "Yi " +0x63d7: "Shun " +0x63d8: "Heng " +0x63d9: "Bian " +0x63da: "Yang " +0x63db: "Huan " +0x63dc: "Yan " +0x63dd: "Zuan " +0x63de: "An " +0x63df: "Xu " +0x63e0: "Ya " +0x63e1: "Wo " +0x63e2: "Ke " +0x63e3: "Chuai " +0x63e4: "Ji " +0x63e5: "Ti " +0x63e6: "La " +0x63e7: "La " +0x63e8: "Cheng " +0x63e9: "Kai " +0x63ea: "Jiu " +0x63eb: "Jiu " +0x63ec: "Tu " +0x63ed: "Jie " +0x63ee: "Hui " +0x63ef: "Geng " +0x63f0: "Chong " +0x63f1: "Shuo " +0x63f2: "She " +0x63f3: "Xie " +0x63f4: "Yuan " +0x63f5: "Qian " +0x63f6: "Ye " +0x63f7: "Cha " +0x63f8: "Zha " +0x63f9: "Bei " +0x63fa: "Yao " +0x63fb: "[?] " +0x63fc: "[?] " +0x63fd: "Lan " +0x63fe: "Wen " +0x63ff: "Qin " +/* x064 */ +0x6400: "Chan " +0x6401: "Ge " +0x6402: "Lou " +0x6403: "Zong " +0x6404: "Geng " +0x6405: "Jiao " +0x6406: "Gou " +0x6407: "Qin " +0x6408: "Yong " +0x6409: "Que " +0x640a: "Chou " +0x640b: "Chi " +0x640c: "Zhan " +0x640d: "Sun " +0x640e: "Sun " +0x640f: "Bo " +0x6410: "Chu " +0x6411: "Rong " +0x6412: "Beng " +0x6413: "Cuo " +0x6414: "Sao " +0x6415: "Ke " +0x6416: "Yao " +0x6417: "Dao " +0x6418: "Zhi " +0x6419: "Nu " +0x641a: "Xie " +0x641b: "Jian " +0x641c: "Sou " +0x641d: "Qiu " +0x641e: "Gao " +0x641f: "Xian " +0x6420: "Shuo " +0x6421: "Sang " +0x6422: "Jin " +0x6423: "Mie " +0x6424: "E " +0x6425: "Chui " +0x6426: "Nuo " +0x6427: "Shan " +0x6428: "Ta " +0x6429: "Jie " +0x642a: "Tang " +0x642b: "Pan " +0x642c: "Ban " +0x642d: "Da " +0x642e: "Li " +0x642f: "Tao " +0x6430: "Hu " +0x6431: "Zhi " +0x6432: "Wa " +0x6433: "Xia " +0x6434: "Qian " +0x6435: "Wen " +0x6436: "Qiang " +0x6437: "Tian " +0x6438: "Zhen " +0x6439: "E " +0x643a: "Xi " +0x643b: "Nuo " +0x643c: "Quan " +0x643d: "Cha " +0x643e: "Zha " +0x643f: "Ge " +0x6440: "Wu " +0x6441: "En " +0x6442: "She " +0x6443: "Kang " +0x6444: "She " +0x6445: "Shu " +0x6446: "Bai " +0x6447: "Yao " +0x6448: "Bin " +0x6449: "Sou " +0x644a: "Tan " +0x644b: "Sa " +0x644c: "Chan " +0x644d: "Suo " +0x644e: "Liao " +0x644f: "Chong " +0x6450: "Chuang " +0x6451: "Guo " +0x6452: "Bing " +0x6453: "Feng " +0x6454: "Shuai " +0x6455: "Di " +0x6456: "Qi " +0x6457: "Sou " +0x6458: "Zhai " +0x6459: "Lian " +0x645a: "Tang " +0x645b: "Chi " +0x645c: "Guan " +0x645d: "Lu " +0x645e: "Luo " +0x645f: "Lou " +0x6460: "Zong " +0x6461: "Gai " +0x6462: "Hu " +0x6463: "Zha " +0x6464: "Chuang " +0x6465: "Tang " +0x6466: "Hua " +0x6467: "Cui " +0x6468: "Nai " +0x6469: "Mo " +0x646a: "Jiang " +0x646b: "Gui " +0x646c: "Ying " +0x646d: "Zhi " +0x646e: "Ao " +0x646f: "Zhi " +0x6470: "Nie " +0x6471: "Man " +0x6472: "Shan " +0x6473: "Kou " +0x6474: "Shu " +0x6475: "Suo " +0x6476: "Tuan " +0x6477: "Jiao " +0x6478: "Mo " +0x6479: "Mo " +0x647a: "Zhe " +0x647b: "Xian " +0x647c: "Keng " +0x647d: "Piao " +0x647e: "Jiang " +0x647f: "Yin " +0x6480: "Gou " +0x6481: "Qian " +0x6482: "Lue " +0x6483: "Ji " +0x6484: "Ying " +0x6485: "Jue " +0x6486: "Pie " +0x6487: "Pie " +0x6488: "Lao " +0x6489: "Dun " +0x648a: "Xian " +0x648b: "Ruan " +0x648c: "Kui " +0x648d: "Zan " +0x648e: "Yi " +0x648f: "Xun " +0x6490: "Cheng " +0x6491: "Cheng " +0x6492: "Sa " +0x6493: "Nao " +0x6494: "Heng " +0x6495: "Si " +0x6496: "Qian " +0x6497: "Huang " +0x6498: "Da " +0x6499: "Zun " +0x649a: "Nian " +0x649b: "Lin " +0x649c: "Zheng " +0x649d: "Hui " +0x649e: "Zhuang " +0x649f: "Jiao " +0x64a0: "Ji " +0x64a1: "Cao " +0x64a2: "Dan " +0x64a3: "Dan " +0x64a4: "Che " +0x64a5: "Bo " +0x64a6: "Che " +0x64a7: "Jue " +0x64a8: "Xiao " +0x64a9: "Liao " +0x64aa: "Ben " +0x64ab: "Fu " +0x64ac: "Qiao " +0x64ad: "Bo " +0x64ae: "Cuo " +0x64af: "Zhuo " +0x64b0: "Zhuan " +0x64b1: "Tuo " +0x64b2: "Pu " +0x64b3: "Qin " +0x64b4: "Dun " +0x64b5: "Nian " +0x64b6: "[?] " +0x64b7: "Xie " +0x64b8: "Lu " +0x64b9: "Jiao " +0x64ba: "Cuan " +0x64bb: "Ta " +0x64bc: "Han " +0x64bd: "Qiao " +0x64be: "Zhua " +0x64bf: "Jian " +0x64c0: "Gan " +0x64c1: "Yong " +0x64c2: "Lei " +0x64c3: "Kuo " +0x64c4: "Lu " +0x64c5: "Shan " +0x64c6: "Zhuo " +0x64c7: "Ze " +0x64c8: "Pu " +0x64c9: "Chuo " +0x64ca: "Ji " +0x64cb: "Dang " +0x64cc: "Suo " +0x64cd: "Cao " +0x64ce: "Qing " +0x64cf: "Jing " +0x64d0: "Huan " +0x64d1: "Jie " +0x64d2: "Qin " +0x64d3: "Kuai " +0x64d4: "Dan " +0x64d5: "Xi " +0x64d6: "Ge " +0x64d7: "Pi " +0x64d8: "Bo " +0x64d9: "Ao " +0x64da: "Ju " +0x64db: "Ye " +0x64dc: "[?] " +0x64dd: "Mang " +0x64de: "Sou " +0x64df: "Mi " +0x64e0: "Ji " +0x64e1: "Tai " +0x64e2: "Zhuo " +0x64e3: "Dao " +0x64e4: "Xing " +0x64e5: "Lan " +0x64e6: "Ca " +0x64e7: "Ju " +0x64e8: "Ye " +0x64e9: "Ru " +0x64ea: "Ye " +0x64eb: "Ye " +0x64ec: "Ni " +0x64ed: "Hu " +0x64ee: "Ji " +0x64ef: "Bin " +0x64f0: "Ning " +0x64f1: "Ge " +0x64f2: "Zhi " +0x64f3: "Jie " +0x64f4: "Kuo " +0x64f5: "Mo " +0x64f6: "Jian " +0x64f7: "Xie " +0x64f8: "Lie " +0x64f9: "Tan " +0x64fa: "Bai " +0x64fb: "Sou " +0x64fc: "Lu " +0x64fd: "Lue " +0x64fe: "Rao " +0x64ff: "Zhi " +/* x065 */ +0x6500: "Pan " +0x6501: "Yang " +0x6502: "Lei " +0x6503: "Sa " +0x6504: "Shu " +0x6505: "Zan " +0x6506: "Nian " +0x6507: "Xian " +0x6508: "Jun " +0x6509: "Huo " +0x650a: "Li " +0x650b: "La " +0x650c: "Han " +0x650d: "Ying " +0x650e: "Lu " +0x650f: "Long " +0x6510: "Qian " +0x6511: "Qian " +0x6512: "Zan " +0x6513: "Qian " +0x6514: "Lan " +0x6515: "San " +0x6516: "Ying " +0x6517: "Mei " +0x6518: "Rang " +0x6519: "Chan " +0x651a: "[?] " +0x651b: "Cuan " +0x651c: "Xi " +0x651d: "She " +0x651e: "Luo " +0x651f: "Jun " +0x6520: "Mi " +0x6521: "Li " +0x6522: "Zan " +0x6523: "Luan " +0x6524: "Tan " +0x6525: "Zuan " +0x6526: "Li " +0x6527: "Dian " +0x6528: "Wa " +0x6529: "Dang " +0x652a: "Jiao " +0x652b: "Jue " +0x652c: "Lan " +0x652d: "Li " +0x652e: "Nang " +0x652f: "Zhi " +0x6530: "Gui " +0x6531: "Gui " +0x6532: "Qi " +0x6533: "Xin " +0x6534: "Pu " +0x6535: "Sui " +0x6536: "Shou " +0x6537: "Kao " +0x6538: "You " +0x6539: "Gai " +0x653a: "Yi " +0x653b: "Gong " +0x653c: "Gan " +0x653d: "Ban " +0x653e: "Fang " +0x653f: "Zheng " +0x6540: "Bo " +0x6541: "Dian " +0x6542: "Kou " +0x6543: "Min " +0x6544: "Wu " +0x6545: "Gu " +0x6546: "He " +0x6547: "Ce " +0x6548: "Xiao " +0x6549: "Mi " +0x654a: "Chu " +0x654b: "Ge " +0x654c: "Di " +0x654d: "Xu " +0x654e: "Jiao " +0x654f: "Min " +0x6550: "Chen " +0x6551: "Jiu " +0x6552: "Zhen " +0x6553: "Duo " +0x6554: "Yu " +0x6555: "Chi " +0x6556: "Ao " +0x6557: "Bai " +0x6558: "Xu " +0x6559: "Jiao " +0x655a: "Duo " +0x655b: "Lian " +0x655c: "Nie " +0x655d: "Bi " +0x655e: "Chang " +0x655f: "Dian " +0x6560: "Duo " +0x6561: "Yi " +0x6562: "Gan " +0x6563: "San " +0x6564: "Ke " +0x6565: "Yan " +0x6566: "Dun " +0x6567: "Qi " +0x6568: "Dou " +0x6569: "Xiao " +0x656a: "Duo " +0x656b: "Jiao " +0x656c: "Jing " +0x656d: "Yang " +0x656e: "Xia " +0x656f: "Min " +0x6570: "Shu " +0x6571: "Ai " +0x6572: "Qiao " +0x6573: "Ai " +0x6574: "Zheng " +0x6575: "Di " +0x6576: "Zhen " +0x6577: "Fu " +0x6578: "Shu " +0x6579: "Liao " +0x657a: "Qu " +0x657b: "Xiong " +0x657c: "Xi " +0x657d: "Jiao " +0x657e: "Sen " +0x657f: "Jiao " +0x6580: "Zhuo " +0x6581: "Yi " +0x6582: "Lian " +0x6583: "Bi " +0x6584: "Li " +0x6585: "Xiao " +0x6586: "Xiao " +0x6587: "Wen " +0x6588: "Xue " +0x6589: "Qi " +0x658a: "Qi " +0x658b: "Zhai " +0x658c: "Bin " +0x658d: "Jue " +0x658e: "Zhai " +0x658f: "[?] " +0x6590: "Fei " +0x6591: "Ban " +0x6592: "Ban " +0x6593: "Lan " +0x6594: "Yu " +0x6595: "Lan " +0x6596: "Wei " +0x6597: "Dou " +0x6598: "Sheng " +0x6599: "Liao " +0x659a: "Jia " +0x659b: "Hu " +0x659c: "Xie " +0x659d: "Jia " +0x659e: "Yu " +0x659f: "Zhen " +0x65a0: "Jiao " +0x65a1: "Wo " +0x65a2: "Tou " +0x65a3: "Chu " +0x65a4: "Jin " +0x65a5: "Chi " +0x65a6: "Yin " +0x65a7: "Fu " +0x65a8: "Qiang " +0x65a9: "Zhan " +0x65aa: "Qu " +0x65ab: "Zhuo " +0x65ac: "Zhan " +0x65ad: "Duan " +0x65ae: "Zhuo " +0x65af: "Si " +0x65b0: "Xin " +0x65b1: "Zhuo " +0x65b2: "Zhuo " +0x65b3: "Qin " +0x65b4: "Lin " +0x65b5: "Zhuo " +0x65b6: "Chu " +0x65b7: "Duan " +0x65b8: "Zhu " +0x65b9: "Fang " +0x65ba: "Xie " +0x65bb: "Hang " +0x65bc: "Yu " +0x65bd: "Shi " +0x65be: "Pei " +0x65bf: "You " +0x65c0: "Mye " +0x65c1: "Pang " +0x65c2: "Qi " +0x65c3: "Zhan " +0x65c4: "Mao " +0x65c5: "Lu " +0x65c6: "Pei " +0x65c7: "Pi " +0x65c8: "Liu " +0x65c9: "Fu " +0x65ca: "Fang " +0x65cb: "Xuan " +0x65cc: "Jing " +0x65cd: "Jing " +0x65ce: "Ni " +0x65cf: "Zu " +0x65d0: "Zhao " +0x65d1: "Yi " +0x65d2: "Liu " +0x65d3: "Shao " +0x65d4: "Jian " +0x65d5: "Es " +0x65d6: "Yi " +0x65d7: "Qi " +0x65d8: "Zhi " +0x65d9: "Fan " +0x65da: "Piao " +0x65db: "Fan " +0x65dc: "Zhan " +0x65dd: "Guai " +0x65de: "Sui " +0x65df: "Yu " +0x65e0: "Wu " +0x65e1: "Ji " +0x65e2: "Ji " +0x65e3: "Ji " +0x65e4: "Huo " +0x65e5: "Ri " +0x65e6: "Dan " +0x65e7: "Jiu " +0x65e8: "Zhi " +0x65e9: "Zao " +0x65ea: "Xie " +0x65eb: "Tiao " +0x65ec: "Xun " +0x65ed: "Xu " +0x65ee: "Xu " +0x65ef: "Xu " +0x65f0: "Gan " +0x65f1: "Han " +0x65f2: "Tai " +0x65f3: "Di " +0x65f4: "Xu " +0x65f5: "Chan " +0x65f6: "Shi " +0x65f7: "Kuang " +0x65f8: "Yang " +0x65f9: "Shi " +0x65fa: "Wang " +0x65fb: "Min " +0x65fc: "Min " +0x65fd: "Tun " +0x65fe: "Chun " +0x65ff: "Wu " +/* x066 */ +0x6600: "Yun " +0x6601: "Bei " +0x6602: "Ang " +0x6603: "Ze " +0x6604: "Ban " +0x6605: "Jie " +0x6606: "Kun " +0x6607: "Sheng " +0x6608: "Hu " +0x6609: "Fang " +0x660a: "Hao " +0x660b: "Gui " +0x660c: "Chang " +0x660d: "Xuan " +0x660e: "Ming " +0x660f: "Hun " +0x6610: "Fen " +0x6611: "Qin " +0x6612: "Hu " +0x6613: "Yi " +0x6614: "Xi " +0x6615: "Xin " +0x6616: "Yan " +0x6617: "Ze " +0x6618: "Fang " +0x6619: "Tan " +0x661a: "Shen " +0x661b: "Ju " +0x661c: "Yang " +0x661d: "Zan " +0x661e: "Bing " +0x661f: "Xing " +0x6620: "Ying " +0x6621: "Xuan " +0x6622: "Pei " +0x6623: "Zhen " +0x6624: "Ling " +0x6625: "Chun " +0x6626: "Hao " +0x6627: "Mei " +0x6628: "Zuo " +0x6629: "Mo " +0x662a: "Bian " +0x662b: "Xu " +0x662c: "Hun " +0x662d: "Zhao " +0x662e: "Zong " +0x662f: "Shi " +0x6630: "Shi " +0x6631: "Yu " +0x6632: "Fei " +0x6633: "Die " +0x6634: "Mao " +0x6635: "Ni " +0x6636: "Chang " +0x6637: "Wen " +0x6638: "Dong " +0x6639: "Ai " +0x663a: "Bing " +0x663b: "Ang " +0x663c: "Zhou " +0x663d: "Long " +0x663e: "Xian " +0x663f: "Kuang " +0x6640: "Tiao " +0x6641: "Chao " +0x6642: "Shi " +0x6643: "Huang " +0x6644: "Huang " +0x6645: "Xuan " +0x6646: "Kui " +0x6647: "Xu " +0x6648: "Jiao " +0x6649: "Jin " +0x664a: "Zhi " +0x664b: "Jin " +0x664c: "Shang " +0x664d: "Tong " +0x664e: "Hong " +0x664f: "Yan " +0x6650: "Gai " +0x6651: "Xiang " +0x6652: "Shai " +0x6653: "Xiao " +0x6654: "Ye " +0x6655: "Yun " +0x6656: "Hui " +0x6657: "Han " +0x6658: "Han " +0x6659: "Jun " +0x665a: "Wan " +0x665b: "Xian " +0x665c: "Kun " +0x665d: "Zhou " +0x665e: "Xi " +0x665f: "Cheng " +0x6660: "Sheng " +0x6661: "Bu " +0x6662: "Zhe " +0x6663: "Zhe " +0x6664: "Wu " +0x6665: "Han " +0x6666: "Hui " +0x6667: "Hao " +0x6668: "Chen " +0x6669: "Wan " +0x666a: "Tian " +0x666b: "Zhuo " +0x666c: "Zui " +0x666d: "Zhou " +0x666e: "Pu " +0x666f: "Jing " +0x6670: "Xi " +0x6671: "Shan " +0x6672: "Yi " +0x6673: "Xi " +0x6674: "Qing " +0x6675: "Qi " +0x6676: "Jing " +0x6677: "Gui " +0x6678: "Zhen " +0x6679: "Yi " +0x667a: "Zhi " +0x667b: "An " +0x667c: "Wan " +0x667d: "Lin " +0x667e: "Liang " +0x667f: "Chang " +0x6680: "Wang " +0x6681: "Xiao " +0x6682: "Zan " +0x6683: "Hi " +0x6684: "Xuan " +0x6685: "Xuan " +0x6686: "Yi " +0x6687: "Xia " +0x6688: "Yun " +0x6689: "Hui " +0x668a: "Fu " +0x668b: "Min " +0x668c: "Kui " +0x668d: "He " +0x668e: "Ying " +0x668f: "Du " +0x6690: "Wei " +0x6691: "Shu " +0x6692: "Qing " +0x6693: "Mao " +0x6694: "Nan " +0x6695: "Jian " +0x6696: "Nuan " +0x6697: "An " +0x6698: "Yang " +0x6699: "Chun " +0x669a: "Yao " +0x669b: "Suo " +0x669c: "Jin " +0x669d: "Ming " +0x669e: "Jiao " +0x669f: "Kai " +0x66a0: "Gao " +0x66a1: "Weng " +0x66a2: "Chang " +0x66a3: "Qi " +0x66a4: "Hao " +0x66a5: "Yan " +0x66a6: "Li " +0x66a7: "Ai " +0x66a8: "Ji " +0x66a9: "Gui " +0x66aa: "Men " +0x66ab: "Zan " +0x66ac: "Xie " +0x66ad: "Hao " +0x66ae: "Mu " +0x66af: "Mo " +0x66b0: "Cong " +0x66b1: "Ni " +0x66b2: "Zhang " +0x66b3: "Hui " +0x66b4: "Bao " +0x66b5: "Han " +0x66b6: "Xuan " +0x66b7: "Chuan " +0x66b8: "Liao " +0x66b9: "Xian " +0x66ba: "Dan " +0x66bb: "Jing " +0x66bc: "Pie " +0x66bd: "Lin " +0x66be: "Tun " +0x66bf: "Xi " +0x66c0: "Yi " +0x66c1: "Ji " +0x66c2: "Huang " +0x66c3: "Tai " +0x66c4: "Ye " +0x66c5: "Ye " +0x66c6: "Li " +0x66c7: "Tan " +0x66c8: "Tong " +0x66c9: "Xiao " +0x66ca: "Fei " +0x66cb: "Qin " +0x66cc: "Zhao " +0x66cd: "Hao " +0x66ce: "Yi " +0x66cf: "Xiang " +0x66d0: "Xing " +0x66d1: "Sen " +0x66d2: "Jiao " +0x66d3: "Bao " +0x66d4: "Jing " +0x66d5: "Yian " +0x66d6: "Ai " +0x66d7: "Ye " +0x66d8: "Ru " +0x66d9: "Shu " +0x66da: "Meng " +0x66db: "Xun " +0x66dc: "Yao " +0x66dd: "Pu " +0x66de: "Li " +0x66df: "Chen " +0x66e0: "Kuang " +0x66e1: "Die " +0x66e2: "[?] " +0x66e3: "Yan " +0x66e4: "Huo " +0x66e5: "Lu " +0x66e6: "Xi " +0x66e7: "Rong " +0x66e8: "Long " +0x66e9: "Nang " +0x66ea: "Luo " +0x66eb: "Luan " +0x66ec: "Shai " +0x66ed: "Tang " +0x66ee: "Yan " +0x66ef: "Chu " +0x66f0: "Yue " +0x66f1: "Yue " +0x66f2: "Qu " +0x66f3: "Yi " +0x66f4: "Geng " +0x66f5: "Ye " +0x66f6: "Hu " +0x66f7: "He " +0x66f8: "Shu " +0x66f9: "Cao " +0x66fa: "Cao " +0x66fb: "Noboru " +0x66fc: "Man " +0x66fd: "Ceng " +0x66fe: "Ceng " +0x66ff: "Ti " +/* x067 */ +0x6700: "Zui " +0x6701: "Can " +0x6702: "Xu " +0x6703: "Hui " +0x6704: "Yin " +0x6705: "Qie " +0x6706: "Fen " +0x6707: "Pi " +0x6708: "Yue " +0x6709: "You " +0x670a: "Ruan " +0x670b: "Peng " +0x670c: "Ban " +0x670d: "Fu " +0x670e: "Ling " +0x670f: "Fei " +0x6710: "Qu " +0x6711: "[?] " +0x6712: "Nu " +0x6713: "Tiao " +0x6714: "Shuo " +0x6715: "Zhen " +0x6716: "Lang " +0x6717: "Lang " +0x6718: "Juan " +0x6719: "Ming " +0x671a: "Huang " +0x671b: "Wang " +0x671c: "Tun " +0x671d: "Zhao " +0x671e: "Ji " +0x671f: "Qi " +0x6720: "Ying " +0x6721: "Zong " +0x6722: "Wang " +0x6723: "Tong " +0x6724: "Lang " +0x6725: "[?] " +0x6726: "Meng " +0x6727: "Long " +0x6728: "Mu " +0x6729: "Deng " +0x672a: "Wei " +0x672b: "Mo " +0x672c: "Ben " +0x672d: "Zha " +0x672e: "Zhu " +0x672f: "Zhu " +0x6730: "[?] " +0x6731: "Zhu " +0x6732: "Ren " +0x6733: "Ba " +0x6734: "Po " +0x6735: "Duo " +0x6736: "Duo " +0x6737: "Dao " +0x6738: "Li " +0x6739: "Qiu " +0x673a: "Ji " +0x673b: "Jiu " +0x673c: "Bi " +0x673d: "Xiu " +0x673e: "Ting " +0x673f: "Ci " +0x6740: "Sha " +0x6741: "Eburi " +0x6742: "Za " +0x6743: "Quan " +0x6744: "Qian " +0x6745: "Yu " +0x6746: "Gan " +0x6747: "Wu " +0x6748: "Cha " +0x6749: "Shan " +0x674a: "Xun " +0x674b: "Fan " +0x674c: "Wu " +0x674d: "Zi " +0x674e: "Li " +0x674f: "Xing " +0x6750: "Cai " +0x6751: "Cun " +0x6752: "Ren " +0x6753: "Shao " +0x6754: "Tuo " +0x6755: "Di " +0x6756: "Zhang " +0x6757: "Mang " +0x6758: "Chi " +0x6759: "Yi " +0x675a: "Gu " +0x675b: "Gong " +0x675c: "Du " +0x675d: "Yi " +0x675e: "Qi " +0x675f: "Shu " +0x6760: "Gang " +0x6761: "Tiao " +0x6762: "Moku " +0x6763: "Soma " +0x6764: "Tochi " +0x6765: "Lai " +0x6766: "Sugi " +0x6767: "Mang " +0x6768: "Yang " +0x6769: "Ma " +0x676a: "Miao " +0x676b: "Si " +0x676c: "Yuan " +0x676d: "Hang " +0x676e: "Fei " +0x676f: "Bei " +0x6770: "Jie " +0x6771: "Dong " +0x6772: "Gao " +0x6773: "Yao " +0x6774: "Xian " +0x6775: "Chu " +0x6776: "Qun " +0x6777: "Pa " +0x6778: "Shu " +0x6779: "Hua " +0x677a: "Xin " +0x677b: "Chou " +0x677c: "Zhu " +0x677d: "Chou " +0x677e: "Song " +0x677f: "Ban " +0x6780: "Song " +0x6781: "Ji " +0x6782: "Yue " +0x6783: "Jin " +0x6784: "Gou " +0x6785: "Ji " +0x6786: "Mao " +0x6787: "Pi " +0x6788: "Bi " +0x6789: "Wang " +0x678a: "Ang " +0x678b: "Fang " +0x678c: "Fen " +0x678d: "Yi " +0x678e: "Fu " +0x678f: "Nan " +0x6790: "Xi " +0x6791: "Hu " +0x6792: "Ya " +0x6793: "Dou " +0x6794: "Xun " +0x6795: "Zhen " +0x6796: "Yao " +0x6797: "Lin " +0x6798: "Rui " +0x6799: "E " +0x679a: "Mei " +0x679b: "Zhao " +0x679c: "Guo " +0x679d: "Zhi " +0x679e: "Cong " +0x679f: "Yun " +0x67a0: "Waku " +0x67a1: "Dou " +0x67a2: "Shu " +0x67a3: "Zao " +0x67a4: "[?] " +0x67a5: "Li " +0x67a6: "Haze " +0x67a7: "Jian " +0x67a8: "Cheng " +0x67a9: "Matsu " +0x67aa: "Qiang " +0x67ab: "Feng " +0x67ac: "Nan " +0x67ad: "Xiao " +0x67ae: "Xian " +0x67af: "Ku " +0x67b0: "Ping " +0x67b1: "Yi " +0x67b2: "Xi " +0x67b3: "Zhi " +0x67b4: "Guai " +0x67b5: "Xiao " +0x67b6: "Jia " +0x67b7: "Jia " +0x67b8: "Gou " +0x67b9: "Fu " +0x67ba: "Mo " +0x67bb: "Yi " +0x67bc: "Ye " +0x67bd: "Ye " +0x67be: "Shi " +0x67bf: "Nie " +0x67c0: "Bi " +0x67c1: "Duo " +0x67c2: "Yi " +0x67c3: "Ling " +0x67c4: "Bing " +0x67c5: "Ni " +0x67c6: "La " +0x67c7: "He " +0x67c8: "Pan " +0x67c9: "Fan " +0x67ca: "Zhong " +0x67cb: "Dai " +0x67cc: "Ci " +0x67cd: "Yang " +0x67ce: "Fu " +0x67cf: "Bo " +0x67d0: "Mou " +0x67d1: "Gan " +0x67d2: "Qi " +0x67d3: "Ran " +0x67d4: "Rou " +0x67d5: "Mao " +0x67d6: "Zhao " +0x67d7: "Song " +0x67d8: "Zhe " +0x67d9: "Xia " +0x67da: "You " +0x67db: "Shen " +0x67dc: "Ju " +0x67dd: "Tuo " +0x67de: "Zuo " +0x67df: "Nan " +0x67e0: "Ning " +0x67e1: "Yong " +0x67e2: "Di " +0x67e3: "Zhi " +0x67e4: "Zha " +0x67e5: "Cha " +0x67e6: "Dan " +0x67e7: "Gu " +0x67e8: "Pu " +0x67e9: "Jiu " +0x67ea: "Ao " +0x67eb: "Fu " +0x67ec: "Jian " +0x67ed: "Bo " +0x67ee: "Duo " +0x67ef: "Ke " +0x67f0: "Nai " +0x67f1: "Zhu " +0x67f2: "Bi " +0x67f3: "Liu " +0x67f4: "Chai " +0x67f5: "Zha " +0x67f6: "Si " +0x67f7: "Zhu " +0x67f8: "Pei " +0x67f9: "Shi " +0x67fa: "Guai " +0x67fb: "Cha " +0x67fc: "Yao " +0x67fd: "Jue " +0x67fe: "Jiu " +0x67ff: "Shi " +/* x068 */ +0x6800: "Zhi " +0x6801: "Liu " +0x6802: "Mei " +0x6803: "Hoy " +0x6804: "Rong " +0x6805: "Zha " +0x6806: "[?] " +0x6807: "Biao " +0x6808: "Zhan " +0x6809: "Jie " +0x680a: "Long " +0x680b: "Dong " +0x680c: "Lu " +0x680d: "Sayng " +0x680e: "Li " +0x680f: "Lan " +0x6810: "Yong " +0x6811: "Shu " +0x6812: "Xun " +0x6813: "Shuan " +0x6814: "Qi " +0x6815: "Zhen " +0x6816: "Qi " +0x6817: "Li " +0x6818: "Yi " +0x6819: "Xiang " +0x681a: "Zhen " +0x681b: "Li " +0x681c: "Su " +0x681d: "Gua " +0x681e: "Kan " +0x681f: "Bing " +0x6820: "Ren " +0x6821: "Xiao " +0x6822: "Bo " +0x6823: "Ren " +0x6824: "Bing " +0x6825: "Zi " +0x6826: "Chou " +0x6827: "Yi " +0x6828: "Jie " +0x6829: "Xu " +0x682a: "Zhu " +0x682b: "Jian " +0x682c: "Zui " +0x682d: "Er " +0x682e: "Er " +0x682f: "You " +0x6830: "Fa " +0x6831: "Gong " +0x6832: "Kao " +0x6833: "Lao " +0x6834: "Zhan " +0x6835: "Li " +0x6836: "Yin " +0x6837: "Yang " +0x6838: "He " +0x6839: "Gen " +0x683a: "Zhi " +0x683b: "Chi " +0x683c: "Ge " +0x683d: "Zai " +0x683e: "Luan " +0x683f: "Fu " +0x6840: "Jie " +0x6841: "Hang " +0x6842: "Gui " +0x6843: "Tao " +0x6844: "Guang " +0x6845: "Wei " +0x6846: "Kuang " +0x6847: "Ru " +0x6848: "An " +0x6849: "An " +0x684a: "Juan " +0x684b: "Yi " +0x684c: "Zhuo " +0x684d: "Ku " +0x684e: "Zhi " +0x684f: "Qiong " +0x6850: "Tong " +0x6851: "Sang " +0x6852: "Sang " +0x6853: "Huan " +0x6854: "Jie " +0x6855: "Jiu " +0x6856: "Xue " +0x6857: "Duo " +0x6858: "Zhui " +0x6859: "Yu " +0x685a: "Zan " +0x685b: "Kasei " +0x685c: "Ying " +0x685d: "Masu " +0x685e: "[?] " +0x685f: "Zhan " +0x6860: "Ya " +0x6861: "Nao " +0x6862: "Zhen " +0x6863: "Dang " +0x6864: "Qi " +0x6865: "Qiao " +0x6866: "Hua " +0x6867: "Kuai " +0x6868: "Jiang " +0x6869: "Zhuang " +0x686a: "Xun " +0x686b: "Suo " +0x686c: "Sha " +0x686d: "Zhen " +0x686e: "Bei " +0x686f: "Ting " +0x6870: "Gua " +0x6871: "Jing " +0x6872: "Bo " +0x6873: "Ben " +0x6874: "Fu " +0x6875: "Rui " +0x6876: "Tong " +0x6877: "Jue " +0x6878: "Xi " +0x6879: "Lang " +0x687a: "Liu " +0x687b: "Feng " +0x687c: "Qi " +0x687d: "Wen " +0x687e: "Jun " +0x687f: "Gan " +0x6880: "Cu " +0x6881: "Liang " +0x6882: "Qiu " +0x6883: "Ting " +0x6884: "You " +0x6885: "Mei " +0x6886: "Bang " +0x6887: "Long " +0x6888: "Peng " +0x6889: "Zhuang " +0x688a: "Di " +0x688b: "Xuan " +0x688c: "Tu " +0x688d: "Zao " +0x688e: "Ao " +0x688f: "Gu " +0x6890: "Bi " +0x6891: "Di " +0x6892: "Han " +0x6893: "Zi " +0x6894: "Zhi " +0x6895: "Ren " +0x6896: "Bei " +0x6897: "Geng " +0x6898: "Jian " +0x6899: "Huan " +0x689a: "Wan " +0x689b: "Nuo " +0x689c: "Jia " +0x689d: "Tiao " +0x689e: "Ji " +0x689f: "Xiao " +0x68a0: "Lu " +0x68a1: "Huan " +0x68a2: "Shao " +0x68a3: "Cen " +0x68a4: "Fen " +0x68a5: "Song " +0x68a6: "Meng " +0x68a7: "Wu " +0x68a8: "Li " +0x68a9: "Li " +0x68aa: "Dou " +0x68ab: "Cen " +0x68ac: "Ying " +0x68ad: "Suo " +0x68ae: "Ju " +0x68af: "Ti " +0x68b0: "Jie " +0x68b1: "Kun " +0x68b2: "Zhuo " +0x68b3: "Shu " +0x68b4: "Chan " +0x68b5: "Fan " +0x68b6: "Wei " +0x68b7: "Jing " +0x68b8: "Li " +0x68b9: "Bing " +0x68ba: "Fumoto " +0x68bb: "Shikimi " +0x68bc: "Tao " +0x68bd: "Zhi " +0x68be: "Lai " +0x68bf: "Lian " +0x68c0: "Jian " +0x68c1: "Zhuo " +0x68c2: "Ling " +0x68c3: "Li " +0x68c4: "Qi " +0x68c5: "Bing " +0x68c6: "Zhun " +0x68c7: "Cong " +0x68c8: "Qian " +0x68c9: "Mian " +0x68ca: "Qi " +0x68cb: "Qi " +0x68cc: "Cai " +0x68cd: "Gun " +0x68ce: "Chan " +0x68cf: "Te " +0x68d0: "Fei " +0x68d1: "Pai " +0x68d2: "Bang " +0x68d3: "Pou " +0x68d4: "Hun " +0x68d5: "Zong " +0x68d6: "Cheng " +0x68d7: "Zao " +0x68d8: "Ji " +0x68d9: "Li " +0x68da: "Peng " +0x68db: "Yu " +0x68dc: "Yu " +0x68dd: "Gu " +0x68de: "Hun " +0x68df: "Dong " +0x68e0: "Tang " +0x68e1: "Gang " +0x68e2: "Wang " +0x68e3: "Di " +0x68e4: "Xi " +0x68e5: "Fan " +0x68e6: "Cheng " +0x68e7: "Zhan " +0x68e8: "Qi " +0x68e9: "Yuan " +0x68ea: "Yan " +0x68eb: "Yu " +0x68ec: "Quan " +0x68ed: "Yi " +0x68ee: "Sen " +0x68ef: "Ren " +0x68f0: "Chui " +0x68f1: "Leng " +0x68f2: "Qi " +0x68f3: "Zhuo " +0x68f4: "Fu " +0x68f5: "Ke " +0x68f6: "Lai " +0x68f7: "Zou " +0x68f8: "Zou " +0x68f9: "Zhuo " +0x68fa: "Guan " +0x68fb: "Fen " +0x68fc: "Fen " +0x68fd: "Chen " +0x68fe: "Qiong " +0x68ff: "Nie " +/* x069 */ +0x6900: "Wan " +0x6901: "Guo " +0x6902: "Lu " +0x6903: "Hao " +0x6904: "Jie " +0x6905: "Yi " +0x6906: "Chou " +0x6907: "Ju " +0x6908: "Ju " +0x6909: "Cheng " +0x690a: "Zuo " +0x690b: "Liang " +0x690c: "Qiang " +0x690d: "Zhi " +0x690e: "Zhui " +0x690f: "Ya " +0x6910: "Ju " +0x6911: "Bei " +0x6912: "Jiao " +0x6913: "Zhuo " +0x6914: "Zi " +0x6915: "Bin " +0x6916: "Peng " +0x6917: "Ding " +0x6918: "Chu " +0x6919: "Chang " +0x691a: "Kunugi " +0x691b: "Momiji " +0x691c: "Jian " +0x691d: "Gui " +0x691e: "Xi " +0x691f: "Du " +0x6920: "Qian " +0x6921: "Kunugi " +0x6922: "Soko " +0x6923: "Shide " +0x6924: "Luo " +0x6925: "Zhi " +0x6926: "Ken " +0x6927: "Myeng " +0x6928: "Tafu " +0x6929: "[?] " +0x692a: "Peng " +0x692b: "Zhan " +0x692c: "[?] " +0x692d: "Tuo " +0x692e: "Sen " +0x692f: "Duo " +0x6930: "Ye " +0x6931: "Fou " +0x6932: "Wei " +0x6933: "Wei " +0x6934: "Duan " +0x6935: "Jia " +0x6936: "Zong " +0x6937: "Jian " +0x6938: "Yi " +0x6939: "Shen " +0x693a: "Xi " +0x693b: "Yan " +0x693c: "Yan " +0x693d: "Chuan " +0x693e: "Zhan " +0x693f: "Chun " +0x6940: "Yu " +0x6941: "He " +0x6942: "Zha " +0x6943: "Wo " +0x6944: "Pian " +0x6945: "Bi " +0x6946: "Yao " +0x6947: "Huo " +0x6948: "Xu " +0x6949: "Ruo " +0x694a: "Yang " +0x694b: "La " +0x694c: "Yan " +0x694d: "Ben " +0x694e: "Hun " +0x694f: "Kui " +0x6950: "Jie " +0x6951: "Kui " +0x6952: "Si " +0x6953: "Feng " +0x6954: "Xie " +0x6955: "Tuo " +0x6956: "Zhi " +0x6957: "Jian " +0x6958: "Mu " +0x6959: "Mao " +0x695a: "Chu " +0x695b: "Hu " +0x695c: "Hu " +0x695d: "Lian " +0x695e: "Leng " +0x695f: "Ting " +0x6960: "Nan " +0x6961: "Yu " +0x6962: "You " +0x6963: "Mei " +0x6964: "Song " +0x6965: "Xuan " +0x6966: "Xuan " +0x6967: "Ying " +0x6968: "Zhen " +0x6969: "Pian " +0x696a: "Ye " +0x696b: "Ji " +0x696c: "Jie " +0x696d: "Ye " +0x696e: "Chu " +0x696f: "Shun " +0x6970: "Yu " +0x6971: "Cou " +0x6972: "Wei " +0x6973: "Mei " +0x6974: "Di " +0x6975: "Ji " +0x6976: "Jie " +0x6977: "Kai " +0x6978: "Qiu " +0x6979: "Ying " +0x697a: "Rou " +0x697b: "Heng " +0x697c: "Lou " +0x697d: "Le " +0x697e: "Hazou " +0x697f: "Katsura " +0x6980: "Pin " +0x6981: "Muro " +0x6982: "Gai " +0x6983: "Tan " +0x6984: "Lan " +0x6985: "Yun " +0x6986: "Yu " +0x6987: "Chen " +0x6988: "Lu " +0x6989: "Ju " +0x698a: "Sakaki " +0x698b: "[?] " +0x698c: "Pi " +0x698d: "Xie " +0x698e: "Jia " +0x698f: "Yi " +0x6990: "Zhan " +0x6991: "Fu " +0x6992: "Nai " +0x6993: "Mi " +0x6994: "Lang " +0x6995: "Rong " +0x6996: "Gu " +0x6997: "Jian " +0x6998: "Ju " +0x6999: "Ta " +0x699a: "Yao " +0x699b: "Zhen " +0x699c: "Bang " +0x699d: "Sha " +0x699e: "Yuan " +0x699f: "Zi " +0x69a0: "Ming " +0x69a1: "Su " +0x69a2: "Jia " +0x69a3: "Yao " +0x69a4: "Jie " +0x69a5: "Huang " +0x69a6: "Gan " +0x69a7: "Fei " +0x69a8: "Zha " +0x69a9: "Qian " +0x69aa: "Ma " +0x69ab: "Sun " +0x69ac: "Yuan " +0x69ad: "Xie " +0x69ae: "Rong " +0x69af: "Shi " +0x69b0: "Zhi " +0x69b1: "Cui " +0x69b2: "Yun " +0x69b3: "Ting " +0x69b4: "Liu " +0x69b5: "Rong " +0x69b6: "Tang " +0x69b7: "Que " +0x69b8: "Zhai " +0x69b9: "Si " +0x69ba: "Sheng " +0x69bb: "Ta " +0x69bc: "Ke " +0x69bd: "Xi " +0x69be: "Gu " +0x69bf: "Qi " +0x69c0: "Kao " +0x69c1: "Gao " +0x69c2: "Sun " +0x69c3: "Pan " +0x69c4: "Tao " +0x69c5: "Ge " +0x69c6: "Xun " +0x69c7: "Dian " +0x69c8: "Nou " +0x69c9: "Ji " +0x69ca: "Shuo " +0x69cb: "Gou " +0x69cc: "Chui " +0x69cd: "Qiang " +0x69ce: "Cha " +0x69cf: "Qian " +0x69d0: "Huai " +0x69d1: "Mei " +0x69d2: "Xu " +0x69d3: "Gang " +0x69d4: "Gao " +0x69d5: "Zhuo " +0x69d6: "Tuo " +0x69d7: "Hashi " +0x69d8: "Yang " +0x69d9: "Dian " +0x69da: "Jia " +0x69db: "Jian " +0x69dc: "Zui " +0x69dd: "Kashi " +0x69de: "Ori " +0x69df: "Bin " +0x69e0: "Zhu " +0x69e1: "[?] " +0x69e2: "Xi " +0x69e3: "Qi " +0x69e4: "Lian " +0x69e5: "Hui " +0x69e6: "Yong " +0x69e7: "Qian " +0x69e8: "Guo " +0x69e9: "Gai " +0x69ea: "Gai " +0x69eb: "Tuan " +0x69ec: "Hua " +0x69ed: "Cu " +0x69ee: "Sen " +0x69ef: "Cui " +0x69f0: "Beng " +0x69f1: "You " +0x69f2: "Hu " +0x69f3: "Jiang " +0x69f4: "Hu " +0x69f5: "Huan " +0x69f6: "Kui " +0x69f7: "Yi " +0x69f8: "Nie " +0x69f9: "Gao " +0x69fa: "Kang " +0x69fb: "Gui " +0x69fc: "Gui " +0x69fd: "Cao " +0x69fe: "Man " +0x69ff: "Jin " +/* x06a */ +0x6a00: "Di " +0x6a01: "Zhuang " +0x6a02: "Le " +0x6a03: "Lang " +0x6a04: "Chen " +0x6a05: "Cong " +0x6a06: "Li " +0x6a07: "Xiu " +0x6a08: "Qing " +0x6a09: "Shuang " +0x6a0a: "Fan " +0x6a0b: "Tong " +0x6a0c: "Guan " +0x6a0d: "Ji " +0x6a0e: "Suo " +0x6a0f: "Lei " +0x6a10: "Lu " +0x6a11: "Liang " +0x6a12: "Mi " +0x6a13: "Lou " +0x6a14: "Chao " +0x6a15: "Su " +0x6a16: "Ke " +0x6a17: "Shu " +0x6a18: "Tang " +0x6a19: "Biao " +0x6a1a: "Lu " +0x6a1b: "Jiu " +0x6a1c: "Shu " +0x6a1d: "Zha " +0x6a1e: "Shu " +0x6a1f: "Zhang " +0x6a20: "Men " +0x6a21: "Mo " +0x6a22: "Niao " +0x6a23: "Yang " +0x6a24: "Tiao " +0x6a25: "Peng " +0x6a26: "Zhu " +0x6a27: "Sha " +0x6a28: "Xi " +0x6a29: "Quan " +0x6a2a: "Heng " +0x6a2b: "Jian " +0x6a2c: "Cong " +0x6a2d: "[?] " +0x6a2e: "Hokuso " +0x6a2f: "Qiang " +0x6a30: "Tara " +0x6a31: "Ying " +0x6a32: "Er " +0x6a33: "Xin " +0x6a34: "Zhi " +0x6a35: "Qiao " +0x6a36: "Zui " +0x6a37: "Cong " +0x6a38: "Pu " +0x6a39: "Shu " +0x6a3a: "Hua " +0x6a3b: "Kui " +0x6a3c: "Zhen " +0x6a3d: "Zun " +0x6a3e: "Yue " +0x6a3f: "Zhan " +0x6a40: "Xi " +0x6a41: "Xun " +0x6a42: "Dian " +0x6a43: "Fa " +0x6a44: "Gan " +0x6a45: "Mo " +0x6a46: "Wu " +0x6a47: "Qiao " +0x6a48: "Nao " +0x6a49: "Lin " +0x6a4a: "Liu " +0x6a4b: "Qiao " +0x6a4c: "Xian " +0x6a4d: "Run " +0x6a4e: "Fan " +0x6a4f: "Zhan " +0x6a50: "Tuo " +0x6a51: "Lao " +0x6a52: "Yun " +0x6a53: "Shun " +0x6a54: "Tui " +0x6a55: "Cheng " +0x6a56: "Tang " +0x6a57: "Meng " +0x6a58: "Ju " +0x6a59: "Cheng " +0x6a5a: "Su " +0x6a5b: "Jue " +0x6a5c: "Jue " +0x6a5d: "Tan " +0x6a5e: "Hui " +0x6a5f: "Ji " +0x6a60: "Nuo " +0x6a61: "Xiang " +0x6a62: "Tuo " +0x6a63: "Ning " +0x6a64: "Rui " +0x6a65: "Zhu " +0x6a66: "Chuang " +0x6a67: "Zeng " +0x6a68: "Fen " +0x6a69: "Qiong " +0x6a6a: "Ran " +0x6a6b: "Heng " +0x6a6c: "Cen " +0x6a6d: "Gu " +0x6a6e: "Liu " +0x6a6f: "Lao " +0x6a70: "Gao " +0x6a71: "Chu " +0x6a72: "Zusa " +0x6a73: "Nude " +0x6a74: "Ca " +0x6a75: "San " +0x6a76: "Ji " +0x6a77: "Dou " +0x6a78: "Shou " +0x6a79: "Lu " +0x6a7a: "[?] " +0x6a7b: "[?] " +0x6a7c: "Yuan " +0x6a7d: "Ta " +0x6a7e: "Shu " +0x6a7f: "Jiang " +0x6a80: "Tan " +0x6a81: "Lin " +0x6a82: "Nong " +0x6a83: "Yin " +0x6a84: "Xi " +0x6a85: "Sui " +0x6a86: "Shan " +0x6a87: "Zui " +0x6a88: "Xuan " +0x6a89: "Cheng " +0x6a8a: "Gan " +0x6a8b: "Ju " +0x6a8c: "Zui " +0x6a8d: "Yi " +0x6a8e: "Qin " +0x6a8f: "Pu " +0x6a90: "Yan " +0x6a91: "Lei " +0x6a92: "Feng " +0x6a93: "Hui " +0x6a94: "Dang " +0x6a95: "Ji " +0x6a96: "Sui " +0x6a97: "Bo " +0x6a98: "Bi " +0x6a99: "Ding " +0x6a9a: "Chu " +0x6a9b: "Zhua " +0x6a9c: "Kuai " +0x6a9d: "Ji " +0x6a9e: "Jie " +0x6a9f: "Jia " +0x6aa0: "Qing " +0x6aa1: "Zhe " +0x6aa2: "Jian " +0x6aa3: "Qiang " +0x6aa4: "Dao " +0x6aa5: "Yi " +0x6aa6: "Biao " +0x6aa7: "Song " +0x6aa8: "She " +0x6aa9: "Lin " +0x6aaa: "Kunugi " +0x6aab: "Cha " +0x6aac: "Meng " +0x6aad: "Yin " +0x6aae: "Tao " +0x6aaf: "Tai " +0x6ab0: "Mian " +0x6ab1: "Qi " +0x6ab2: "Toan " +0x6ab3: "Bin " +0x6ab4: "Huo " +0x6ab5: "Ji " +0x6ab6: "Qian " +0x6ab7: "Mi " +0x6ab8: "Ning " +0x6ab9: "Yi " +0x6aba: "Gao " +0x6abb: "Jian " +0x6abc: "Yin " +0x6abd: "Er " +0x6abe: "Qing " +0x6abf: "Yan " +0x6ac0: "Qi " +0x6ac1: "Mi " +0x6ac2: "Zhao " +0x6ac3: "Gui " +0x6ac4: "Chun " +0x6ac5: "Ji " +0x6ac6: "Kui " +0x6ac7: "Po " +0x6ac8: "Deng " +0x6ac9: "Chu " +0x6aca: "[?] " +0x6acb: "Mian " +0x6acc: "You " +0x6acd: "Zhi " +0x6ace: "Guang " +0x6acf: "Qian " +0x6ad0: "Lei " +0x6ad1: "Lei " +0x6ad2: "Sa " +0x6ad3: "Lu " +0x6ad4: "Li " +0x6ad5: "Cuan " +0x6ad6: "Lu " +0x6ad7: "Mie " +0x6ad8: "Hui " +0x6ad9: "Ou " +0x6ada: "Lu " +0x6adb: "Jie " +0x6adc: "Gao " +0x6add: "Du " +0x6ade: "Yuan " +0x6adf: "Li " +0x6ae0: "Fei " +0x6ae1: "Zhuo " +0x6ae2: "Sou " +0x6ae3: "Lian " +0x6ae4: "Tamo " +0x6ae5: "Chu " +0x6ae6: "[?] " +0x6ae7: "Zhu " +0x6ae8: "Lu " +0x6ae9: "Yan " +0x6aea: "Li " +0x6aeb: "Zhu " +0x6aec: "Chen " +0x6aed: "Jie " +0x6aee: "E " +0x6aef: "Su " +0x6af0: "Huai " +0x6af1: "Nie " +0x6af2: "Yu " +0x6af3: "Long " +0x6af4: "Lai " +0x6af5: "[?] " +0x6af6: "Xian " +0x6af7: "Kwi " +0x6af8: "Ju " +0x6af9: "Xiao " +0x6afa: "Ling " +0x6afb: "Ying " +0x6afc: "Jian " +0x6afd: "Yin " +0x6afe: "You " +0x6aff: "Ying " +/* x06b */ +0x6b00: "Xiang " +0x6b01: "Nong " +0x6b02: "Bo " +0x6b03: "Chan " +0x6b04: "Lan " +0x6b05: "Ju " +0x6b06: "Shuang " +0x6b07: "She " +0x6b08: "Wei " +0x6b09: "Cong " +0x6b0a: "Quan " +0x6b0b: "Qu " +0x6b0c: "Cang " +0x6b0d: "[?] " +0x6b0e: "Yu " +0x6b0f: "Luo " +0x6b10: "Li " +0x6b11: "Zan " +0x6b12: "Luan " +0x6b13: "Dang " +0x6b14: "Jue " +0x6b15: "Em " +0x6b16: "Lan " +0x6b17: "Lan " +0x6b18: "Zhu " +0x6b19: "Lei " +0x6b1a: "Li " +0x6b1b: "Ba " +0x6b1c: "Nang " +0x6b1d: "Yu " +0x6b1e: "Ling " +0x6b1f: "Tsuki " +0x6b20: "Qian " +0x6b21: "Ci " +0x6b22: "Huan " +0x6b23: "Xin " +0x6b24: "Yu " +0x6b25: "Yu " +0x6b26: "Qian " +0x6b27: "Ou " +0x6b28: "Xu " +0x6b29: "Chao " +0x6b2a: "Chu " +0x6b2b: "Chi " +0x6b2c: "Kai " +0x6b2d: "Yi " +0x6b2e: "Jue " +0x6b2f: "Xi " +0x6b30: "Xu " +0x6b31: "Xia " +0x6b32: "Yu " +0x6b33: "Kuai " +0x6b34: "Lang " +0x6b35: "Kuan " +0x6b36: "Shuo " +0x6b37: "Xi " +0x6b38: "Ai " +0x6b39: "Yi " +0x6b3a: "Qi " +0x6b3b: "Hu " +0x6b3c: "Chi " +0x6b3d: "Qin " +0x6b3e: "Kuan " +0x6b3f: "Kan " +0x6b40: "Kuan " +0x6b41: "Kan " +0x6b42: "Chuan " +0x6b43: "Sha " +0x6b44: "Gua " +0x6b45: "Yin " +0x6b46: "Xin " +0x6b47: "Xie " +0x6b48: "Yu " +0x6b49: "Qian " +0x6b4a: "Xiao " +0x6b4b: "Yi " +0x6b4c: "Ge " +0x6b4d: "Wu " +0x6b4e: "Tan " +0x6b4f: "Jin " +0x6b50: "Ou " +0x6b51: "Hu " +0x6b52: "Ti " +0x6b53: "Huan " +0x6b54: "Xu " +0x6b55: "Pen " +0x6b56: "Xi " +0x6b57: "Xiao " +0x6b58: "Xu " +0x6b59: "Xi " +0x6b5a: "Sen " +0x6b5b: "Lian " +0x6b5c: "Chu " +0x6b5d: "Yi " +0x6b5e: "Kan " +0x6b5f: "Yu " +0x6b60: "Chuo " +0x6b61: "Huan " +0x6b62: "Zhi " +0x6b63: "Zheng " +0x6b64: "Ci " +0x6b65: "Bu " +0x6b66: "Wu " +0x6b67: "Qi " +0x6b68: "Bu " +0x6b69: "Bu " +0x6b6a: "Wai " +0x6b6b: "Ju " +0x6b6c: "Qian " +0x6b6d: "Chi " +0x6b6e: "Se " +0x6b6f: "Chi " +0x6b70: "Se " +0x6b71: "Zhong " +0x6b72: "Sui " +0x6b73: "Sui " +0x6b74: "Li " +0x6b75: "Cuo " +0x6b76: "Yu " +0x6b77: "Li " +0x6b78: "Gui " +0x6b79: "Dai " +0x6b7a: "Dai " +0x6b7b: "Si " +0x6b7c: "Jian " +0x6b7d: "Zhe " +0x6b7e: "Mo " +0x6b7f: "Mo " +0x6b80: "Yao " +0x6b81: "Mo " +0x6b82: "Cu " +0x6b83: "Yang " +0x6b84: "Tian " +0x6b85: "Sheng " +0x6b86: "Dai " +0x6b87: "Shang " +0x6b88: "Xu " +0x6b89: "Xun " +0x6b8a: "Shu " +0x6b8b: "Can " +0x6b8c: "Jue " +0x6b8d: "Piao " +0x6b8e: "Qia " +0x6b8f: "Qiu " +0x6b90: "Su " +0x6b91: "Qing " +0x6b92: "Yun " +0x6b93: "Lian " +0x6b94: "Yi " +0x6b95: "Fou " +0x6b96: "Zhi " +0x6b97: "Ye " +0x6b98: "Can " +0x6b99: "Hun " +0x6b9a: "Dan " +0x6b9b: "Ji " +0x6b9c: "Ye " +0x6b9d: "Zhen " +0x6b9e: "Yun " +0x6b9f: "Wen " +0x6ba0: "Chou " +0x6ba1: "Bin " +0x6ba2: "Ti " +0x6ba3: "Jin " +0x6ba4: "Shang " +0x6ba5: "Yin " +0x6ba6: "Diao " +0x6ba7: "Cu " +0x6ba8: "Hui " +0x6ba9: "Cuan " +0x6baa: "Yi " +0x6bab: "Dan " +0x6bac: "Du " +0x6bad: "Jiang " +0x6bae: "Lian " +0x6baf: "Bin " +0x6bb0: "Du " +0x6bb1: "Tsukusu " +0x6bb2: "Jian " +0x6bb3: "Shu " +0x6bb4: "Ou " +0x6bb5: "Duan " +0x6bb6: "Zhu " +0x6bb7: "Yin " +0x6bb8: "Qing " +0x6bb9: "Yi " +0x6bba: "Sha " +0x6bbb: "Que " +0x6bbc: "Ke " +0x6bbd: "Yao " +0x6bbe: "Jun " +0x6bbf: "Dian " +0x6bc0: "Hui " +0x6bc1: "Hui " +0x6bc2: "Gu " +0x6bc3: "Que " +0x6bc4: "Ji " +0x6bc5: "Yi " +0x6bc6: "Ou " +0x6bc7: "Hui " +0x6bc8: "Duan " +0x6bc9: "Yi " +0x6bca: "Xiao " +0x6bcb: "Wu " +0x6bcc: "Guan " +0x6bcd: "Mu " +0x6bce: "Mei " +0x6bcf: "Mei " +0x6bd0: "Ai " +0x6bd1: "Zuo " +0x6bd2: "Du " +0x6bd3: "Yu " +0x6bd4: "Bi " +0x6bd5: "Bi " +0x6bd6: "Bi " +0x6bd7: "Pi " +0x6bd8: "Pi " +0x6bd9: "Bi " +0x6bda: "Chan " +0x6bdb: "Mao " +0x6bdc: "[?] " +0x6bdd: "[?] " +0x6bde: "Pu " +0x6bdf: "Mushiru " +0x6be0: "Jia " +0x6be1: "Zhan " +0x6be2: "Sai " +0x6be3: "Mu " +0x6be4: "Tuo " +0x6be5: "Xun " +0x6be6: "Er " +0x6be7: "Rong " +0x6be8: "Xian " +0x6be9: "Ju " +0x6bea: "Mu " +0x6beb: "Hao " +0x6bec: "Qiu " +0x6bed: "Dou " +0x6bee: "Mushiru " +0x6bef: "Tan " +0x6bf0: "Pei " +0x6bf1: "Ju " +0x6bf2: "Duo " +0x6bf3: "Cui " +0x6bf4: "Bi " +0x6bf5: "San " +0x6bf6: "[?] " +0x6bf7: "Mao " +0x6bf8: "Sui " +0x6bf9: "Yu " +0x6bfa: "Yu " +0x6bfb: "Tuo " +0x6bfc: "He " +0x6bfd: "Jian " +0x6bfe: "Ta " +0x6bff: "San " +/* x06c */ +0x6c00: "Lu " +0x6c01: "Mu " +0x6c02: "Li " +0x6c03: "Tong " +0x6c04: "Rong " +0x6c05: "Chang " +0x6c06: "Pu " +0x6c07: "Luo " +0x6c08: "Zhan " +0x6c09: "Sao " +0x6c0a: "Zhan " +0x6c0b: "Meng " +0x6c0c: "Luo " +0x6c0d: "Qu " +0x6c0e: "Die " +0x6c0f: "Shi " +0x6c10: "Di " +0x6c11: "Min " +0x6c12: "Jue " +0x6c13: "Mang " +0x6c14: "Qi " +0x6c15: "Pie " +0x6c16: "Nai " +0x6c17: "Qi " +0x6c18: "Dao " +0x6c19: "Xian " +0x6c1a: "Chuan " +0x6c1b: "Fen " +0x6c1c: "Ri " +0x6c1d: "Nei " +0x6c1e: "[?] " +0x6c1f: "Fu " +0x6c20: "Shen " +0x6c21: "Dong " +0x6c22: "Qing " +0x6c23: "Qi " +0x6c24: "Yin " +0x6c25: "Xi " +0x6c26: "Hai " +0x6c27: "Yang " +0x6c28: "An " +0x6c29: "Ya " +0x6c2a: "Ke " +0x6c2b: "Qing " +0x6c2c: "Ya " +0x6c2d: "Dong " +0x6c2e: "Dan " +0x6c2f: "Lu " +0x6c30: "Qing " +0x6c31: "Yang " +0x6c32: "Yun " +0x6c33: "Yun " +0x6c34: "Shui " +0x6c35: "San " +0x6c36: "Zheng " +0x6c37: "Bing " +0x6c38: "Yong " +0x6c39: "Dang " +0x6c3a: "Shitamizu " +0x6c3b: "Le " +0x6c3c: "Ni " +0x6c3d: "Tun " +0x6c3e: "Fan " +0x6c3f: "Gui " +0x6c40: "Ting " +0x6c41: "Zhi " +0x6c42: "Qiu " +0x6c43: "Bin " +0x6c44: "Ze " +0x6c45: "Mian " +0x6c46: "Cuan " +0x6c47: "Hui " +0x6c48: "Diao " +0x6c49: "Yi " +0x6c4a: "Cha " +0x6c4b: "Zhuo " +0x6c4c: "Chuan " +0x6c4d: "Wan " +0x6c4e: "Fan " +0x6c4f: "Dai " +0x6c50: "Xi " +0x6c51: "Tuo " +0x6c52: "Mang " +0x6c53: "Qiu " +0x6c54: "Qi " +0x6c55: "Shan " +0x6c56: "Pai " +0x6c57: "Han " +0x6c58: "Qian " +0x6c59: "Wu " +0x6c5a: "Wu " +0x6c5b: "Xun " +0x6c5c: "Si " +0x6c5d: "Ru " +0x6c5e: "Gong " +0x6c5f: "Jiang " +0x6c60: "Chi " +0x6c61: "Wu " +0x6c62: "Tsuchi " +0x6c63: "[?] " +0x6c64: "Tang " +0x6c65: "Zhi " +0x6c66: "Chi " +0x6c67: "Qian " +0x6c68: "Mi " +0x6c69: "Yu " +0x6c6a: "Wang " +0x6c6b: "Qing " +0x6c6c: "Jing " +0x6c6d: "Rui " +0x6c6e: "Jun " +0x6c6f: "Hong " +0x6c70: "Tai " +0x6c71: "Quan " +0x6c72: "Ji " +0x6c73: "Bian " +0x6c74: "Bian " +0x6c75: "Gan " +0x6c76: "Wen " +0x6c77: "Zhong " +0x6c78: "Fang " +0x6c79: "Xiong " +0x6c7a: "Jue " +0x6c7b: "Hang " +0x6c7c: "Niou " +0x6c7d: "Qi " +0x6c7e: "Fen " +0x6c7f: "Xu " +0x6c80: "Xu " +0x6c81: "Qin " +0x6c82: "Yi " +0x6c83: "Wo " +0x6c84: "Yun " +0x6c85: "Yuan " +0x6c86: "Hang " +0x6c87: "Yan " +0x6c88: "Chen " +0x6c89: "Chen " +0x6c8a: "Dan " +0x6c8b: "You " +0x6c8c: "Dun " +0x6c8d: "Hu " +0x6c8e: "Huo " +0x6c8f: "Qie " +0x6c90: "Mu " +0x6c91: "Rou " +0x6c92: "Mei " +0x6c93: "Ta " +0x6c94: "Mian " +0x6c95: "Wu " +0x6c96: "Chong " +0x6c97: "Tian " +0x6c98: "Bi " +0x6c99: "Sha " +0x6c9a: "Zhi " +0x6c9b: "Pei " +0x6c9c: "Pan " +0x6c9d: "Zhui " +0x6c9e: "Za " +0x6c9f: "Gou " +0x6ca0: "Liu " +0x6ca1: "Mei " +0x6ca2: "Ze " +0x6ca3: "Feng " +0x6ca4: "Ou " +0x6ca5: "Li " +0x6ca6: "Lun " +0x6ca7: "Cang " +0x6ca8: "Feng " +0x6ca9: "Wei " +0x6caa: "Hu " +0x6cab: "Mo " +0x6cac: "Mei " +0x6cad: "Shu " +0x6cae: "Ju " +0x6caf: "Zan " +0x6cb0: "Tuo " +0x6cb1: "Tuo " +0x6cb2: "Tuo " +0x6cb3: "He " +0x6cb4: "Li " +0x6cb5: "Mi " +0x6cb6: "Yi " +0x6cb7: "Fa " +0x6cb8: "Fei " +0x6cb9: "You " +0x6cba: "Tian " +0x6cbb: "Zhi " +0x6cbc: "Zhao " +0x6cbd: "Gu " +0x6cbe: "Zhan " +0x6cbf: "Yan " +0x6cc0: "Si " +0x6cc1: "Kuang " +0x6cc2: "Jiong " +0x6cc3: "Ju " +0x6cc4: "Xie " +0x6cc5: "Qiu " +0x6cc6: "Yi " +0x6cc7: "Jia " +0x6cc8: "Zhong " +0x6cc9: "Quan " +0x6cca: "Bo " +0x6ccb: "Hui " +0x6ccc: "Mi " +0x6ccd: "Ben " +0x6cce: "Zhuo " +0x6ccf: "Chu " +0x6cd0: "Le " +0x6cd1: "You " +0x6cd2: "Gu " +0x6cd3: "Hong " +0x6cd4: "Gan " +0x6cd5: "Fa " +0x6cd6: "Mao " +0x6cd7: "Si " +0x6cd8: "Hu " +0x6cd9: "Ping " +0x6cda: "Ci " +0x6cdb: "Fan " +0x6cdc: "Chi " +0x6cdd: "Su " +0x6cde: "Ning " +0x6cdf: "Cheng " +0x6ce0: "Ling " +0x6ce1: "Pao " +0x6ce2: "Bo " +0x6ce3: "Qi " +0x6ce4: "Si " +0x6ce5: "Ni " +0x6ce6: "Ju " +0x6ce7: "Yue " +0x6ce8: "Zhu " +0x6ce9: "Sheng " +0x6cea: "Lei " +0x6ceb: "Xuan " +0x6cec: "Xue " +0x6ced: "Fu " +0x6cee: "Pan " +0x6cef: "Min " +0x6cf0: "Tai " +0x6cf1: "Yang " +0x6cf2: "Ji " +0x6cf3: "Yong " +0x6cf4: "Guan " +0x6cf5: "Beng " +0x6cf6: "Xue " +0x6cf7: "Long " +0x6cf8: "Lu " +0x6cf9: "[?] " +0x6cfa: "Bo " +0x6cfb: "Xie " +0x6cfc: "Po " +0x6cfd: "Ze " +0x6cfe: "Jing " +0x6cff: "Yin " +/* x06d */ +0x6d00: "Zhou " +0x6d01: "Ji " +0x6d02: "Yi " +0x6d03: "Hui " +0x6d04: "Hui " +0x6d05: "Zui " +0x6d06: "Cheng " +0x6d07: "Yin " +0x6d08: "Wei " +0x6d09: "Hou " +0x6d0a: "Jian " +0x6d0b: "Yang " +0x6d0c: "Lie " +0x6d0d: "Si " +0x6d0e: "Ji " +0x6d0f: "Er " +0x6d10: "Xing " +0x6d11: "Fu " +0x6d12: "Sa " +0x6d13: "Suo " +0x6d14: "Zhi " +0x6d15: "Yin " +0x6d16: "Wu " +0x6d17: "Xi " +0x6d18: "Kao " +0x6d19: "Zhu " +0x6d1a: "Jiang " +0x6d1b: "Luo " +0x6d1c: "[?] " +0x6d1d: "An " +0x6d1e: "Dong " +0x6d1f: "Yi " +0x6d20: "Mou " +0x6d21: "Lei " +0x6d22: "Yi " +0x6d23: "Mi " +0x6d24: "Quan " +0x6d25: "Jin " +0x6d26: "Mo " +0x6d27: "Wei " +0x6d28: "Xiao " +0x6d29: "Xie " +0x6d2a: "Hong " +0x6d2b: "Xu " +0x6d2c: "Shuo " +0x6d2d: "Kuang " +0x6d2e: "Tao " +0x6d2f: "Qie " +0x6d30: "Ju " +0x6d31: "Er " +0x6d32: "Zhou " +0x6d33: "Ru " +0x6d34: "Ping " +0x6d35: "Xun " +0x6d36: "Xiong " +0x6d37: "Zhi " +0x6d38: "Guang " +0x6d39: "Huan " +0x6d3a: "Ming " +0x6d3b: "Huo " +0x6d3c: "Wa " +0x6d3d: "Qia " +0x6d3e: "Pai " +0x6d3f: "Wu " +0x6d40: "Qu " +0x6d41: "Liu " +0x6d42: "Yi " +0x6d43: "Jia " +0x6d44: "Jing " +0x6d45: "Qian " +0x6d46: "Jiang " +0x6d47: "Jiao " +0x6d48: "Cheng " +0x6d49: "Shi " +0x6d4a: "Zhuo " +0x6d4b: "Ce " +0x6d4c: "Pal " +0x6d4d: "Kuai " +0x6d4e: "Ji " +0x6d4f: "Liu " +0x6d50: "Chan " +0x6d51: "Hun " +0x6d52: "Hu " +0x6d53: "Nong " +0x6d54: "Xun " +0x6d55: "Jin " +0x6d56: "Lie " +0x6d57: "Qiu " +0x6d58: "Wei " +0x6d59: "Zhe " +0x6d5a: "Jun " +0x6d5b: "Han " +0x6d5c: "Bang " +0x6d5d: "Mang " +0x6d5e: "Zhuo " +0x6d5f: "You " +0x6d60: "Xi " +0x6d61: "Bo " +0x6d62: "Dou " +0x6d63: "Wan " +0x6d64: "Hong " +0x6d65: "Yi " +0x6d66: "Pu " +0x6d67: "Ying " +0x6d68: "Lan " +0x6d69: "Hao " +0x6d6a: "Lang " +0x6d6b: "Han " +0x6d6c: "Li " +0x6d6d: "Geng " +0x6d6e: "Fu " +0x6d6f: "Wu " +0x6d70: "Lian " +0x6d71: "Chun " +0x6d72: "Feng " +0x6d73: "Yi " +0x6d74: "Yu " +0x6d75: "Tong " +0x6d76: "Lao " +0x6d77: "Hai " +0x6d78: "Jin " +0x6d79: "Jia " +0x6d7a: "Chong " +0x6d7b: "Weng " +0x6d7c: "Mei " +0x6d7d: "Sui " +0x6d7e: "Cheng " +0x6d7f: "Pei " +0x6d80: "Xian " +0x6d81: "Shen " +0x6d82: "Tu " +0x6d83: "Kun " +0x6d84: "Pin " +0x6d85: "Nie " +0x6d86: "Han " +0x6d87: "Jing " +0x6d88: "Xiao " +0x6d89: "She " +0x6d8a: "Nian " +0x6d8b: "Tu " +0x6d8c: "Yong " +0x6d8d: "Xiao " +0x6d8e: "Xian " +0x6d8f: "Ting " +0x6d90: "E " +0x6d91: "Su " +0x6d92: "Tun " +0x6d93: "Juan " +0x6d94: "Cen " +0x6d95: "Ti " +0x6d96: "Li " +0x6d97: "Shui " +0x6d98: "Si " +0x6d99: "Lei " +0x6d9a: "Shui " +0x6d9b: "Tao " +0x6d9c: "Du " +0x6d9d: "Lao " +0x6d9e: "Lai " +0x6d9f: "Lian " +0x6da0: "Wei " +0x6da1: "Wo " +0x6da2: "Yun " +0x6da3: "Huan " +0x6da4: "Di " +0x6da5: "[?] " +0x6da6: "Run " +0x6da7: "Jian " +0x6da8: "Zhang " +0x6da9: "Se " +0x6daa: "Fu " +0x6dab: "Guan " +0x6dac: "Xing " +0x6dad: "Shou " +0x6dae: "Shuan " +0x6daf: "Ya " +0x6db0: "Chuo " +0x6db1: "Zhang " +0x6db2: "Ye " +0x6db3: "Kong " +0x6db4: "Wo " +0x6db5: "Han " +0x6db6: "Tuo " +0x6db7: "Dong " +0x6db8: "He " +0x6db9: "Wo " +0x6dba: "Ju " +0x6dbb: "Gan " +0x6dbc: "Liang " +0x6dbd: "Hun " +0x6dbe: "Ta " +0x6dbf: "Zhuo " +0x6dc0: "Dian " +0x6dc1: "Qie " +0x6dc2: "De " +0x6dc3: "Juan " +0x6dc4: "Zi " +0x6dc5: "Xi " +0x6dc6: "Yao " +0x6dc7: "Qi " +0x6dc8: "Gu " +0x6dc9: "Guo " +0x6dca: "Han " +0x6dcb: "Lin " +0x6dcc: "Tang " +0x6dcd: "Zhou " +0x6dce: "Peng " +0x6dcf: "Hao " +0x6dd0: "Chang " +0x6dd1: "Shu " +0x6dd2: "Qi " +0x6dd3: "Fang " +0x6dd4: "Chi " +0x6dd5: "Lu " +0x6dd6: "Nao " +0x6dd7: "Ju " +0x6dd8: "Tao " +0x6dd9: "Cong " +0x6dda: "Lei " +0x6ddb: "Zhi " +0x6ddc: "Peng " +0x6ddd: "Fei " +0x6dde: "Song " +0x6ddf: "Tian " +0x6de0: "Pi " +0x6de1: "Dan " +0x6de2: "Yu " +0x6de3: "Ni " +0x6de4: "Yu " +0x6de5: "Lu " +0x6de6: "Gan " +0x6de7: "Mi " +0x6de8: "Jing " +0x6de9: "Ling " +0x6dea: "Lun " +0x6deb: "Yin " +0x6dec: "Cui " +0x6ded: "Qu " +0x6dee: "Huai " +0x6def: "Yu " +0x6df0: "Nian " +0x6df1: "Shen " +0x6df2: "Piao " +0x6df3: "Chun " +0x6df4: "Wa " +0x6df5: "Yuan " +0x6df6: "Lai " +0x6df7: "Hun " +0x6df8: "Qing " +0x6df9: "Yan " +0x6dfa: "Qian " +0x6dfb: "Tian " +0x6dfc: "Miao " +0x6dfd: "Zhi " +0x6dfe: "Yin " +0x6dff: "Mi " +/* x06e */ +0x6e00: "Ben " +0x6e01: "Yuan " +0x6e02: "Wen " +0x6e03: "Re " +0x6e04: "Fei " +0x6e05: "Qing " +0x6e06: "Yuan " +0x6e07: "Ke " +0x6e08: "Ji " +0x6e09: "She " +0x6e0a: "Yuan " +0x6e0b: "Shibui " +0x6e0c: "Lu " +0x6e0d: "Zi " +0x6e0e: "Du " +0x6e0f: "[?] " +0x6e10: "Jian " +0x6e11: "Min " +0x6e12: "Pi " +0x6e13: "Tani " +0x6e14: "Yu " +0x6e15: "Yuan " +0x6e16: "Shen " +0x6e17: "Shen " +0x6e18: "Rou " +0x6e19: "Huan " +0x6e1a: "Zhu " +0x6e1b: "Jian " +0x6e1c: "Nuan " +0x6e1d: "Yu " +0x6e1e: "Qiu " +0x6e1f: "Ting " +0x6e20: "Qu " +0x6e21: "Du " +0x6e22: "Feng " +0x6e23: "Zha " +0x6e24: "Bo " +0x6e25: "Wo " +0x6e26: "Wo " +0x6e27: "Di " +0x6e28: "Wei " +0x6e29: "Wen " +0x6e2a: "Ru " +0x6e2b: "Xie " +0x6e2c: "Ce " +0x6e2d: "Wei " +0x6e2e: "Ge " +0x6e2f: "Gang " +0x6e30: "Yan " +0x6e31: "Hong " +0x6e32: "Xuan " +0x6e33: "Mi " +0x6e34: "Ke " +0x6e35: "Mao " +0x6e36: "Ying " +0x6e37: "Yan " +0x6e38: "You " +0x6e39: "Hong " +0x6e3a: "Miao " +0x6e3b: "Xing " +0x6e3c: "Mei " +0x6e3d: "Zai " +0x6e3e: "Hun " +0x6e3f: "Nai " +0x6e40: "Kui " +0x6e41: "Shi " +0x6e42: "E " +0x6e43: "Pai " +0x6e44: "Mei " +0x6e45: "Lian " +0x6e46: "Qi " +0x6e47: "Qi " +0x6e48: "Mei " +0x6e49: "Tian " +0x6e4a: "Cou " +0x6e4b: "Wei " +0x6e4c: "Can " +0x6e4d: "Tuan " +0x6e4e: "Mian " +0x6e4f: "Hui " +0x6e50: "Mo " +0x6e51: "Xu " +0x6e52: "Ji " +0x6e53: "Pen " +0x6e54: "Jian " +0x6e55: "Jian " +0x6e56: "Hu " +0x6e57: "Feng " +0x6e58: "Xiang " +0x6e59: "Yi " +0x6e5a: "Yin " +0x6e5b: "Zhan " +0x6e5c: "Shi " +0x6e5d: "Jie " +0x6e5e: "Cheng " +0x6e5f: "Huang " +0x6e60: "Tan " +0x6e61: "Yu " +0x6e62: "Bi " +0x6e63: "Min " +0x6e64: "Shi " +0x6e65: "Tu " +0x6e66: "Sheng " +0x6e67: "Yong " +0x6e68: "Qu " +0x6e69: "Zhong " +0x6e6a: "Suei " +0x6e6b: "Jiu " +0x6e6c: "Jiao " +0x6e6d: "Qiou " +0x6e6e: "Yin " +0x6e6f: "Tang " +0x6e70: "Long " +0x6e71: "Huo " +0x6e72: "Yuan " +0x6e73: "Nan " +0x6e74: "Ban " +0x6e75: "You " +0x6e76: "Quan " +0x6e77: "Chui " +0x6e78: "Liang " +0x6e79: "Chan " +0x6e7a: "Yan " +0x6e7b: "Chun " +0x6e7c: "Nie " +0x6e7d: "Zi " +0x6e7e: "Wan " +0x6e7f: "Shi " +0x6e80: "Man " +0x6e81: "Ying " +0x6e82: "Ratsu " +0x6e83: "Kui " +0x6e84: "[?] " +0x6e85: "Jian " +0x6e86: "Xu " +0x6e87: "Lu " +0x6e88: "Gui " +0x6e89: "Gai " +0x6e8a: "[?] " +0x6e8b: "[?] " +0x6e8c: "Po " +0x6e8d: "Jin " +0x6e8e: "Gui " +0x6e8f: "Tang " +0x6e90: "Yuan " +0x6e91: "Suo " +0x6e92: "Yuan " +0x6e93: "Lian " +0x6e94: "Yao " +0x6e95: "Meng " +0x6e96: "Zhun " +0x6e97: "Sheng " +0x6e98: "Ke " +0x6e99: "Tai " +0x6e9a: "Da " +0x6e9b: "Wa " +0x6e9c: "Liu " +0x6e9d: "Gou " +0x6e9e: "Sao " +0x6e9f: "Ming " +0x6ea0: "Zha " +0x6ea1: "Shi " +0x6ea2: "Yi " +0x6ea3: "Lun " +0x6ea4: "Ma " +0x6ea5: "Pu " +0x6ea6: "Wei " +0x6ea7: "Li " +0x6ea8: "Cai " +0x6ea9: "Wu " +0x6eaa: "Xi " +0x6eab: "Wen " +0x6eac: "Qiang " +0x6ead: "Ze " +0x6eae: "Shi " +0x6eaf: "Su " +0x6eb0: "Yi " +0x6eb1: "Zhen " +0x6eb2: "Sou " +0x6eb3: "Yun " +0x6eb4: "Xiu " +0x6eb5: "Yin " +0x6eb6: "Rong " +0x6eb7: "Hun " +0x6eb8: "Su " +0x6eb9: "Su " +0x6eba: "Ni " +0x6ebb: "Ta " +0x6ebc: "Shi " +0x6ebd: "Ru " +0x6ebe: "Wei " +0x6ebf: "Pan " +0x6ec0: "Chu " +0x6ec1: "Chu " +0x6ec2: "Pang " +0x6ec3: "Weng " +0x6ec4: "Cang " +0x6ec5: "Mie " +0x6ec6: "He " +0x6ec7: "Dian " +0x6ec8: "Hao " +0x6ec9: "Huang " +0x6eca: "Xi " +0x6ecb: "Zi " +0x6ecc: "Di " +0x6ecd: "Zhi " +0x6ece: "Ying " +0x6ecf: "Fu " +0x6ed0: "Jie " +0x6ed1: "Hua " +0x6ed2: "Ge " +0x6ed3: "Zi " +0x6ed4: "Tao " +0x6ed5: "Teng " +0x6ed6: "Sui " +0x6ed7: "Bi " +0x6ed8: "Jiao " +0x6ed9: "Hui " +0x6eda: "Gun " +0x6edb: "Yin " +0x6edc: "Gao " +0x6edd: "Long " +0x6ede: "Zhi " +0x6edf: "Yan " +0x6ee0: "She " +0x6ee1: "Man " +0x6ee2: "Ying " +0x6ee3: "Chun " +0x6ee4: "Lu " +0x6ee5: "Lan " +0x6ee6: "Luan " +0x6ee7: "[?] " +0x6ee8: "Bin " +0x6ee9: "Tan " +0x6eea: "Yu " +0x6eeb: "Sou " +0x6eec: "Hu " +0x6eed: "Bi " +0x6eee: "Biao " +0x6eef: "Zhi " +0x6ef0: "Jiang " +0x6ef1: "Kou " +0x6ef2: "Shen " +0x6ef3: "Shang " +0x6ef4: "Di " +0x6ef5: "Mi " +0x6ef6: "Ao " +0x6ef7: "Lu " +0x6ef8: "Hu " +0x6ef9: "Hu " +0x6efa: "You " +0x6efb: "Chan " +0x6efc: "Fan " +0x6efd: "Yong " +0x6efe: "Gun " +0x6eff: "Man " +/* x06f */ +0x6f00: "Qing " +0x6f01: "Yu " +0x6f02: "Piao " +0x6f03: "Ji " +0x6f04: "Ya " +0x6f05: "Jiao " +0x6f06: "Qi " +0x6f07: "Xi " +0x6f08: "Ji " +0x6f09: "Lu " +0x6f0a: "Lu " +0x6f0b: "Long " +0x6f0c: "Jin " +0x6f0d: "Guo " +0x6f0e: "Cong " +0x6f0f: "Lou " +0x6f10: "Zhi " +0x6f11: "Gai " +0x6f12: "Qiang " +0x6f13: "Li " +0x6f14: "Yan " +0x6f15: "Cao " +0x6f16: "Jiao " +0x6f17: "Cong " +0x6f18: "Qun " +0x6f19: "Tuan " +0x6f1a: "Ou " +0x6f1b: "Teng " +0x6f1c: "Ye " +0x6f1d: "Xi " +0x6f1e: "Mi " +0x6f1f: "Tang " +0x6f20: "Mo " +0x6f21: "Shang " +0x6f22: "Han " +0x6f23: "Lian " +0x6f24: "Lan " +0x6f25: "Wa " +0x6f26: "Li " +0x6f27: "Qian " +0x6f28: "Feng " +0x6f29: "Xuan " +0x6f2a: "Yi " +0x6f2b: "Man " +0x6f2c: "Zi " +0x6f2d: "Mang " +0x6f2e: "Kang " +0x6f2f: "Lei " +0x6f30: "Peng " +0x6f31: "Shu " +0x6f32: "Zhang " +0x6f33: "Zhang " +0x6f34: "Chong " +0x6f35: "Xu " +0x6f36: "Huan " +0x6f37: "Kuo " +0x6f38: "Jian " +0x6f39: "Yan " +0x6f3a: "Chuang " +0x6f3b: "Liao " +0x6f3c: "Cui " +0x6f3d: "Ti " +0x6f3e: "Yang " +0x6f3f: "Jiang " +0x6f40: "Cong " +0x6f41: "Ying " +0x6f42: "Hong " +0x6f43: "Xun " +0x6f44: "Shu " +0x6f45: "Guan " +0x6f46: "Ying " +0x6f47: "Xiao " +0x6f48: "[?] " +0x6f49: "[?] " +0x6f4a: "Xu " +0x6f4b: "Lian " +0x6f4c: "Zhi " +0x6f4d: "Wei " +0x6f4e: "Pi " +0x6f4f: "Jue " +0x6f50: "Jiao " +0x6f51: "Po " +0x6f52: "Dang " +0x6f53: "Hui " +0x6f54: "Jie " +0x6f55: "Wu " +0x6f56: "Pa " +0x6f57: "Ji " +0x6f58: "Pan " +0x6f59: "Gui " +0x6f5a: "Xiao " +0x6f5b: "Qian " +0x6f5c: "Qian " +0x6f5d: "Xi " +0x6f5e: "Lu " +0x6f5f: "Xi " +0x6f60: "Xuan " +0x6f61: "Dun " +0x6f62: "Huang " +0x6f63: "Min " +0x6f64: "Run " +0x6f65: "Su " +0x6f66: "Liao " +0x6f67: "Zhen " +0x6f68: "Zhong " +0x6f69: "Yi " +0x6f6a: "Di " +0x6f6b: "Wan " +0x6f6c: "Dan " +0x6f6d: "Tan " +0x6f6e: "Chao " +0x6f6f: "Xun " +0x6f70: "Kui " +0x6f71: "Yie " +0x6f72: "Shao " +0x6f73: "Tu " +0x6f74: "Zhu " +0x6f75: "San " +0x6f76: "Hei " +0x6f77: "Bi " +0x6f78: "Shan " +0x6f79: "Chan " +0x6f7a: "Chan " +0x6f7b: "Shu " +0x6f7c: "Tong " +0x6f7d: "Pu " +0x6f7e: "Lin " +0x6f7f: "Wei " +0x6f80: "Se " +0x6f81: "Se " +0x6f82: "Cheng " +0x6f83: "Jiong " +0x6f84: "Cheng " +0x6f85: "Hua " +0x6f86: "Jiao " +0x6f87: "Lao " +0x6f88: "Che " +0x6f89: "Gan " +0x6f8a: "Cun " +0x6f8b: "Heng " +0x6f8c: "Si " +0x6f8d: "Shu " +0x6f8e: "Peng " +0x6f8f: "Han " +0x6f90: "Yun " +0x6f91: "Liu " +0x6f92: "Hong " +0x6f93: "Fu " +0x6f94: "Hao " +0x6f95: "He " +0x6f96: "Xian " +0x6f97: "Jian " +0x6f98: "Shan " +0x6f99: "Xi " +0x6f9a: "Oki " +0x6f9b: "[?] " +0x6f9c: "Lan " +0x6f9d: "[?] " +0x6f9e: "Yu " +0x6f9f: "Lin " +0x6fa0: "Min " +0x6fa1: "Zao " +0x6fa2: "Dang " +0x6fa3: "Wan " +0x6fa4: "Ze " +0x6fa5: "Xie " +0x6fa6: "Yu " +0x6fa7: "Li " +0x6fa8: "Shi " +0x6fa9: "Xue " +0x6faa: "Ling " +0x6fab: "Man " +0x6fac: "Zi " +0x6fad: "Yong " +0x6fae: "Kuai " +0x6faf: "Can " +0x6fb0: "Lian " +0x6fb1: "Dian " +0x6fb2: "Ye " +0x6fb3: "Ao " +0x6fb4: "Huan " +0x6fb5: "Zhen " +0x6fb6: "Chan " +0x6fb7: "Man " +0x6fb8: "Dan " +0x6fb9: "Dan " +0x6fba: "Yi " +0x6fbb: "Sui " +0x6fbc: "Pi " +0x6fbd: "Ju " +0x6fbe: "Ta " +0x6fbf: "Qin " +0x6fc0: "Ji " +0x6fc1: "Zhuo " +0x6fc2: "Lian " +0x6fc3: "Nong " +0x6fc4: "Guo " +0x6fc5: "Jin " +0x6fc6: "Fen " +0x6fc7: "Se " +0x6fc8: "Ji " +0x6fc9: "Sui " +0x6fca: "Hui " +0x6fcb: "Chu " +0x6fcc: "Ta " +0x6fcd: "Song " +0x6fce: "Ding " +0x6fcf: "[?] " +0x6fd0: "Zhu " +0x6fd1: "Lai " +0x6fd2: "Bin " +0x6fd3: "Lian " +0x6fd4: "Mi " +0x6fd5: "Shi " +0x6fd6: "Shu " +0x6fd7: "Mi " +0x6fd8: "Ning " +0x6fd9: "Ying " +0x6fda: "Ying " +0x6fdb: "Meng " +0x6fdc: "Jin " +0x6fdd: "Qi " +0x6fde: "Pi " +0x6fdf: "Ji " +0x6fe0: "Hao " +0x6fe1: "Ru " +0x6fe2: "Zui " +0x6fe3: "Wo " +0x6fe4: "Tao " +0x6fe5: "Yin " +0x6fe6: "Yin " +0x6fe7: "Dui " +0x6fe8: "Ci " +0x6fe9: "Huo " +0x6fea: "Jing " +0x6feb: "Lan " +0x6fec: "Jun " +0x6fed: "Ai " +0x6fee: "Pu " +0x6fef: "Zhuo " +0x6ff0: "Wei " +0x6ff1: "Bin " +0x6ff2: "Gu " +0x6ff3: "Qian " +0x6ff4: "Xing " +0x6ff5: "Hama " +0x6ff6: "Kuo " +0x6ff7: "Fei " +0x6ff8: "[?] " +0x6ff9: "Boku " +0x6ffa: "Jian " +0x6ffb: "Wei " +0x6ffc: "Luo " +0x6ffd: "Zan " +0x6ffe: "Lu " +0x6fff: "Li " +/* x070 */ +0x7000: "You " +0x7001: "Yang " +0x7002: "Lu " +0x7003: "Si " +0x7004: "Jie " +0x7005: "Ying " +0x7006: "Du " +0x7007: "Wang " +0x7008: "Hui " +0x7009: "Xie " +0x700a: "Pan " +0x700b: "Shen " +0x700c: "Biao " +0x700d: "Chan " +0x700e: "Mo " +0x700f: "Liu " +0x7010: "Jian " +0x7011: "Pu " +0x7012: "Se " +0x7013: "Cheng " +0x7014: "Gu " +0x7015: "Bin " +0x7016: "Huo " +0x7017: "Xian " +0x7018: "Lu " +0x7019: "Qin " +0x701a: "Han " +0x701b: "Ying " +0x701c: "Yong " +0x701d: "Li " +0x701e: "Jing " +0x701f: "Xiao " +0x7020: "Ying " +0x7021: "Sui " +0x7022: "Wei " +0x7023: "Xie " +0x7024: "Huai " +0x7025: "Hao " +0x7026: "Zhu " +0x7027: "Long " +0x7028: "Lai " +0x7029: "Dui " +0x702a: "Fan " +0x702b: "Hu " +0x702c: "Lai " +0x702d: "[?] " +0x702e: "[?] " +0x702f: "Ying " +0x7030: "Mi " +0x7031: "Ji " +0x7032: "Lian " +0x7033: "Jian " +0x7034: "Ying " +0x7035: "Fen " +0x7036: "Lin " +0x7037: "Yi " +0x7038: "Jian " +0x7039: "Yue " +0x703a: "Chan " +0x703b: "Dai " +0x703c: "Rang " +0x703d: "Jian " +0x703e: "Lan " +0x703f: "Fan " +0x7040: "Shuang " +0x7041: "Yuan " +0x7042: "Zhuo " +0x7043: "Feng " +0x7044: "She " +0x7045: "Lei " +0x7046: "Lan " +0x7047: "Cong " +0x7048: "Qu " +0x7049: "Yong " +0x704a: "Qian " +0x704b: "Fa " +0x704c: "Guan " +0x704d: "Que " +0x704e: "Yan " +0x704f: "Hao " +0x7050: "Hyeng " +0x7051: "Sa " +0x7052: "Zan " +0x7053: "Luan " +0x7054: "Yan " +0x7055: "Li " +0x7056: "Mi " +0x7057: "Shan " +0x7058: "Tan " +0x7059: "Dang " +0x705a: "Jiao " +0x705b: "Chan " +0x705c: "[?] " +0x705d: "Hao " +0x705e: "Ba " +0x705f: "Zhu " +0x7060: "Lan " +0x7061: "Lan " +0x7062: "Nang " +0x7063: "Wan " +0x7064: "Luan " +0x7065: "Xun " +0x7066: "Xian " +0x7067: "Yan " +0x7068: "Gan " +0x7069: "Yan " +0x706a: "Yu " +0x706b: "Huo " +0x706c: "Si " +0x706d: "Mie " +0x706e: "Guang " +0x706f: "Deng " +0x7070: "Hui " +0x7071: "Xiao " +0x7072: "Xiao " +0x7073: "Hu " +0x7074: "Hong " +0x7075: "Ling " +0x7076: "Zao " +0x7077: "Zhuan " +0x7078: "Jiu " +0x7079: "Zha " +0x707a: "Xie " +0x707b: "Chi " +0x707c: "Zhuo " +0x707d: "Zai " +0x707e: "Zai " +0x707f: "Can " +0x7080: "Yang " +0x7081: "Qi " +0x7082: "Zhong " +0x7083: "Fen " +0x7084: "Niu " +0x7085: "Jiong " +0x7086: "Wen " +0x7087: "Po " +0x7088: "Yi " +0x7089: "Lu " +0x708a: "Chui " +0x708b: "Pi " +0x708c: "Kai " +0x708d: "Pan " +0x708e: "Yan " +0x708f: "Kai " +0x7090: "Pang " +0x7091: "Mu " +0x7092: "Chao " +0x7093: "Liao " +0x7094: "Gui " +0x7095: "Kang " +0x7096: "Tun " +0x7097: "Guang " +0x7098: "Xin " +0x7099: "Zhi " +0x709a: "Guang " +0x709b: "Guang " +0x709c: "Wei " +0x709d: "Qiang " +0x709e: "[?] " +0x709f: "Da " +0x70a0: "Xia " +0x70a1: "Zheng " +0x70a2: "Zhu " +0x70a3: "Ke " +0x70a4: "Zhao " +0x70a5: "Fu " +0x70a6: "Ba " +0x70a7: "Duo " +0x70a8: "Duo " +0x70a9: "Ling " +0x70aa: "Zhuo " +0x70ab: "Xuan " +0x70ac: "Ju " +0x70ad: "Tan " +0x70ae: "Pao " +0x70af: "Jiong " +0x70b0: "Pao " +0x70b1: "Tai " +0x70b2: "Tai " +0x70b3: "Bing " +0x70b4: "Yang " +0x70b5: "Tong " +0x70b6: "Han " +0x70b7: "Zhu " +0x70b8: "Zha " +0x70b9: "Dian " +0x70ba: "Wei " +0x70bb: "Shi " +0x70bc: "Lian " +0x70bd: "Chi " +0x70be: "Huang " +0x70bf: "[?] " +0x70c0: "Hu " +0x70c1: "Shuo " +0x70c2: "Lan " +0x70c3: "Jing " +0x70c4: "Jiao " +0x70c5: "Xu " +0x70c6: "Xing " +0x70c7: "Quan " +0x70c8: "Lie " +0x70c9: "Huan " +0x70ca: "Yang " +0x70cb: "Xiao " +0x70cc: "Xiu " +0x70cd: "Xian " +0x70ce: "Yin " +0x70cf: "Wu " +0x70d0: "Zhou " +0x70d1: "Yao " +0x70d2: "Shi " +0x70d3: "Wei " +0x70d4: "Tong " +0x70d5: "Xue " +0x70d6: "Zai " +0x70d7: "Kai " +0x70d8: "Hong " +0x70d9: "Luo " +0x70da: "Xia " +0x70db: "Zhu " +0x70dc: "Xuan " +0x70dd: "Zheng " +0x70de: "Po " +0x70df: "Yan " +0x70e0: "Hui " +0x70e1: "Guang " +0x70e2: "Zhe " +0x70e3: "Hui " +0x70e4: "Kao " +0x70e5: "[?] " +0x70e6: "Fan " +0x70e7: "Shao " +0x70e8: "Ye " +0x70e9: "Hui " +0x70ea: "[?] " +0x70eb: "Tang " +0x70ec: "Jin " +0x70ed: "Re " +0x70ee: "[?] " +0x70ef: "Xi " +0x70f0: "Fu " +0x70f1: "Jiong " +0x70f2: "Che " +0x70f3: "Pu " +0x70f4: "Jing " +0x70f5: "Zhuo " +0x70f6: "Ting " +0x70f7: "Wan " +0x70f8: "Hai " +0x70f9: "Peng " +0x70fa: "Lang " +0x70fb: "Shan " +0x70fc: "Hu " +0x70fd: "Feng " +0x70fe: "Chi " +0x70ff: "Rong " +/* x071 */ +0x7100: "Hu " +0x7101: "Xi " +0x7102: "Shu " +0x7103: "He " +0x7104: "Xun " +0x7105: "Ku " +0x7106: "Jue " +0x7107: "Xiao " +0x7108: "Xi " +0x7109: "Yan " +0x710a: "Han " +0x710b: "Zhuang " +0x710c: "Jun " +0x710d: "Di " +0x710e: "Xie " +0x710f: "Ji " +0x7110: "Wu " +0x7111: "[?] " +0x7112: "[?] " +0x7113: "Han " +0x7114: "Yan " +0x7115: "Huan " +0x7116: "Men " +0x7117: "Ju " +0x7118: "Chou " +0x7119: "Bei " +0x711a: "Fen " +0x711b: "Lin " +0x711c: "Kun " +0x711d: "Hun " +0x711e: "Tun " +0x711f: "Xi " +0x7120: "Cui " +0x7121: "Wu " +0x7122: "Hong " +0x7123: "Ju " +0x7124: "Fu " +0x7125: "Wo " +0x7126: "Jiao " +0x7127: "Cong " +0x7128: "Feng " +0x7129: "Ping " +0x712a: "Qiong " +0x712b: "Ruo " +0x712c: "Xi " +0x712d: "Qiong " +0x712e: "Xin " +0x712f: "Zhuo " +0x7130: "Yan " +0x7131: "Yan " +0x7132: "Yi " +0x7133: "Jue " +0x7134: "Yu " +0x7135: "Gang " +0x7136: "Ran " +0x7137: "Pi " +0x7138: "Gu " +0x7139: "[?] " +0x713a: "Sheng " +0x713b: "Chang " +0x713c: "Shao " +0x713d: "[?] " +0x713e: "[?] " +0x713f: "[?] " +0x7140: "[?] " +0x7141: "Chen " +0x7142: "He " +0x7143: "Kui " +0x7144: "Zhong " +0x7145: "Duan " +0x7146: "Xia " +0x7147: "Hui " +0x7148: "Feng " +0x7149: "Lian " +0x714a: "Xuan " +0x714b: "Xing " +0x714c: "Huang " +0x714d: "Jiao " +0x714e: "Jian " +0x714f: "Bi " +0x7150: "Ying " +0x7151: "Zhu " +0x7152: "Wei " +0x7153: "Tuan " +0x7154: "Tian " +0x7155: "Xi " +0x7156: "Nuan " +0x7157: "Nuan " +0x7158: "Chan " +0x7159: "Yan " +0x715a: "Jiong " +0x715b: "Jiong " +0x715c: "Yu " +0x715d: "Mei " +0x715e: "Sha " +0x715f: "Wei " +0x7160: "Ye " +0x7161: "Xin " +0x7162: "Qiong " +0x7163: "Rou " +0x7164: "Mei " +0x7165: "Huan " +0x7166: "Xu " +0x7167: "Zhao " +0x7168: "Wei " +0x7169: "Fan " +0x716a: "Qiu " +0x716b: "Sui " +0x716c: "Yang " +0x716d: "Lie " +0x716e: "Zhu " +0x716f: "Jie " +0x7170: "Gao " +0x7171: "Gua " +0x7172: "Bao " +0x7173: "Hu " +0x7174: "Yun " +0x7175: "Xia " +0x7176: "[?] " +0x7177: "[?] " +0x7178: "Bian " +0x7179: "Gou " +0x717a: "Tui " +0x717b: "Tang " +0x717c: "Chao " +0x717d: "Shan " +0x717e: "N " +0x717f: "Bo " +0x7180: "Huang " +0x7181: "Xie " +0x7182: "Xi " +0x7183: "Wu " +0x7184: "Xi " +0x7185: "Yun " +0x7186: "He " +0x7187: "He " +0x7188: "Xi " +0x7189: "Yun " +0x718a: "Xiong " +0x718b: "Nai " +0x718c: "Shan " +0x718d: "Qiong " +0x718e: "Yao " +0x718f: "Xun " +0x7190: "Mi " +0x7191: "Lian " +0x7192: "Ying " +0x7193: "Wen " +0x7194: "Rong " +0x7195: "Oozutsu " +0x7196: "[?] " +0x7197: "Qiang " +0x7198: "Liu " +0x7199: "Xi " +0x719a: "Bi " +0x719b: "Biao " +0x719c: "Zong " +0x719d: "Lu " +0x719e: "Jian " +0x719f: "Shou " +0x71a0: "Yi " +0x71a1: "Lou " +0x71a2: "Feng " +0x71a3: "Sui " +0x71a4: "Yi " +0x71a5: "Tong " +0x71a6: "Jue " +0x71a7: "Zong " +0x71a8: "Yun " +0x71a9: "Hu " +0x71aa: "Yi " +0x71ab: "Zhi " +0x71ac: "Ao " +0x71ad: "Wei " +0x71ae: "Liao " +0x71af: "Han " +0x71b0: "Ou " +0x71b1: "Re " +0x71b2: "Jiong " +0x71b3: "Man " +0x71b4: "[?] " +0x71b5: "Shang " +0x71b6: "Cuan " +0x71b7: "Zeng " +0x71b8: "Jian " +0x71b9: "Xi " +0x71ba: "Xi " +0x71bb: "Xi " +0x71bc: "Yi " +0x71bd: "Xiao " +0x71be: "Chi " +0x71bf: "Huang " +0x71c0: "Chan " +0x71c1: "Ye " +0x71c2: "Qian " +0x71c3: "Ran " +0x71c4: "Yan " +0x71c5: "Xian " +0x71c6: "Qiao " +0x71c7: "Zun " +0x71c8: "Deng " +0x71c9: "Dun " +0x71ca: "Shen " +0x71cb: "Jiao " +0x71cc: "Fen " +0x71cd: "Si " +0x71ce: "Liao " +0x71cf: "Yu " +0x71d0: "Lin " +0x71d1: "Tong " +0x71d2: "Shao " +0x71d3: "Fen " +0x71d4: "Fan " +0x71d5: "Yan " +0x71d6: "Xun " +0x71d7: "Lan " +0x71d8: "Mei " +0x71d9: "Tang " +0x71da: "Yi " +0x71db: "Jing " +0x71dc: "Men " +0x71dd: "[?] " +0x71de: "[?] " +0x71df: "Ying " +0x71e0: "Yu " +0x71e1: "Yi " +0x71e2: "Xue " +0x71e3: "Lan " +0x71e4: "Tai " +0x71e5: "Zao " +0x71e6: "Can " +0x71e7: "Sui " +0x71e8: "Xi " +0x71e9: "Que " +0x71ea: "Cong " +0x71eb: "Lian " +0x71ec: "Hui " +0x71ed: "Zhu " +0x71ee: "Xie " +0x71ef: "Ling " +0x71f0: "Wei " +0x71f1: "Yi " +0x71f2: "Xie " +0x71f3: "Zhao " +0x71f4: "Hui " +0x71f5: "Tatsu " +0x71f6: "Nung " +0x71f7: "Lan " +0x71f8: "Ru " +0x71f9: "Xian " +0x71fa: "Kao " +0x71fb: "Xun " +0x71fc: "Jin " +0x71fd: "Chou " +0x71fe: "Chou " +0x71ff: "Yao " +/* x072 */ +0x7200: "He " +0x7201: "Lan " +0x7202: "Biao " +0x7203: "Rong " +0x7204: "Li " +0x7205: "Mo " +0x7206: "Bao " +0x7207: "Ruo " +0x7208: "Lu " +0x7209: "La " +0x720a: "Ao " +0x720b: "Xun " +0x720c: "Kuang " +0x720d: "Shuo " +0x720e: "[?] " +0x720f: "Li " +0x7210: "Lu " +0x7211: "Jue " +0x7212: "Liao " +0x7213: "Yan " +0x7214: "Xi " +0x7215: "Xie " +0x7216: "Long " +0x7217: "Ye " +0x7218: "[?] " +0x7219: "Rang " +0x721a: "Yue " +0x721b: "Lan " +0x721c: "Cong " +0x721d: "Jue " +0x721e: "Tong " +0x721f: "Guan " +0x7220: "[?] " +0x7221: "Che " +0x7222: "Mi " +0x7223: "Tang " +0x7224: "Lan " +0x7225: "Zhu " +0x7226: "[?] " +0x7227: "Ling " +0x7228: "Cuan " +0x7229: "Yu " +0x722a: "Zhua " +0x722b: "Tsumekanmuri " +0x722c: "Pa " +0x722d: "Zheng " +0x722e: "Pao " +0x722f: "Cheng " +0x7230: "Yuan " +0x7231: "Ai " +0x7232: "Wei " +0x7233: "[?] " +0x7234: "Jue " +0x7235: "Jue " +0x7236: "Fu " +0x7237: "Ye " +0x7238: "Ba " +0x7239: "Die " +0x723a: "Ye " +0x723b: "Yao " +0x723c: "Zu " +0x723d: "Shuang " +0x723e: "Er " +0x723f: "Qiang " +0x7240: "Chuang " +0x7241: "Ge " +0x7242: "Zang " +0x7243: "Die " +0x7244: "Qiang " +0x7245: "Yong " +0x7246: "Qiang " +0x7247: "Pian " +0x7248: "Ban " +0x7249: "Pan " +0x724a: "Shao " +0x724b: "Jian " +0x724c: "Pai " +0x724d: "Du " +0x724e: "Chuang " +0x724f: "Tou " +0x7250: "Zha " +0x7251: "Bian " +0x7252: "Die " +0x7253: "Bang " +0x7254: "Bo " +0x7255: "Chuang " +0x7256: "You " +0x7257: "[?] " +0x7258: "Du " +0x7259: "Ya " +0x725a: "Cheng " +0x725b: "Niu " +0x725c: "Ushihen " +0x725d: "Pin " +0x725e: "Jiu " +0x725f: "Mou " +0x7260: "Tuo " +0x7261: "Mu " +0x7262: "Lao " +0x7263: "Ren " +0x7264: "Mang " +0x7265: "Fang " +0x7266: "Mao " +0x7267: "Mu " +0x7268: "Gang " +0x7269: "Wu " +0x726a: "Yan " +0x726b: "Ge " +0x726c: "Bei " +0x726d: "Si " +0x726e: "Jian " +0x726f: "Gu " +0x7270: "You " +0x7271: "Ge " +0x7272: "Sheng " +0x7273: "Mu " +0x7274: "Di " +0x7275: "Qian " +0x7276: "Quan " +0x7277: "Quan " +0x7278: "Zi " +0x7279: "Te " +0x727a: "Xi " +0x727b: "Mang " +0x727c: "Keng " +0x727d: "Qian " +0x727e: "Wu " +0x727f: "Gu " +0x7280: "Xi " +0x7281: "Li " +0x7282: "Li " +0x7283: "Pou " +0x7284: "Ji " +0x7285: "Gang " +0x7286: "Zhi " +0x7287: "Ben " +0x7288: "Quan " +0x7289: "Run " +0x728a: "Du " +0x728b: "Ju " +0x728c: "Jia " +0x728d: "Jian " +0x728e: "Feng " +0x728f: "Pian " +0x7290: "Ke " +0x7291: "Ju " +0x7292: "Kao " +0x7293: "Chu " +0x7294: "Xi " +0x7295: "Bei " +0x7296: "Luo " +0x7297: "Jie " +0x7298: "Ma " +0x7299: "San " +0x729a: "Wei " +0x729b: "Li " +0x729c: "Dun " +0x729d: "Tong " +0x729e: "[?] " +0x729f: "Jiang " +0x72a0: "Ikenie " +0x72a1: "Li " +0x72a2: "Du " +0x72a3: "Lie " +0x72a4: "Pi " +0x72a5: "Piao " +0x72a6: "Bao " +0x72a7: "Xi " +0x72a8: "Chou " +0x72a9: "Wei " +0x72aa: "Kui " +0x72ab: "Chou " +0x72ac: "Quan " +0x72ad: "Fan " +0x72ae: "Ba " +0x72af: "Fan " +0x72b0: "Qiu " +0x72b1: "Ji " +0x72b2: "Cai " +0x72b3: "Chuo " +0x72b4: "An " +0x72b5: "Jie " +0x72b6: "Zhuang " +0x72b7: "Guang " +0x72b8: "Ma " +0x72b9: "You " +0x72ba: "Kang " +0x72bb: "Bo " +0x72bc: "Hou " +0x72bd: "Ya " +0x72be: "Yin " +0x72bf: "Huan " +0x72c0: "Zhuang " +0x72c1: "Yun " +0x72c2: "Kuang " +0x72c3: "Niu " +0x72c4: "Di " +0x72c5: "Qing " +0x72c6: "Zhong " +0x72c7: "Mu " +0x72c8: "Bei " +0x72c9: "Pi " +0x72ca: "Ju " +0x72cb: "Ni " +0x72cc: "Sheng " +0x72cd: "Pao " +0x72ce: "Xia " +0x72cf: "Tuo " +0x72d0: "Hu " +0x72d1: "Ling " +0x72d2: "Fei " +0x72d3: "Pi " +0x72d4: "Ni " +0x72d5: "Ao " +0x72d6: "You " +0x72d7: "Gou " +0x72d8: "Yue " +0x72d9: "Ju " +0x72da: "Dan " +0x72db: "Po " +0x72dc: "Gu " +0x72dd: "Xian " +0x72de: "Ning " +0x72df: "Huan " +0x72e0: "Hen " +0x72e1: "Jiao " +0x72e2: "He " +0x72e3: "Zhao " +0x72e4: "Ji " +0x72e5: "Xun " +0x72e6: "Shan " +0x72e7: "Ta " +0x72e8: "Rong " +0x72e9: "Shou " +0x72ea: "Tong " +0x72eb: "Lao " +0x72ec: "Du " +0x72ed: "Xia " +0x72ee: "Shi " +0x72ef: "Hua " +0x72f0: "Zheng " +0x72f1: "Yu " +0x72f2: "Sun " +0x72f3: "Yu " +0x72f4: "Bi " +0x72f5: "Mang " +0x72f6: "Xi " +0x72f7: "Juan " +0x72f8: "Li " +0x72f9: "Xia " +0x72fa: "Yin " +0x72fb: "Suan " +0x72fc: "Lang " +0x72fd: "Bei " +0x72fe: "Zhi " +0x72ff: "Yan " +/* x073 */ +0x7300: "Sha " +0x7301: "Li " +0x7302: "Han " +0x7303: "Xian " +0x7304: "Jing " +0x7305: "Pai " +0x7306: "Fei " +0x7307: "Yao " +0x7308: "Ba " +0x7309: "Qi " +0x730a: "Ni " +0x730b: "Biao " +0x730c: "Yin " +0x730d: "Lai " +0x730e: "Xi " +0x730f: "Jian " +0x7310: "Qiang " +0x7311: "Kun " +0x7312: "Yan " +0x7313: "Guo " +0x7314: "Zong " +0x7315: "Mi " +0x7316: "Chang " +0x7317: "Yi " +0x7318: "Zhi " +0x7319: "Zheng " +0x731a: "Ya " +0x731b: "Meng " +0x731c: "Cai " +0x731d: "Cu " +0x731e: "She " +0x731f: "Kari " +0x7320: "Cen " +0x7321: "Luo " +0x7322: "Hu " +0x7323: "Zong " +0x7324: "Ji " +0x7325: "Wei " +0x7326: "Feng " +0x7327: "Wo " +0x7328: "Yuan " +0x7329: "Xing " +0x732a: "Zhu " +0x732b: "Mao " +0x732c: "Wei " +0x732d: "Yuan " +0x732e: "Xian " +0x732f: "Tuan " +0x7330: "Ya " +0x7331: "Nao " +0x7332: "Xie " +0x7333: "Jia " +0x7334: "Hou " +0x7335: "Bian " +0x7336: "You " +0x7337: "You " +0x7338: "Mei " +0x7339: "Zha " +0x733a: "Yao " +0x733b: "Sun " +0x733c: "Bo " +0x733d: "Ming " +0x733e: "Hua " +0x733f: "Yuan " +0x7340: "Sou " +0x7341: "Ma " +0x7342: "Yuan " +0x7343: "Dai " +0x7344: "Yu " +0x7345: "Shi " +0x7346: "Hao " +0x7347: "[?] " +0x7348: "Yi " +0x7349: "Zhen " +0x734a: "Chuang " +0x734b: "Hao " +0x734c: "Man " +0x734d: "Jing " +0x734e: "Jiang " +0x734f: "Mu " +0x7350: "Zhang " +0x7351: "Chan " +0x7352: "Ao " +0x7353: "Ao " +0x7354: "Hao " +0x7355: "Cui " +0x7356: "Fen " +0x7357: "Jue " +0x7358: "Bi " +0x7359: "Bi " +0x735a: "Huang " +0x735b: "Pu " +0x735c: "Lin " +0x735d: "Yu " +0x735e: "Tong " +0x735f: "Yao " +0x7360: "Liao " +0x7361: "Shuo " +0x7362: "Xiao " +0x7363: "Swu " +0x7364: "Ton " +0x7365: "Xi " +0x7366: "Ge " +0x7367: "Juan " +0x7368: "Du " +0x7369: "Hui " +0x736a: "Kuai " +0x736b: "Xian " +0x736c: "Xie " +0x736d: "Ta " +0x736e: "Xian " +0x736f: "Xun " +0x7370: "Ning " +0x7371: "Pin " +0x7372: "Huo " +0x7373: "Nou " +0x7374: "Meng " +0x7375: "Lie " +0x7376: "Nao " +0x7377: "Guang " +0x7378: "Shou " +0x7379: "Lu " +0x737a: "Ta " +0x737b: "Xian " +0x737c: "Mi " +0x737d: "Rang " +0x737e: "Huan " +0x737f: "Nao " +0x7380: "Luo " +0x7381: "Xian " +0x7382: "Qi " +0x7383: "Jue " +0x7384: "Xuan " +0x7385: "Miao " +0x7386: "Zi " +0x7387: "Lu " +0x7388: "Lu " +0x7389: "Yu " +0x738a: "Su " +0x738b: "Wang " +0x738c: "Qiu " +0x738d: "Ga " +0x738e: "Ding " +0x738f: "Le " +0x7390: "Ba " +0x7391: "Ji " +0x7392: "Hong " +0x7393: "Di " +0x7394: "Quan " +0x7395: "Gan " +0x7396: "Jiu " +0x7397: "Yu " +0x7398: "Ji " +0x7399: "Yu " +0x739a: "Yang " +0x739b: "Ma " +0x739c: "Gong " +0x739d: "Wu " +0x739e: "Fu " +0x739f: "Wen " +0x73a0: "Jie " +0x73a1: "Ya " +0x73a2: "Fen " +0x73a3: "Bian " +0x73a4: "Beng " +0x73a5: "Yue " +0x73a6: "Jue " +0x73a7: "Yun " +0x73a8: "Jue " +0x73a9: "Wan " +0x73aa: "Jian " +0x73ab: "Mei " +0x73ac: "Dan " +0x73ad: "Pi " +0x73ae: "Wei " +0x73af: "Huan " +0x73b0: "Xian " +0x73b1: "Qiang " +0x73b2: "Ling " +0x73b3: "Dai " +0x73b4: "Yi " +0x73b5: "An " +0x73b6: "Ping " +0x73b7: "Dian " +0x73b8: "Fu " +0x73b9: "Xuan " +0x73ba: "Xi " +0x73bb: "Bo " +0x73bc: "Ci " +0x73bd: "Gou " +0x73be: "Jia " +0x73bf: "Shao " +0x73c0: "Po " +0x73c1: "Ci " +0x73c2: "Ke " +0x73c3: "Ran " +0x73c4: "Sheng " +0x73c5: "Shen " +0x73c6: "Yi " +0x73c7: "Zu " +0x73c8: "Jia " +0x73c9: "Min " +0x73ca: "Shan " +0x73cb: "Liu " +0x73cc: "Bi " +0x73cd: "Zhen " +0x73ce: "Zhen " +0x73cf: "Jue " +0x73d0: "Fa " +0x73d1: "Long " +0x73d2: "Jin " +0x73d3: "Jiao " +0x73d4: "Jian " +0x73d5: "Li " +0x73d6: "Guang " +0x73d7: "Xian " +0x73d8: "Zhou " +0x73d9: "Gong " +0x73da: "Yan " +0x73db: "Xiu " +0x73dc: "Yang " +0x73dd: "Xu " +0x73de: "Luo " +0x73df: "Su " +0x73e0: "Zhu " +0x73e1: "Qin " +0x73e2: "Ken " +0x73e3: "Xun " +0x73e4: "Bao " +0x73e5: "Er " +0x73e6: "Xiang " +0x73e7: "Yao " +0x73e8: "Xia " +0x73e9: "Heng " +0x73ea: "Gui " +0x73eb: "Chong " +0x73ec: "Xu " +0x73ed: "Ban " +0x73ee: "Pei " +0x73ef: "[?] " +0x73f0: "Dang " +0x73f1: "Ei " +0x73f2: "Hun " +0x73f3: "Wen " +0x73f4: "E " +0x73f5: "Cheng " +0x73f6: "Ti " +0x73f7: "Wu " +0x73f8: "Wu " +0x73f9: "Cheng " +0x73fa: "Jun " +0x73fb: "Mei " +0x73fc: "Bei " +0x73fd: "Ting " +0x73fe: "Xian " +0x73ff: "Chuo " +/* x074 */ +0x7400: "Han " +0x7401: "Xuan " +0x7402: "Yan " +0x7403: "Qiu " +0x7404: "Quan " +0x7405: "Lang " +0x7406: "Li " +0x7407: "Xiu " +0x7408: "Fu " +0x7409: "Liu " +0x740a: "Ye " +0x740b: "Xi " +0x740c: "Ling " +0x740d: "Li " +0x740e: "Jin " +0x740f: "Lian " +0x7410: "Suo " +0x7411: "Chiisai " +0x7412: "[?] " +0x7413: "Wan " +0x7414: "Dian " +0x7415: "Pin " +0x7416: "Zhan " +0x7417: "Cui " +0x7418: "Min " +0x7419: "Yu " +0x741a: "Ju " +0x741b: "Chen " +0x741c: "Lai " +0x741d: "Wen " +0x741e: "Sheng " +0x741f: "Wei " +0x7420: "Dian " +0x7421: "Chu " +0x7422: "Zhuo " +0x7423: "Pei " +0x7424: "Cheng " +0x7425: "Hu " +0x7426: "Qi " +0x7427: "E " +0x7428: "Kun " +0x7429: "Chang " +0x742a: "Qi " +0x742b: "Beng " +0x742c: "Wan " +0x742d: "Lu " +0x742e: "Cong " +0x742f: "Guan " +0x7430: "Yan " +0x7431: "Diao " +0x7432: "Bei " +0x7433: "Lin " +0x7434: "Qin " +0x7435: "Pi " +0x7436: "Pa " +0x7437: "Que " +0x7438: "Zhuo " +0x7439: "Qin " +0x743a: "Fa " +0x743b: "[?] " +0x743c: "Qiong " +0x743d: "Du " +0x743e: "Jie " +0x743f: "Hun " +0x7440: "Yu " +0x7441: "Mao " +0x7442: "Mei " +0x7443: "Chun " +0x7444: "Xuan " +0x7445: "Ti " +0x7446: "Xing " +0x7447: "Dai " +0x7448: "Rou " +0x7449: "Min " +0x744a: "Zhen " +0x744b: "Wei " +0x744c: "Ruan " +0x744d: "Huan " +0x744e: "Jie " +0x744f: "Chuan " +0x7450: "Jian " +0x7451: "Zhuan " +0x7452: "Yang " +0x7453: "Lian " +0x7454: "Quan " +0x7455: "Xia " +0x7456: "Duan " +0x7457: "Yuan " +0x7458: "Ye " +0x7459: "Nao " +0x745a: "Hu " +0x745b: "Ying " +0x745c: "Yu " +0x745d: "Huang " +0x745e: "Rui " +0x745f: "Se " +0x7460: "Liu " +0x7461: "Shi " +0x7462: "Rong " +0x7463: "Suo " +0x7464: "Yao " +0x7465: "Wen " +0x7466: "Wu " +0x7467: "Jin " +0x7468: "Jin " +0x7469: "Ying " +0x746a: "Ma " +0x746b: "Tao " +0x746c: "Liu " +0x746d: "Tang " +0x746e: "Li " +0x746f: "Lang " +0x7470: "Gui " +0x7471: "Zhen " +0x7472: "Qiang " +0x7473: "Cuo " +0x7474: "Jue " +0x7475: "Zhao " +0x7476: "Yao " +0x7477: "Ai " +0x7478: "Bin " +0x7479: "Tu " +0x747a: "Chang " +0x747b: "Kun " +0x747c: "Zhuan " +0x747d: "Cong " +0x747e: "Jin " +0x747f: "Yi " +0x7480: "Cui " +0x7481: "Cong " +0x7482: "Qi " +0x7483: "Li " +0x7484: "Ying " +0x7485: "Suo " +0x7486: "Qiu " +0x7487: "Xuan " +0x7488: "Ao " +0x7489: "Lian " +0x748a: "Man " +0x748b: "Zhang " +0x748c: "Yin " +0x748d: "[?] " +0x748e: "Ying " +0x748f: "Zhi " +0x7490: "Lu " +0x7491: "Wu " +0x7492: "Deng " +0x7493: "Xiou " +0x7494: "Zeng " +0x7495: "Xun " +0x7496: "Qu " +0x7497: "Dang " +0x7498: "Lin " +0x7499: "Liao " +0x749a: "Qiong " +0x749b: "Su " +0x749c: "Huang " +0x749d: "Gui " +0x749e: "Pu " +0x749f: "Jing " +0x74a0: "Fan " +0x74a1: "Jin " +0x74a2: "Liu " +0x74a3: "Ji " +0x74a4: "[?] " +0x74a5: "Jing " +0x74a6: "Ai " +0x74a7: "Bi " +0x74a8: "Can " +0x74a9: "Qu " +0x74aa: "Zao " +0x74ab: "Dang " +0x74ac: "Jiao " +0x74ad: "Gun " +0x74ae: "Tan " +0x74af: "Hui " +0x74b0: "Huan " +0x74b1: "Se " +0x74b2: "Sui " +0x74b3: "Tian " +0x74b4: "[?] " +0x74b5: "Yu " +0x74b6: "Jin " +0x74b7: "Lu " +0x74b8: "Bin " +0x74b9: "Shou " +0x74ba: "Wen " +0x74bb: "Zui " +0x74bc: "Lan " +0x74bd: "Xi " +0x74be: "Ji " +0x74bf: "Xuan " +0x74c0: "Ruan " +0x74c1: "Huo " +0x74c2: "Gai " +0x74c3: "Lei " +0x74c4: "Du " +0x74c5: "Li " +0x74c6: "Zhi " +0x74c7: "Rou " +0x74c8: "Li " +0x74c9: "Zan " +0x74ca: "Qiong " +0x74cb: "Zhe " +0x74cc: "Gui " +0x74cd: "Sui " +0x74ce: "La " +0x74cf: "Long " +0x74d0: "Lu " +0x74d1: "Li " +0x74d2: "Zan " +0x74d3: "Lan " +0x74d4: "Ying " +0x74d5: "Mi " +0x74d6: "Xiang " +0x74d7: "Xi " +0x74d8: "Guan " +0x74d9: "Dao " +0x74da: "Zan " +0x74db: "Huan " +0x74dc: "Gua " +0x74dd: "Bo " +0x74de: "Die " +0x74df: "Bao " +0x74e0: "Hu " +0x74e1: "Zhi " +0x74e2: "Piao " +0x74e3: "Ban " +0x74e4: "Rang " +0x74e5: "Li " +0x74e6: "Wa " +0x74e7: "Dekaguramu " +0x74e8: "Jiang " +0x74e9: "Qian " +0x74ea: "Fan " +0x74eb: "Pen " +0x74ec: "Fang " +0x74ed: "Dan " +0x74ee: "Weng " +0x74ef: "Ou " +0x74f0: "Deshiguramu " +0x74f1: "Miriguramu " +0x74f2: "Thon " +0x74f3: "Hu " +0x74f4: "Ling " +0x74f5: "Yi " +0x74f6: "Ping " +0x74f7: "Ci " +0x74f8: "Hekutogura " +0x74f9: "Juan " +0x74fa: "Chang " +0x74fb: "Chi " +0x74fc: "Sarake " +0x74fd: "Dang " +0x74fe: "Meng " +0x74ff: "Pou " +/* x075 */ +0x7500: "Zhui " +0x7501: "Ping " +0x7502: "Bian " +0x7503: "Zhou " +0x7504: "Zhen " +0x7505: "Senchigura " +0x7506: "Ci " +0x7507: "Ying " +0x7508: "Qi " +0x7509: "Xian " +0x750a: "Lou " +0x750b: "Di " +0x750c: "Ou " +0x750d: "Meng " +0x750e: "Zhuan " +0x750f: "Peng " +0x7510: "Lin " +0x7511: "Zeng " +0x7512: "Wu " +0x7513: "Pi " +0x7514: "Dan " +0x7515: "Weng " +0x7516: "Ying " +0x7517: "Yan " +0x7518: "Gan " +0x7519: "Dai " +0x751a: "Shen " +0x751b: "Tian " +0x751c: "Tian " +0x751d: "Han " +0x751e: "Chang " +0x751f: "Sheng " +0x7520: "Qing " +0x7521: "Sheng " +0x7522: "Chan " +0x7523: "Chan " +0x7524: "Rui " +0x7525: "Sheng " +0x7526: "Su " +0x7527: "Sen " +0x7528: "Yong " +0x7529: "Shuai " +0x752a: "Lu " +0x752b: "Fu " +0x752c: "Yong " +0x752d: "Beng " +0x752e: "Feng " +0x752f: "Ning " +0x7530: "Tian " +0x7531: "You " +0x7532: "Jia " +0x7533: "Shen " +0x7534: "Zha " +0x7535: "Dian " +0x7536: "Fu " +0x7537: "Nan " +0x7538: "Dian " +0x7539: "Ping " +0x753a: "Ting " +0x753b: "Hua " +0x753c: "Ting " +0x753d: "Quan " +0x753e: "Zi " +0x753f: "Meng " +0x7540: "Bi " +0x7541: "Qi " +0x7542: "Liu " +0x7543: "Xun " +0x7544: "Liu " +0x7545: "Chang " +0x7546: "Mu " +0x7547: "Yun " +0x7548: "Fan " +0x7549: "Fu " +0x754a: "Geng " +0x754b: "Tian " +0x754c: "Jie " +0x754d: "Jie " +0x754e: "Quan " +0x754f: "Wei " +0x7550: "Fu " +0x7551: "Tian " +0x7552: "Mu " +0x7553: "Tap " +0x7554: "Pan " +0x7555: "Jiang " +0x7556: "Wa " +0x7557: "Da " +0x7558: "Nan " +0x7559: "Liu " +0x755a: "Ben " +0x755b: "Zhen " +0x755c: "Chu " +0x755d: "Mu " +0x755e: "Mu " +0x755f: "Ce " +0x7560: "Cen " +0x7561: "Gai " +0x7562: "Bi " +0x7563: "Da " +0x7564: "Zhi " +0x7565: "Lue " +0x7566: "Qi " +0x7567: "Lue " +0x7568: "Pan " +0x7569: "Kesa " +0x756a: "Fan " +0x756b: "Hua " +0x756c: "Yu " +0x756d: "Yu " +0x756e: "Mu " +0x756f: "Jun " +0x7570: "Yi " +0x7571: "Liu " +0x7572: "Yu " +0x7573: "Die " +0x7574: "Chou " +0x7575: "Hua " +0x7576: "Dang " +0x7577: "Chuo " +0x7578: "Ji " +0x7579: "Wan " +0x757a: "Jiang " +0x757b: "Sheng " +0x757c: "Chang " +0x757d: "Tuan " +0x757e: "Lei " +0x757f: "Ji " +0x7580: "Cha " +0x7581: "Liu " +0x7582: "Tatamu " +0x7583: "Tuan " +0x7584: "Lin " +0x7585: "Jiang " +0x7586: "Jiang " +0x7587: "Chou " +0x7588: "Bo " +0x7589: "Die " +0x758a: "Die " +0x758b: "Pi " +0x758c: "Nie " +0x758d: "Dan " +0x758e: "Shu " +0x758f: "Shu " +0x7590: "Zhi " +0x7591: "Yi " +0x7592: "Chuang " +0x7593: "Nai " +0x7594: "Ding " +0x7595: "Bi " +0x7596: "Jie " +0x7597: "Liao " +0x7598: "Gong " +0x7599: "Ge " +0x759a: "Jiu " +0x759b: "Zhou " +0x759c: "Xia " +0x759d: "Shan " +0x759e: "Xu " +0x759f: "Nue " +0x75a0: "Li " +0x75a1: "Yang " +0x75a2: "Chen " +0x75a3: "You " +0x75a4: "Ba " +0x75a5: "Jie " +0x75a6: "Jue " +0x75a7: "Zhi " +0x75a8: "Xia " +0x75a9: "Cui " +0x75aa: "Bi " +0x75ab: "Yi " +0x75ac: "Li " +0x75ad: "Zong " +0x75ae: "Chuang " +0x75af: "Feng " +0x75b0: "Zhu " +0x75b1: "Pao " +0x75b2: "Pi " +0x75b3: "Gan " +0x75b4: "Ke " +0x75b5: "Ci " +0x75b6: "Xie " +0x75b7: "Qi " +0x75b8: "Dan " +0x75b9: "Zhen " +0x75ba: "Fa " +0x75bb: "Zhi " +0x75bc: "Teng " +0x75bd: "Ju " +0x75be: "Ji " +0x75bf: "Fei " +0x75c0: "Qu " +0x75c1: "Dian " +0x75c2: "Jia " +0x75c3: "Xian " +0x75c4: "Cha " +0x75c5: "Bing " +0x75c6: "Ni " +0x75c7: "Zheng " +0x75c8: "Yong " +0x75c9: "Jing " +0x75ca: "Quan " +0x75cb: "Chong " +0x75cc: "Tong " +0x75cd: "Yi " +0x75ce: "Kai " +0x75cf: "Wei " +0x75d0: "Hui " +0x75d1: "Duo " +0x75d2: "Yang " +0x75d3: "Chi " +0x75d4: "Zhi " +0x75d5: "Hen " +0x75d6: "Ya " +0x75d7: "Mei " +0x75d8: "Dou " +0x75d9: "Jing " +0x75da: "Xiao " +0x75db: "Tong " +0x75dc: "Tu " +0x75dd: "Mang " +0x75de: "Pi " +0x75df: "Xiao " +0x75e0: "Suan " +0x75e1: "Pu " +0x75e2: "Li " +0x75e3: "Zhi " +0x75e4: "Cuo " +0x75e5: "Duo " +0x75e6: "Wu " +0x75e7: "Sha " +0x75e8: "Lao " +0x75e9: "Shou " +0x75ea: "Huan " +0x75eb: "Xian " +0x75ec: "Yi " +0x75ed: "Peng " +0x75ee: "Zhang " +0x75ef: "Guan " +0x75f0: "Tan " +0x75f1: "Fei " +0x75f2: "Ma " +0x75f3: "Lin " +0x75f4: "Chi " +0x75f5: "Ji " +0x75f6: "Dian " +0x75f7: "An " +0x75f8: "Chi " +0x75f9: "Bi " +0x75fa: "Bei " +0x75fb: "Min " +0x75fc: "Gu " +0x75fd: "Dui " +0x75fe: "E " +0x75ff: "Wei " +/* x076 */ +0x7600: "Yu " +0x7601: "Cui " +0x7602: "Ya " +0x7603: "Zhu " +0x7604: "Cu " +0x7605: "Dan " +0x7606: "Shen " +0x7607: "Zhung " +0x7608: "Ji " +0x7609: "Yu " +0x760a: "Hou " +0x760b: "Feng " +0x760c: "La " +0x760d: "Yang " +0x760e: "Shen " +0x760f: "Tu " +0x7610: "Yu " +0x7611: "Gua " +0x7612: "Wen " +0x7613: "Huan " +0x7614: "Ku " +0x7615: "Jia " +0x7616: "Yin " +0x7617: "Yi " +0x7618: "Lu " +0x7619: "Sao " +0x761a: "Jue " +0x761b: "Chi " +0x761c: "Xi " +0x761d: "Guan " +0x761e: "Yi " +0x761f: "Wen " +0x7620: "Ji " +0x7621: "Chuang " +0x7622: "Ban " +0x7623: "Lei " +0x7624: "Liu " +0x7625: "Chai " +0x7626: "Shou " +0x7627: "Nue " +0x7628: "Dian " +0x7629: "Da " +0x762a: "Pie " +0x762b: "Tan " +0x762c: "Zhang " +0x762d: "Biao " +0x762e: "Shen " +0x762f: "Cu " +0x7630: "Luo " +0x7631: "Yi " +0x7632: "Zong " +0x7633: "Chou " +0x7634: "Zhang " +0x7635: "Zhai " +0x7636: "Sou " +0x7637: "Suo " +0x7638: "Que " +0x7639: "Diao " +0x763a: "Lou " +0x763b: "Lu " +0x763c: "Mo " +0x763d: "Jin " +0x763e: "Yin " +0x763f: "Ying " +0x7640: "Huang " +0x7641: "Fu " +0x7642: "Liao " +0x7643: "Long " +0x7644: "Qiao " +0x7645: "Liu " +0x7646: "Lao " +0x7647: "Xian " +0x7648: "Fei " +0x7649: "Dan " +0x764a: "Yin " +0x764b: "He " +0x764c: "Yan " +0x764d: "Ban " +0x764e: "Xian " +0x764f: "Guan " +0x7650: "Guai " +0x7651: "Nong " +0x7652: "Yu " +0x7653: "Wei " +0x7654: "Yi " +0x7655: "Yong " +0x7656: "Pi " +0x7657: "Lei " +0x7658: "Li " +0x7659: "Shu " +0x765a: "Dan " +0x765b: "Lin " +0x765c: "Dian " +0x765d: "Lin " +0x765e: "Lai " +0x765f: "Pie " +0x7660: "Ji " +0x7661: "Chi " +0x7662: "Yang " +0x7663: "Xian " +0x7664: "Jie " +0x7665: "Zheng " +0x7666: "[?] " +0x7667: "Li " +0x7668: "Huo " +0x7669: "Lai " +0x766a: "Shaku " +0x766b: "Dian " +0x766c: "Xian " +0x766d: "Ying " +0x766e: "Yin " +0x766f: "Qu " +0x7670: "Yong " +0x7671: "Tan " +0x7672: "Dian " +0x7673: "Luo " +0x7674: "Luan " +0x7675: "Luan " +0x7676: "Bo " +0x7677: "[?] " +0x7678: "Gui " +0x7679: "Po " +0x767a: "Fa " +0x767b: "Deng " +0x767c: "Fa " +0x767d: "Bai " +0x767e: "Bai " +0x767f: "Qie " +0x7680: "Bi " +0x7681: "Zao " +0x7682: "Zao " +0x7683: "Mao " +0x7684: "De " +0x7685: "Pa " +0x7686: "Jie " +0x7687: "Huang " +0x7688: "Gui " +0x7689: "Ci " +0x768a: "Ling " +0x768b: "Gao " +0x768c: "Mo " +0x768d: "Ji " +0x768e: "Jiao " +0x768f: "Peng " +0x7690: "Gao " +0x7691: "Ai " +0x7692: "E " +0x7693: "Hao " +0x7694: "Han " +0x7695: "Bi " +0x7696: "Wan " +0x7697: "Chou " +0x7698: "Qian " +0x7699: "Xi " +0x769a: "Ai " +0x769b: "Jiong " +0x769c: "Hao " +0x769d: "Huang " +0x769e: "Hao " +0x769f: "Ze " +0x76a0: "Cui " +0x76a1: "Hao " +0x76a2: "Xiao " +0x76a3: "Ye " +0x76a4: "Po " +0x76a5: "Hao " +0x76a6: "Jiao " +0x76a7: "Ai " +0x76a8: "Xing " +0x76a9: "Huang " +0x76aa: "Li " +0x76ab: "Piao " +0x76ac: "He " +0x76ad: "Jiao " +0x76ae: "Pi " +0x76af: "Gan " +0x76b0: "Pao " +0x76b1: "Zhou " +0x76b2: "Jun " +0x76b3: "Qiu " +0x76b4: "Cun " +0x76b5: "Que " +0x76b6: "Zha " +0x76b7: "Gu " +0x76b8: "Jun " +0x76b9: "Jun " +0x76ba: "Zhou " +0x76bb: "Zha " +0x76bc: "Gu " +0x76bd: "Zhan " +0x76be: "Du " +0x76bf: "Min " +0x76c0: "Qi " +0x76c1: "Ying " +0x76c2: "Yu " +0x76c3: "Bei " +0x76c4: "Zhao " +0x76c5: "Zhong " +0x76c6: "Pen " +0x76c7: "He " +0x76c8: "Ying " +0x76c9: "He " +0x76ca: "Yi " +0x76cb: "Bo " +0x76cc: "Wan " +0x76cd: "He " +0x76ce: "Ang " +0x76cf: "Zhan " +0x76d0: "Yan " +0x76d1: "Jian " +0x76d2: "He " +0x76d3: "Yu " +0x76d4: "Kui " +0x76d5: "Fan " +0x76d6: "Gai " +0x76d7: "Dao " +0x76d8: "Pan " +0x76d9: "Fu " +0x76da: "Qiu " +0x76db: "Sheng " +0x76dc: "Dao " +0x76dd: "Lu " +0x76de: "Zhan " +0x76df: "Meng " +0x76e0: "Li " +0x76e1: "Jin " +0x76e2: "Xu " +0x76e3: "Jian " +0x76e4: "Pan " +0x76e5: "Guan " +0x76e6: "An " +0x76e7: "Lu " +0x76e8: "Shu " +0x76e9: "Zhou " +0x76ea: "Dang " +0x76eb: "An " +0x76ec: "Gu " +0x76ed: "Li " +0x76ee: "Mu " +0x76ef: "Cheng " +0x76f0: "Gan " +0x76f1: "Xu " +0x76f2: "Mang " +0x76f3: "Mang " +0x76f4: "Zhi " +0x76f5: "Qi " +0x76f6: "Ruan " +0x76f7: "Tian " +0x76f8: "Xiang " +0x76f9: "Dun " +0x76fa: "Xin " +0x76fb: "Xi " +0x76fc: "Pan " +0x76fd: "Feng " +0x76fe: "Dun " +0x76ff: "Min " +/* x077 */ +0x7700: "Ming " +0x7701: "Sheng " +0x7702: "Shi " +0x7703: "Yun " +0x7704: "Mian " +0x7705: "Pan " +0x7706: "Fang " +0x7707: "Miao " +0x7708: "Dan " +0x7709: "Mei " +0x770a: "Mao " +0x770b: "Kan " +0x770c: "Xian " +0x770d: "Ou " +0x770e: "Shi " +0x770f: "Yang " +0x7710: "Zheng " +0x7711: "Yao " +0x7712: "Shen " +0x7713: "Huo " +0x7714: "Da " +0x7715: "Zhen " +0x7716: "Kuang " +0x7717: "Ju " +0x7718: "Shen " +0x7719: "Chi " +0x771a: "Sheng " +0x771b: "Mei " +0x771c: "Mo " +0x771d: "Zhu " +0x771e: "Zhen " +0x771f: "Zhen " +0x7720: "Mian " +0x7721: "Di " +0x7722: "Yuan " +0x7723: "Die " +0x7724: "Yi " +0x7725: "Zi " +0x7726: "Zi " +0x7727: "Chao " +0x7728: "Zha " +0x7729: "Xuan " +0x772a: "Bing " +0x772b: "Mi " +0x772c: "Long " +0x772d: "Sui " +0x772e: "Dong " +0x772f: "Mi " +0x7730: "Die " +0x7731: "Yi " +0x7732: "Er " +0x7733: "Ming " +0x7734: "Xuan " +0x7735: "Chi " +0x7736: "Kuang " +0x7737: "Juan " +0x7738: "Mou " +0x7739: "Zhen " +0x773a: "Tiao " +0x773b: "Yang " +0x773c: "Yan " +0x773d: "Mo " +0x773e: "Zhong " +0x773f: "Mai " +0x7740: "Zhao " +0x7741: "Zheng " +0x7742: "Mei " +0x7743: "Jun " +0x7744: "Shao " +0x7745: "Han " +0x7746: "Huan " +0x7747: "Di " +0x7748: "Cheng " +0x7749: "Cuo " +0x774a: "Juan " +0x774b: "E " +0x774c: "Wan " +0x774d: "Xian " +0x774e: "Xi " +0x774f: "Kun " +0x7750: "Lai " +0x7751: "Jian " +0x7752: "Shan " +0x7753: "Tian " +0x7754: "Hun " +0x7755: "Wan " +0x7756: "Ling " +0x7757: "Shi " +0x7758: "Qiong " +0x7759: "Lie " +0x775a: "Yai " +0x775b: "Jing " +0x775c: "Zheng " +0x775d: "Li " +0x775e: "Lai " +0x775f: "Sui " +0x7760: "Juan " +0x7761: "Shui " +0x7762: "Sui " +0x7763: "Du " +0x7764: "Bi " +0x7765: "Bi " +0x7766: "Mu " +0x7767: "Hun " +0x7768: "Ni " +0x7769: "Lu " +0x776a: "Yi " +0x776b: "Jie " +0x776c: "Cai " +0x776d: "Zhou " +0x776e: "Yu " +0x776f: "Hun " +0x7770: "Ma " +0x7771: "Xia " +0x7772: "Xing " +0x7773: "Xi " +0x7774: "Gun " +0x7775: "Cai " +0x7776: "Chun " +0x7777: "Jian " +0x7778: "Mei " +0x7779: "Du " +0x777a: "Hou " +0x777b: "Xuan " +0x777c: "Ti " +0x777d: "Kui " +0x777e: "Gao " +0x777f: "Rui " +0x7780: "Mou " +0x7781: "Xu " +0x7782: "Fa " +0x7783: "Wen " +0x7784: "Miao " +0x7785: "Chou " +0x7786: "Kui " +0x7787: "Mi " +0x7788: "Weng " +0x7789: "Kou " +0x778a: "Dang " +0x778b: "Chen " +0x778c: "Ke " +0x778d: "Sou " +0x778e: "Xia " +0x778f: "Qiong " +0x7790: "Mao " +0x7791: "Ming " +0x7792: "Man " +0x7793: "Shui " +0x7794: "Ze " +0x7795: "Zhang " +0x7796: "Yi " +0x7797: "Diao " +0x7798: "Ou " +0x7799: "Mo " +0x779a: "Shun " +0x779b: "Cong " +0x779c: "Lou " +0x779d: "Chi " +0x779e: "Man " +0x779f: "Piao " +0x77a0: "Cheng " +0x77a1: "Ji " +0x77a2: "Meng " +0x77a3: "[?] " +0x77a4: "Run " +0x77a5: "Pie " +0x77a6: "Xi " +0x77a7: "Qiao " +0x77a8: "Pu " +0x77a9: "Zhu " +0x77aa: "Deng " +0x77ab: "Shen " +0x77ac: "Shun " +0x77ad: "Liao " +0x77ae: "Che " +0x77af: "Xian " +0x77b0: "Kan " +0x77b1: "Ye " +0x77b2: "Xu " +0x77b3: "Tong " +0x77b4: "Mou " +0x77b5: "Lin " +0x77b6: "Kui " +0x77b7: "Xian " +0x77b8: "Ye " +0x77b9: "Ai " +0x77ba: "Hui " +0x77bb: "Zhan " +0x77bc: "Jian " +0x77bd: "Gu " +0x77be: "Zhao " +0x77bf: "Qu " +0x77c0: "Wei " +0x77c1: "Chou " +0x77c2: "Sao " +0x77c3: "Ning " +0x77c4: "Xun " +0x77c5: "Yao " +0x77c6: "Huo " +0x77c7: "Meng " +0x77c8: "Mian " +0x77c9: "Bin " +0x77ca: "Mian " +0x77cb: "Li " +0x77cc: "Kuang " +0x77cd: "Jue " +0x77ce: "Xuan " +0x77cf: "Mian " +0x77d0: "Huo " +0x77d1: "Lu " +0x77d2: "Meng " +0x77d3: "Long " +0x77d4: "Guan " +0x77d5: "Man " +0x77d6: "Xi " +0x77d7: "Chu " +0x77d8: "Tang " +0x77d9: "Kan " +0x77da: "Zhu " +0x77db: "Mao " +0x77dc: "Jin " +0x77dd: "Lin " +0x77de: "Yu " +0x77df: "Shuo " +0x77e0: "Ce " +0x77e1: "Jue " +0x77e2: "Shi " +0x77e3: "Yi " +0x77e4: "Shen " +0x77e5: "Zhi " +0x77e6: "Hou " +0x77e7: "Shen " +0x77e8: "Ying " +0x77e9: "Ju " +0x77ea: "Zhou " +0x77eb: "Jiao " +0x77ec: "Cuo " +0x77ed: "Duan " +0x77ee: "Ai " +0x77ef: "Jiao " +0x77f0: "Zeng " +0x77f1: "Huo " +0x77f2: "Bai " +0x77f3: "Shi " +0x77f4: "Ding " +0x77f5: "Qi " +0x77f6: "Ji " +0x77f7: "Zi " +0x77f8: "Gan " +0x77f9: "Wu " +0x77fa: "Tuo " +0x77fb: "Ku " +0x77fc: "Qiang " +0x77fd: "Xi " +0x77fe: "Fan " +0x77ff: "Kuang " +/* x078 */ +0x7800: "Dang " +0x7801: "Ma " +0x7802: "Sha " +0x7803: "Dan " +0x7804: "Jue " +0x7805: "Li " +0x7806: "Fu " +0x7807: "Min " +0x7808: "Nuo " +0x7809: "Huo " +0x780a: "Kang " +0x780b: "Zhi " +0x780c: "Qi " +0x780d: "Kan " +0x780e: "Jie " +0x780f: "Fen " +0x7810: "E " +0x7811: "Ya " +0x7812: "Pi " +0x7813: "Zhe " +0x7814: "Yan " +0x7815: "Sui " +0x7816: "Zhuan " +0x7817: "Che " +0x7818: "Dun " +0x7819: "Pan " +0x781a: "Yan " +0x781b: "[?] " +0x781c: "Feng " +0x781d: "Fa " +0x781e: "Mo " +0x781f: "Zha " +0x7820: "Qu " +0x7821: "Yu " +0x7822: "Luo " +0x7823: "Tuo " +0x7824: "Tuo " +0x7825: "Di " +0x7826: "Zhai " +0x7827: "Zhen " +0x7828: "Ai " +0x7829: "Fei " +0x782a: "Mu " +0x782b: "Zhu " +0x782c: "Li " +0x782d: "Bian " +0x782e: "Nu " +0x782f: "Ping " +0x7830: "Peng " +0x7831: "Ling " +0x7832: "Pao " +0x7833: "Le " +0x7834: "Po " +0x7835: "Bo " +0x7836: "Po " +0x7837: "Shen " +0x7838: "Za " +0x7839: "Nuo " +0x783a: "Li " +0x783b: "Long " +0x783c: "Tong " +0x783d: "[?] " +0x783e: "Li " +0x783f: "Aragane " +0x7840: "Chu " +0x7841: "Keng " +0x7842: "Quan " +0x7843: "Zhu " +0x7844: "Kuang " +0x7845: "Huo " +0x7846: "E " +0x7847: "Nao " +0x7848: "Jia " +0x7849: "Lu " +0x784a: "Wei " +0x784b: "Ai " +0x784c: "Luo " +0x784d: "Ken " +0x784e: "Xing " +0x784f: "Yan " +0x7850: "Tong " +0x7851: "Peng " +0x7852: "Xi " +0x7853: "[?] " +0x7854: "Hong " +0x7855: "Shuo " +0x7856: "Xia " +0x7857: "Qiao " +0x7858: "[?] " +0x7859: "Wei " +0x785a: "Qiao " +0x785b: "[?] " +0x785c: "Keng " +0x785d: "Xiao " +0x785e: "Que " +0x785f: "Chan " +0x7860: "Lang " +0x7861: "Hong " +0x7862: "Yu " +0x7863: "Xiao " +0x7864: "Xia " +0x7865: "Mang " +0x7866: "Long " +0x7867: "Iong " +0x7868: "Che " +0x7869: "Che " +0x786a: "E " +0x786b: "Liu " +0x786c: "Ying " +0x786d: "Mang " +0x786e: "Que " +0x786f: "Yan " +0x7870: "Sha " +0x7871: "Kun " +0x7872: "Yu " +0x7873: "[?] " +0x7874: "Kaki " +0x7875: "Lu " +0x7876: "Chen " +0x7877: "Jian " +0x7878: "Nue " +0x7879: "Song " +0x787a: "Zhuo " +0x787b: "Keng " +0x787c: "Peng " +0x787d: "Yan " +0x787e: "Zhui " +0x787f: "Kong " +0x7880: "Ceng " +0x7881: "Qi " +0x7882: "Zong " +0x7883: "Qing " +0x7884: "Lin " +0x7885: "Jun " +0x7886: "Bo " +0x7887: "Ding " +0x7888: "Min " +0x7889: "Diao " +0x788a: "Jian " +0x788b: "He " +0x788c: "Lu " +0x788d: "Ai " +0x788e: "Sui " +0x788f: "Que " +0x7890: "Ling " +0x7891: "Bei " +0x7892: "Yin " +0x7893: "Dui " +0x7894: "Wu " +0x7895: "Qi " +0x7896: "Lun " +0x7897: "Wan " +0x7898: "Dian " +0x7899: "Gang " +0x789a: "Pei " +0x789b: "Qi " +0x789c: "Chen " +0x789d: "Ruan " +0x789e: "Yan " +0x789f: "Die " +0x78a0: "Ding " +0x78a1: "Du " +0x78a2: "Tuo " +0x78a3: "Jie " +0x78a4: "Ying " +0x78a5: "Bian " +0x78a6: "Ke " +0x78a7: "Bi " +0x78a8: "Wei " +0x78a9: "Shuo " +0x78aa: "Zhen " +0x78ab: "Duan " +0x78ac: "Xia " +0x78ad: "Dang " +0x78ae: "Ti " +0x78af: "Nao " +0x78b0: "Peng " +0x78b1: "Jian " +0x78b2: "Di " +0x78b3: "Tan " +0x78b4: "Cha " +0x78b5: "Seki " +0x78b6: "Qi " +0x78b7: "[?] " +0x78b8: "Feng " +0x78b9: "Xuan " +0x78ba: "Que " +0x78bb: "Que " +0x78bc: "Ma " +0x78bd: "Gong " +0x78be: "Nian " +0x78bf: "Su " +0x78c0: "E " +0x78c1: "Ci " +0x78c2: "Liu " +0x78c3: "Si " +0x78c4: "Tang " +0x78c5: "Bang " +0x78c6: "Hua " +0x78c7: "Pi " +0x78c8: "Wei " +0x78c9: "Sang " +0x78ca: "Lei " +0x78cb: "Cuo " +0x78cc: "Zhen " +0x78cd: "Xia " +0x78ce: "Qi " +0x78cf: "Lian " +0x78d0: "Pan " +0x78d1: "Wei " +0x78d2: "Yun " +0x78d3: "Dui " +0x78d4: "Zhe " +0x78d5: "Ke " +0x78d6: "La " +0x78d7: "[?] " +0x78d8: "Qing " +0x78d9: "Gun " +0x78da: "Zhuan " +0x78db: "Chan " +0x78dc: "Qi " +0x78dd: "Ao " +0x78de: "Peng " +0x78df: "Lu " +0x78e0: "Lu " +0x78e1: "Kan " +0x78e2: "Qiang " +0x78e3: "Chen " +0x78e4: "Yin " +0x78e5: "Lei " +0x78e6: "Biao " +0x78e7: "Qi " +0x78e8: "Mo " +0x78e9: "Qi " +0x78ea: "Cui " +0x78eb: "Zong " +0x78ec: "Qing " +0x78ed: "Chuo " +0x78ee: "[?] " +0x78ef: "Ji " +0x78f0: "Shan " +0x78f1: "Lao " +0x78f2: "Qu " +0x78f3: "Zeng " +0x78f4: "Deng " +0x78f5: "Jian " +0x78f6: "Xi " +0x78f7: "Lin " +0x78f8: "Ding " +0x78f9: "Dian " +0x78fa: "Huang " +0x78fb: "Pan " +0x78fc: "Za " +0x78fd: "Qiao " +0x78fe: "Di " +0x78ff: "Li " +/* x079 */ +0x7900: "Tani " +0x7901: "Jiao " +0x7902: "[?] " +0x7903: "Zhang " +0x7904: "Qiao " +0x7905: "Dun " +0x7906: "Xian " +0x7907: "Yu " +0x7908: "Zhui " +0x7909: "He " +0x790a: "Huo " +0x790b: "Zhai " +0x790c: "Lei " +0x790d: "Ke " +0x790e: "Chu " +0x790f: "Ji " +0x7910: "Que " +0x7911: "Dang " +0x7912: "Yi " +0x7913: "Jiang " +0x7914: "Pi " +0x7915: "Pi " +0x7916: "Yu " +0x7917: "Pin " +0x7918: "Qi " +0x7919: "Ai " +0x791a: "Kai " +0x791b: "Jian " +0x791c: "Yu " +0x791d: "Ruan " +0x791e: "Meng " +0x791f: "Pao " +0x7920: "Ci " +0x7921: "[?] " +0x7922: "[?] " +0x7923: "Mie " +0x7924: "Ca " +0x7925: "Xian " +0x7926: "Kuang " +0x7927: "Lei " +0x7928: "Lei " +0x7929: "Zhi " +0x792a: "Li " +0x792b: "Li " +0x792c: "Fan " +0x792d: "Que " +0x792e: "Pao " +0x792f: "Ying " +0x7930: "Li " +0x7931: "Long " +0x7932: "Long " +0x7933: "Mo " +0x7934: "Bo " +0x7935: "Shuang " +0x7936: "Guan " +0x7937: "Lan " +0x7938: "Zan " +0x7939: "Yan " +0x793a: "Shi " +0x793b: "Shi " +0x793c: "Li " +0x793d: "Reng " +0x793e: "She " +0x793f: "Yue " +0x7940: "Si " +0x7941: "Qi " +0x7942: "Ta " +0x7943: "Ma " +0x7944: "Xie " +0x7945: "Xian " +0x7946: "Xian " +0x7947: "Zhi " +0x7948: "Qi " +0x7949: "Zhi " +0x794a: "Beng " +0x794b: "Dui " +0x794c: "Zhong " +0x794d: "[?] " +0x794e: "Yi " +0x794f: "Shi " +0x7950: "You " +0x7951: "Zhi " +0x7952: "Tiao " +0x7953: "Fu " +0x7954: "Fu " +0x7955: "Mi " +0x7956: "Zu " +0x7957: "Zhi " +0x7958: "Suan " +0x7959: "Mei " +0x795a: "Zuo " +0x795b: "Qu " +0x795c: "Hu " +0x795d: "Zhu " +0x795e: "Shen " +0x795f: "Sui " +0x7960: "Ci " +0x7961: "Chai " +0x7962: "Mi " +0x7963: "Lu " +0x7964: "Yu " +0x7965: "Xiang " +0x7966: "Wu " +0x7967: "Tiao " +0x7968: "Piao " +0x7969: "Zhu " +0x796a: "Gui " +0x796b: "Xia " +0x796c: "Zhi " +0x796d: "Ji " +0x796e: "Gao " +0x796f: "Zhen " +0x7970: "Gao " +0x7971: "Shui " +0x7972: "Jin " +0x7973: "Chen " +0x7974: "Gai " +0x7975: "Kun " +0x7976: "Di " +0x7977: "Dao " +0x7978: "Huo " +0x7979: "Tao " +0x797a: "Qi " +0x797b: "Gu " +0x797c: "Guan " +0x797d: "Zui " +0x797e: "Ling " +0x797f: "Lu " +0x7980: "Bing " +0x7981: "Jin " +0x7982: "Dao " +0x7983: "Zhi " +0x7984: "Lu " +0x7985: "Shan " +0x7986: "Bei " +0x7987: "Zhe " +0x7988: "Hui " +0x7989: "You " +0x798a: "Xi " +0x798b: "Yin " +0x798c: "Zi " +0x798d: "Huo " +0x798e: "Zhen " +0x798f: "Fu " +0x7990: "Yuan " +0x7991: "Wu " +0x7992: "Xian " +0x7993: "Yang " +0x7994: "Ti " +0x7995: "Yi " +0x7996: "Mei " +0x7997: "Si " +0x7998: "Di " +0x7999: "[?] " +0x799a: "Zhuo " +0x799b: "Zhen " +0x799c: "Yong " +0x799d: "Ji " +0x799e: "Gao " +0x799f: "Tang " +0x79a0: "Si " +0x79a1: "Ma " +0x79a2: "Ta " +0x79a3: "[?] " +0x79a4: "Xuan " +0x79a5: "Qi " +0x79a6: "Yu " +0x79a7: "Xi " +0x79a8: "Ji " +0x79a9: "Si " +0x79aa: "Chan " +0x79ab: "Tan " +0x79ac: "Kuai " +0x79ad: "Sui " +0x79ae: "Li " +0x79af: "Nong " +0x79b0: "Ni " +0x79b1: "Dao " +0x79b2: "Li " +0x79b3: "Rang " +0x79b4: "Yue " +0x79b5: "Ti " +0x79b6: "Zan " +0x79b7: "Lei " +0x79b8: "Rou " +0x79b9: "Yu " +0x79ba: "Yu " +0x79bb: "Chi " +0x79bc: "Xie " +0x79bd: "Qin " +0x79be: "He " +0x79bf: "Tu " +0x79c0: "Xiu " +0x79c1: "Si " +0x79c2: "Ren " +0x79c3: "Tu " +0x79c4: "Zi " +0x79c5: "Cha " +0x79c6: "Gan " +0x79c7: "Yi " +0x79c8: "Xian " +0x79c9: "Bing " +0x79ca: "Nian " +0x79cb: "Qiu " +0x79cc: "Qiu " +0x79cd: "Chong " +0x79ce: "Fen " +0x79cf: "Hao " +0x79d0: "Yun " +0x79d1: "Ke " +0x79d2: "Miao " +0x79d3: "Zhi " +0x79d4: "Geng " +0x79d5: "Bi " +0x79d6: "Zhi " +0x79d7: "Yu " +0x79d8: "Mi " +0x79d9: "Ku " +0x79da: "Ban " +0x79db: "Pi " +0x79dc: "Ni " +0x79dd: "Li " +0x79de: "You " +0x79df: "Zu " +0x79e0: "Pi " +0x79e1: "Ba " +0x79e2: "Ling " +0x79e3: "Mo " +0x79e4: "Cheng " +0x79e5: "Nian " +0x79e6: "Qin " +0x79e7: "Yang " +0x79e8: "Zuo " +0x79e9: "Zhi " +0x79ea: "Zhi " +0x79eb: "Shu " +0x79ec: "Ju " +0x79ed: "Zi " +0x79ee: "Huo " +0x79ef: "Ji " +0x79f0: "Cheng " +0x79f1: "Tong " +0x79f2: "Zhi " +0x79f3: "Huo " +0x79f4: "He " +0x79f5: "Yin " +0x79f6: "Zi " +0x79f7: "Zhi " +0x79f8: "Jie " +0x79f9: "Ren " +0x79fa: "Du " +0x79fb: "Yi " +0x79fc: "Zhu " +0x79fd: "Hui " +0x79fe: "Nong " +0x79ff: "Fu " +/* x07a */ +0x7a00: "Xi " +0x7a01: "Kao " +0x7a02: "Lang " +0x7a03: "Fu " +0x7a04: "Ze " +0x7a05: "Shui " +0x7a06: "Lu " +0x7a07: "Kun " +0x7a08: "Gan " +0x7a09: "Geng " +0x7a0a: "Ti " +0x7a0b: "Cheng " +0x7a0c: "Tu " +0x7a0d: "Shao " +0x7a0e: "Shui " +0x7a0f: "Ya " +0x7a10: "Lun " +0x7a11: "Lu " +0x7a12: "Gu " +0x7a13: "Zuo " +0x7a14: "Ren " +0x7a15: "Zhun " +0x7a16: "Bang " +0x7a17: "Bai " +0x7a18: "Ji " +0x7a19: "Zhi " +0x7a1a: "Zhi " +0x7a1b: "Kun " +0x7a1c: "Leng " +0x7a1d: "Peng " +0x7a1e: "Ke " +0x7a1f: "Bing " +0x7a20: "Chou " +0x7a21: "Zu " +0x7a22: "Yu " +0x7a23: "Su " +0x7a24: "Lue " +0x7a25: "[?] " +0x7a26: "Yi " +0x7a27: "Xi " +0x7a28: "Bian " +0x7a29: "Ji " +0x7a2a: "Fu " +0x7a2b: "Bi " +0x7a2c: "Nuo " +0x7a2d: "Jie " +0x7a2e: "Zhong " +0x7a2f: "Zong " +0x7a30: "Xu " +0x7a31: "Cheng " +0x7a32: "Dao " +0x7a33: "Wen " +0x7a34: "Lian " +0x7a35: "Zi " +0x7a36: "Yu " +0x7a37: "Ji " +0x7a38: "Xu " +0x7a39: "Zhen " +0x7a3a: "Zhi " +0x7a3b: "Dao " +0x7a3c: "Jia " +0x7a3d: "Ji " +0x7a3e: "Gao " +0x7a3f: "Gao " +0x7a40: "Gu " +0x7a41: "Rong " +0x7a42: "Sui " +0x7a43: "You " +0x7a44: "Ji " +0x7a45: "Kang " +0x7a46: "Mu " +0x7a47: "Shan " +0x7a48: "Men " +0x7a49: "Zhi " +0x7a4a: "Ji " +0x7a4b: "Lu " +0x7a4c: "Su " +0x7a4d: "Ji " +0x7a4e: "Ying " +0x7a4f: "Wen " +0x7a50: "Qiu " +0x7a51: "Se " +0x7a52: "[?] " +0x7a53: "Yi " +0x7a54: "Huang " +0x7a55: "Qie " +0x7a56: "Ji " +0x7a57: "Sui " +0x7a58: "Xiao " +0x7a59: "Pu " +0x7a5a: "Jiao " +0x7a5b: "Zhuo " +0x7a5c: "Tong " +0x7a5d: "Sai " +0x7a5e: "Lu " +0x7a5f: "Sui " +0x7a60: "Nong " +0x7a61: "Se " +0x7a62: "Hui " +0x7a63: "Rang " +0x7a64: "Nuo " +0x7a65: "Yu " +0x7a66: "Bin " +0x7a67: "Ji " +0x7a68: "Tui " +0x7a69: "Wen " +0x7a6a: "Cheng " +0x7a6b: "Huo " +0x7a6c: "Gong " +0x7a6d: "Lu " +0x7a6e: "Biao " +0x7a6f: "[?] " +0x7a70: "Rang " +0x7a71: "Zhuo " +0x7a72: "Li " +0x7a73: "Zan " +0x7a74: "Xue " +0x7a75: "Wa " +0x7a76: "Jiu " +0x7a77: "Qiong " +0x7a78: "Xi " +0x7a79: "Qiong " +0x7a7a: "Kong " +0x7a7b: "Yu " +0x7a7c: "Sen " +0x7a7d: "Jing " +0x7a7e: "Yao " +0x7a7f: "Chuan " +0x7a80: "Zhun " +0x7a81: "Tu " +0x7a82: "Lao " +0x7a83: "Qie " +0x7a84: "Zhai " +0x7a85: "Yao " +0x7a86: "Bian " +0x7a87: "Bao " +0x7a88: "Yao " +0x7a89: "Bing " +0x7a8a: "Wa " +0x7a8b: "Zhu " +0x7a8c: "Jiao " +0x7a8d: "Qiao " +0x7a8e: "Diao " +0x7a8f: "Wu " +0x7a90: "Gui " +0x7a91: "Yao " +0x7a92: "Zhi " +0x7a93: "Chuang " +0x7a94: "Yao " +0x7a95: "Tiao " +0x7a96: "Jiao " +0x7a97: "Chuang " +0x7a98: "Jiong " +0x7a99: "Xiao " +0x7a9a: "Cheng " +0x7a9b: "Kou " +0x7a9c: "Cuan " +0x7a9d: "Wo " +0x7a9e: "Dan " +0x7a9f: "Ku " +0x7aa0: "Ke " +0x7aa1: "Zhui " +0x7aa2: "Xu " +0x7aa3: "Su " +0x7aa4: "Guan " +0x7aa5: "Kui " +0x7aa6: "Dou " +0x7aa7: "[?] " +0x7aa8: "Yin " +0x7aa9: "Wo " +0x7aaa: "Wa " +0x7aab: "Ya " +0x7aac: "Yu " +0x7aad: "Ju " +0x7aae: "Qiong " +0x7aaf: "Yao " +0x7ab0: "Yao " +0x7ab1: "Tiao " +0x7ab2: "Chao " +0x7ab3: "Yu " +0x7ab4: "Tian " +0x7ab5: "Diao " +0x7ab6: "Ju " +0x7ab7: "Liao " +0x7ab8: "Xi " +0x7ab9: "Wu " +0x7aba: "Kui " +0x7abb: "Chuang " +0x7abc: "Zhao " +0x7abd: "[?] " +0x7abe: "Kuan " +0x7abf: "Long " +0x7ac0: "Cheng " +0x7ac1: "Cui " +0x7ac2: "Piao " +0x7ac3: "Zao " +0x7ac4: "Cuan " +0x7ac5: "Qiao " +0x7ac6: "Qiong " +0x7ac7: "Dou " +0x7ac8: "Zao " +0x7ac9: "Long " +0x7aca: "Qie " +0x7acb: "Li " +0x7acc: "Chu " +0x7acd: "Shi " +0x7ace: "Fou " +0x7acf: "Qian " +0x7ad0: "Chu " +0x7ad1: "Hong " +0x7ad2: "Qi " +0x7ad3: "Qian " +0x7ad4: "Gong " +0x7ad5: "Shi " +0x7ad6: "Shu " +0x7ad7: "Miao " +0x7ad8: "Ju " +0x7ad9: "Zhan " +0x7ada: "Zhu " +0x7adb: "Ling " +0x7adc: "Long " +0x7add: "Bing " +0x7ade: "Jing " +0x7adf: "Jing " +0x7ae0: "Zhang " +0x7ae1: "Yi " +0x7ae2: "Si " +0x7ae3: "Jun " +0x7ae4: "Hong " +0x7ae5: "Tong " +0x7ae6: "Song " +0x7ae7: "Jing " +0x7ae8: "Diao " +0x7ae9: "Yi " +0x7aea: "Shu " +0x7aeb: "Jing " +0x7aec: "Qu " +0x7aed: "Jie " +0x7aee: "Ping " +0x7aef: "Duan " +0x7af0: "Shao " +0x7af1: "Zhuan " +0x7af2: "Ceng " +0x7af3: "Deng " +0x7af4: "Cui " +0x7af5: "Huai " +0x7af6: "Jing " +0x7af7: "Kan " +0x7af8: "Jing " +0x7af9: "Zhu " +0x7afa: "Zhu " +0x7afb: "Le " +0x7afc: "Peng " +0x7afd: "Yu " +0x7afe: "Chi " +0x7aff: "Gan " +/* x07b */ +0x7b00: "Mang " +0x7b01: "Zhu " +0x7b02: "Utsubo " +0x7b03: "Du " +0x7b04: "Ji " +0x7b05: "Xiao " +0x7b06: "Ba " +0x7b07: "Suan " +0x7b08: "Ji " +0x7b09: "Zhen " +0x7b0a: "Zhao " +0x7b0b: "Sun " +0x7b0c: "Ya " +0x7b0d: "Zhui " +0x7b0e: "Yuan " +0x7b0f: "Hu " +0x7b10: "Gang " +0x7b11: "Xiao " +0x7b12: "Cen " +0x7b13: "Pi " +0x7b14: "Bi " +0x7b15: "Jian " +0x7b16: "Yi " +0x7b17: "Dong " +0x7b18: "Shan " +0x7b19: "Sheng " +0x7b1a: "Xia " +0x7b1b: "Di " +0x7b1c: "Zhu " +0x7b1d: "Na " +0x7b1e: "Chi " +0x7b1f: "Gu " +0x7b20: "Li " +0x7b21: "Qie " +0x7b22: "Min " +0x7b23: "Bao " +0x7b24: "Tiao " +0x7b25: "Si " +0x7b26: "Fu " +0x7b27: "Ce " +0x7b28: "Ben " +0x7b29: "Pei " +0x7b2a: "Da " +0x7b2b: "Zi " +0x7b2c: "Di " +0x7b2d: "Ling " +0x7b2e: "Ze " +0x7b2f: "Nu " +0x7b30: "Fu " +0x7b31: "Gou " +0x7b32: "Fan " +0x7b33: "Jia " +0x7b34: "Ge " +0x7b35: "Fan " +0x7b36: "Shi " +0x7b37: "Mao " +0x7b38: "Po " +0x7b39: "Sey " +0x7b3a: "Jian " +0x7b3b: "Qiong " +0x7b3c: "Long " +0x7b3d: "Souke " +0x7b3e: "Bian " +0x7b3f: "Luo " +0x7b40: "Gui " +0x7b41: "Qu " +0x7b42: "Chi " +0x7b43: "Yin " +0x7b44: "Yao " +0x7b45: "Xian " +0x7b46: "Bi " +0x7b47: "Qiong " +0x7b48: "Gua " +0x7b49: "Deng " +0x7b4a: "Jiao " +0x7b4b: "Jin " +0x7b4c: "Quan " +0x7b4d: "Sun " +0x7b4e: "Ru " +0x7b4f: "Fa " +0x7b50: "Kuang " +0x7b51: "Zhu " +0x7b52: "Tong " +0x7b53: "Ji " +0x7b54: "Da " +0x7b55: "Xing " +0x7b56: "Ce " +0x7b57: "Zhong " +0x7b58: "Kou " +0x7b59: "Lai " +0x7b5a: "Bi " +0x7b5b: "Shai " +0x7b5c: "Dang " +0x7b5d: "Zheng " +0x7b5e: "Ce " +0x7b5f: "Fu " +0x7b60: "Yun " +0x7b61: "Tu " +0x7b62: "Pa " +0x7b63: "Li " +0x7b64: "Lang " +0x7b65: "Ju " +0x7b66: "Guan " +0x7b67: "Jian " +0x7b68: "Han " +0x7b69: "Tong " +0x7b6a: "Xia " +0x7b6b: "Zhi " +0x7b6c: "Cheng " +0x7b6d: "Suan " +0x7b6e: "Shi " +0x7b6f: "Zhu " +0x7b70: "Zuo " +0x7b71: "Xiao " +0x7b72: "Shao " +0x7b73: "Ting " +0x7b74: "Ce " +0x7b75: "Yan " +0x7b76: "Gao " +0x7b77: "Kuai " +0x7b78: "Gan " +0x7b79: "Chou " +0x7b7a: "Kago " +0x7b7b: "Gang " +0x7b7c: "Yun " +0x7b7d: "O " +0x7b7e: "Qian " +0x7b7f: "Xiao " +0x7b80: "Jian " +0x7b81: "Pu " +0x7b82: "Lai " +0x7b83: "Zou " +0x7b84: "Bi " +0x7b85: "Bi " +0x7b86: "Bi " +0x7b87: "Ge " +0x7b88: "Chi " +0x7b89: "Guai " +0x7b8a: "Yu " +0x7b8b: "Jian " +0x7b8c: "Zhao " +0x7b8d: "Gu " +0x7b8e: "Chi " +0x7b8f: "Zheng " +0x7b90: "Jing " +0x7b91: "Sha " +0x7b92: "Zhou " +0x7b93: "Lu " +0x7b94: "Bo " +0x7b95: "Ji " +0x7b96: "Lin " +0x7b97: "Suan " +0x7b98: "Jun " +0x7b99: "Fu " +0x7b9a: "Zha " +0x7b9b: "Gu " +0x7b9c: "Kong " +0x7b9d: "Qian " +0x7b9e: "Quan " +0x7b9f: "Jun " +0x7ba0: "Chui " +0x7ba1: "Guan " +0x7ba2: "Yuan " +0x7ba3: "Ce " +0x7ba4: "Ju " +0x7ba5: "Bo " +0x7ba6: "Ze " +0x7ba7: "Qie " +0x7ba8: "Tuo " +0x7ba9: "Luo " +0x7baa: "Dan " +0x7bab: "Xiao " +0x7bac: "Ruo " +0x7bad: "Jian " +0x7bae: "Xuan " +0x7baf: "Bian " +0x7bb0: "Sun " +0x7bb1: "Xiang " +0x7bb2: "Xian " +0x7bb3: "Ping " +0x7bb4: "Zhen " +0x7bb5: "Sheng " +0x7bb6: "Hu " +0x7bb7: "Shi " +0x7bb8: "Zhu " +0x7bb9: "Yue " +0x7bba: "Chun " +0x7bbb: "Lu " +0x7bbc: "Wu " +0x7bbd: "Dong " +0x7bbe: "Xiao " +0x7bbf: "Ji " +0x7bc0: "Jie " +0x7bc1: "Huang " +0x7bc2: "Xing " +0x7bc3: "Mei " +0x7bc4: "Fan " +0x7bc5: "Chui " +0x7bc6: "Zhuan " +0x7bc7: "Pian " +0x7bc8: "Feng " +0x7bc9: "Zhu " +0x7bca: "Hong " +0x7bcb: "Qie " +0x7bcc: "Hou " +0x7bcd: "Qiu " +0x7bce: "Miao " +0x7bcf: "Qian " +0x7bd0: "[?] " +0x7bd1: "Kui " +0x7bd2: "Sik " +0x7bd3: "Lou " +0x7bd4: "Yun " +0x7bd5: "He " +0x7bd6: "Tang " +0x7bd7: "Yue " +0x7bd8: "Chou " +0x7bd9: "Gao " +0x7bda: "Fei " +0x7bdb: "Ruo " +0x7bdc: "Zheng " +0x7bdd: "Gou " +0x7bde: "Nie " +0x7bdf: "Qian " +0x7be0: "Xiao " +0x7be1: "Cuan " +0x7be2: "Gong " +0x7be3: "Pang " +0x7be4: "Du " +0x7be5: "Li " +0x7be6: "Bi " +0x7be7: "Zhuo " +0x7be8: "Chu " +0x7be9: "Shai " +0x7bea: "Chi " +0x7beb: "Zhu " +0x7bec: "Qiang " +0x7bed: "Long " +0x7bee: "Lan " +0x7bef: "Jian " +0x7bf0: "Bu " +0x7bf1: "Li " +0x7bf2: "Hui " +0x7bf3: "Bi " +0x7bf4: "Di " +0x7bf5: "Cong " +0x7bf6: "Yan " +0x7bf7: "Peng " +0x7bf8: "Sen " +0x7bf9: "Zhuan " +0x7bfa: "Pai " +0x7bfb: "Piao " +0x7bfc: "Dou " +0x7bfd: "Yu " +0x7bfe: "Mie " +0x7bff: "Zhuan " +/* x07c */ +0x7c00: "Ze " +0x7c01: "Xi " +0x7c02: "Guo " +0x7c03: "Yi " +0x7c04: "Hu " +0x7c05: "Chan " +0x7c06: "Kou " +0x7c07: "Cu " +0x7c08: "Ping " +0x7c09: "Chou " +0x7c0a: "Ji " +0x7c0b: "Gui " +0x7c0c: "Su " +0x7c0d: "Lou " +0x7c0e: "Zha " +0x7c0f: "Lu " +0x7c10: "Nian " +0x7c11: "Suo " +0x7c12: "Cuan " +0x7c13: "Sasara " +0x7c14: "Suo " +0x7c15: "Le " +0x7c16: "Duan " +0x7c17: "Yana " +0x7c18: "Xiao " +0x7c19: "Bo " +0x7c1a: "Mi " +0x7c1b: "Si " +0x7c1c: "Dang " +0x7c1d: "Liao " +0x7c1e: "Dan " +0x7c1f: "Dian " +0x7c20: "Fu " +0x7c21: "Jian " +0x7c22: "Min " +0x7c23: "Kui " +0x7c24: "Dai " +0x7c25: "Qiao " +0x7c26: "Deng " +0x7c27: "Huang " +0x7c28: "Sun " +0x7c29: "Lao " +0x7c2a: "Zan " +0x7c2b: "Xiao " +0x7c2c: "Du " +0x7c2d: "Shi " +0x7c2e: "Zan " +0x7c2f: "[?] " +0x7c30: "Pai " +0x7c31: "Hata " +0x7c32: "Pai " +0x7c33: "Gan " +0x7c34: "Ju " +0x7c35: "Du " +0x7c36: "Lu " +0x7c37: "Yan " +0x7c38: "Bo " +0x7c39: "Dang " +0x7c3a: "Sai " +0x7c3b: "Ke " +0x7c3c: "Long " +0x7c3d: "Qian " +0x7c3e: "Lian " +0x7c3f: "Bo " +0x7c40: "Zhou " +0x7c41: "Lai " +0x7c42: "[?] " +0x7c43: "Lan " +0x7c44: "Kui " +0x7c45: "Yu " +0x7c46: "Yue " +0x7c47: "Hao " +0x7c48: "Zhen " +0x7c49: "Tai " +0x7c4a: "Ti " +0x7c4b: "Mi " +0x7c4c: "Chou " +0x7c4d: "Ji " +0x7c4e: "[?] " +0x7c4f: "Hata " +0x7c50: "Teng " +0x7c51: "Zhuan " +0x7c52: "Zhou " +0x7c53: "Fan " +0x7c54: "Sou " +0x7c55: "Zhou " +0x7c56: "Kuji " +0x7c57: "Zhuo " +0x7c58: "Teng " +0x7c59: "Lu " +0x7c5a: "Lu " +0x7c5b: "Jian " +0x7c5c: "Tuo " +0x7c5d: "Ying " +0x7c5e: "Yu " +0x7c5f: "Lai " +0x7c60: "Long " +0x7c61: "Shinshi " +0x7c62: "Lian " +0x7c63: "Lan " +0x7c64: "Qian " +0x7c65: "Yue " +0x7c66: "Zhong " +0x7c67: "Qu " +0x7c68: "Lian " +0x7c69: "Bian " +0x7c6a: "Duan " +0x7c6b: "Zuan " +0x7c6c: "Li " +0x7c6d: "Si " +0x7c6e: "Luo " +0x7c6f: "Ying " +0x7c70: "Yue " +0x7c71: "Zhuo " +0x7c72: "Xu " +0x7c73: "Mi " +0x7c74: "Di " +0x7c75: "Fan " +0x7c76: "Shen " +0x7c77: "Zhe " +0x7c78: "Shen " +0x7c79: "Nu " +0x7c7a: "Xie " +0x7c7b: "Lei " +0x7c7c: "Xian " +0x7c7d: "Zi " +0x7c7e: "Ni " +0x7c7f: "Cun " +0x7c80: "[?] " +0x7c81: "Qian " +0x7c82: "Kume " +0x7c83: "Bi " +0x7c84: "Ban " +0x7c85: "Wu " +0x7c86: "Sha " +0x7c87: "Kang " +0x7c88: "Rou " +0x7c89: "Fen " +0x7c8a: "Bi " +0x7c8b: "Cui " +0x7c8c: "[?] " +0x7c8d: "Li " +0x7c8e: "Chi " +0x7c8f: "Nukamiso " +0x7c90: "Ro " +0x7c91: "Ba " +0x7c92: "Li " +0x7c93: "Gan " +0x7c94: "Ju " +0x7c95: "Po " +0x7c96: "Mo " +0x7c97: "Cu " +0x7c98: "Nian " +0x7c99: "Zhou " +0x7c9a: "Li " +0x7c9b: "Su " +0x7c9c: "Tiao " +0x7c9d: "Li " +0x7c9e: "Qi " +0x7c9f: "Su " +0x7ca0: "Hong " +0x7ca1: "Tong " +0x7ca2: "Zi " +0x7ca3: "Ce " +0x7ca4: "Yue " +0x7ca5: "Zhou " +0x7ca6: "Lin " +0x7ca7: "Zhuang " +0x7ca8: "Bai " +0x7ca9: "[?] " +0x7caa: "Fen " +0x7cab: "Ji " +0x7cac: "[?] " +0x7cad: "Sukumo " +0x7cae: "Liang " +0x7caf: "Xian " +0x7cb0: "Fu " +0x7cb1: "Liang " +0x7cb2: "Can " +0x7cb3: "Geng " +0x7cb4: "Li " +0x7cb5: "Yue " +0x7cb6: "Lu " +0x7cb7: "Ju " +0x7cb8: "Qi " +0x7cb9: "Cui " +0x7cba: "Bai " +0x7cbb: "Zhang " +0x7cbc: "Lin " +0x7cbd: "Zong " +0x7cbe: "Jing " +0x7cbf: "Guo " +0x7cc0: "Kouji " +0x7cc1: "San " +0x7cc2: "San " +0x7cc3: "Tang " +0x7cc4: "Bian " +0x7cc5: "Rou " +0x7cc6: "Mian " +0x7cc7: "Hou " +0x7cc8: "Xu " +0x7cc9: "Zong " +0x7cca: "Hu " +0x7ccb: "Jian " +0x7ccc: "Zan " +0x7ccd: "Ci " +0x7cce: "Li " +0x7ccf: "Xie " +0x7cd0: "Fu " +0x7cd1: "Ni " +0x7cd2: "Bei " +0x7cd3: "Gu " +0x7cd4: "Xiu " +0x7cd5: "Gao " +0x7cd6: "Tang " +0x7cd7: "Qiu " +0x7cd8: "Sukumo " +0x7cd9: "Cao " +0x7cda: "Zhuang " +0x7cdb: "Tang " +0x7cdc: "Mi " +0x7cdd: "San " +0x7cde: "Fen " +0x7cdf: "Zao " +0x7ce0: "Kang " +0x7ce1: "Jiang " +0x7ce2: "Mo " +0x7ce3: "San " +0x7ce4: "San " +0x7ce5: "Nuo " +0x7ce6: "Xi " +0x7ce7: "Liang " +0x7ce8: "Jiang " +0x7ce9: "Kuai " +0x7cea: "Bo " +0x7ceb: "Huan " +0x7cec: "[?] " +0x7ced: "Zong " +0x7cee: "Xian " +0x7cef: "Nuo " +0x7cf0: "Tuan " +0x7cf1: "Nie " +0x7cf2: "Li " +0x7cf3: "Zuo " +0x7cf4: "Di " +0x7cf5: "Nie " +0x7cf6: "Tiao " +0x7cf7: "Lan " +0x7cf8: "Mi " +0x7cf9: "Jiao " +0x7cfa: "Jiu " +0x7cfb: "Xi " +0x7cfc: "Gong " +0x7cfd: "Zheng " +0x7cfe: "Jiu " +0x7cff: "You " +/* x07d */ +0x7d00: "Ji " +0x7d01: "Cha " +0x7d02: "Zhou " +0x7d03: "Xun " +0x7d04: "Yue " +0x7d05: "Hong " +0x7d06: "Yu " +0x7d07: "He " +0x7d08: "Wan " +0x7d09: "Ren " +0x7d0a: "Wen " +0x7d0b: "Wen " +0x7d0c: "Qiu " +0x7d0d: "Na " +0x7d0e: "Zi " +0x7d0f: "Tou " +0x7d10: "Niu " +0x7d11: "Fou " +0x7d12: "Jie " +0x7d13: "Shu " +0x7d14: "Chun " +0x7d15: "Pi " +0x7d16: "Yin " +0x7d17: "Sha " +0x7d18: "Hong " +0x7d19: "Zhi " +0x7d1a: "Ji " +0x7d1b: "Fen " +0x7d1c: "Yun " +0x7d1d: "Ren " +0x7d1e: "Dan " +0x7d1f: "Jin " +0x7d20: "Su " +0x7d21: "Fang " +0x7d22: "Suo " +0x7d23: "Cui " +0x7d24: "Jiu " +0x7d25: "Zha " +0x7d26: "Kinu " +0x7d27: "Jin " +0x7d28: "Fu " +0x7d29: "Zhi " +0x7d2a: "Ci " +0x7d2b: "Zi " +0x7d2c: "Chou " +0x7d2d: "Hong " +0x7d2e: "Zha " +0x7d2f: "Lei " +0x7d30: "Xi " +0x7d31: "Fu " +0x7d32: "Xie " +0x7d33: "Shen " +0x7d34: "Bei " +0x7d35: "Zhu " +0x7d36: "Qu " +0x7d37: "Ling " +0x7d38: "Zhu " +0x7d39: "Shao " +0x7d3a: "Gan " +0x7d3b: "Yang " +0x7d3c: "Fu " +0x7d3d: "Tuo " +0x7d3e: "Zhen " +0x7d3f: "Dai " +0x7d40: "Zhuo " +0x7d41: "Shi " +0x7d42: "Zhong " +0x7d43: "Xian " +0x7d44: "Zu " +0x7d45: "Jiong " +0x7d46: "Ban " +0x7d47: "Ju " +0x7d48: "Mo " +0x7d49: "Shu " +0x7d4a: "Zui " +0x7d4b: "Wata " +0x7d4c: "Jing " +0x7d4d: "Ren " +0x7d4e: "Heng " +0x7d4f: "Xie " +0x7d50: "Jie " +0x7d51: "Zhu " +0x7d52: "Chou " +0x7d53: "Gua " +0x7d54: "Bai " +0x7d55: "Jue " +0x7d56: "Kuang " +0x7d57: "Hu " +0x7d58: "Ci " +0x7d59: "Geng " +0x7d5a: "Geng " +0x7d5b: "Tao " +0x7d5c: "Xie " +0x7d5d: "Ku " +0x7d5e: "Jiao " +0x7d5f: "Quan " +0x7d60: "Gai " +0x7d61: "Luo " +0x7d62: "Xuan " +0x7d63: "Bing " +0x7d64: "Xian " +0x7d65: "Fu " +0x7d66: "Gei " +0x7d67: "Tong " +0x7d68: "Rong " +0x7d69: "Tiao " +0x7d6a: "Yin " +0x7d6b: "Lei " +0x7d6c: "Xie " +0x7d6d: "Quan " +0x7d6e: "Xu " +0x7d6f: "Lun " +0x7d70: "Die " +0x7d71: "Tong " +0x7d72: "Si " +0x7d73: "Jiang " +0x7d74: "Xiang " +0x7d75: "Hui " +0x7d76: "Jue " +0x7d77: "Zhi " +0x7d78: "Jian " +0x7d79: "Juan " +0x7d7a: "Chi " +0x7d7b: "Mian " +0x7d7c: "Zhen " +0x7d7d: "Lu " +0x7d7e: "Cheng " +0x7d7f: "Qiu " +0x7d80: "Shu " +0x7d81: "Bang " +0x7d82: "Tong " +0x7d83: "Xiao " +0x7d84: "Wan " +0x7d85: "Qin " +0x7d86: "Geng " +0x7d87: "Xiu " +0x7d88: "Ti " +0x7d89: "Xiu " +0x7d8a: "Xie " +0x7d8b: "Hong " +0x7d8c: "Xi " +0x7d8d: "Fu " +0x7d8e: "Ting " +0x7d8f: "Sui " +0x7d90: "Dui " +0x7d91: "Kun " +0x7d92: "Fu " +0x7d93: "Jing " +0x7d94: "Hu " +0x7d95: "Zhi " +0x7d96: "Yan " +0x7d97: "Jiong " +0x7d98: "Feng " +0x7d99: "Ji " +0x7d9a: "Sok " +0x7d9b: "Kase " +0x7d9c: "Zong " +0x7d9d: "Lin " +0x7d9e: "Duo " +0x7d9f: "Li " +0x7da0: "Lu " +0x7da1: "Liang " +0x7da2: "Chou " +0x7da3: "Quan " +0x7da4: "Shao " +0x7da5: "Qi " +0x7da6: "Qi " +0x7da7: "Zhun " +0x7da8: "Qi " +0x7da9: "Wan " +0x7daa: "Qian " +0x7dab: "Xian " +0x7dac: "Shou " +0x7dad: "Wei " +0x7dae: "Qi " +0x7daf: "Tao " +0x7db0: "Wan " +0x7db1: "Gang " +0x7db2: "Wang " +0x7db3: "Beng " +0x7db4: "Zhui " +0x7db5: "Cai " +0x7db6: "Guo " +0x7db7: "Cui " +0x7db8: "Lun " +0x7db9: "Liu " +0x7dba: "Qi " +0x7dbb: "Zhan " +0x7dbc: "Bei " +0x7dbd: "Chuo " +0x7dbe: "Ling " +0x7dbf: "Mian " +0x7dc0: "Qi " +0x7dc1: "Qie " +0x7dc2: "Tan " +0x7dc3: "Zong " +0x7dc4: "Gun " +0x7dc5: "Zou " +0x7dc6: "Yi " +0x7dc7: "Zi " +0x7dc8: "Xing " +0x7dc9: "Liang " +0x7dca: "Jin " +0x7dcb: "Fei " +0x7dcc: "Rui " +0x7dcd: "Min " +0x7dce: "Yu " +0x7dcf: "Zong " +0x7dd0: "Fan " +0x7dd1: "Lu " +0x7dd2: "Xu " +0x7dd3: "Yingl " +0x7dd4: "Zhang " +0x7dd5: "Kasuri " +0x7dd6: "Xu " +0x7dd7: "Xiang " +0x7dd8: "Jian " +0x7dd9: "Ke " +0x7dda: "Xian " +0x7ddb: "Ruan " +0x7ddc: "Mian " +0x7ddd: "Qi " +0x7dde: "Duan " +0x7ddf: "Zhong " +0x7de0: "Di " +0x7de1: "Min " +0x7de2: "Miao " +0x7de3: "Yuan " +0x7de4: "Xie " +0x7de5: "Bao " +0x7de6: "Si " +0x7de7: "Qiu " +0x7de8: "Bian " +0x7de9: "Huan " +0x7dea: "Geng " +0x7deb: "Cong " +0x7dec: "Mian " +0x7ded: "Wei " +0x7dee: "Fu " +0x7def: "Wei " +0x7df0: "Yu " +0x7df1: "Gou " +0x7df2: "Miao " +0x7df3: "Xie " +0x7df4: "Lian " +0x7df5: "Zong " +0x7df6: "Bian " +0x7df7: "Yun " +0x7df8: "Yin " +0x7df9: "Ti " +0x7dfa: "Gua " +0x7dfb: "Zhi " +0x7dfc: "Yun " +0x7dfd: "Cheng " +0x7dfe: "Chan " +0x7dff: "Dai " +/* x07e */ +0x7e00: "Xia " +0x7e01: "Yuan " +0x7e02: "Zong " +0x7e03: "Xu " +0x7e04: "Nawa " +0x7e05: "Odoshi " +0x7e06: "Geng " +0x7e07: "Sen " +0x7e08: "Ying " +0x7e09: "Jin " +0x7e0a: "Yi " +0x7e0b: "Zhui " +0x7e0c: "Ni " +0x7e0d: "Bang " +0x7e0e: "Gu " +0x7e0f: "Pan " +0x7e10: "Zhou " +0x7e11: "Jian " +0x7e12: "Cuo " +0x7e13: "Quan " +0x7e14: "Shuang " +0x7e15: "Yun " +0x7e16: "Xia " +0x7e17: "Shuai " +0x7e18: "Xi " +0x7e19: "Rong " +0x7e1a: "Tao " +0x7e1b: "Fu " +0x7e1c: "Yun " +0x7e1d: "Zhen " +0x7e1e: "Gao " +0x7e1f: "Ru " +0x7e20: "Hu " +0x7e21: "Zai " +0x7e22: "Teng " +0x7e23: "Xian " +0x7e24: "Su " +0x7e25: "Zhen " +0x7e26: "Zong " +0x7e27: "Tao " +0x7e28: "Horo " +0x7e29: "Cai " +0x7e2a: "Bi " +0x7e2b: "Feng " +0x7e2c: "Cu " +0x7e2d: "Li " +0x7e2e: "Suo " +0x7e2f: "Yin " +0x7e30: "Xi " +0x7e31: "Zong " +0x7e32: "Lei " +0x7e33: "Zhuan " +0x7e34: "Qian " +0x7e35: "Man " +0x7e36: "Zhi " +0x7e37: "Lu " +0x7e38: "Mo " +0x7e39: "Piao " +0x7e3a: "Lian " +0x7e3b: "Mi " +0x7e3c: "Xuan " +0x7e3d: "Zong " +0x7e3e: "Ji " +0x7e3f: "Shan " +0x7e40: "Sui " +0x7e41: "Fan " +0x7e42: "Shuai " +0x7e43: "Beng " +0x7e44: "Yi " +0x7e45: "Sao " +0x7e46: "Mou " +0x7e47: "Zhou " +0x7e48: "Qiang " +0x7e49: "Hun " +0x7e4a: "Sem " +0x7e4b: "Xi " +0x7e4c: "Jung " +0x7e4d: "Xiu " +0x7e4e: "Ran " +0x7e4f: "Xuan " +0x7e50: "Hui " +0x7e51: "Qiao " +0x7e52: "Zeng " +0x7e53: "Zuo " +0x7e54: "Zhi " +0x7e55: "Shan " +0x7e56: "San " +0x7e57: "Lin " +0x7e58: "Yu " +0x7e59: "Fan " +0x7e5a: "Liao " +0x7e5b: "Chuo " +0x7e5c: "Zun " +0x7e5d: "Jian " +0x7e5e: "Rao " +0x7e5f: "Chan " +0x7e60: "Rui " +0x7e61: "Xiu " +0x7e62: "Hui " +0x7e63: "Hua " +0x7e64: "Zuan " +0x7e65: "Xi " +0x7e66: "Qiang " +0x7e67: "Un " +0x7e68: "Da " +0x7e69: "Sheng " +0x7e6a: "Hui " +0x7e6b: "Xi " +0x7e6c: "Se " +0x7e6d: "Jian " +0x7e6e: "Jiang " +0x7e6f: "Huan " +0x7e70: "Zao " +0x7e71: "Cong " +0x7e72: "Jie " +0x7e73: "Jiao " +0x7e74: "Bo " +0x7e75: "Chan " +0x7e76: "Yi " +0x7e77: "Nao " +0x7e78: "Sui " +0x7e79: "Yi " +0x7e7a: "Shai " +0x7e7b: "Xu " +0x7e7c: "Ji " +0x7e7d: "Bin " +0x7e7e: "Qian " +0x7e7f: "Lan " +0x7e80: "Pu " +0x7e81: "Xun " +0x7e82: "Zuan " +0x7e83: "Qi " +0x7e84: "Peng " +0x7e85: "Li " +0x7e86: "Mo " +0x7e87: "Lei " +0x7e88: "Xie " +0x7e89: "Zuan " +0x7e8a: "Kuang " +0x7e8b: "You " +0x7e8c: "Xu " +0x7e8d: "Lei " +0x7e8e: "Xian " +0x7e8f: "Chan " +0x7e90: "Kou " +0x7e91: "Lu " +0x7e92: "Chan " +0x7e93: "Ying " +0x7e94: "Cai " +0x7e95: "Xiang " +0x7e96: "Xian " +0x7e97: "Zui " +0x7e98: "Zuan " +0x7e99: "Luo " +0x7e9a: "Xi " +0x7e9b: "Dao " +0x7e9c: "Lan " +0x7e9d: "Lei " +0x7e9e: "Lian " +0x7e9f: "Si " +0x7ea0: "Jiu " +0x7ea1: "Yu " +0x7ea2: "Hong " +0x7ea3: "Zhou " +0x7ea4: "Xian " +0x7ea5: "He " +0x7ea6: "Yue " +0x7ea7: "Ji " +0x7ea8: "Wan " +0x7ea9: "Kuang " +0x7eaa: "Ji " +0x7eab: "Ren " +0x7eac: "Wei " +0x7ead: "Yun " +0x7eae: "Hong " +0x7eaf: "Chun " +0x7eb0: "Pi " +0x7eb1: "Sha " +0x7eb2: "Gang " +0x7eb3: "Na " +0x7eb4: "Ren " +0x7eb5: "Zong " +0x7eb6: "Lun " +0x7eb7: "Fen " +0x7eb8: "Zhi " +0x7eb9: "Wen " +0x7eba: "Fang " +0x7ebb: "Zhu " +0x7ebc: "Yin " +0x7ebd: "Niu " +0x7ebe: "Shu " +0x7ebf: "Xian " +0x7ec0: "Gan " +0x7ec1: "Xie " +0x7ec2: "Fu " +0x7ec3: "Lian " +0x7ec4: "Zu " +0x7ec5: "Shen " +0x7ec6: "Xi " +0x7ec7: "Zhi " +0x7ec8: "Zhong " +0x7ec9: "Zhou " +0x7eca: "Ban " +0x7ecb: "Fu " +0x7ecc: "Zhuo " +0x7ecd: "Shao " +0x7ece: "Yi " +0x7ecf: "Jing " +0x7ed0: "Dai " +0x7ed1: "Bang " +0x7ed2: "Rong " +0x7ed3: "Jie " +0x7ed4: "Ku " +0x7ed5: "Rao " +0x7ed6: "Die " +0x7ed7: "Heng " +0x7ed8: "Hui " +0x7ed9: "Gei " +0x7eda: "Xuan " +0x7edb: "Jiang " +0x7edc: "Luo " +0x7edd: "Jue " +0x7ede: "Jiao " +0x7edf: "Tong " +0x7ee0: "Geng " +0x7ee1: "Xiao " +0x7ee2: "Juan " +0x7ee3: "Xiu " +0x7ee4: "Xi " +0x7ee5: "Sui " +0x7ee6: "Tao " +0x7ee7: "Ji " +0x7ee8: "Ti " +0x7ee9: "Ji " +0x7eea: "Xu " +0x7eeb: "Ling " +0x7eec: "[?] " +0x7eed: "Xu " +0x7eee: "Qi " +0x7eef: "Fei " +0x7ef0: "Chuo " +0x7ef1: "Zhang " +0x7ef2: "Gun " +0x7ef3: "Sheng " +0x7ef4: "Wei " +0x7ef5: "Mian " +0x7ef6: "Shou " +0x7ef7: "Beng " +0x7ef8: "Chou " +0x7ef9: "Tao " +0x7efa: "Liu " +0x7efb: "Quan " +0x7efc: "Zong " +0x7efd: "Zhan " +0x7efe: "Wan " +0x7eff: "Lu " +/* x07f */ +0x7f00: "Zhui " +0x7f01: "Zi " +0x7f02: "Ke " +0x7f03: "Xiang " +0x7f04: "Jian " +0x7f05: "Mian " +0x7f06: "Lan " +0x7f07: "Ti " +0x7f08: "Miao " +0x7f09: "Qi " +0x7f0a: "Yun " +0x7f0b: "Hui " +0x7f0c: "Si " +0x7f0d: "Duo " +0x7f0e: "Duan " +0x7f0f: "Bian " +0x7f10: "Xian " +0x7f11: "Gou " +0x7f12: "Zhui " +0x7f13: "Huan " +0x7f14: "Di " +0x7f15: "Lu " +0x7f16: "Bian " +0x7f17: "Min " +0x7f18: "Yuan " +0x7f19: "Jin " +0x7f1a: "Fu " +0x7f1b: "Ru " +0x7f1c: "Zhen " +0x7f1d: "Feng " +0x7f1e: "Shuai " +0x7f1f: "Gao " +0x7f20: "Chan " +0x7f21: "Li " +0x7f22: "Yi " +0x7f23: "Jian " +0x7f24: "Bin " +0x7f25: "Piao " +0x7f26: "Man " +0x7f27: "Lei " +0x7f28: "Ying " +0x7f29: "Suo " +0x7f2a: "Mou " +0x7f2b: "Sao " +0x7f2c: "Xie " +0x7f2d: "Liao " +0x7f2e: "Shan " +0x7f2f: "Zeng " +0x7f30: "Jiang " +0x7f31: "Qian " +0x7f32: "Zao " +0x7f33: "Huan " +0x7f34: "Jiao " +0x7f35: "Zuan " +0x7f36: "Fou " +0x7f37: "Xie " +0x7f38: "Gang " +0x7f39: "Fou " +0x7f3a: "Que " +0x7f3b: "Fou " +0x7f3c: "Kaakeru " +0x7f3d: "Bo " +0x7f3e: "Ping " +0x7f3f: "Hou " +0x7f40: "[?] " +0x7f41: "Gang " +0x7f42: "Ying " +0x7f43: "Ying " +0x7f44: "Qing " +0x7f45: "Xia " +0x7f46: "Guan " +0x7f47: "Zun " +0x7f48: "Tan " +0x7f49: "Chang " +0x7f4a: "Qi " +0x7f4b: "Weng " +0x7f4c: "Ying " +0x7f4d: "Lei " +0x7f4e: "Tan " +0x7f4f: "Lu " +0x7f50: "Guan " +0x7f51: "Wang " +0x7f52: "Wang " +0x7f53: "Gang " +0x7f54: "Wang " +0x7f55: "Han " +0x7f56: "[?] " +0x7f57: "Luo " +0x7f58: "Fu " +0x7f59: "Mi " +0x7f5a: "Fa " +0x7f5b: "Gu " +0x7f5c: "Zhu " +0x7f5d: "Ju " +0x7f5e: "Mao " +0x7f5f: "Gu " +0x7f60: "Min " +0x7f61: "Gang " +0x7f62: "Ba " +0x7f63: "Gua " +0x7f64: "Ti " +0x7f65: "Juan " +0x7f66: "Fu " +0x7f67: "Lin " +0x7f68: "Yan " +0x7f69: "Zhao " +0x7f6a: "Zui " +0x7f6b: "Gua " +0x7f6c: "Zhuo " +0x7f6d: "Yu " +0x7f6e: "Zhi " +0x7f6f: "An " +0x7f70: "Fa " +0x7f71: "Nan " +0x7f72: "Shu " +0x7f73: "Si " +0x7f74: "Pi " +0x7f75: "Ma " +0x7f76: "Liu " +0x7f77: "Ba " +0x7f78: "Fa " +0x7f79: "Li " +0x7f7a: "Chao " +0x7f7b: "Wei " +0x7f7c: "Bi " +0x7f7d: "Ji " +0x7f7e: "Zeng " +0x7f7f: "Tong " +0x7f80: "Liu " +0x7f81: "Ji " +0x7f82: "Juan " +0x7f83: "Mi " +0x7f84: "Zhao " +0x7f85: "Luo " +0x7f86: "Pi " +0x7f87: "Ji " +0x7f88: "Ji " +0x7f89: "Luan " +0x7f8a: "Yang " +0x7f8b: "Mie " +0x7f8c: "Qiang " +0x7f8d: "Ta " +0x7f8e: "Mei " +0x7f8f: "Yang " +0x7f90: "You " +0x7f91: "You " +0x7f92: "Fen " +0x7f93: "Ba " +0x7f94: "Gao " +0x7f95: "Yang " +0x7f96: "Gu " +0x7f97: "Qiang " +0x7f98: "Zang " +0x7f99: "Gao " +0x7f9a: "Ling " +0x7f9b: "Yi " +0x7f9c: "Zhu " +0x7f9d: "Di " +0x7f9e: "Xiu " +0x7f9f: "Qian " +0x7fa0: "Yi " +0x7fa1: "Xian " +0x7fa2: "Rong " +0x7fa3: "Qun " +0x7fa4: "Qun " +0x7fa5: "Qian " +0x7fa6: "Huan " +0x7fa7: "Zui " +0x7fa8: "Xian " +0x7fa9: "Yi " +0x7faa: "Yashinau " +0x7fab: "Qiang " +0x7fac: "Xian " +0x7fad: "Yu " +0x7fae: "Geng " +0x7faf: "Jie " +0x7fb0: "Tang " +0x7fb1: "Yuan " +0x7fb2: "Xi " +0x7fb3: "Fan " +0x7fb4: "Shan " +0x7fb5: "Fen " +0x7fb6: "Shan " +0x7fb7: "Lian " +0x7fb8: "Lei " +0x7fb9: "Geng " +0x7fba: "Nou " +0x7fbb: "Qiang " +0x7fbc: "Chan " +0x7fbd: "Yu " +0x7fbe: "Gong " +0x7fbf: "Yi " +0x7fc0: "Chong " +0x7fc1: "Weng " +0x7fc2: "Fen " +0x7fc3: "Hong " +0x7fc4: "Chi " +0x7fc5: "Chi " +0x7fc6: "Cui " +0x7fc7: "Fu " +0x7fc8: "Xia " +0x7fc9: "Pen " +0x7fca: "Yi " +0x7fcb: "La " +0x7fcc: "Yi " +0x7fcd: "Pi " +0x7fce: "Ling " +0x7fcf: "Liu " +0x7fd0: "Zhi " +0x7fd1: "Qu " +0x7fd2: "Xi " +0x7fd3: "Xie " +0x7fd4: "Xiang " +0x7fd5: "Xi " +0x7fd6: "Xi " +0x7fd7: "Qi " +0x7fd8: "Qiao " +0x7fd9: "Hui " +0x7fda: "Hui " +0x7fdb: "Xiao " +0x7fdc: "Se " +0x7fdd: "Hong " +0x7fde: "Jiang " +0x7fdf: "Di " +0x7fe0: "Cui " +0x7fe1: "Fei " +0x7fe2: "Tao " +0x7fe3: "Sha " +0x7fe4: "Chi " +0x7fe5: "Zhu " +0x7fe6: "Jian " +0x7fe7: "Xuan " +0x7fe8: "Shi " +0x7fe9: "Pian " +0x7fea: "Zong " +0x7feb: "Wan " +0x7fec: "Hui " +0x7fed: "Hou " +0x7fee: "He " +0x7fef: "He " +0x7ff0: "Han " +0x7ff1: "Ao " +0x7ff2: "Piao " +0x7ff3: "Yi " +0x7ff4: "Lian " +0x7ff5: "Qu " +0x7ff6: "[?] " +0x7ff7: "Lin " +0x7ff8: "Pen " +0x7ff9: "Qiao " +0x7ffa: "Ao " +0x7ffb: "Fan " +0x7ffc: "Yi " +0x7ffd: "Hui " +0x7ffe: "Xuan " +0x7fff: "Dao " +/* x080 */ +0x8000: "Yao " +0x8001: "Lao " +0x8002: "[?] " +0x8003: "Kao " +0x8004: "Mao " +0x8005: "Zhe " +0x8006: "Qi " +0x8007: "Gou " +0x8008: "Gou " +0x8009: "Gou " +0x800a: "Die " +0x800b: "Die " +0x800c: "Er " +0x800d: "Shua " +0x800e: "Ruan " +0x800f: "Er " +0x8010: "Nai " +0x8011: "Zhuan " +0x8012: "Lei " +0x8013: "Ting " +0x8014: "Zi " +0x8015: "Geng " +0x8016: "Chao " +0x8017: "Hao " +0x8018: "Yun " +0x8019: "Pa " +0x801a: "Pi " +0x801b: "Chi " +0x801c: "Si " +0x801d: "Chu " +0x801e: "Jia " +0x801f: "Ju " +0x8020: "He " +0x8021: "Chu " +0x8022: "Lao " +0x8023: "Lun " +0x8024: "Ji " +0x8025: "Tang " +0x8026: "Ou " +0x8027: "Lou " +0x8028: "Nou " +0x8029: "Gou " +0x802a: "Pang " +0x802b: "Ze " +0x802c: "Lou " +0x802d: "Ji " +0x802e: "Lao " +0x802f: "Huo " +0x8030: "You " +0x8031: "Mo " +0x8032: "Huai " +0x8033: "Er " +0x8034: "Zhe " +0x8035: "Ting " +0x8036: "Ye " +0x8037: "Da " +0x8038: "Song " +0x8039: "Qin " +0x803a: "Yun " +0x803b: "Chi " +0x803c: "Dan " +0x803d: "Dan " +0x803e: "Hong " +0x803f: "Geng " +0x8040: "Zhi " +0x8041: "[?] " +0x8042: "Nie " +0x8043: "Dan " +0x8044: "Zhen " +0x8045: "Che " +0x8046: "Ling " +0x8047: "Zheng " +0x8048: "You " +0x8049: "Wa " +0x804a: "Liao " +0x804b: "Long " +0x804c: "Zhi " +0x804d: "Ning " +0x804e: "Tiao " +0x804f: "Er " +0x8050: "Ya " +0x8051: "Die " +0x8052: "Gua " +0x8053: "[?] " +0x8054: "Lian " +0x8055: "Hao " +0x8056: "Sheng " +0x8057: "Lie " +0x8058: "Pin " +0x8059: "Jing " +0x805a: "Ju " +0x805b: "Bi " +0x805c: "Di " +0x805d: "Guo " +0x805e: "Wen " +0x805f: "Xu " +0x8060: "Ping " +0x8061: "Cong " +0x8062: "Shikato " +0x8063: "[?] " +0x8064: "Ting " +0x8065: "Yu " +0x8066: "Cong " +0x8067: "Kui " +0x8068: "Tsuraneru " +0x8069: "Kui " +0x806a: "Cong " +0x806b: "Lian " +0x806c: "Weng " +0x806d: "Kui " +0x806e: "Lian " +0x806f: "Lian " +0x8070: "Cong " +0x8071: "Ao " +0x8072: "Sheng " +0x8073: "Song " +0x8074: "Ting " +0x8075: "Kui " +0x8076: "Nie " +0x8077: "Zhi " +0x8078: "Dan " +0x8079: "Ning " +0x807a: "Qie " +0x807b: "Ji " +0x807c: "Ting " +0x807d: "Ting " +0x807e: "Long " +0x807f: "Yu " +0x8080: "Yu " +0x8081: "Zhao " +0x8082: "Si " +0x8083: "Su " +0x8084: "Yi " +0x8085: "Su " +0x8086: "Si " +0x8087: "Zhao " +0x8088: "Zhao " +0x8089: "Rou " +0x808a: "Yi " +0x808b: "Le " +0x808c: "Ji " +0x808d: "Qiu " +0x808e: "Ken " +0x808f: "Cao " +0x8090: "Ge " +0x8091: "Di " +0x8092: "Huan " +0x8093: "Huang " +0x8094: "Yi " +0x8095: "Ren " +0x8096: "Xiao " +0x8097: "Ru " +0x8098: "Zhou " +0x8099: "Yuan " +0x809a: "Du " +0x809b: "Gang " +0x809c: "Rong " +0x809d: "Gan " +0x809e: "Cha " +0x809f: "Wo " +0x80a0: "Chang " +0x80a1: "Gu " +0x80a2: "Zhi " +0x80a3: "Han " +0x80a4: "Fu " +0x80a5: "Fei " +0x80a6: "Fen " +0x80a7: "Pei " +0x80a8: "Pang " +0x80a9: "Jian " +0x80aa: "Fang " +0x80ab: "Zhun " +0x80ac: "You " +0x80ad: "Na " +0x80ae: "Hang " +0x80af: "Ken " +0x80b0: "Ran " +0x80b1: "Gong " +0x80b2: "Yu " +0x80b3: "Wen " +0x80b4: "Yao " +0x80b5: "Jin " +0x80b6: "Pi " +0x80b7: "Qian " +0x80b8: "Xi " +0x80b9: "Xi " +0x80ba: "Fei " +0x80bb: "Ken " +0x80bc: "Jing " +0x80bd: "Tai " +0x80be: "Shen " +0x80bf: "Zhong " +0x80c0: "Zhang " +0x80c1: "Xie " +0x80c2: "Shen " +0x80c3: "Wei " +0x80c4: "Zhou " +0x80c5: "Die " +0x80c6: "Dan " +0x80c7: "Fei " +0x80c8: "Ba " +0x80c9: "Bo " +0x80ca: "Qu " +0x80cb: "Tian " +0x80cc: "Bei " +0x80cd: "Gua " +0x80ce: "Tai " +0x80cf: "Zi " +0x80d0: "Ku " +0x80d1: "Zhi " +0x80d2: "Ni " +0x80d3: "Ping " +0x80d4: "Zi " +0x80d5: "Fu " +0x80d6: "Pang " +0x80d7: "Zhen " +0x80d8: "Xian " +0x80d9: "Zuo " +0x80da: "Pei " +0x80db: "Jia " +0x80dc: "Sheng " +0x80dd: "Zhi " +0x80de: "Bao " +0x80df: "Mu " +0x80e0: "Qu " +0x80e1: "Hu " +0x80e2: "Ke " +0x80e3: "Yi " +0x80e4: "Yin " +0x80e5: "Xu " +0x80e6: "Yang " +0x80e7: "Long " +0x80e8: "Dong " +0x80e9: "Ka " +0x80ea: "Lu " +0x80eb: "Jing " +0x80ec: "Nu " +0x80ed: "Yan " +0x80ee: "Pang " +0x80ef: "Kua " +0x80f0: "Yi " +0x80f1: "Guang " +0x80f2: "Gai " +0x80f3: "Ge " +0x80f4: "Dong " +0x80f5: "Zhi " +0x80f6: "Xiao " +0x80f7: "Xiong " +0x80f8: "Xiong " +0x80f9: "Er " +0x80fa: "E " +0x80fb: "Xing " +0x80fc: "Pian " +0x80fd: "Neng " +0x80fe: "Zi " +0x80ff: "Gui " +/* x081 */ +0x8100: "Cheng " +0x8101: "Tiao " +0x8102: "Zhi " +0x8103: "Cui " +0x8104: "Mei " +0x8105: "Xie " +0x8106: "Cui " +0x8107: "Xie " +0x8108: "Mo " +0x8109: "Mai " +0x810a: "Ji " +0x810b: "Obiyaakasu " +0x810c: "[?] " +0x810d: "Kuai " +0x810e: "Sa " +0x810f: "Zang " +0x8110: "Qi " +0x8111: "Nao " +0x8112: "Mi " +0x8113: "Nong " +0x8114: "Luan " +0x8115: "Wan " +0x8116: "Bo " +0x8117: "Wen " +0x8118: "Guan " +0x8119: "Qiu " +0x811a: "Jiao " +0x811b: "Jing " +0x811c: "Rou " +0x811d: "Heng " +0x811e: "Cuo " +0x811f: "Lie " +0x8120: "Shan " +0x8121: "Ting " +0x8122: "Mei " +0x8123: "Chun " +0x8124: "Shen " +0x8125: "Xie " +0x8126: "De " +0x8127: "Zui " +0x8128: "Cu " +0x8129: "Xiu " +0x812a: "Xin " +0x812b: "Tuo " +0x812c: "Pao " +0x812d: "Cheng " +0x812e: "Nei " +0x812f: "Fu " +0x8130: "Dou " +0x8131: "Tuo " +0x8132: "Niao " +0x8133: "Noy " +0x8134: "Pi " +0x8135: "Gu " +0x8136: "Gua " +0x8137: "Li " +0x8138: "Lian " +0x8139: "Zhang " +0x813a: "Cui " +0x813b: "Jie " +0x813c: "Liang " +0x813d: "Zhou " +0x813e: "Pi " +0x813f: "Biao " +0x8140: "Lun " +0x8141: "Pian " +0x8142: "Guo " +0x8143: "Kui " +0x8144: "Chui " +0x8145: "Dan " +0x8146: "Tian " +0x8147: "Nei " +0x8148: "Jing " +0x8149: "Jie " +0x814a: "La " +0x814b: "Yi " +0x814c: "An " +0x814d: "Ren " +0x814e: "Shen " +0x814f: "Chuo " +0x8150: "Fu " +0x8151: "Fu " +0x8152: "Ju " +0x8153: "Fei " +0x8154: "Qiang " +0x8155: "Wan " +0x8156: "Dong " +0x8157: "Pi " +0x8158: "Guo " +0x8159: "Zong " +0x815a: "Ding " +0x815b: "Wu " +0x815c: "Mei " +0x815d: "Ruan " +0x815e: "Zhuan " +0x815f: "Zhi " +0x8160: "Cou " +0x8161: "Gua " +0x8162: "Ou " +0x8163: "Di " +0x8164: "An " +0x8165: "Xing " +0x8166: "Nao " +0x8167: "Yu " +0x8168: "Chuan " +0x8169: "Nan " +0x816a: "Yun " +0x816b: "Zhong " +0x816c: "Rou " +0x816d: "E " +0x816e: "Sai " +0x816f: "Tu " +0x8170: "Yao " +0x8171: "Jian " +0x8172: "Wei " +0x8173: "Jiao " +0x8174: "Yu " +0x8175: "Jia " +0x8176: "Duan " +0x8177: "Bi " +0x8178: "Chang " +0x8179: "Fu " +0x817a: "Xian " +0x817b: "Ni " +0x817c: "Mian " +0x817d: "Wa " +0x817e: "Teng " +0x817f: "Tui " +0x8180: "Bang " +0x8181: "Qian " +0x8182: "Lu " +0x8183: "Wa " +0x8184: "Sou " +0x8185: "Tang " +0x8186: "Su " +0x8187: "Zhui " +0x8188: "Ge " +0x8189: "Yi " +0x818a: "Bo " +0x818b: "Liao " +0x818c: "Ji " +0x818d: "Pi " +0x818e: "Xie " +0x818f: "Gao " +0x8190: "Lu " +0x8191: "Bin " +0x8192: "Ou " +0x8193: "Chang " +0x8194: "Lu " +0x8195: "Guo " +0x8196: "Pang " +0x8197: "Chuai " +0x8198: "Piao " +0x8199: "Jiang " +0x819a: "Fu " +0x819b: "Tang " +0x819c: "Mo " +0x819d: "Xi " +0x819e: "Zhuan " +0x819f: "Lu " +0x81a0: "Jiao " +0x81a1: "Ying " +0x81a2: "Lu " +0x81a3: "Zhi " +0x81a4: "Tara " +0x81a5: "Chun " +0x81a6: "Lian " +0x81a7: "Tong " +0x81a8: "Peng " +0x81a9: "Ni " +0x81aa: "Zha " +0x81ab: "Liao " +0x81ac: "Cui " +0x81ad: "Gui " +0x81ae: "Xiao " +0x81af: "Teng " +0x81b0: "Fan " +0x81b1: "Zhi " +0x81b2: "Jiao " +0x81b3: "Shan " +0x81b4: "Wu " +0x81b5: "Cui " +0x81b6: "Run " +0x81b7: "Xiang " +0x81b8: "Sui " +0x81b9: "Fen " +0x81ba: "Ying " +0x81bb: "Tan " +0x81bc: "Zhua " +0x81bd: "Dan " +0x81be: "Kuai " +0x81bf: "Nong " +0x81c0: "Tun " +0x81c1: "Lian " +0x81c2: "Bi " +0x81c3: "Yong " +0x81c4: "Jue " +0x81c5: "Chu " +0x81c6: "Yi " +0x81c7: "Juan " +0x81c8: "La " +0x81c9: "Lian " +0x81ca: "Sao " +0x81cb: "Tun " +0x81cc: "Gu " +0x81cd: "Qi " +0x81ce: "Cui " +0x81cf: "Bin " +0x81d0: "Xun " +0x81d1: "Ru " +0x81d2: "Huo " +0x81d3: "Zang " +0x81d4: "Xian " +0x81d5: "Biao " +0x81d6: "Xing " +0x81d7: "Kuan " +0x81d8: "La " +0x81d9: "Yan " +0x81da: "Lu " +0x81db: "Huo " +0x81dc: "Zang " +0x81dd: "Luo " +0x81de: "Qu " +0x81df: "Zang " +0x81e0: "Luan " +0x81e1: "Ni " +0x81e2: "Zang " +0x81e3: "Chen " +0x81e4: "Qian " +0x81e5: "Wo " +0x81e6: "Guang " +0x81e7: "Zang " +0x81e8: "Lin " +0x81e9: "Guang " +0x81ea: "Zi " +0x81eb: "Jiao " +0x81ec: "Nie " +0x81ed: "Chou " +0x81ee: "Ji " +0x81ef: "Gao " +0x81f0: "Chou " +0x81f1: "Mian " +0x81f2: "Nie " +0x81f3: "Zhi " +0x81f4: "Zhi " +0x81f5: "Ge " +0x81f6: "Jian " +0x81f7: "Die " +0x81f8: "Zhi " +0x81f9: "Xiu " +0x81fa: "Tai " +0x81fb: "Zhen " +0x81fc: "Jiu " +0x81fd: "Xian " +0x81fe: "Yu " +0x81ff: "Cha " +/* x082 */ +0x8200: "Yao " +0x8201: "Yu " +0x8202: "Chong " +0x8203: "Xi " +0x8204: "Xi " +0x8205: "Jiu " +0x8206: "Yu " +0x8207: "Yu " +0x8208: "Xing " +0x8209: "Ju " +0x820a: "Jiu " +0x820b: "Xin " +0x820c: "She " +0x820d: "She " +0x820e: "Yadoru " +0x820f: "Jiu " +0x8210: "Shi " +0x8211: "Tan " +0x8212: "Shu " +0x8213: "Shi " +0x8214: "Tian " +0x8215: "Dan " +0x8216: "Pu " +0x8217: "Pu " +0x8218: "Guan " +0x8219: "Hua " +0x821a: "Tan " +0x821b: "Chuan " +0x821c: "Shun " +0x821d: "Xia " +0x821e: "Wu " +0x821f: "Zhou " +0x8220: "Dao " +0x8221: "Gang " +0x8222: "Shan " +0x8223: "Yi " +0x8224: "[?] " +0x8225: "Pa " +0x8226: "Tai " +0x8227: "Fan " +0x8228: "Ban " +0x8229: "Chuan " +0x822a: "Hang " +0x822b: "Fang " +0x822c: "Ban " +0x822d: "Que " +0x822e: "Hesaki " +0x822f: "Zhong " +0x8230: "Jian " +0x8231: "Cang " +0x8232: "Ling " +0x8233: "Zhu " +0x8234: "Ze " +0x8235: "Duo " +0x8236: "Bo " +0x8237: "Xian " +0x8238: "Ge " +0x8239: "Chuan " +0x823a: "Jia " +0x823b: "Lu " +0x823c: "Hong " +0x823d: "Pang " +0x823e: "Xi " +0x823f: "[?] " +0x8240: "Fu " +0x8241: "Zao " +0x8242: "Feng " +0x8243: "Li " +0x8244: "Shao " +0x8245: "Yu " +0x8246: "Lang " +0x8247: "Ting " +0x8248: "[?] " +0x8249: "Wei " +0x824a: "Bo " +0x824b: "Meng " +0x824c: "Nian " +0x824d: "Ju " +0x824e: "Huang " +0x824f: "Shou " +0x8250: "Zong " +0x8251: "Bian " +0x8252: "Mao " +0x8253: "Die " +0x8254: "[?] " +0x8255: "Bang " +0x8256: "Cha " +0x8257: "Yi " +0x8258: "Sao " +0x8259: "Cang " +0x825a: "Cao " +0x825b: "Lou " +0x825c: "Dai " +0x825d: "Sori " +0x825e: "Yao " +0x825f: "Tong " +0x8260: "Yofune " +0x8261: "Dang " +0x8262: "Tan " +0x8263: "Lu " +0x8264: "Yi " +0x8265: "Jie " +0x8266: "Jian " +0x8267: "Huo " +0x8268: "Meng " +0x8269: "Qi " +0x826a: "Lu " +0x826b: "Lu " +0x826c: "Chan " +0x826d: "Shuang " +0x826e: "Gen " +0x826f: "Liang " +0x8270: "Jian " +0x8271: "Jian " +0x8272: "Se " +0x8273: "Yan " +0x8274: "Fu " +0x8275: "Ping " +0x8276: "Yan " +0x8277: "Yan " +0x8278: "Cao " +0x8279: "Cao " +0x827a: "Yi " +0x827b: "Le " +0x827c: "Ting " +0x827d: "Qiu " +0x827e: "Ai " +0x827f: "Nai " +0x8280: "Tiao " +0x8281: "Jiao " +0x8282: "Jie " +0x8283: "Peng " +0x8284: "Wan " +0x8285: "Yi " +0x8286: "Chai " +0x8287: "Mian " +0x8288: "Mie " +0x8289: "Gan " +0x828a: "Qian " +0x828b: "Yu " +0x828c: "Yu " +0x828d: "Shuo " +0x828e: "Qiong " +0x828f: "Tu " +0x8290: "Xia " +0x8291: "Qi " +0x8292: "Mang " +0x8293: "Zi " +0x8294: "Hui " +0x8295: "Sui " +0x8296: "Zhi " +0x8297: "Xiang " +0x8298: "Bi " +0x8299: "Fu " +0x829a: "Tun " +0x829b: "Wei " +0x829c: "Wu " +0x829d: "Zhi " +0x829e: "Qi " +0x829f: "Shan " +0x82a0: "Wen " +0x82a1: "Qian " +0x82a2: "Ren " +0x82a3: "Fou " +0x82a4: "Kou " +0x82a5: "Jie " +0x82a6: "Lu " +0x82a7: "Xu " +0x82a8: "Ji " +0x82a9: "Qin " +0x82aa: "Qi " +0x82ab: "Yuan " +0x82ac: "Fen " +0x82ad: "Ba " +0x82ae: "Rui " +0x82af: "Xin " +0x82b0: "Ji " +0x82b1: "Hua " +0x82b2: "Hua " +0x82b3: "Fang " +0x82b4: "Wu " +0x82b5: "Jue " +0x82b6: "Gou " +0x82b7: "Zhi " +0x82b8: "Yun " +0x82b9: "Qin " +0x82ba: "Ao " +0x82bb: "Chu " +0x82bc: "Mao " +0x82bd: "Ya " +0x82be: "Fei " +0x82bf: "Reng " +0x82c0: "Hang " +0x82c1: "Cong " +0x82c2: "Yin " +0x82c3: "You " +0x82c4: "Bian " +0x82c5: "Yi " +0x82c6: "Susa " +0x82c7: "Wei " +0x82c8: "Li " +0x82c9: "Pi " +0x82ca: "E " +0x82cb: "Xian " +0x82cc: "Chang " +0x82cd: "Cang " +0x82ce: "Meng " +0x82cf: "Su " +0x82d0: "Yi " +0x82d1: "Yuan " +0x82d2: "Ran " +0x82d3: "Ling " +0x82d4: "Tai " +0x82d5: "Tiao " +0x82d6: "Di " +0x82d7: "Miao " +0x82d8: "Qiong " +0x82d9: "Li " +0x82da: "Yong " +0x82db: "Ke " +0x82dc: "Mu " +0x82dd: "Pei " +0x82de: "Bao " +0x82df: "Gou " +0x82e0: "Min " +0x82e1: "Yi " +0x82e2: "Yi " +0x82e3: "Ju " +0x82e4: "Pi " +0x82e5: "Ruo " +0x82e6: "Ku " +0x82e7: "Zhu " +0x82e8: "Ni " +0x82e9: "Bo " +0x82ea: "Bing " +0x82eb: "Shan " +0x82ec: "Qiu " +0x82ed: "Yao " +0x82ee: "Xian " +0x82ef: "Ben " +0x82f0: "Hong " +0x82f1: "Ying " +0x82f2: "Zha " +0x82f3: "Dong " +0x82f4: "Ju " +0x82f5: "Die " +0x82f6: "Nie " +0x82f7: "Gan " +0x82f8: "Hu " +0x82f9: "Ping " +0x82fa: "Mei " +0x82fb: "Fu " +0x82fc: "Sheng " +0x82fd: "Gu " +0x82fe: "Bi " +0x82ff: "Wei " +/* x083 */ +0x8300: "Fu " +0x8301: "Zhuo " +0x8302: "Mao " +0x8303: "Fan " +0x8304: "Qie " +0x8305: "Mao " +0x8306: "Mao " +0x8307: "Ba " +0x8308: "Zi " +0x8309: "Mo " +0x830a: "Zi " +0x830b: "Di " +0x830c: "Chi " +0x830d: "Ji " +0x830e: "Jing " +0x830f: "Long " +0x8310: "[?] " +0x8311: "Niao " +0x8312: "[?] " +0x8313: "Xue " +0x8314: "Ying " +0x8315: "Qiong " +0x8316: "Ge " +0x8317: "Ming " +0x8318: "Li " +0x8319: "Rong " +0x831a: "Yin " +0x831b: "Gen " +0x831c: "Qian " +0x831d: "Chai " +0x831e: "Chen " +0x831f: "Yu " +0x8320: "Xiu " +0x8321: "Zi " +0x8322: "Lie " +0x8323: "Wu " +0x8324: "Ji " +0x8325: "Kui " +0x8326: "Ce " +0x8327: "Chong " +0x8328: "Ci " +0x8329: "Gou " +0x832a: "Guang " +0x832b: "Mang " +0x832c: "Chi " +0x832d: "Jiao " +0x832e: "Jiao " +0x832f: "Fu " +0x8330: "Yu " +0x8331: "Zhu " +0x8332: "Zi " +0x8333: "Jiang " +0x8334: "Hui " +0x8335: "Yin " +0x8336: "Cha " +0x8337: "Fa " +0x8338: "Rong " +0x8339: "Ru " +0x833a: "Chong " +0x833b: "Mang " +0x833c: "Tong " +0x833d: "Zhong " +0x833e: "[?] " +0x833f: "Zhu " +0x8340: "Xun " +0x8341: "Huan " +0x8342: "Kua " +0x8343: "Quan " +0x8344: "Gai " +0x8345: "Da " +0x8346: "Jing " +0x8347: "Xing " +0x8348: "Quan " +0x8349: "Cao " +0x834a: "Jing " +0x834b: "Er " +0x834c: "An " +0x834d: "Shou " +0x834e: "Chi " +0x834f: "Ren " +0x8350: "Jian " +0x8351: "Ti " +0x8352: "Huang " +0x8353: "Ping " +0x8354: "Li " +0x8355: "Jin " +0x8356: "Lao " +0x8357: "Shu " +0x8358: "Zhuang " +0x8359: "Da " +0x835a: "Jia " +0x835b: "Rao " +0x835c: "Bi " +0x835d: "Ze " +0x835e: "Qiao " +0x835f: "Hui " +0x8360: "Qi " +0x8361: "Dang " +0x8362: "[?] " +0x8363: "Rong " +0x8364: "Hun " +0x8365: "Ying " +0x8366: "Luo " +0x8367: "Ying " +0x8368: "Xun " +0x8369: "Jin " +0x836a: "Sun " +0x836b: "Yin " +0x836c: "Mai " +0x836d: "Hong " +0x836e: "Zhou " +0x836f: "Yao " +0x8370: "Du " +0x8371: "Wei " +0x8372: "Chu " +0x8373: "Dou " +0x8374: "Fu " +0x8375: "Ren " +0x8376: "Yin " +0x8377: "He " +0x8378: "Bi " +0x8379: "Bu " +0x837a: "Yun " +0x837b: "Di " +0x837c: "Tu " +0x837d: "Sui " +0x837e: "Sui " +0x837f: "Cheng " +0x8380: "Chen " +0x8381: "Wu " +0x8382: "Bie " +0x8383: "Xi " +0x8384: "Geng " +0x8385: "Li " +0x8386: "Fu " +0x8387: "Zhu " +0x8388: "Mo " +0x8389: "Li " +0x838a: "Zhuang " +0x838b: "Ji " +0x838c: "Duo " +0x838d: "Qiu " +0x838e: "Sha " +0x838f: "Suo " +0x8390: "Chen " +0x8391: "Feng " +0x8392: "Ju " +0x8393: "Mei " +0x8394: "Meng " +0x8395: "Xing " +0x8396: "Jing " +0x8397: "Che " +0x8398: "Xin " +0x8399: "Jun " +0x839a: "Yan " +0x839b: "Ting " +0x839c: "Diao " +0x839d: "Cuo " +0x839e: "Wan " +0x839f: "Han " +0x83a0: "You " +0x83a1: "Cuo " +0x83a2: "Jia " +0x83a3: "Wang " +0x83a4: "You " +0x83a5: "Niu " +0x83a6: "Shao " +0x83a7: "Xian " +0x83a8: "Lang " +0x83a9: "Fu " +0x83aa: "E " +0x83ab: "Mo " +0x83ac: "Wen " +0x83ad: "Jie " +0x83ae: "Nan " +0x83af: "Mu " +0x83b0: "Kan " +0x83b1: "Lai " +0x83b2: "Lian " +0x83b3: "Shi " +0x83b4: "Wo " +0x83b5: "Usagi " +0x83b6: "Lian " +0x83b7: "Huo " +0x83b8: "You " +0x83b9: "Ying " +0x83ba: "Ying " +0x83bb: "Nuc " +0x83bc: "Chun " +0x83bd: "Mang " +0x83be: "Mang " +0x83bf: "Ci " +0x83c0: "Wan " +0x83c1: "Jing " +0x83c2: "Di " +0x83c3: "Qu " +0x83c4: "Dong " +0x83c5: "Jian " +0x83c6: "Zou " +0x83c7: "Gu " +0x83c8: "La " +0x83c9: "Lu " +0x83ca: "Ju " +0x83cb: "Wei " +0x83cc: "Jun " +0x83cd: "Nie " +0x83ce: "Kun " +0x83cf: "He " +0x83d0: "Pu " +0x83d1: "Zi " +0x83d2: "Gao " +0x83d3: "Guo " +0x83d4: "Fu " +0x83d5: "Lun " +0x83d6: "Chang " +0x83d7: "Chou " +0x83d8: "Song " +0x83d9: "Chui " +0x83da: "Zhan " +0x83db: "Men " +0x83dc: "Cai " +0x83dd: "Ba " +0x83de: "Li " +0x83df: "Tu " +0x83e0: "Bo " +0x83e1: "Han " +0x83e2: "Bao " +0x83e3: "Qin " +0x83e4: "Juan " +0x83e5: "Xi " +0x83e6: "Qin " +0x83e7: "Di " +0x83e8: "Jie " +0x83e9: "Pu " +0x83ea: "Dang " +0x83eb: "Jin " +0x83ec: "Zhao " +0x83ed: "Tai " +0x83ee: "Geng " +0x83ef: "Hua " +0x83f0: "Gu " +0x83f1: "Ling " +0x83f2: "Fei " +0x83f3: "Jin " +0x83f4: "An " +0x83f5: "Wang " +0x83f6: "Beng " +0x83f7: "Zhou " +0x83f8: "Yan " +0x83f9: "Ju " +0x83fa: "Jian " +0x83fb: "Lin " +0x83fc: "Tan " +0x83fd: "Shu " +0x83fe: "Tian " +0x83ff: "Dao " +/* x084 */ +0x8400: "Hu " +0x8401: "Qi " +0x8402: "He " +0x8403: "Cui " +0x8404: "Tao " +0x8405: "Chun " +0x8406: "Bei " +0x8407: "Chang " +0x8408: "Huan " +0x8409: "Fei " +0x840a: "Lai " +0x840b: "Qi " +0x840c: "Meng " +0x840d: "Ping " +0x840e: "Wei " +0x840f: "Dan " +0x8410: "Sha " +0x8411: "Huan " +0x8412: "Yan " +0x8413: "Yi " +0x8414: "Tiao " +0x8415: "Qi " +0x8416: "Wan " +0x8417: "Ce " +0x8418: "Nai " +0x8419: "Kutabireru " +0x841a: "Tuo " +0x841b: "Jiu " +0x841c: "Tie " +0x841d: "Luo " +0x841e: "[?] " +0x841f: "[?] " +0x8420: "Meng " +0x8421: "[?] " +0x8422: "Yaji " +0x8423: "[?] " +0x8424: "Ying " +0x8425: "Ying " +0x8426: "Ying " +0x8427: "Xiao " +0x8428: "Sa " +0x8429: "Qiu " +0x842a: "Ke " +0x842b: "Xiang " +0x842c: "Wan " +0x842d: "Yu " +0x842e: "Yu " +0x842f: "Fu " +0x8430: "Lian " +0x8431: "Xuan " +0x8432: "Yuan " +0x8433: "Nan " +0x8434: "Ze " +0x8435: "Wo " +0x8436: "Chun " +0x8437: "Xiao " +0x8438: "Yu " +0x8439: "Pian " +0x843a: "Mao " +0x843b: "An " +0x843c: "E " +0x843d: "Luo " +0x843e: "Ying " +0x843f: "Huo " +0x8440: "Gua " +0x8441: "Jiang " +0x8442: "Mian " +0x8443: "Zuo " +0x8444: "Zuo " +0x8445: "Ju " +0x8446: "Bao " +0x8447: "Rou " +0x8448: "Xi " +0x8449: "Xie " +0x844a: "An " +0x844b: "Qu " +0x844c: "Jian " +0x844d: "Fu " +0x844e: "Lu " +0x844f: "Jing " +0x8450: "Pen " +0x8451: "Feng " +0x8452: "Hong " +0x8453: "Hong " +0x8454: "Hou " +0x8455: "Yan " +0x8456: "Tu " +0x8457: "Zhu " +0x8458: "Zi " +0x8459: "Xiang " +0x845a: "Shen " +0x845b: "Ge " +0x845c: "Jie " +0x845d: "Jing " +0x845e: "Mi " +0x845f: "Huang " +0x8460: "Shen " +0x8461: "Pu " +0x8462: "Gai " +0x8463: "Dong " +0x8464: "Zhou " +0x8465: "Qian " +0x8466: "Wei " +0x8467: "Bo " +0x8468: "Wei " +0x8469: "Pa " +0x846a: "Ji " +0x846b: "Hu " +0x846c: "Zang " +0x846d: "Jia " +0x846e: "Duan " +0x846f: "Yao " +0x8470: "Jun " +0x8471: "Cong " +0x8472: "Quan " +0x8473: "Wei " +0x8474: "Xian " +0x8475: "Kui " +0x8476: "Ting " +0x8477: "Hun " +0x8478: "Xi " +0x8479: "Shi " +0x847a: "Qi " +0x847b: "Lan " +0x847c: "Zong " +0x847d: "Yao " +0x847e: "Yuan " +0x847f: "Mei " +0x8480: "Yun " +0x8481: "Shu " +0x8482: "Di " +0x8483: "Zhuan " +0x8484: "Guan " +0x8485: "Sukumo " +0x8486: "Xue " +0x8487: "Chan " +0x8488: "Kai " +0x8489: "Kui " +0x848a: "[?] " +0x848b: "Jiang " +0x848c: "Lou " +0x848d: "Wei " +0x848e: "Pai " +0x848f: "[?] " +0x8490: "Sou " +0x8491: "Yin " +0x8492: "Shi " +0x8493: "Chun " +0x8494: "Shi " +0x8495: "Yun " +0x8496: "Zhen " +0x8497: "Lang " +0x8498: "Nu " +0x8499: "Meng " +0x849a: "He " +0x849b: "Que " +0x849c: "Suan " +0x849d: "Yuan " +0x849e: "Li " +0x849f: "Ju " +0x84a0: "Xi " +0x84a1: "Pang " +0x84a2: "Chu " +0x84a3: "Xu " +0x84a4: "Tu " +0x84a5: "Liu " +0x84a6: "Wo " +0x84a7: "Zhen " +0x84a8: "Qian " +0x84a9: "Zu " +0x84aa: "Po " +0x84ab: "Cuo " +0x84ac: "Yuan " +0x84ad: "Chu " +0x84ae: "Yu " +0x84af: "Kuai " +0x84b0: "Pan " +0x84b1: "Pu " +0x84b2: "Pu " +0x84b3: "Na " +0x84b4: "Shuo " +0x84b5: "Xi " +0x84b6: "Fen " +0x84b7: "Yun " +0x84b8: "Zheng " +0x84b9: "Jian " +0x84ba: "Ji " +0x84bb: "Ruo " +0x84bc: "Cang " +0x84bd: "En " +0x84be: "Mi " +0x84bf: "Hao " +0x84c0: "Sun " +0x84c1: "Zhen " +0x84c2: "Ming " +0x84c3: "Sou " +0x84c4: "Xu " +0x84c5: "Liu " +0x84c6: "Xi " +0x84c7: "Gu " +0x84c8: "Lang " +0x84c9: "Rong " +0x84ca: "Weng " +0x84cb: "Gai " +0x84cc: "Cuo " +0x84cd: "Shi " +0x84ce: "Tang " +0x84cf: "Luo " +0x84d0: "Ru " +0x84d1: "Suo " +0x84d2: "Xian " +0x84d3: "Bei " +0x84d4: "Yao " +0x84d5: "Gui " +0x84d6: "Bi " +0x84d7: "Zong " +0x84d8: "Gun " +0x84d9: "Za " +0x84da: "Xiu " +0x84db: "Ce " +0x84dc: "Hai " +0x84dd: "Lan " +0x84de: "[?] " +0x84df: "Ji " +0x84e0: "Li " +0x84e1: "Can " +0x84e2: "Lang " +0x84e3: "Yu " +0x84e4: "[?] " +0x84e5: "Ying " +0x84e6: "Mo " +0x84e7: "Diao " +0x84e8: "Tiao " +0x84e9: "Mao " +0x84ea: "Tong " +0x84eb: "Zhu " +0x84ec: "Peng " +0x84ed: "An " +0x84ee: "Lian " +0x84ef: "Cong " +0x84f0: "Xi " +0x84f1: "Ping " +0x84f2: "Qiu " +0x84f3: "Jin " +0x84f4: "Chun " +0x84f5: "Jie " +0x84f6: "Wei " +0x84f7: "Tui " +0x84f8: "Cao " +0x84f9: "Yu " +0x84fa: "Yi " +0x84fb: "Ji " +0x84fc: "Liao " +0x84fd: "Bi " +0x84fe: "Lu " +0x84ff: "Su " +/* x085 */ +0x8500: "Bu " +0x8501: "Zhang " +0x8502: "Luo " +0x8503: "Jiang " +0x8504: "Man " +0x8505: "Yan " +0x8506: "Ling " +0x8507: "Ji " +0x8508: "Piao " +0x8509: "Gun " +0x850a: "Han " +0x850b: "Di " +0x850c: "Su " +0x850d: "Lu " +0x850e: "She " +0x850f: "Shang " +0x8510: "Di " +0x8511: "Mie " +0x8512: "Xun " +0x8513: "Man " +0x8514: "Bo " +0x8515: "Di " +0x8516: "Cuo " +0x8517: "Zhe " +0x8518: "Sen " +0x8519: "Xuan " +0x851a: "Wei " +0x851b: "Hu " +0x851c: "Ao " +0x851d: "Mi " +0x851e: "Lou " +0x851f: "Cu " +0x8520: "Zhong " +0x8521: "Cai " +0x8522: "Po " +0x8523: "Jiang " +0x8524: "Mi " +0x8525: "Cong " +0x8526: "Niao " +0x8527: "Hui " +0x8528: "Jun " +0x8529: "Yin " +0x852a: "Jian " +0x852b: "Yan " +0x852c: "Shu " +0x852d: "Yin " +0x852e: "Kui " +0x852f: "Chen " +0x8530: "Hu " +0x8531: "Sha " +0x8532: "Kou " +0x8533: "Qian " +0x8534: "Ma " +0x8535: "Zang " +0x8536: "Sonoko " +0x8537: "Qiang " +0x8538: "Dou " +0x8539: "Lian " +0x853a: "Lin " +0x853b: "Kou " +0x853c: "Ai " +0x853d: "Bi " +0x853e: "Li " +0x853f: "Wei " +0x8540: "Ji " +0x8541: "Xun " +0x8542: "Sheng " +0x8543: "Fan " +0x8544: "Meng " +0x8545: "Ou " +0x8546: "Chan " +0x8547: "Dian " +0x8548: "Xun " +0x8549: "Jiao " +0x854a: "Rui " +0x854b: "Rui " +0x854c: "Lei " +0x854d: "Yu " +0x854e: "Qiao " +0x854f: "Chu " +0x8550: "Hua " +0x8551: "Jian " +0x8552: "Mai " +0x8553: "Yun " +0x8554: "Bao " +0x8555: "You " +0x8556: "Qu " +0x8557: "Lu " +0x8558: "Rao " +0x8559: "Hui " +0x855a: "E " +0x855b: "Teng " +0x855c: "Fei " +0x855d: "Jue " +0x855e: "Zui " +0x855f: "Fa " +0x8560: "Ru " +0x8561: "Fen " +0x8562: "Kui " +0x8563: "Shun " +0x8564: "Rui " +0x8565: "Ya " +0x8566: "Xu " +0x8567: "Fu " +0x8568: "Jue " +0x8569: "Dang " +0x856a: "Wu " +0x856b: "Tong " +0x856c: "Si " +0x856d: "Xiao " +0x856e: "Xi " +0x856f: "Long " +0x8570: "Yun " +0x8571: "[?] " +0x8572: "Qi " +0x8573: "Jian " +0x8574: "Yun " +0x8575: "Sun " +0x8576: "Ling " +0x8577: "Yu " +0x8578: "Xia " +0x8579: "Yong " +0x857a: "Ji " +0x857b: "Hong " +0x857c: "Si " +0x857d: "Nong " +0x857e: "Lei " +0x857f: "Xuan " +0x8580: "Yun " +0x8581: "Yu " +0x8582: "Xi " +0x8583: "Hao " +0x8584: "Bo " +0x8585: "Hao " +0x8586: "Ai " +0x8587: "Wei " +0x8588: "Hui " +0x8589: "Wei " +0x858a: "Ji " +0x858b: "Ci " +0x858c: "Xiang " +0x858d: "Luan " +0x858e: "Mie " +0x858f: "Yi " +0x8590: "Leng " +0x8591: "Jiang " +0x8592: "Can " +0x8593: "Shen " +0x8594: "Qiang " +0x8595: "Lian " +0x8596: "Ke " +0x8597: "Yuan " +0x8598: "Da " +0x8599: "Ti " +0x859a: "Tang " +0x859b: "Xie " +0x859c: "Bi " +0x859d: "Zhan " +0x859e: "Sun " +0x859f: "Lian " +0x85a0: "Fan " +0x85a1: "Ding " +0x85a2: "Jie " +0x85a3: "Gu " +0x85a4: "Xie " +0x85a5: "Shu " +0x85a6: "Jian " +0x85a7: "Kao " +0x85a8: "Hong " +0x85a9: "Sa " +0x85aa: "Xin " +0x85ab: "Xun " +0x85ac: "Yao " +0x85ad: "Hie " +0x85ae: "Sou " +0x85af: "Shu " +0x85b0: "Xun " +0x85b1: "Dui " +0x85b2: "Pin " +0x85b3: "Wei " +0x85b4: "Neng " +0x85b5: "Chou " +0x85b6: "Mai " +0x85b7: "Ru " +0x85b8: "Piao " +0x85b9: "Tai " +0x85ba: "Qi " +0x85bb: "Zao " +0x85bc: "Chen " +0x85bd: "Zhen " +0x85be: "Er " +0x85bf: "Ni " +0x85c0: "Ying " +0x85c1: "Gao " +0x85c2: "Cong " +0x85c3: "Xiao " +0x85c4: "Qi " +0x85c5: "Fa " +0x85c6: "Jian " +0x85c7: "Xu " +0x85c8: "Kui " +0x85c9: "Jie " +0x85ca: "Bian " +0x85cb: "Diao " +0x85cc: "Mi " +0x85cd: "Lan " +0x85ce: "Jin " +0x85cf: "Cang " +0x85d0: "Miao " +0x85d1: "Qiong " +0x85d2: "Qie " +0x85d3: "Xian " +0x85d4: "[?] " +0x85d5: "Ou " +0x85d6: "Xian " +0x85d7: "Su " +0x85d8: "Lu " +0x85d9: "Yi " +0x85da: "Xu " +0x85db: "Xie " +0x85dc: "Li " +0x85dd: "Yi " +0x85de: "La " +0x85df: "Lei " +0x85e0: "Xiao " +0x85e1: "Di " +0x85e2: "Zhi " +0x85e3: "Bei " +0x85e4: "Teng " +0x85e5: "Yao " +0x85e6: "Mo " +0x85e7: "Huan " +0x85e8: "Piao " +0x85e9: "Fan " +0x85ea: "Sou " +0x85eb: "Tan " +0x85ec: "Tui " +0x85ed: "Qiong " +0x85ee: "Qiao " +0x85ef: "Wei " +0x85f0: "Liu " +0x85f1: "Hui " +0x85f2: "[?] " +0x85f3: "Gao " +0x85f4: "Yun " +0x85f5: "[?] " +0x85f6: "Li " +0x85f7: "Shu " +0x85f8: "Chu " +0x85f9: "Ai " +0x85fa: "Lin " +0x85fb: "Zao " +0x85fc: "Xuan " +0x85fd: "Chen " +0x85fe: "Lai " +0x85ff: "Huo " +/* x086 */ +0x8600: "Tuo " +0x8601: "Wu " +0x8602: "Rui " +0x8603: "Rui " +0x8604: "Qi " +0x8605: "Heng " +0x8606: "Lu " +0x8607: "Su " +0x8608: "Tui " +0x8609: "Mang " +0x860a: "Yun " +0x860b: "Pin " +0x860c: "Yu " +0x860d: "Xun " +0x860e: "Ji " +0x860f: "Jiong " +0x8610: "Xian " +0x8611: "Mo " +0x8612: "Hagi " +0x8613: "Su " +0x8614: "Jiong " +0x8615: "[?] " +0x8616: "Nie " +0x8617: "Bo " +0x8618: "Rang " +0x8619: "Yi " +0x861a: "Xian " +0x861b: "Yu " +0x861c: "Ju " +0x861d: "Lian " +0x861e: "Lian " +0x861f: "Yin " +0x8620: "Qiang " +0x8621: "Ying " +0x8622: "Long " +0x8623: "Tong " +0x8624: "Wei " +0x8625: "Yue " +0x8626: "Ling " +0x8627: "Qu " +0x8628: "Yao " +0x8629: "Fan " +0x862a: "Mi " +0x862b: "Lan " +0x862c: "Kui " +0x862d: "Lan " +0x862e: "Ji " +0x862f: "Dang " +0x8630: "Katsura " +0x8631: "Lei " +0x8632: "Lei " +0x8633: "Hua " +0x8634: "Feng " +0x8635: "Zhi " +0x8636: "Wei " +0x8637: "Kui " +0x8638: "Zhan " +0x8639: "Huai " +0x863a: "Li " +0x863b: "Ji " +0x863c: "Mi " +0x863d: "Lei " +0x863e: "Huai " +0x863f: "Luo " +0x8640: "Ji " +0x8641: "Kui " +0x8642: "Lu " +0x8643: "Jian " +0x8644: "San " +0x8645: "[?] " +0x8646: "Lei " +0x8647: "Quan " +0x8648: "Xiao " +0x8649: "Yi " +0x864a: "Luan " +0x864b: "Men " +0x864c: "Bie " +0x864d: "Hu " +0x864e: "Hu " +0x864f: "Lu " +0x8650: "Nue " +0x8651: "Lu " +0x8652: "Si " +0x8653: "Xiao " +0x8654: "Qian " +0x8655: "Chu " +0x8656: "Hu " +0x8657: "Xu " +0x8658: "Cuo " +0x8659: "Fu " +0x865a: "Xu " +0x865b: "Xu " +0x865c: "Lu " +0x865d: "Hu " +0x865e: "Yu " +0x865f: "Hao " +0x8660: "Jiao " +0x8661: "Ju " +0x8662: "Guo " +0x8663: "Bao " +0x8664: "Yan " +0x8665: "Zhan " +0x8666: "Zhan " +0x8667: "Kui " +0x8668: "Ban " +0x8669: "Xi " +0x866a: "Shu " +0x866b: "Chong " +0x866c: "Qiu " +0x866d: "Diao " +0x866e: "Ji " +0x866f: "Qiu " +0x8670: "Cheng " +0x8671: "Shi " +0x8672: "[?] " +0x8673: "Di " +0x8674: "Zhe " +0x8675: "She " +0x8676: "Yu " +0x8677: "Gan " +0x8678: "Zi " +0x8679: "Hong " +0x867a: "Hui " +0x867b: "Meng " +0x867c: "Ge " +0x867d: "Sui " +0x867e: "Xia " +0x867f: "Chai " +0x8680: "Shi " +0x8681: "Yi " +0x8682: "Ma " +0x8683: "Xiang " +0x8684: "Fang " +0x8685: "E " +0x8686: "Pa " +0x8687: "Chi " +0x8688: "Qian " +0x8689: "Wen " +0x868a: "Wen " +0x868b: "Rui " +0x868c: "Bang " +0x868d: "Bi " +0x868e: "Yue " +0x868f: "Yue " +0x8690: "Jun " +0x8691: "Qi " +0x8692: "Ran " +0x8693: "Yin " +0x8694: "Qi " +0x8695: "Tian " +0x8696: "Yuan " +0x8697: "Jue " +0x8698: "Hui " +0x8699: "Qin " +0x869a: "Qi " +0x869b: "Zhong " +0x869c: "Ya " +0x869d: "Ci " +0x869e: "Mu " +0x869f: "Wang " +0x86a0: "Fen " +0x86a1: "Fen " +0x86a2: "Hang " +0x86a3: "Gong " +0x86a4: "Zao " +0x86a5: "Fu " +0x86a6: "Ran " +0x86a7: "Jie " +0x86a8: "Fu " +0x86a9: "Chi " +0x86aa: "Dou " +0x86ab: "Piao " +0x86ac: "Xian " +0x86ad: "Ni " +0x86ae: "Te " +0x86af: "Qiu " +0x86b0: "You " +0x86b1: "Zha " +0x86b2: "Ping " +0x86b3: "Chi " +0x86b4: "You " +0x86b5: "He " +0x86b6: "Han " +0x86b7: "Ju " +0x86b8: "Li " +0x86b9: "Fu " +0x86ba: "Ran " +0x86bb: "Zha " +0x86bc: "Gou " +0x86bd: "Pi " +0x86be: "Bo " +0x86bf: "Xian " +0x86c0: "Zhu " +0x86c1: "Diao " +0x86c2: "Bie " +0x86c3: "Bing " +0x86c4: "Gu " +0x86c5: "Ran " +0x86c6: "Qu " +0x86c7: "She " +0x86c8: "Tie " +0x86c9: "Ling " +0x86ca: "Gu " +0x86cb: "Dan " +0x86cc: "Gu " +0x86cd: "Ying " +0x86ce: "Li " +0x86cf: "Cheng " +0x86d0: "Qu " +0x86d1: "Mou " +0x86d2: "Ge " +0x86d3: "Ci " +0x86d4: "Hui " +0x86d5: "Hui " +0x86d6: "Mang " +0x86d7: "Fu " +0x86d8: "Yang " +0x86d9: "Wa " +0x86da: "Lie " +0x86db: "Zhu " +0x86dc: "Yi " +0x86dd: "Xian " +0x86de: "Kuo " +0x86df: "Jiao " +0x86e0: "Li " +0x86e1: "Yi " +0x86e2: "Ping " +0x86e3: "Ji " +0x86e4: "Ha " +0x86e5: "She " +0x86e6: "Yi " +0x86e7: "Wang " +0x86e8: "Mo " +0x86e9: "Qiong " +0x86ea: "Qie " +0x86eb: "Gui " +0x86ec: "Gong " +0x86ed: "Zhi " +0x86ee: "Man " +0x86ef: "Ebi " +0x86f0: "Zhi " +0x86f1: "Jia " +0x86f2: "Rao " +0x86f3: "Si " +0x86f4: "Qi " +0x86f5: "Xing " +0x86f6: "Lie " +0x86f7: "Qiu " +0x86f8: "Shao " +0x86f9: "Yong " +0x86fa: "Jia " +0x86fb: "Shui " +0x86fc: "Che " +0x86fd: "Bai " +0x86fe: "E " +0x86ff: "Han " +/* x087 */ +0x8700: "Shu " +0x8701: "Xuan " +0x8702: "Feng " +0x8703: "Shen " +0x8704: "Zhen " +0x8705: "Fu " +0x8706: "Xian " +0x8707: "Zhe " +0x8708: "Wu " +0x8709: "Fu " +0x870a: "Li " +0x870b: "Lang " +0x870c: "Bi " +0x870d: "Chu " +0x870e: "Yuan " +0x870f: "You " +0x8710: "Jie " +0x8711: "Dan " +0x8712: "Yan " +0x8713: "Ting " +0x8714: "Dian " +0x8715: "Shui " +0x8716: "Hui " +0x8717: "Gua " +0x8718: "Zhi " +0x8719: "Song " +0x871a: "Fei " +0x871b: "Ju " +0x871c: "Mi " +0x871d: "Qi " +0x871e: "Qi " +0x871f: "Yu " +0x8720: "Jun " +0x8721: "Zha " +0x8722: "Meng " +0x8723: "Qiang " +0x8724: "Si " +0x8725: "Xi " +0x8726: "Lun " +0x8727: "Li " +0x8728: "Die " +0x8729: "Tiao " +0x872a: "Tao " +0x872b: "Kun " +0x872c: "Gan " +0x872d: "Han " +0x872e: "Yu " +0x872f: "Bang " +0x8730: "Fei " +0x8731: "Pi " +0x8732: "Wei " +0x8733: "Dun " +0x8734: "Yi " +0x8735: "Yuan " +0x8736: "Su " +0x8737: "Quan " +0x8738: "Qian " +0x8739: "Rui " +0x873a: "Ni " +0x873b: "Qing " +0x873c: "Wei " +0x873d: "Liang " +0x873e: "Guo " +0x873f: "Wan " +0x8740: "Dong " +0x8741: "E " +0x8742: "Ban " +0x8743: "Di " +0x8744: "Wang " +0x8745: "Can " +0x8746: "Yang " +0x8747: "Ying " +0x8748: "Guo " +0x8749: "Chan " +0x874a: "[?] " +0x874b: "La " +0x874c: "Ke " +0x874d: "Ji " +0x874e: "He " +0x874f: "Ting " +0x8750: "Mai " +0x8751: "Xu " +0x8752: "Mian " +0x8753: "Yu " +0x8754: "Jie " +0x8755: "Shi " +0x8756: "Xuan " +0x8757: "Huang " +0x8758: "Yan " +0x8759: "Bian " +0x875a: "Rou " +0x875b: "Wei " +0x875c: "Fu " +0x875d: "Yuan " +0x875e: "Mei " +0x875f: "Wei " +0x8760: "Fu " +0x8761: "Ruan " +0x8762: "Xie " +0x8763: "You " +0x8764: "Qiu " +0x8765: "Mao " +0x8766: "Xia " +0x8767: "Ying " +0x8768: "Shi " +0x8769: "Chong " +0x876a: "Tang " +0x876b: "Zhu " +0x876c: "Zong " +0x876d: "Ti " +0x876e: "Fu " +0x876f: "Yuan " +0x8770: "Hui " +0x8771: "Meng " +0x8772: "La " +0x8773: "Du " +0x8774: "Hu " +0x8775: "Qiu " +0x8776: "Die " +0x8777: "Li " +0x8778: "Gua " +0x8779: "Yun " +0x877a: "Ju " +0x877b: "Nan " +0x877c: "Lou " +0x877d: "Qun " +0x877e: "Rong " +0x877f: "Ying " +0x8780: "Jiang " +0x8781: "[?] " +0x8782: "Lang " +0x8783: "Pang " +0x8784: "Si " +0x8785: "Xi " +0x8786: "Ci " +0x8787: "Xi " +0x8788: "Yuan " +0x8789: "Weng " +0x878a: "Lian " +0x878b: "Sou " +0x878c: "Ban " +0x878d: "Rong " +0x878e: "Rong " +0x878f: "Ji " +0x8790: "Wu " +0x8791: "Qiu " +0x8792: "Han " +0x8793: "Qin " +0x8794: "Yi " +0x8795: "Bi " +0x8796: "Hua " +0x8797: "Tang " +0x8798: "Yi " +0x8799: "Du " +0x879a: "Nai " +0x879b: "He " +0x879c: "Hu " +0x879d: "Hui " +0x879e: "Ma " +0x879f: "Ming " +0x87a0: "Yi " +0x87a1: "Wen " +0x87a2: "Ying " +0x87a3: "Teng " +0x87a4: "Yu " +0x87a5: "Cang " +0x87a6: "So " +0x87a7: "Ebi " +0x87a8: "Man " +0x87a9: "[?] " +0x87aa: "Shang " +0x87ab: "Zhe " +0x87ac: "Cao " +0x87ad: "Chi " +0x87ae: "Di " +0x87af: "Ao " +0x87b0: "Lu " +0x87b1: "Wei " +0x87b2: "Zhi " +0x87b3: "Tang " +0x87b4: "Chen " +0x87b5: "Piao " +0x87b6: "Qu " +0x87b7: "Pi " +0x87b8: "Yu " +0x87b9: "Jian " +0x87ba: "Luo " +0x87bb: "Lou " +0x87bc: "Qin " +0x87bd: "Zhong " +0x87be: "Yin " +0x87bf: "Jiang " +0x87c0: "Shuai " +0x87c1: "Wen " +0x87c2: "Jiao " +0x87c3: "Wan " +0x87c4: "Zhi " +0x87c5: "Zhe " +0x87c6: "Ma " +0x87c7: "Ma " +0x87c8: "Guo " +0x87c9: "Liu " +0x87ca: "Mao " +0x87cb: "Xi " +0x87cc: "Cong " +0x87cd: "Li " +0x87ce: "Man " +0x87cf: "Xiao " +0x87d0: "Kamakiri " +0x87d1: "Zhang " +0x87d2: "Mang " +0x87d3: "Xiang " +0x87d4: "Mo " +0x87d5: "Zui " +0x87d6: "Si " +0x87d7: "Qiu " +0x87d8: "Te " +0x87d9: "Zhi " +0x87da: "Peng " +0x87db: "Peng " +0x87dc: "Jiao " +0x87dd: "Qu " +0x87de: "Bie " +0x87df: "Liao " +0x87e0: "Pan " +0x87e1: "Gui " +0x87e2: "Xi " +0x87e3: "Ji " +0x87e4: "Zhuan " +0x87e5: "Huang " +0x87e6: "Fei " +0x87e7: "Lao " +0x87e8: "Jue " +0x87e9: "Jue " +0x87ea: "Hui " +0x87eb: "Yin " +0x87ec: "Chan " +0x87ed: "Jiao " +0x87ee: "Shan " +0x87ef: "Rao " +0x87f0: "Xiao " +0x87f1: "Mou " +0x87f2: "Chong " +0x87f3: "Xun " +0x87f4: "Si " +0x87f5: "[?] " +0x87f6: "Cheng " +0x87f7: "Dang " +0x87f8: "Li " +0x87f9: "Xie " +0x87fa: "Shan " +0x87fb: "Yi " +0x87fc: "Jing " +0x87fd: "Da " +0x87fe: "Chan " +0x87ff: "Qi " +/* x088 */ +0x8800: "Ci " +0x8801: "Xiang " +0x8802: "She " +0x8803: "Luo " +0x8804: "Qin " +0x8805: "Ying " +0x8806: "Chai " +0x8807: "Li " +0x8808: "Ze " +0x8809: "Xuan " +0x880a: "Lian " +0x880b: "Zhu " +0x880c: "Ze " +0x880d: "Xie " +0x880e: "Mang " +0x880f: "Xie " +0x8810: "Qi " +0x8811: "Rong " +0x8812: "Jian " +0x8813: "Meng " +0x8814: "Hao " +0x8815: "Ruan " +0x8816: "Huo " +0x8817: "Zhuo " +0x8818: "Jie " +0x8819: "Bin " +0x881a: "He " +0x881b: "Mie " +0x881c: "Fan " +0x881d: "Lei " +0x881e: "Jie " +0x881f: "La " +0x8820: "Mi " +0x8821: "Li " +0x8822: "Chun " +0x8823: "Li " +0x8824: "Qiu " +0x8825: "Nie " +0x8826: "Lu " +0x8827: "Du " +0x8828: "Xiao " +0x8829: "Zhu " +0x882a: "Long " +0x882b: "Li " +0x882c: "Long " +0x882d: "Feng " +0x882e: "Ye " +0x882f: "Beng " +0x8830: "Shang " +0x8831: "Gu " +0x8832: "Juan " +0x8833: "Ying " +0x8834: "[?] " +0x8835: "Xi " +0x8836: "Can " +0x8837: "Qu " +0x8838: "Quan " +0x8839: "Du " +0x883a: "Can " +0x883b: "Man " +0x883c: "Jue " +0x883d: "Jie " +0x883e: "Zhu " +0x883f: "Zha " +0x8840: "Xie " +0x8841: "Huang " +0x8842: "Niu " +0x8843: "Pei " +0x8844: "Nu " +0x8845: "Xin " +0x8846: "Zhong " +0x8847: "Mo " +0x8848: "Er " +0x8849: "Ke " +0x884a: "Mie " +0x884b: "Xi " +0x884c: "Xing " +0x884d: "Yan " +0x884e: "Kan " +0x884f: "Yuan " +0x8850: "[?] " +0x8851: "Ling " +0x8852: "Xuan " +0x8853: "Shu " +0x8854: "Xian " +0x8855: "Tong " +0x8856: "Long " +0x8857: "Jie " +0x8858: "Xian " +0x8859: "Ya " +0x885a: "Hu " +0x885b: "Wei " +0x885c: "Dao " +0x885d: "Chong " +0x885e: "Wei " +0x885f: "Dao " +0x8860: "Zhun " +0x8861: "Heng " +0x8862: "Qu " +0x8863: "Yi " +0x8864: "Yi " +0x8865: "Bu " +0x8866: "Gan " +0x8867: "Yu " +0x8868: "Biao " +0x8869: "Cha " +0x886a: "Yi " +0x886b: "Shan " +0x886c: "Chen " +0x886d: "Fu " +0x886e: "Gun " +0x886f: "Fen " +0x8870: "Shuai " +0x8871: "Jie " +0x8872: "Na " +0x8873: "Zhong " +0x8874: "Dan " +0x8875: "Ri " +0x8876: "Zhong " +0x8877: "Zhong " +0x8878: "Xie " +0x8879: "Qi " +0x887a: "Xie " +0x887b: "Ran " +0x887c: "Zhi " +0x887d: "Ren " +0x887e: "Qin " +0x887f: "Jin " +0x8880: "Jun " +0x8881: "Yuan " +0x8882: "Mei " +0x8883: "Chai " +0x8884: "Ao " +0x8885: "Niao " +0x8886: "Hui " +0x8887: "Ran " +0x8888: "Jia " +0x8889: "Tuo " +0x888a: "Ling " +0x888b: "Dai " +0x888c: "Bao " +0x888d: "Pao " +0x888e: "Yao " +0x888f: "Zuo " +0x8890: "Bi " +0x8891: "Shao " +0x8892: "Tan " +0x8893: "Ju " +0x8894: "He " +0x8895: "Shu " +0x8896: "Xiu " +0x8897: "Zhen " +0x8898: "Yi " +0x8899: "Pa " +0x889a: "Bo " +0x889b: "Di " +0x889c: "Wa " +0x889d: "Fu " +0x889e: "Gun " +0x889f: "Zhi " +0x88a0: "Zhi " +0x88a1: "Ran " +0x88a2: "Pan " +0x88a3: "Yi " +0x88a4: "Mao " +0x88a5: "Tuo " +0x88a6: "Na " +0x88a7: "Kou " +0x88a8: "Xian " +0x88a9: "Chan " +0x88aa: "Qu " +0x88ab: "Bei " +0x88ac: "Gun " +0x88ad: "Xi " +0x88ae: "Ne " +0x88af: "Bo " +0x88b0: "Horo " +0x88b1: "Fu " +0x88b2: "Yi " +0x88b3: "Chi " +0x88b4: "Ku " +0x88b5: "Ren " +0x88b6: "Jiang " +0x88b7: "Jia " +0x88b8: "Cun " +0x88b9: "Mo " +0x88ba: "Jie " +0x88bb: "Er " +0x88bc: "Luo " +0x88bd: "Ru " +0x88be: "Zhu " +0x88bf: "Gui " +0x88c0: "Yin " +0x88c1: "Cai " +0x88c2: "Lie " +0x88c3: "Kamishimo " +0x88c4: "Yuki " +0x88c5: "Zhuang " +0x88c6: "Dang " +0x88c7: "[?] " +0x88c8: "Kun " +0x88c9: "Ken " +0x88ca: "Niao " +0x88cb: "Shu " +0x88cc: "Jia " +0x88cd: "Kun " +0x88ce: "Cheng " +0x88cf: "Li " +0x88d0: "Juan " +0x88d1: "Shen " +0x88d2: "Pou " +0x88d3: "Ge " +0x88d4: "Yi " +0x88d5: "Yu " +0x88d6: "Zhen " +0x88d7: "Liu " +0x88d8: "Qiu " +0x88d9: "Qun " +0x88da: "Ji " +0x88db: "Yi " +0x88dc: "Bu " +0x88dd: "Zhuang " +0x88de: "Shui " +0x88df: "Sha " +0x88e0: "Qun " +0x88e1: "Li " +0x88e2: "Lian " +0x88e3: "Lian " +0x88e4: "Ku " +0x88e5: "Jian " +0x88e6: "Fou " +0x88e7: "Chan " +0x88e8: "Bi " +0x88e9: "Gun " +0x88ea: "Tao " +0x88eb: "Yuan " +0x88ec: "Ling " +0x88ed: "Chi " +0x88ee: "Chang " +0x88ef: "Chou " +0x88f0: "Duo " +0x88f1: "Biao " +0x88f2: "Liang " +0x88f3: "Chang " +0x88f4: "Pei " +0x88f5: "Pei " +0x88f6: "Fei " +0x88f7: "Yuan " +0x88f8: "Luo " +0x88f9: "Guo " +0x88fa: "Yan " +0x88fb: "Du " +0x88fc: "Xi " +0x88fd: "Zhi " +0x88fe: "Ju " +0x88ff: "Qi " +/* x089 */ +0x8900: "Ji " +0x8901: "Zhi " +0x8902: "Gua " +0x8903: "Ken " +0x8904: "Che " +0x8905: "Ti " +0x8906: "Ti " +0x8907: "Fu " +0x8908: "Chong " +0x8909: "Xie " +0x890a: "Bian " +0x890b: "Die " +0x890c: "Kun " +0x890d: "Duan " +0x890e: "Xiu " +0x890f: "Xiu " +0x8910: "He " +0x8911: "Yuan " +0x8912: "Bao " +0x8913: "Bao " +0x8914: "Fu " +0x8915: "Yu " +0x8916: "Tuan " +0x8917: "Yan " +0x8918: "Hui " +0x8919: "Bei " +0x891a: "Chu " +0x891b: "Lu " +0x891c: "Ena " +0x891d: "Hitoe " +0x891e: "Yun " +0x891f: "Da " +0x8920: "Gou " +0x8921: "Da " +0x8922: "Huai " +0x8923: "Rong " +0x8924: "Yuan " +0x8925: "Ru " +0x8926: "Nai " +0x8927: "Jiong " +0x8928: "Suo " +0x8929: "Ban " +0x892a: "Tun " +0x892b: "Chi " +0x892c: "Sang " +0x892d: "Niao " +0x892e: "Ying " +0x892f: "Jie " +0x8930: "Qian " +0x8931: "Huai " +0x8932: "Ku " +0x8933: "Lian " +0x8934: "Bao " +0x8935: "Li " +0x8936: "Zhe " +0x8937: "Shi " +0x8938: "Lu " +0x8939: "Yi " +0x893a: "Die " +0x893b: "Xie " +0x893c: "Xian " +0x893d: "Wei " +0x893e: "Biao " +0x893f: "Cao " +0x8940: "Ji " +0x8941: "Jiang " +0x8942: "Sen " +0x8943: "Bao " +0x8944: "Xiang " +0x8945: "Chihaya " +0x8946: "Pu " +0x8947: "Jian " +0x8948: "Zhuan " +0x8949: "Jian " +0x894a: "Zui " +0x894b: "Ji " +0x894c: "Dan " +0x894d: "Za " +0x894e: "Fan " +0x894f: "Bo " +0x8950: "Xiang " +0x8951: "Xin " +0x8952: "Bie " +0x8953: "Rao " +0x8954: "Man " +0x8955: "Lan " +0x8956: "Ao " +0x8957: "Duo " +0x8958: "Gui " +0x8959: "Cao " +0x895a: "Sui " +0x895b: "Nong " +0x895c: "Chan " +0x895d: "Lian " +0x895e: "Bi " +0x895f: "Jin " +0x8960: "Dang " +0x8961: "Shu " +0x8962: "Tan " +0x8963: "Bi " +0x8964: "Lan " +0x8965: "Pu " +0x8966: "Ru " +0x8967: "Zhi " +0x8968: "[?] " +0x8969: "Shu " +0x896a: "Wa " +0x896b: "Shi " +0x896c: "Bai " +0x896d: "Xie " +0x896e: "Bo " +0x896f: "Chen " +0x8970: "Lai " +0x8971: "Long " +0x8972: "Xi " +0x8973: "Xian " +0x8974: "Lan " +0x8975: "Zhe " +0x8976: "Dai " +0x8977: "Tasuki " +0x8978: "Zan " +0x8979: "Shi " +0x897a: "Jian " +0x897b: "Pan " +0x897c: "Yi " +0x897d: "Ran " +0x897e: "Ya " +0x897f: "Xi " +0x8980: "Xi " +0x8981: "Yao " +0x8982: "Feng " +0x8983: "Tan " +0x8984: "[?] " +0x8985: "Biao " +0x8986: "Fu " +0x8987: "Ba " +0x8988: "He " +0x8989: "Ji " +0x898a: "Ji " +0x898b: "Jian " +0x898c: "Guan " +0x898d: "Bian " +0x898e: "Yan " +0x898f: "Gui " +0x8990: "Jue " +0x8991: "Pian " +0x8992: "Mao " +0x8993: "Mi " +0x8994: "Mi " +0x8995: "Mie " +0x8996: "Shi " +0x8997: "Si " +0x8998: "Zhan " +0x8999: "Luo " +0x899a: "Jue " +0x899b: "Mi " +0x899c: "Tiao " +0x899d: "Lian " +0x899e: "Yao " +0x899f: "Zhi " +0x89a0: "Jun " +0x89a1: "Xi " +0x89a2: "Shan " +0x89a3: "Wei " +0x89a4: "Xi " +0x89a5: "Tian " +0x89a6: "Yu " +0x89a7: "Lan " +0x89a8: "E " +0x89a9: "Du " +0x89aa: "Qin " +0x89ab: "Pang " +0x89ac: "Ji " +0x89ad: "Ming " +0x89ae: "Ying " +0x89af: "Gou " +0x89b0: "Qu " +0x89b1: "Zhan " +0x89b2: "Jin " +0x89b3: "Guan " +0x89b4: "Deng " +0x89b5: "Jian " +0x89b6: "Luo " +0x89b7: "Qu " +0x89b8: "Jian " +0x89b9: "Wei " +0x89ba: "Jue " +0x89bb: "Qu " +0x89bc: "Luo " +0x89bd: "Lan " +0x89be: "Shen " +0x89bf: "Di " +0x89c0: "Guan " +0x89c1: "Jian " +0x89c2: "Guan " +0x89c3: "Yan " +0x89c4: "Gui " +0x89c5: "Mi " +0x89c6: "Shi " +0x89c7: "Zhan " +0x89c8: "Lan " +0x89c9: "Jue " +0x89ca: "Ji " +0x89cb: "Xi " +0x89cc: "Di " +0x89cd: "Tian " +0x89ce: "Yu " +0x89cf: "Gou " +0x89d0: "Jin " +0x89d1: "Qu " +0x89d2: "Jiao " +0x89d3: "Jiu " +0x89d4: "Jin " +0x89d5: "Cu " +0x89d6: "Jue " +0x89d7: "Zhi " +0x89d8: "Chao " +0x89d9: "Ji " +0x89da: "Gu " +0x89db: "Dan " +0x89dc: "Zui " +0x89dd: "Di " +0x89de: "Shang " +0x89df: "Hua " +0x89e0: "Quan " +0x89e1: "Ge " +0x89e2: "Chi " +0x89e3: "Jie " +0x89e4: "Gui " +0x89e5: "Gong " +0x89e6: "Hong " +0x89e7: "Jie " +0x89e8: "Hun " +0x89e9: "Qiu " +0x89ea: "Xing " +0x89eb: "Su " +0x89ec: "Ni " +0x89ed: "Ji " +0x89ee: "Lu " +0x89ef: "Zhi " +0x89f0: "Zha " +0x89f1: "Bi " +0x89f2: "Xing " +0x89f3: "Hu " +0x89f4: "Shang " +0x89f5: "Gong " +0x89f6: "Zhi " +0x89f7: "Xue " +0x89f8: "Chu " +0x89f9: "Xi " +0x89fa: "Yi " +0x89fb: "Lu " +0x89fc: "Jue " +0x89fd: "Xi " +0x89fe: "Yan " +0x89ff: "Xi " +/* x08a */ +0x8a00: "Yan " +0x8a01: "Yan " +0x8a02: "Ding " +0x8a03: "Fu " +0x8a04: "Qiu " +0x8a05: "Qiu " +0x8a06: "Jiao " +0x8a07: "Hong " +0x8a08: "Ji " +0x8a09: "Fan " +0x8a0a: "Xun " +0x8a0b: "Diao " +0x8a0c: "Hong " +0x8a0d: "Cha " +0x8a0e: "Tao " +0x8a0f: "Xu " +0x8a10: "Jie " +0x8a11: "Yi " +0x8a12: "Ren " +0x8a13: "Xun " +0x8a14: "Yin " +0x8a15: "Shan " +0x8a16: "Qi " +0x8a17: "Tuo " +0x8a18: "Ji " +0x8a19: "Xun " +0x8a1a: "Yin " +0x8a1b: "E " +0x8a1c: "Fen " +0x8a1d: "Ya " +0x8a1e: "Yao " +0x8a1f: "Song " +0x8a20: "Shen " +0x8a21: "Yin " +0x8a22: "Xin " +0x8a23: "Jue " +0x8a24: "Xiao " +0x8a25: "Ne " +0x8a26: "Chen " +0x8a27: "You " +0x8a28: "Zhi " +0x8a29: "Xiong " +0x8a2a: "Fang " +0x8a2b: "Xin " +0x8a2c: "Chao " +0x8a2d: "She " +0x8a2e: "Xian " +0x8a2f: "Sha " +0x8a30: "Tun " +0x8a31: "Xu " +0x8a32: "Yi " +0x8a33: "Yi " +0x8a34: "Su " +0x8a35: "Chi " +0x8a36: "He " +0x8a37: "Shen " +0x8a38: "He " +0x8a39: "Xu " +0x8a3a: "Zhen " +0x8a3b: "Zhu " +0x8a3c: "Zheng " +0x8a3d: "Gou " +0x8a3e: "Zi " +0x8a3f: "Zi " +0x8a40: "Zhan " +0x8a41: "Gu " +0x8a42: "Fu " +0x8a43: "Quan " +0x8a44: "Die " +0x8a45: "Ling " +0x8a46: "Di " +0x8a47: "Yang " +0x8a48: "Li " +0x8a49: "Nao " +0x8a4a: "Pan " +0x8a4b: "Zhou " +0x8a4c: "Gan " +0x8a4d: "Yi " +0x8a4e: "Ju " +0x8a4f: "Ao " +0x8a50: "Zha " +0x8a51: "Tuo " +0x8a52: "Yi " +0x8a53: "Qu " +0x8a54: "Zhao " +0x8a55: "Ping " +0x8a56: "Bi " +0x8a57: "Xiong " +0x8a58: "Qu " +0x8a59: "Ba " +0x8a5a: "Da " +0x8a5b: "Zu " +0x8a5c: "Tao " +0x8a5d: "Zhu " +0x8a5e: "Ci " +0x8a5f: "Zhe " +0x8a60: "Yong " +0x8a61: "Xu " +0x8a62: "Xun " +0x8a63: "Yi " +0x8a64: "Huang " +0x8a65: "He " +0x8a66: "Shi " +0x8a67: "Cha " +0x8a68: "Jiao " +0x8a69: "Shi " +0x8a6a: "Hen " +0x8a6b: "Cha " +0x8a6c: "Gou " +0x8a6d: "Gui " +0x8a6e: "Quan " +0x8a6f: "Hui " +0x8a70: "Jie " +0x8a71: "Hua " +0x8a72: "Gai " +0x8a73: "Xiang " +0x8a74: "Wei " +0x8a75: "Shen " +0x8a76: "Chou " +0x8a77: "Tong " +0x8a78: "Mi " +0x8a79: "Zhan " +0x8a7a: "Ming " +0x8a7b: "E " +0x8a7c: "Hui " +0x8a7d: "Yan " +0x8a7e: "Xiong " +0x8a7f: "Gua " +0x8a80: "Er " +0x8a81: "Beng " +0x8a82: "Tiao " +0x8a83: "Chi " +0x8a84: "Lei " +0x8a85: "Zhu " +0x8a86: "Kuang " +0x8a87: "Kua " +0x8a88: "Wu " +0x8a89: "Yu " +0x8a8a: "Teng " +0x8a8b: "Ji " +0x8a8c: "Zhi " +0x8a8d: "Ren " +0x8a8e: "Su " +0x8a8f: "Lang " +0x8a90: "E " +0x8a91: "Kuang " +0x8a92: "E " +0x8a93: "Shi " +0x8a94: "Ting " +0x8a95: "Dan " +0x8a96: "Bo " +0x8a97: "Chan " +0x8a98: "You " +0x8a99: "Heng " +0x8a9a: "Qiao " +0x8a9b: "Qin " +0x8a9c: "Shua " +0x8a9d: "An " +0x8a9e: "Yu " +0x8a9f: "Xiao " +0x8aa0: "Cheng " +0x8aa1: "Jie " +0x8aa2: "Xian " +0x8aa3: "Wu " +0x8aa4: "Wu " +0x8aa5: "Gao " +0x8aa6: "Song " +0x8aa7: "Pu " +0x8aa8: "Hui " +0x8aa9: "Jing " +0x8aaa: "Shuo " +0x8aab: "Zhen " +0x8aac: "Shuo " +0x8aad: "Du " +0x8aae: "Yasashi " +0x8aaf: "Chang " +0x8ab0: "Shui " +0x8ab1: "Jie " +0x8ab2: "Ke " +0x8ab3: "Qu " +0x8ab4: "Cong " +0x8ab5: "Xiao " +0x8ab6: "Sui " +0x8ab7: "Wang " +0x8ab8: "Xuan " +0x8ab9: "Fei " +0x8aba: "Chi " +0x8abb: "Ta " +0x8abc: "Yi " +0x8abd: "Na " +0x8abe: "Yin " +0x8abf: "Diao " +0x8ac0: "Pi " +0x8ac1: "Chuo " +0x8ac2: "Chan " +0x8ac3: "Chen " +0x8ac4: "Zhun " +0x8ac5: "Ji " +0x8ac6: "Qi " +0x8ac7: "Tan " +0x8ac8: "Zhui " +0x8ac9: "Wei " +0x8aca: "Ju " +0x8acb: "Qing " +0x8acc: "Jian " +0x8acd: "Zheng " +0x8ace: "Ze " +0x8acf: "Zou " +0x8ad0: "Qian " +0x8ad1: "Zhuo " +0x8ad2: "Liang " +0x8ad3: "Jian " +0x8ad4: "Zhu " +0x8ad5: "Hao " +0x8ad6: "Lun " +0x8ad7: "Shen " +0x8ad8: "Biao " +0x8ad9: "Huai " +0x8ada: "Pian " +0x8adb: "Yu " +0x8adc: "Die " +0x8add: "Xu " +0x8ade: "Pian " +0x8adf: "Shi " +0x8ae0: "Xuan " +0x8ae1: "Shi " +0x8ae2: "Hun " +0x8ae3: "Hua " +0x8ae4: "E " +0x8ae5: "Zhong " +0x8ae6: "Di " +0x8ae7: "Xie " +0x8ae8: "Fu " +0x8ae9: "Pu " +0x8aea: "Ting " +0x8aeb: "Jian " +0x8aec: "Qi " +0x8aed: "Yu " +0x8aee: "Zi " +0x8aef: "Chuan " +0x8af0: "Xi " +0x8af1: "Hui " +0x8af2: "Yin " +0x8af3: "An " +0x8af4: "Xian " +0x8af5: "Nan " +0x8af6: "Chen " +0x8af7: "Feng " +0x8af8: "Zhu " +0x8af9: "Yang " +0x8afa: "Yan " +0x8afb: "Heng " +0x8afc: "Xuan " +0x8afd: "Ge " +0x8afe: "Nuo " +0x8aff: "Qi " +/* x08b */ +0x8b00: "Mou " +0x8b01: "Ye " +0x8b02: "Wei " +0x8b03: "[?] " +0x8b04: "Teng " +0x8b05: "Zou " +0x8b06: "Shan " +0x8b07: "Jian " +0x8b08: "Bo " +0x8b09: "Ku " +0x8b0a: "Huang " +0x8b0b: "Huo " +0x8b0c: "Ge " +0x8b0d: "Ying " +0x8b0e: "Mi " +0x8b0f: "Xiao " +0x8b10: "Mi " +0x8b11: "Xi " +0x8b12: "Qiang " +0x8b13: "Chen " +0x8b14: "Nue " +0x8b15: "Ti " +0x8b16: "Su " +0x8b17: "Bang " +0x8b18: "Chi " +0x8b19: "Qian " +0x8b1a: "Shi " +0x8b1b: "Jiang " +0x8b1c: "Yuan " +0x8b1d: "Xie " +0x8b1e: "Xue " +0x8b1f: "Tao " +0x8b20: "Yao " +0x8b21: "Yao " +0x8b22: "[?] " +0x8b23: "Yu " +0x8b24: "Biao " +0x8b25: "Cong " +0x8b26: "Qing " +0x8b27: "Li " +0x8b28: "Mo " +0x8b29: "Mo " +0x8b2a: "Shang " +0x8b2b: "Zhe " +0x8b2c: "Miu " +0x8b2d: "Jian " +0x8b2e: "Ze " +0x8b2f: "Jie " +0x8b30: "Lian " +0x8b31: "Lou " +0x8b32: "Can " +0x8b33: "Ou " +0x8b34: "Guan " +0x8b35: "Xi " +0x8b36: "Zhuo " +0x8b37: "Ao " +0x8b38: "Ao " +0x8b39: "Jin " +0x8b3a: "Zhe " +0x8b3b: "Yi " +0x8b3c: "Hu " +0x8b3d: "Jiang " +0x8b3e: "Man " +0x8b3f: "Chao " +0x8b40: "Han " +0x8b41: "Hua " +0x8b42: "Chan " +0x8b43: "Xu " +0x8b44: "Zeng " +0x8b45: "Se " +0x8b46: "Xi " +0x8b47: "She " +0x8b48: "Dui " +0x8b49: "Zheng " +0x8b4a: "Nao " +0x8b4b: "Lan " +0x8b4c: "E " +0x8b4d: "Ying " +0x8b4e: "Jue " +0x8b4f: "Ji " +0x8b50: "Zun " +0x8b51: "Jiao " +0x8b52: "Bo " +0x8b53: "Hui " +0x8b54: "Zhuan " +0x8b55: "Mu " +0x8b56: "Zen " +0x8b57: "Zha " +0x8b58: "Shi " +0x8b59: "Qiao " +0x8b5a: "Tan " +0x8b5b: "Zen " +0x8b5c: "Pu " +0x8b5d: "Sheng " +0x8b5e: "Xuan " +0x8b5f: "Zao " +0x8b60: "Tan " +0x8b61: "Dang " +0x8b62: "Sui " +0x8b63: "Qian " +0x8b64: "Ji " +0x8b65: "Jiao " +0x8b66: "Jing " +0x8b67: "Lian " +0x8b68: "Nou " +0x8b69: "Yi " +0x8b6a: "Ai " +0x8b6b: "Zhan " +0x8b6c: "Pi " +0x8b6d: "Hui " +0x8b6e: "Hua " +0x8b6f: "Yi " +0x8b70: "Yi " +0x8b71: "Shan " +0x8b72: "Rang " +0x8b73: "Nou " +0x8b74: "Qian " +0x8b75: "Zhui " +0x8b76: "Ta " +0x8b77: "Hu " +0x8b78: "Zhou " +0x8b79: "Hao " +0x8b7a: "Ye " +0x8b7b: "Ying " +0x8b7c: "Jian " +0x8b7d: "Yu " +0x8b7e: "Jian " +0x8b7f: "Hui " +0x8b80: "Du " +0x8b81: "Zhe " +0x8b82: "Xuan " +0x8b83: "Zan " +0x8b84: "Lei " +0x8b85: "Shen " +0x8b86: "Wei " +0x8b87: "Chan " +0x8b88: "Li " +0x8b89: "Yi " +0x8b8a: "Bian " +0x8b8b: "Zhe " +0x8b8c: "Yan " +0x8b8d: "E " +0x8b8e: "Chou " +0x8b8f: "Wei " +0x8b90: "Chou " +0x8b91: "Yao " +0x8b92: "Chan " +0x8b93: "Rang " +0x8b94: "Yin " +0x8b95: "Lan " +0x8b96: "Chen " +0x8b97: "Huo " +0x8b98: "Zhe " +0x8b99: "Huan " +0x8b9a: "Zan " +0x8b9b: "Yi " +0x8b9c: "Dang " +0x8b9d: "Zhan " +0x8b9e: "Yan " +0x8b9f: "Du " +0x8ba0: "Yan " +0x8ba1: "Ji " +0x8ba2: "Ding " +0x8ba3: "Fu " +0x8ba4: "Ren " +0x8ba5: "Ji " +0x8ba6: "Jie " +0x8ba7: "Hong " +0x8ba8: "Tao " +0x8ba9: "Rang " +0x8baa: "Shan " +0x8bab: "Qi " +0x8bac: "Tuo " +0x8bad: "Xun " +0x8bae: "Yi " +0x8baf: "Xun " +0x8bb0: "Ji " +0x8bb1: "Ren " +0x8bb2: "Jiang " +0x8bb3: "Hui " +0x8bb4: "Ou " +0x8bb5: "Ju " +0x8bb6: "Ya " +0x8bb7: "Ne " +0x8bb8: "Xu " +0x8bb9: "E " +0x8bba: "Lun " +0x8bbb: "Xiong " +0x8bbc: "Song " +0x8bbd: "Feng " +0x8bbe: "She " +0x8bbf: "Fang " +0x8bc0: "Jue " +0x8bc1: "Zheng " +0x8bc2: "Gu " +0x8bc3: "He " +0x8bc4: "Ping " +0x8bc5: "Zu " +0x8bc6: "Shi " +0x8bc7: "Xiong " +0x8bc8: "Zha " +0x8bc9: "Su " +0x8bca: "Zhen " +0x8bcb: "Di " +0x8bcc: "Zou " +0x8bcd: "Ci " +0x8bce: "Qu " +0x8bcf: "Zhao " +0x8bd0: "Bi " +0x8bd1: "Yi " +0x8bd2: "Yi " +0x8bd3: "Kuang " +0x8bd4: "Lei " +0x8bd5: "Shi " +0x8bd6: "Gua " +0x8bd7: "Shi " +0x8bd8: "Jie " +0x8bd9: "Hui " +0x8bda: "Cheng " +0x8bdb: "Zhu " +0x8bdc: "Shen " +0x8bdd: "Hua " +0x8bde: "Dan " +0x8bdf: "Gou " +0x8be0: "Quan " +0x8be1: "Gui " +0x8be2: "Xun " +0x8be3: "Yi " +0x8be4: "Zheng " +0x8be5: "Gai " +0x8be6: "Xiang " +0x8be7: "Cha " +0x8be8: "Hun " +0x8be9: "Xu " +0x8bea: "Zhou " +0x8beb: "Jie " +0x8bec: "Wu " +0x8bed: "Yu " +0x8bee: "Qiao " +0x8bef: "Wu " +0x8bf0: "Gao " +0x8bf1: "You " +0x8bf2: "Hui " +0x8bf3: "Kuang " +0x8bf4: "Shuo " +0x8bf5: "Song " +0x8bf6: "Ai " +0x8bf7: "Qing " +0x8bf8: "Zhu " +0x8bf9: "Zou " +0x8bfa: "Nuo " +0x8bfb: "Du " +0x8bfc: "Zhuo " +0x8bfd: "Fei " +0x8bfe: "Ke " +0x8bff: "Wei " +/* x08c */ +0x8c00: "Yu " +0x8c01: "Shui " +0x8c02: "Shen " +0x8c03: "Diao " +0x8c04: "Chan " +0x8c05: "Liang " +0x8c06: "Zhun " +0x8c07: "Sui " +0x8c08: "Tan " +0x8c09: "Shen " +0x8c0a: "Yi " +0x8c0b: "Mou " +0x8c0c: "Chen " +0x8c0d: "Die " +0x8c0e: "Huang " +0x8c0f: "Jian " +0x8c10: "Xie " +0x8c11: "Nue " +0x8c12: "Ye " +0x8c13: "Wei " +0x8c14: "E " +0x8c15: "Yu " +0x8c16: "Xuan " +0x8c17: "Chan " +0x8c18: "Zi " +0x8c19: "An " +0x8c1a: "Yan " +0x8c1b: "Di " +0x8c1c: "Mi " +0x8c1d: "Pian " +0x8c1e: "Xu " +0x8c1f: "Mo " +0x8c20: "Dang " +0x8c21: "Su " +0x8c22: "Xie " +0x8c23: "Yao " +0x8c24: "Bang " +0x8c25: "Shi " +0x8c26: "Qian " +0x8c27: "Mi " +0x8c28: "Jin " +0x8c29: "Man " +0x8c2a: "Zhe " +0x8c2b: "Jian " +0x8c2c: "Miu " +0x8c2d: "Tan " +0x8c2e: "Zen " +0x8c2f: "Qiao " +0x8c30: "Lan " +0x8c31: "Pu " +0x8c32: "Jue " +0x8c33: "Yan " +0x8c34: "Qian " +0x8c35: "Zhan " +0x8c36: "Chen " +0x8c37: "Gu " +0x8c38: "Qian " +0x8c39: "Hong " +0x8c3a: "Xia " +0x8c3b: "Jue " +0x8c3c: "Hong " +0x8c3d: "Han " +0x8c3e: "Hong " +0x8c3f: "Xi " +0x8c40: "Xi " +0x8c41: "Huo " +0x8c42: "Liao " +0x8c43: "Han " +0x8c44: "Du " +0x8c45: "Long " +0x8c46: "Dou " +0x8c47: "Jiang " +0x8c48: "Qi " +0x8c49: "Shi " +0x8c4a: "Li " +0x8c4b: "Deng " +0x8c4c: "Wan " +0x8c4d: "Bi " +0x8c4e: "Shu " +0x8c4f: "Xian " +0x8c50: "Feng " +0x8c51: "Zhi " +0x8c52: "Zhi " +0x8c53: "Yan " +0x8c54: "Yan " +0x8c55: "Shi " +0x8c56: "Chu " +0x8c57: "Hui " +0x8c58: "Tun " +0x8c59: "Yi " +0x8c5a: "Tun " +0x8c5b: "Yi " +0x8c5c: "Jian " +0x8c5d: "Ba " +0x8c5e: "Hou " +0x8c5f: "E " +0x8c60: "Cu " +0x8c61: "Xiang " +0x8c62: "Huan " +0x8c63: "Jian " +0x8c64: "Ken " +0x8c65: "Gai " +0x8c66: "Qu " +0x8c67: "Fu " +0x8c68: "Xi " +0x8c69: "Bin " +0x8c6a: "Hao " +0x8c6b: "Yu " +0x8c6c: "Zhu " +0x8c6d: "Jia " +0x8c6e: "[?] " +0x8c6f: "Xi " +0x8c70: "Bo " +0x8c71: "Wen " +0x8c72: "Huan " +0x8c73: "Bin " +0x8c74: "Di " +0x8c75: "Zong " +0x8c76: "Fen " +0x8c77: "Yi " +0x8c78: "Zhi " +0x8c79: "Bao " +0x8c7a: "Chai " +0x8c7b: "Han " +0x8c7c: "Pi " +0x8c7d: "Na " +0x8c7e: "Pi " +0x8c7f: "Gou " +0x8c80: "Na " +0x8c81: "You " +0x8c82: "Diao " +0x8c83: "Mo " +0x8c84: "Si " +0x8c85: "Xiu " +0x8c86: "Huan " +0x8c87: "Kun " +0x8c88: "He " +0x8c89: "He " +0x8c8a: "Mo " +0x8c8b: "Han " +0x8c8c: "Mao " +0x8c8d: "Li " +0x8c8e: "Ni " +0x8c8f: "Bi " +0x8c90: "Yu " +0x8c91: "Jia " +0x8c92: "Tuan " +0x8c93: "Mao " +0x8c94: "Pi " +0x8c95: "Xi " +0x8c96: "E " +0x8c97: "Ju " +0x8c98: "Mo " +0x8c99: "Chu " +0x8c9a: "Tan " +0x8c9b: "Huan " +0x8c9c: "Jue " +0x8c9d: "Bei " +0x8c9e: "Zhen " +0x8c9f: "Yuan " +0x8ca0: "Fu " +0x8ca1: "Cai " +0x8ca2: "Gong " +0x8ca3: "Te " +0x8ca4: "Yi " +0x8ca5: "Hang " +0x8ca6: "Wan " +0x8ca7: "Pin " +0x8ca8: "Huo " +0x8ca9: "Fan " +0x8caa: "Tan " +0x8cab: "Guan " +0x8cac: "Ze " +0x8cad: "Zhi " +0x8cae: "Er " +0x8caf: "Zhu " +0x8cb0: "Shi " +0x8cb1: "Bi " +0x8cb2: "Zi " +0x8cb3: "Er " +0x8cb4: "Gui " +0x8cb5: "Pian " +0x8cb6: "Bian " +0x8cb7: "Mai " +0x8cb8: "Dai " +0x8cb9: "Sheng " +0x8cba: "Kuang " +0x8cbb: "Fei " +0x8cbc: "Tie " +0x8cbd: "Yi " +0x8cbe: "Chi " +0x8cbf: "Mao " +0x8cc0: "He " +0x8cc1: "Bi " +0x8cc2: "Lu " +0x8cc3: "Ren " +0x8cc4: "Hui " +0x8cc5: "Gai " +0x8cc6: "Pian " +0x8cc7: "Zi " +0x8cc8: "Jia " +0x8cc9: "Xu " +0x8cca: "Zei " +0x8ccb: "Jiao " +0x8ccc: "Gai " +0x8ccd: "Zang " +0x8cce: "Jian " +0x8ccf: "Ying " +0x8cd0: "Xun " +0x8cd1: "Zhen " +0x8cd2: "She " +0x8cd3: "Bin " +0x8cd4: "Bin " +0x8cd5: "Qiu " +0x8cd6: "She " +0x8cd7: "Chuan " +0x8cd8: "Zang " +0x8cd9: "Zhou " +0x8cda: "Lai " +0x8cdb: "Zan " +0x8cdc: "Si " +0x8cdd: "Chen " +0x8cde: "Shang " +0x8cdf: "Tian " +0x8ce0: "Pei " +0x8ce1: "Geng " +0x8ce2: "Xian " +0x8ce3: "Mai " +0x8ce4: "Jian " +0x8ce5: "Sui " +0x8ce6: "Fu " +0x8ce7: "Tan " +0x8ce8: "Cong " +0x8ce9: "Cong " +0x8cea: "Zhi " +0x8ceb: "Ji " +0x8cec: "Zhang " +0x8ced: "Du " +0x8cee: "Jin " +0x8cef: "Xiong " +0x8cf0: "Shun " +0x8cf1: "Yun " +0x8cf2: "Bao " +0x8cf3: "Zai " +0x8cf4: "Lai " +0x8cf5: "Feng " +0x8cf6: "Cang " +0x8cf7: "Ji " +0x8cf8: "Sheng " +0x8cf9: "Ai " +0x8cfa: "Zhuan " +0x8cfb: "Fu " +0x8cfc: "Gou " +0x8cfd: "Sai " +0x8cfe: "Ze " +0x8cff: "Liao " +/* x08d */ +0x8d00: "Wei " +0x8d01: "Bai " +0x8d02: "Chen " +0x8d03: "Zhuan " +0x8d04: "Zhi " +0x8d05: "Zhui " +0x8d06: "Biao " +0x8d07: "Yun " +0x8d08: "Zeng " +0x8d09: "Tan " +0x8d0a: "Zan " +0x8d0b: "Yan " +0x8d0c: "[?] " +0x8d0d: "Shan " +0x8d0e: "Wan " +0x8d0f: "Ying " +0x8d10: "Jin " +0x8d11: "Gan " +0x8d12: "Xian " +0x8d13: "Zang " +0x8d14: "Bi " +0x8d15: "Du " +0x8d16: "Shu " +0x8d17: "Yan " +0x8d18: "[?] " +0x8d19: "Xuan " +0x8d1a: "Long " +0x8d1b: "Gan " +0x8d1c: "Zang " +0x8d1d: "Bei " +0x8d1e: "Zhen " +0x8d1f: "Fu " +0x8d20: "Yuan " +0x8d21: "Gong " +0x8d22: "Cai " +0x8d23: "Ze " +0x8d24: "Xian " +0x8d25: "Bai " +0x8d26: "Zhang " +0x8d27: "Huo " +0x8d28: "Zhi " +0x8d29: "Fan " +0x8d2a: "Tan " +0x8d2b: "Pin " +0x8d2c: "Bian " +0x8d2d: "Gou " +0x8d2e: "Zhu " +0x8d2f: "Guan " +0x8d30: "Er " +0x8d31: "Jian " +0x8d32: "Bi " +0x8d33: "Shi " +0x8d34: "Tie " +0x8d35: "Gui " +0x8d36: "Kuang " +0x8d37: "Dai " +0x8d38: "Mao " +0x8d39: "Fei " +0x8d3a: "He " +0x8d3b: "Yi " +0x8d3c: "Zei " +0x8d3d: "Zhi " +0x8d3e: "Jia " +0x8d3f: "Hui " +0x8d40: "Zi " +0x8d41: "Ren " +0x8d42: "Lu " +0x8d43: "Zang " +0x8d44: "Zi " +0x8d45: "Gai " +0x8d46: "Jin " +0x8d47: "Qiu " +0x8d48: "Zhen " +0x8d49: "Lai " +0x8d4a: "She " +0x8d4b: "Fu " +0x8d4c: "Du " +0x8d4d: "Ji " +0x8d4e: "Shu " +0x8d4f: "Shang " +0x8d50: "Si " +0x8d51: "Bi " +0x8d52: "Zhou " +0x8d53: "Geng " +0x8d54: "Pei " +0x8d55: "Tan " +0x8d56: "Lai " +0x8d57: "Feng " +0x8d58: "Zhui " +0x8d59: "Fu " +0x8d5a: "Zhuan " +0x8d5b: "Sai " +0x8d5c: "Ze " +0x8d5d: "Yan " +0x8d5e: "Zan " +0x8d5f: "Yun " +0x8d60: "Zeng " +0x8d61: "Shan " +0x8d62: "Ying " +0x8d63: "Gan " +0x8d64: "Chi " +0x8d65: "Xi " +0x8d66: "She " +0x8d67: "Nan " +0x8d68: "Xiong " +0x8d69: "Xi " +0x8d6a: "Cheng " +0x8d6b: "He " +0x8d6c: "Cheng " +0x8d6d: "Zhe " +0x8d6e: "Xia " +0x8d6f: "Tang " +0x8d70: "Zou " +0x8d71: "Zou " +0x8d72: "Li " +0x8d73: "Jiu " +0x8d74: "Fu " +0x8d75: "Zhao " +0x8d76: "Gan " +0x8d77: "Qi " +0x8d78: "Shan " +0x8d79: "Qiong " +0x8d7a: "Qin " +0x8d7b: "Xian " +0x8d7c: "Ci " +0x8d7d: "Jue " +0x8d7e: "Qin " +0x8d7f: "Chi " +0x8d80: "Ci " +0x8d81: "Chen " +0x8d82: "Chen " +0x8d83: "Die " +0x8d84: "Ju " +0x8d85: "Chao " +0x8d86: "Di " +0x8d87: "Se " +0x8d88: "Zhan " +0x8d89: "Zhu " +0x8d8a: "Yue " +0x8d8b: "Qu " +0x8d8c: "Jie " +0x8d8d: "Chi " +0x8d8e: "Chu " +0x8d8f: "Gua " +0x8d90: "Xue " +0x8d91: "Ci " +0x8d92: "Tiao " +0x8d93: "Duo " +0x8d94: "Lie " +0x8d95: "Gan " +0x8d96: "Suo " +0x8d97: "Cu " +0x8d98: "Xi " +0x8d99: "Zhao " +0x8d9a: "Su " +0x8d9b: "Yin " +0x8d9c: "Ju " +0x8d9d: "Jian " +0x8d9e: "Que " +0x8d9f: "Tang " +0x8da0: "Chuo " +0x8da1: "Cui " +0x8da2: "Lu " +0x8da3: "Qu " +0x8da4: "Dang " +0x8da5: "Qiu " +0x8da6: "Zi " +0x8da7: "Ti " +0x8da8: "Qu " +0x8da9: "Chi " +0x8daa: "Huang " +0x8dab: "Qiao " +0x8dac: "Qiao " +0x8dad: "Yao " +0x8dae: "Zao " +0x8daf: "Ti " +0x8db0: "[?] " +0x8db1: "Zan " +0x8db2: "Zan " +0x8db3: "Zu " +0x8db4: "Pa " +0x8db5: "Bao " +0x8db6: "Ku " +0x8db7: "Ke " +0x8db8: "Dun " +0x8db9: "Jue " +0x8dba: "Fu " +0x8dbb: "Chen " +0x8dbc: "Jian " +0x8dbd: "Fang " +0x8dbe: "Zhi " +0x8dbf: "Sa " +0x8dc0: "Yue " +0x8dc1: "Pa " +0x8dc2: "Qi " +0x8dc3: "Yue " +0x8dc4: "Qiang " +0x8dc5: "Tuo " +0x8dc6: "Tai " +0x8dc7: "Yi " +0x8dc8: "Nian " +0x8dc9: "Ling " +0x8dca: "Mei " +0x8dcb: "Ba " +0x8dcc: "Die " +0x8dcd: "Ku " +0x8dce: "Tuo " +0x8dcf: "Jia " +0x8dd0: "Ci " +0x8dd1: "Pao " +0x8dd2: "Qia " +0x8dd3: "Zhu " +0x8dd4: "Ju " +0x8dd5: "Die " +0x8dd6: "Zhi " +0x8dd7: "Fu " +0x8dd8: "Pan " +0x8dd9: "Ju " +0x8dda: "Shan " +0x8ddb: "Bo " +0x8ddc: "Ni " +0x8ddd: "Ju " +0x8dde: "Li " +0x8ddf: "Gen " +0x8de0: "Yi " +0x8de1: "Ji " +0x8de2: "Dai " +0x8de3: "Xian " +0x8de4: "Jiao " +0x8de5: "Duo " +0x8de6: "Zhu " +0x8de7: "Zhuan " +0x8de8: "Kua " +0x8de9: "Zhuai " +0x8dea: "Gui " +0x8deb: "Qiong " +0x8dec: "Kui " +0x8ded: "Xiang " +0x8dee: "Chi " +0x8def: "Lu " +0x8df0: "Beng " +0x8df1: "Zhi " +0x8df2: "Jia " +0x8df3: "Tiao " +0x8df4: "Cai " +0x8df5: "Jian " +0x8df6: "Ta " +0x8df7: "Qiao " +0x8df8: "Bi " +0x8df9: "Xian " +0x8dfa: "Duo " +0x8dfb: "Ji " +0x8dfc: "Ju " +0x8dfd: "Ji " +0x8dfe: "Shu " +0x8dff: "Tu " +/* x08e */ +0x8e00: "Chu " +0x8e01: "Jing " +0x8e02: "Nie " +0x8e03: "Xiao " +0x8e04: "Bo " +0x8e05: "Chi " +0x8e06: "Qun " +0x8e07: "Mou " +0x8e08: "Shu " +0x8e09: "Lang " +0x8e0a: "Yong " +0x8e0b: "Jiao " +0x8e0c: "Chou " +0x8e0d: "Qiao " +0x8e0e: "[?] " +0x8e0f: "Ta " +0x8e10: "Jian " +0x8e11: "Qi " +0x8e12: "Wo " +0x8e13: "Wei " +0x8e14: "Zhuo " +0x8e15: "Jie " +0x8e16: "Ji " +0x8e17: "Nie " +0x8e18: "Ju " +0x8e19: "Ju " +0x8e1a: "Lun " +0x8e1b: "Lu " +0x8e1c: "Leng " +0x8e1d: "Huai " +0x8e1e: "Ju " +0x8e1f: "Chi " +0x8e20: "Wan " +0x8e21: "Quan " +0x8e22: "Ti " +0x8e23: "Bo " +0x8e24: "Zu " +0x8e25: "Qie " +0x8e26: "Ji " +0x8e27: "Cu " +0x8e28: "Zong " +0x8e29: "Cai " +0x8e2a: "Zong " +0x8e2b: "Peng " +0x8e2c: "Zhi " +0x8e2d: "Zheng " +0x8e2e: "Dian " +0x8e2f: "Zhi " +0x8e30: "Yu " +0x8e31: "Duo " +0x8e32: "Dun " +0x8e33: "Chun " +0x8e34: "Yong " +0x8e35: "Zhong " +0x8e36: "Di " +0x8e37: "Zhe " +0x8e38: "Chen " +0x8e39: "Chuai " +0x8e3a: "Jian " +0x8e3b: "Gua " +0x8e3c: "Tang " +0x8e3d: "Ju " +0x8e3e: "Fu " +0x8e3f: "Zu " +0x8e40: "Die " +0x8e41: "Pian " +0x8e42: "Rou " +0x8e43: "Nuo " +0x8e44: "Ti " +0x8e45: "Cha " +0x8e46: "Tui " +0x8e47: "Jian " +0x8e48: "Dao " +0x8e49: "Cuo " +0x8e4a: "Xi " +0x8e4b: "Ta " +0x8e4c: "Qiang " +0x8e4d: "Zhan " +0x8e4e: "Dian " +0x8e4f: "Ti " +0x8e50: "Ji " +0x8e51: "Nie " +0x8e52: "Man " +0x8e53: "Liu " +0x8e54: "Zhan " +0x8e55: "Bi " +0x8e56: "Chong " +0x8e57: "Lu " +0x8e58: "Liao " +0x8e59: "Cu " +0x8e5a: "Tang " +0x8e5b: "Dai " +0x8e5c: "Suo " +0x8e5d: "Xi " +0x8e5e: "Kui " +0x8e5f: "Ji " +0x8e60: "Zhi " +0x8e61: "Qiang " +0x8e62: "Di " +0x8e63: "Man " +0x8e64: "Zong " +0x8e65: "Lian " +0x8e66: "Beng " +0x8e67: "Zao " +0x8e68: "Nian " +0x8e69: "Bie " +0x8e6a: "Tui " +0x8e6b: "Ju " +0x8e6c: "Deng " +0x8e6d: "Ceng " +0x8e6e: "Xian " +0x8e6f: "Fan " +0x8e70: "Chu " +0x8e71: "Zhong " +0x8e72: "Dun " +0x8e73: "Bo " +0x8e74: "Cu " +0x8e75: "Zu " +0x8e76: "Jue " +0x8e77: "Jue " +0x8e78: "Lin " +0x8e79: "Ta " +0x8e7a: "Qiao " +0x8e7b: "Qiao " +0x8e7c: "Pu " +0x8e7d: "Liao " +0x8e7e: "Dun " +0x8e7f: "Cuan " +0x8e80: "Kuang " +0x8e81: "Zao " +0x8e82: "Ta " +0x8e83: "Bi " +0x8e84: "Bi " +0x8e85: "Zhu " +0x8e86: "Ju " +0x8e87: "Chu " +0x8e88: "Qiao " +0x8e89: "Dun " +0x8e8a: "Chou " +0x8e8b: "Ji " +0x8e8c: "Wu " +0x8e8d: "Yue " +0x8e8e: "Nian " +0x8e8f: "Lin " +0x8e90: "Lie " +0x8e91: "Zhi " +0x8e92: "Li " +0x8e93: "Zhi " +0x8e94: "Chan " +0x8e95: "Chu " +0x8e96: "Duan " +0x8e97: "Wei " +0x8e98: "Long " +0x8e99: "Lin " +0x8e9a: "Xian " +0x8e9b: "Wei " +0x8e9c: "Zuan " +0x8e9d: "Lan " +0x8e9e: "Xie " +0x8e9f: "Rang " +0x8ea0: "Xie " +0x8ea1: "Nie " +0x8ea2: "Ta " +0x8ea3: "Qu " +0x8ea4: "Jie " +0x8ea5: "Cuan " +0x8ea6: "Zuan " +0x8ea7: "Xi " +0x8ea8: "Kui " +0x8ea9: "Jue " +0x8eaa: "Lin " +0x8eab: "Shen " +0x8eac: "Gong " +0x8ead: "Dan " +0x8eae: "Segare " +0x8eaf: "Qu " +0x8eb0: "Ti " +0x8eb1: "Duo " +0x8eb2: "Duo " +0x8eb3: "Gong " +0x8eb4: "Lang " +0x8eb5: "Nerau " +0x8eb6: "Luo " +0x8eb7: "Ai " +0x8eb8: "Ji " +0x8eb9: "Ju " +0x8eba: "Tang " +0x8ebb: "Utsuke " +0x8ebc: "[?] " +0x8ebd: "Yan " +0x8ebe: "Shitsuke " +0x8ebf: "Kang " +0x8ec0: "Qu " +0x8ec1: "Lou " +0x8ec2: "Lao " +0x8ec3: "Tuo " +0x8ec4: "Zhi " +0x8ec5: "Yagate " +0x8ec6: "Ti " +0x8ec7: "Dao " +0x8ec8: "Yagate " +0x8ec9: "Yu " +0x8eca: "Che " +0x8ecb: "Ya " +0x8ecc: "Gui " +0x8ecd: "Jun " +0x8ece: "Wei " +0x8ecf: "Yue " +0x8ed0: "Xin " +0x8ed1: "Di " +0x8ed2: "Xuan " +0x8ed3: "Fan " +0x8ed4: "Ren " +0x8ed5: "Shan " +0x8ed6: "Qiang " +0x8ed7: "Shu " +0x8ed8: "Tun " +0x8ed9: "Chen " +0x8eda: "Dai " +0x8edb: "E " +0x8edc: "Na " +0x8edd: "Qi " +0x8ede: "Mao " +0x8edf: "Ruan " +0x8ee0: "Ren " +0x8ee1: "Fan " +0x8ee2: "Zhuan " +0x8ee3: "Hong " +0x8ee4: "Hu " +0x8ee5: "Qu " +0x8ee6: "Huang " +0x8ee7: "Di " +0x8ee8: "Ling " +0x8ee9: "Dai " +0x8eea: "Ao " +0x8eeb: "Zhen " +0x8eec: "Fan " +0x8eed: "Kuang " +0x8eee: "Ang " +0x8eef: "Peng " +0x8ef0: "Bei " +0x8ef1: "Gu " +0x8ef2: "Ku " +0x8ef3: "Pao " +0x8ef4: "Zhu " +0x8ef5: "Rong " +0x8ef6: "E " +0x8ef7: "Ba " +0x8ef8: "Zhou " +0x8ef9: "Zhi " +0x8efa: "Yao " +0x8efb: "Ke " +0x8efc: "Yi " +0x8efd: "Qing " +0x8efe: "Shi " +0x8eff: "Ping " +/* x08f */ +0x8f00: "Er " +0x8f01: "Qiong " +0x8f02: "Ju " +0x8f03: "Jiao " +0x8f04: "Guang " +0x8f05: "Lu " +0x8f06: "Kai " +0x8f07: "Quan " +0x8f08: "Zhou " +0x8f09: "Zai " +0x8f0a: "Zhi " +0x8f0b: "She " +0x8f0c: "Liang " +0x8f0d: "Yu " +0x8f0e: "Shao " +0x8f0f: "You " +0x8f10: "Huan " +0x8f11: "Yun " +0x8f12: "Zhe " +0x8f13: "Wan " +0x8f14: "Fu " +0x8f15: "Qing " +0x8f16: "Zhou " +0x8f17: "Ni " +0x8f18: "Ling " +0x8f19: "Zhe " +0x8f1a: "Zhan " +0x8f1b: "Liang " +0x8f1c: "Zi " +0x8f1d: "Hui " +0x8f1e: "Wang " +0x8f1f: "Chuo " +0x8f20: "Guo " +0x8f21: "Kan " +0x8f22: "Yi " +0x8f23: "Peng " +0x8f24: "Qian " +0x8f25: "Gun " +0x8f26: "Nian " +0x8f27: "Pian " +0x8f28: "Guan " +0x8f29: "Bei " +0x8f2a: "Lun " +0x8f2b: "Pai " +0x8f2c: "Liang " +0x8f2d: "Ruan " +0x8f2e: "Rou " +0x8f2f: "Ji " +0x8f30: "Yang " +0x8f31: "Xian " +0x8f32: "Chuan " +0x8f33: "Cou " +0x8f34: "Qun " +0x8f35: "Ge " +0x8f36: "You " +0x8f37: "Hong " +0x8f38: "Shu " +0x8f39: "Fu " +0x8f3a: "Zi " +0x8f3b: "Fu " +0x8f3c: "Wen " +0x8f3d: "Ben " +0x8f3e: "Zhan " +0x8f3f: "Yu " +0x8f40: "Wen " +0x8f41: "Tao " +0x8f42: "Gu " +0x8f43: "Zhen " +0x8f44: "Xia " +0x8f45: "Yuan " +0x8f46: "Lu " +0x8f47: "Jiu " +0x8f48: "Chao " +0x8f49: "Zhuan " +0x8f4a: "Wei " +0x8f4b: "Hun " +0x8f4c: "Sori " +0x8f4d: "Che " +0x8f4e: "Jiao " +0x8f4f: "Zhan " +0x8f50: "Pu " +0x8f51: "Lao " +0x8f52: "Fen " +0x8f53: "Fan " +0x8f54: "Lin " +0x8f55: "Ge " +0x8f56: "Se " +0x8f57: "Kan " +0x8f58: "Huan " +0x8f59: "Yi " +0x8f5a: "Ji " +0x8f5b: "Dui " +0x8f5c: "Er " +0x8f5d: "Yu " +0x8f5e: "Xian " +0x8f5f: "Hong " +0x8f60: "Lei " +0x8f61: "Pei " +0x8f62: "Li " +0x8f63: "Li " +0x8f64: "Lu " +0x8f65: "Lin " +0x8f66: "Che " +0x8f67: "Ya " +0x8f68: "Gui " +0x8f69: "Xuan " +0x8f6a: "Di " +0x8f6b: "Ren " +0x8f6c: "Zhuan " +0x8f6d: "E " +0x8f6e: "Lun " +0x8f6f: "Ruan " +0x8f70: "Hong " +0x8f71: "Ku " +0x8f72: "Ke " +0x8f73: "Lu " +0x8f74: "Zhou " +0x8f75: "Zhi " +0x8f76: "Yi " +0x8f77: "Hu " +0x8f78: "Zhen " +0x8f79: "Li " +0x8f7a: "Yao " +0x8f7b: "Qing " +0x8f7c: "Shi " +0x8f7d: "Zai " +0x8f7e: "Zhi " +0x8f7f: "Jiao " +0x8f80: "Zhou " +0x8f81: "Quan " +0x8f82: "Lu " +0x8f83: "Jiao " +0x8f84: "Zhe " +0x8f85: "Fu " +0x8f86: "Liang " +0x8f87: "Nian " +0x8f88: "Bei " +0x8f89: "Hui " +0x8f8a: "Gun " +0x8f8b: "Wang " +0x8f8c: "Liang " +0x8f8d: "Chuo " +0x8f8e: "Zi " +0x8f8f: "Cou " +0x8f90: "Fu " +0x8f91: "Ji " +0x8f92: "Wen " +0x8f93: "Shu " +0x8f94: "Pei " +0x8f95: "Yuan " +0x8f96: "Xia " +0x8f97: "Zhan " +0x8f98: "Lu " +0x8f99: "Che " +0x8f9a: "Lin " +0x8f9b: "Xin " +0x8f9c: "Gu " +0x8f9d: "Ci " +0x8f9e: "Ci " +0x8f9f: "Pi " +0x8fa0: "Zui " +0x8fa1: "Bian " +0x8fa2: "La " +0x8fa3: "La " +0x8fa4: "Ci " +0x8fa5: "Xue " +0x8fa6: "Ban " +0x8fa7: "Bian " +0x8fa8: "Bian " +0x8fa9: "Bian " +0x8faa: "[?] " +0x8fab: "Bian " +0x8fac: "Ban " +0x8fad: "Ci " +0x8fae: "Bian " +0x8faf: "Bian " +0x8fb0: "Chen " +0x8fb1: "Ru " +0x8fb2: "Nong " +0x8fb3: "Nong " +0x8fb4: "Zhen " +0x8fb5: "Chuo " +0x8fb6: "Chuo " +0x8fb7: "Suberu " +0x8fb8: "Reng " +0x8fb9: "Bian " +0x8fba: "Bian " +0x8fbb: "Sip " +0x8fbc: "Ip " +0x8fbd: "Liao " +0x8fbe: "Da " +0x8fbf: "Chan " +0x8fc0: "Gan " +0x8fc1: "Qian " +0x8fc2: "Yu " +0x8fc3: "Yu " +0x8fc4: "Qi " +0x8fc5: "Xun " +0x8fc6: "Yi " +0x8fc7: "Guo " +0x8fc8: "Mai " +0x8fc9: "Qi " +0x8fca: "Za " +0x8fcb: "Wang " +0x8fcc: "Jia " +0x8fcd: "Zhun " +0x8fce: "Ying " +0x8fcf: "Ti " +0x8fd0: "Yun " +0x8fd1: "Jin " +0x8fd2: "Hang " +0x8fd3: "Ya " +0x8fd4: "Fan " +0x8fd5: "Wu " +0x8fd6: "Da " +0x8fd7: "E " +0x8fd8: "Huan " +0x8fd9: "Zhe " +0x8fda: "Totemo " +0x8fdb: "Jin " +0x8fdc: "Yuan " +0x8fdd: "Wei " +0x8fde: "Lian " +0x8fdf: "Chi " +0x8fe0: "Che " +0x8fe1: "Ni " +0x8fe2: "Tiao " +0x8fe3: "Zhi " +0x8fe4: "Yi " +0x8fe5: "Jiong " +0x8fe6: "Jia " +0x8fe7: "Chen " +0x8fe8: "Dai " +0x8fe9: "Er " +0x8fea: "Di " +0x8feb: "Po " +0x8fec: "Wang " +0x8fed: "Die " +0x8fee: "Ze " +0x8fef: "Tao " +0x8ff0: "Shu " +0x8ff1: "Tuo " +0x8ff2: "Kep " +0x8ff3: "Jing " +0x8ff4: "Hui " +0x8ff5: "Tong " +0x8ff6: "You " +0x8ff7: "Mi " +0x8ff8: "Beng " +0x8ff9: "Ji " +0x8ffa: "Nai " +0x8ffb: "Yi " +0x8ffc: "Jie " +0x8ffd: "Zhui " +0x8ffe: "Lie " +0x8fff: "Xun " +/* x090 */ +0x9000: "Tui " +0x9001: "Song " +0x9002: "Gua " +0x9003: "Tao " +0x9004: "Pang " +0x9005: "Hou " +0x9006: "Ni " +0x9007: "Dun " +0x9008: "Jiong " +0x9009: "Xuan " +0x900a: "Xun " +0x900b: "Bu " +0x900c: "You " +0x900d: "Xiao " +0x900e: "Qiu " +0x900f: "Tou " +0x9010: "Zhu " +0x9011: "Qiu " +0x9012: "Di " +0x9013: "Di " +0x9014: "Tu " +0x9015: "Jing " +0x9016: "Ti " +0x9017: "Dou " +0x9018: "Yi " +0x9019: "Zhe " +0x901a: "Tong " +0x901b: "Guang " +0x901c: "Wu " +0x901d: "Shi " +0x901e: "Cheng " +0x901f: "Su " +0x9020: "Zao " +0x9021: "Qun " +0x9022: "Feng " +0x9023: "Lian " +0x9024: "Suo " +0x9025: "Hui " +0x9026: "Li " +0x9027: "Sako " +0x9028: "Lai " +0x9029: "Ben " +0x902a: "Cuo " +0x902b: "Jue " +0x902c: "Beng " +0x902d: "Huan " +0x902e: "Dai " +0x902f: "Lu " +0x9030: "You " +0x9031: "Zhou " +0x9032: "Jin " +0x9033: "Yu " +0x9034: "Chuo " +0x9035: "Kui " +0x9036: "Wei " +0x9037: "Ti " +0x9038: "Yi " +0x9039: "Da " +0x903a: "Yuan " +0x903b: "Luo " +0x903c: "Bi " +0x903d: "Nuo " +0x903e: "Yu " +0x903f: "Dang " +0x9040: "Sui " +0x9041: "Dun " +0x9042: "Sui " +0x9043: "Yan " +0x9044: "Chuan " +0x9045: "Chi " +0x9046: "Ti " +0x9047: "Yu " +0x9048: "Shi " +0x9049: "Zhen " +0x904a: "You " +0x904b: "Yun " +0x904c: "E " +0x904d: "Bian " +0x904e: "Guo " +0x904f: "E " +0x9050: "Xia " +0x9051: "Huang " +0x9052: "Qiu " +0x9053: "Dao " +0x9054: "Da " +0x9055: "Wei " +0x9056: "Appare " +0x9057: "Yi " +0x9058: "Gou " +0x9059: "Yao " +0x905a: "Chu " +0x905b: "Liu " +0x905c: "Xun " +0x905d: "Ta " +0x905e: "Di " +0x905f: "Chi " +0x9060: "Yuan " +0x9061: "Su " +0x9062: "Ta " +0x9063: "Qian " +0x9064: "[?] " +0x9065: "Yao " +0x9066: "Guan " +0x9067: "Zhang " +0x9068: "Ao " +0x9069: "Shi " +0x906a: "Ce " +0x906b: "Chi " +0x906c: "Su " +0x906d: "Zao " +0x906e: "Zhe " +0x906f: "Dun " +0x9070: "Di " +0x9071: "Lou " +0x9072: "Chi " +0x9073: "Cuo " +0x9074: "Lin " +0x9075: "Zun " +0x9076: "Rao " +0x9077: "Qian " +0x9078: "Xuan " +0x9079: "Yu " +0x907a: "Yi " +0x907b: "Wu " +0x907c: "Liao " +0x907d: "Ju " +0x907e: "Shi " +0x907f: "Bi " +0x9080: "Yao " +0x9081: "Mai " +0x9082: "Xie " +0x9083: "Sui " +0x9084: "Huan " +0x9085: "Zhan " +0x9086: "Teng " +0x9087: "Er " +0x9088: "Miao " +0x9089: "Bian " +0x908a: "Bian " +0x908b: "La " +0x908c: "Li " +0x908d: "Yuan " +0x908e: "Yao " +0x908f: "Luo " +0x9090: "Li " +0x9091: "Yi " +0x9092: "Ting " +0x9093: "Deng " +0x9094: "Qi " +0x9095: "Yong " +0x9096: "Shan " +0x9097: "Han " +0x9098: "Yu " +0x9099: "Mang " +0x909a: "Ru " +0x909b: "Qiong " +0x909c: "[?] " +0x909d: "Kuang " +0x909e: "Fu " +0x909f: "Kang " +0x90a0: "Bin " +0x90a1: "Fang " +0x90a2: "Xing " +0x90a3: "Na " +0x90a4: "Xin " +0x90a5: "Shen " +0x90a6: "Bang " +0x90a7: "Yuan " +0x90a8: "Cun " +0x90a9: "Huo " +0x90aa: "Xie " +0x90ab: "Bang " +0x90ac: "Wu " +0x90ad: "Ju " +0x90ae: "You " +0x90af: "Han " +0x90b0: "Tai " +0x90b1: "Qiu " +0x90b2: "Bi " +0x90b3: "Pei " +0x90b4: "Bing " +0x90b5: "Shao " +0x90b6: "Bei " +0x90b7: "Wa " +0x90b8: "Di " +0x90b9: "Zou " +0x90ba: "Ye " +0x90bb: "Lin " +0x90bc: "Kuang " +0x90bd: "Gui " +0x90be: "Zhu " +0x90bf: "Shi " +0x90c0: "Ku " +0x90c1: "Yu " +0x90c2: "Gai " +0x90c3: "Ge " +0x90c4: "Xi " +0x90c5: "Zhi " +0x90c6: "Ji " +0x90c7: "Xun " +0x90c8: "Hou " +0x90c9: "Xing " +0x90ca: "Jiao " +0x90cb: "Xi " +0x90cc: "Gui " +0x90cd: "Nuo " +0x90ce: "Lang " +0x90cf: "Jia " +0x90d0: "Kuai " +0x90d1: "Zheng " +0x90d2: "Otoko " +0x90d3: "Yun " +0x90d4: "Yan " +0x90d5: "Cheng " +0x90d6: "Dou " +0x90d7: "Chi " +0x90d8: "Lu " +0x90d9: "Fu " +0x90da: "Wu " +0x90db: "Fu " +0x90dc: "Gao " +0x90dd: "Hao " +0x90de: "Lang " +0x90df: "Jia " +0x90e0: "Geng " +0x90e1: "Jun " +0x90e2: "Ying " +0x90e3: "Bo " +0x90e4: "Xi " +0x90e5: "Bei " +0x90e6: "Li " +0x90e7: "Yun " +0x90e8: "Bu " +0x90e9: "Xiao " +0x90ea: "Qi " +0x90eb: "Pi " +0x90ec: "Qing " +0x90ed: "Guo " +0x90ee: "Zhou " +0x90ef: "Tan " +0x90f0: "Zou " +0x90f1: "Ping " +0x90f2: "Lai " +0x90f3: "Ni " +0x90f4: "Chen " +0x90f5: "You " +0x90f6: "Bu " +0x90f7: "Xiang " +0x90f8: "Dan " +0x90f9: "Ju " +0x90fa: "Yong " +0x90fb: "Qiao " +0x90fc: "Yi " +0x90fd: "Du " +0x90fe: "Yan " +0x90ff: "Mei " +/* x091 */ +0x9100: "Ruo " +0x9101: "Bei " +0x9102: "E " +0x9103: "Yu " +0x9104: "Juan " +0x9105: "Yu " +0x9106: "Yun " +0x9107: "Hou " +0x9108: "Kui " +0x9109: "Xiang " +0x910a: "Xiang " +0x910b: "Sou " +0x910c: "Tang " +0x910d: "Ming " +0x910e: "Xi " +0x910f: "Ru " +0x9110: "Chu " +0x9111: "Zi " +0x9112: "Zou " +0x9113: "Ju " +0x9114: "Wu " +0x9115: "Xiang " +0x9116: "Yun " +0x9117: "Hao " +0x9118: "Yong " +0x9119: "Bi " +0x911a: "Mo " +0x911b: "Chao " +0x911c: "Fu " +0x911d: "Liao " +0x911e: "Yin " +0x911f: "Zhuan " +0x9120: "Hu " +0x9121: "Qiao " +0x9122: "Yan " +0x9123: "Zhang " +0x9124: "Fan " +0x9125: "Qiao " +0x9126: "Xu " +0x9127: "Deng " +0x9128: "Bi " +0x9129: "Xin " +0x912a: "Bi " +0x912b: "Ceng " +0x912c: "Wei " +0x912d: "Zheng " +0x912e: "Mao " +0x912f: "Shan " +0x9130: "Lin " +0x9131: "Po " +0x9132: "Dan " +0x9133: "Meng " +0x9134: "Ye " +0x9135: "Cao " +0x9136: "Kuai " +0x9137: "Feng " +0x9138: "Meng " +0x9139: "Zou " +0x913a: "Kuang " +0x913b: "Lian " +0x913c: "Zan " +0x913d: "Chan " +0x913e: "You " +0x913f: "Qi " +0x9140: "Yan " +0x9141: "Chan " +0x9142: "Zan " +0x9143: "Ling " +0x9144: "Huan " +0x9145: "Xi " +0x9146: "Feng " +0x9147: "Zan " +0x9148: "Li " +0x9149: "You " +0x914a: "Ding " +0x914b: "Qiu " +0x914c: "Zhuo " +0x914d: "Pei " +0x914e: "Zhou " +0x914f: "Yi " +0x9150: "Hang " +0x9151: "Yu " +0x9152: "Jiu " +0x9153: "Yan " +0x9154: "Zui " +0x9155: "Mao " +0x9156: "Dan " +0x9157: "Xu " +0x9158: "Tou " +0x9159: "Zhen " +0x915a: "Fen " +0x915b: "Sakenomoto " +0x915c: "[?] " +0x915d: "Yun " +0x915e: "Tai " +0x915f: "Tian " +0x9160: "Qia " +0x9161: "Tuo " +0x9162: "Zuo " +0x9163: "Han " +0x9164: "Gu " +0x9165: "Su " +0x9166: "Po " +0x9167: "Chou " +0x9168: "Zai " +0x9169: "Ming " +0x916a: "Luo " +0x916b: "Chuo " +0x916c: "Chou " +0x916d: "You " +0x916e: "Tong " +0x916f: "Zhi " +0x9170: "Xian " +0x9171: "Jiang " +0x9172: "Cheng " +0x9173: "Yin " +0x9174: "Tu " +0x9175: "Xiao " +0x9176: "Mei " +0x9177: "Ku " +0x9178: "Suan " +0x9179: "Lei " +0x917a: "Pu " +0x917b: "Zui " +0x917c: "Hai " +0x917d: "Yan " +0x917e: "Xi " +0x917f: "Niang " +0x9180: "Wei " +0x9181: "Lu " +0x9182: "Lan " +0x9183: "Yan " +0x9184: "Tao " +0x9185: "Pei " +0x9186: "Zhan " +0x9187: "Chun " +0x9188: "Tan " +0x9189: "Zui " +0x918a: "Chuo " +0x918b: "Cu " +0x918c: "Kun " +0x918d: "Ti " +0x918e: "Mian " +0x918f: "Du " +0x9190: "Hu " +0x9191: "Xu " +0x9192: "Xing " +0x9193: "Tan " +0x9194: "Jiu " +0x9195: "Chun " +0x9196: "Yun " +0x9197: "Po " +0x9198: "Ke " +0x9199: "Sou " +0x919a: "Mi " +0x919b: "Quan " +0x919c: "Chou " +0x919d: "Cuo " +0x919e: "Yun " +0x919f: "Yong " +0x91a0: "Ang " +0x91a1: "Zha " +0x91a2: "Hai " +0x91a3: "Tang " +0x91a4: "Jiang " +0x91a5: "Piao " +0x91a6: "Shan " +0x91a7: "Yu " +0x91a8: "Li " +0x91a9: "Zao " +0x91aa: "Lao " +0x91ab: "Yi " +0x91ac: "Jiang " +0x91ad: "Pu " +0x91ae: "Jiao " +0x91af: "Xi " +0x91b0: "Tan " +0x91b1: "Po " +0x91b2: "Nong " +0x91b3: "Yi " +0x91b4: "Li " +0x91b5: "Ju " +0x91b6: "Jiao " +0x91b7: "Yi " +0x91b8: "Niang " +0x91b9: "Ru " +0x91ba: "Xun " +0x91bb: "Chou " +0x91bc: "Yan " +0x91bd: "Ling " +0x91be: "Mi " +0x91bf: "Mi " +0x91c0: "Niang " +0x91c1: "Xin " +0x91c2: "Jiao " +0x91c3: "Xi " +0x91c4: "Mi " +0x91c5: "Yan " +0x91c6: "Bian " +0x91c7: "Cai " +0x91c8: "Shi " +0x91c9: "You " +0x91ca: "Shi " +0x91cb: "Shi " +0x91cc: "Li " +0x91cd: "Zhong " +0x91ce: "Ye " +0x91cf: "Liang " +0x91d0: "Li " +0x91d1: "Jin " +0x91d2: "Jin " +0x91d3: "Qiu " +0x91d4: "Yi " +0x91d5: "Diao " +0x91d6: "Dao " +0x91d7: "Zhao " +0x91d8: "Ding " +0x91d9: "Po " +0x91da: "Qiu " +0x91db: "He " +0x91dc: "Fu " +0x91dd: "Zhen " +0x91de: "Zhi " +0x91df: "Ba " +0x91e0: "Luan " +0x91e1: "Fu " +0x91e2: "Nai " +0x91e3: "Diao " +0x91e4: "Shan " +0x91e5: "Qiao " +0x91e6: "Kou " +0x91e7: "Chuan " +0x91e8: "Zi " +0x91e9: "Fan " +0x91ea: "Yu " +0x91eb: "Hua " +0x91ec: "Han " +0x91ed: "Gong " +0x91ee: "Qi " +0x91ef: "Mang " +0x91f0: "Ri " +0x91f1: "Di " +0x91f2: "Si " +0x91f3: "Xi " +0x91f4: "Yi " +0x91f5: "Chai " +0x91f6: "Shi " +0x91f7: "Tu " +0x91f8: "Xi " +0x91f9: "Nu " +0x91fa: "Qian " +0x91fb: "Ishiyumi " +0x91fc: "Jian " +0x91fd: "Pi " +0x91fe: "Ye " +0x91ff: "Yin " +/* x092 */ +0x9200: "Ba " +0x9201: "Fang " +0x9202: "Chen " +0x9203: "Xing " +0x9204: "Tou " +0x9205: "Yue " +0x9206: "Yan " +0x9207: "Fu " +0x9208: "Pi " +0x9209: "Na " +0x920a: "Xin " +0x920b: "E " +0x920c: "Jue " +0x920d: "Dun " +0x920e: "Gou " +0x920f: "Yin " +0x9210: "Qian " +0x9211: "Ban " +0x9212: "Ji " +0x9213: "Ren " +0x9214: "Chao " +0x9215: "Niu " +0x9216: "Fen " +0x9217: "Yun " +0x9218: "Ji " +0x9219: "Qin " +0x921a: "Pi " +0x921b: "Guo " +0x921c: "Hong " +0x921d: "Yin " +0x921e: "Jun " +0x921f: "Shi " +0x9220: "Yi " +0x9221: "Zhong " +0x9222: "Nie " +0x9223: "Gai " +0x9224: "Ri " +0x9225: "Huo " +0x9226: "Tai " +0x9227: "Kang " +0x9228: "Habaki " +0x9229: "Irori " +0x922a: "Ngaak " +0x922b: "[?] " +0x922c: "Duo " +0x922d: "Zi " +0x922e: "Ni " +0x922f: "Tu " +0x9230: "Shi " +0x9231: "Min " +0x9232: "Gu " +0x9233: "E " +0x9234: "Ling " +0x9235: "Bing " +0x9236: "Yi " +0x9237: "Gu " +0x9238: "Ba " +0x9239: "Pi " +0x923a: "Yu " +0x923b: "Si " +0x923c: "Zuo " +0x923d: "Bu " +0x923e: "You " +0x923f: "Dian " +0x9240: "Jia " +0x9241: "Zhen " +0x9242: "Shi " +0x9243: "Shi " +0x9244: "Tie " +0x9245: "Ju " +0x9246: "Zhan " +0x9247: "Shi " +0x9248: "She " +0x9249: "Xuan " +0x924a: "Zhao " +0x924b: "Bao " +0x924c: "He " +0x924d: "Bi " +0x924e: "Sheng " +0x924f: "Chu " +0x9250: "Shi " +0x9251: "Bo " +0x9252: "Zhu " +0x9253: "Chi " +0x9254: "Za " +0x9255: "Po " +0x9256: "Tong " +0x9257: "Qian " +0x9258: "Fu " +0x9259: "Zhai " +0x925a: "Liu " +0x925b: "Qian " +0x925c: "Fu " +0x925d: "Li " +0x925e: "Yue " +0x925f: "Pi " +0x9260: "Yang " +0x9261: "Ban " +0x9262: "Bo " +0x9263: "Jie " +0x9264: "Gou " +0x9265: "Shu " +0x9266: "Zheng " +0x9267: "Mu " +0x9268: "Ni " +0x9269: "Nie " +0x926a: "Di " +0x926b: "Jia " +0x926c: "Mu " +0x926d: "Dan " +0x926e: "Shen " +0x926f: "Yi " +0x9270: "Si " +0x9271: "Kuang " +0x9272: "Ka " +0x9273: "Bei " +0x9274: "Jian " +0x9275: "Tong " +0x9276: "Xing " +0x9277: "Hong " +0x9278: "Jiao " +0x9279: "Chi " +0x927a: "Er " +0x927b: "Ge " +0x927c: "Bing " +0x927d: "Shi " +0x927e: "Mou " +0x927f: "Jia " +0x9280: "Yin " +0x9281: "Jun " +0x9282: "Zhou " +0x9283: "Chong " +0x9284: "Shang " +0x9285: "Tong " +0x9286: "Mo " +0x9287: "Lei " +0x9288: "Ji " +0x9289: "Yu " +0x928a: "Xu " +0x928b: "Ren " +0x928c: "Zun " +0x928d: "Zhi " +0x928e: "Qiong " +0x928f: "Shan " +0x9290: "Chi " +0x9291: "Xian " +0x9292: "Xing " +0x9293: "Quan " +0x9294: "Pi " +0x9295: "Tie " +0x9296: "Zhu " +0x9297: "Hou " +0x9298: "Ming " +0x9299: "Kua " +0x929a: "Yao " +0x929b: "Xian " +0x929c: "Xian " +0x929d: "Xiu " +0x929e: "Jun " +0x929f: "Cha " +0x92a0: "Lao " +0x92a1: "Ji " +0x92a2: "Pi " +0x92a3: "Ru " +0x92a4: "Mi " +0x92a5: "Yi " +0x92a6: "Yin " +0x92a7: "Guang " +0x92a8: "An " +0x92a9: "Diou " +0x92aa: "You " +0x92ab: "Se " +0x92ac: "Kao " +0x92ad: "Qian " +0x92ae: "Luan " +0x92af: "Kasugai " +0x92b0: "Ai " +0x92b1: "Diao " +0x92b2: "Han " +0x92b3: "Rui " +0x92b4: "Shi " +0x92b5: "Keng " +0x92b6: "Qiu " +0x92b7: "Xiao " +0x92b8: "Zhe " +0x92b9: "Xiu " +0x92ba: "Zang " +0x92bb: "Ti " +0x92bc: "Cuo " +0x92bd: "Gua " +0x92be: "Gong " +0x92bf: "Zhong " +0x92c0: "Dou " +0x92c1: "Lu " +0x92c2: "Mei " +0x92c3: "Lang " +0x92c4: "Wan " +0x92c5: "Xin " +0x92c6: "Yun " +0x92c7: "Bei " +0x92c8: "Wu " +0x92c9: "Su " +0x92ca: "Yu " +0x92cb: "Chan " +0x92cc: "Ting " +0x92cd: "Bo " +0x92ce: "Han " +0x92cf: "Jia " +0x92d0: "Hong " +0x92d1: "Cuan " +0x92d2: "Feng " +0x92d3: "Chan " +0x92d4: "Wan " +0x92d5: "Zhi " +0x92d6: "Si " +0x92d7: "Xuan " +0x92d8: "Wu " +0x92d9: "Wu " +0x92da: "Tiao " +0x92db: "Gong " +0x92dc: "Zhuo " +0x92dd: "Lue " +0x92de: "Xing " +0x92df: "Qian " +0x92e0: "Shen " +0x92e1: "Han " +0x92e2: "Lue " +0x92e3: "Xie " +0x92e4: "Chu " +0x92e5: "Zheng " +0x92e6: "Ju " +0x92e7: "Xian " +0x92e8: "Tie " +0x92e9: "Mang " +0x92ea: "Pu " +0x92eb: "Li " +0x92ec: "Pan " +0x92ed: "Rui " +0x92ee: "Cheng " +0x92ef: "Gao " +0x92f0: "Li " +0x92f1: "Te " +0x92f2: "Pyeng " +0x92f3: "Zhu " +0x92f4: "[?] " +0x92f5: "Tu " +0x92f6: "Liu " +0x92f7: "Zui " +0x92f8: "Ju " +0x92f9: "Chang " +0x92fa: "Yuan " +0x92fb: "Jian " +0x92fc: "Gang " +0x92fd: "Diao " +0x92fe: "Tao " +0x92ff: "Chang " +/* x093 */ +0x9300: "Lun " +0x9301: "Kua " +0x9302: "Ling " +0x9303: "Bei " +0x9304: "Lu " +0x9305: "Li " +0x9306: "Qiang " +0x9307: "Pou " +0x9308: "Juan " +0x9309: "Min " +0x930a: "Zui " +0x930b: "Peng " +0x930c: "An " +0x930d: "Pi " +0x930e: "Xian " +0x930f: "Ya " +0x9310: "Zhui " +0x9311: "Lei " +0x9312: "A " +0x9313: "Kong " +0x9314: "Ta " +0x9315: "Kun " +0x9316: "Du " +0x9317: "Wei " +0x9318: "Chui " +0x9319: "Zi " +0x931a: "Zheng " +0x931b: "Ben " +0x931c: "Nie " +0x931d: "Cong " +0x931e: "Qun " +0x931f: "Tan " +0x9320: "Ding " +0x9321: "Qi " +0x9322: "Qian " +0x9323: "Zhuo " +0x9324: "Qi " +0x9325: "Yu " +0x9326: "Jin " +0x9327: "Guan " +0x9328: "Mao " +0x9329: "Chang " +0x932a: "Tian " +0x932b: "Xi " +0x932c: "Lian " +0x932d: "Tao " +0x932e: "Gu " +0x932f: "Cuo " +0x9330: "Shu " +0x9331: "Zhen " +0x9332: "Lu " +0x9333: "Meng " +0x9334: "Lu " +0x9335: "Hua " +0x9336: "Biao " +0x9337: "Ga " +0x9338: "Lai " +0x9339: "Ken " +0x933a: "Kazari " +0x933b: "Bu " +0x933c: "Nai " +0x933d: "Wan " +0x933e: "Zan " +0x933f: "[?] " +0x9340: "De " +0x9341: "Xian " +0x9342: "[?] " +0x9343: "Huo " +0x9344: "Liang " +0x9345: "[?] " +0x9346: "Men " +0x9347: "Kai " +0x9348: "Ying " +0x9349: "Di " +0x934a: "Lian " +0x934b: "Guo " +0x934c: "Xian " +0x934d: "Du " +0x934e: "Tu " +0x934f: "Wei " +0x9350: "Cong " +0x9351: "Fu " +0x9352: "Rou " +0x9353: "Ji " +0x9354: "E " +0x9355: "Rou " +0x9356: "Chen " +0x9357: "Ti " +0x9358: "Zha " +0x9359: "Hong " +0x935a: "Yang " +0x935b: "Duan " +0x935c: "Xia " +0x935d: "Yu " +0x935e: "Keng " +0x935f: "Xing " +0x9360: "Huang " +0x9361: "Wei " +0x9362: "Fu " +0x9363: "Zhao " +0x9364: "Cha " +0x9365: "Qie " +0x9366: "She " +0x9367: "Hong " +0x9368: "Kui " +0x9369: "Tian " +0x936a: "Mou " +0x936b: "Qiao " +0x936c: "Qiao " +0x936d: "Hou " +0x936e: "Tou " +0x936f: "Cong " +0x9370: "Huan " +0x9371: "Ye " +0x9372: "Min " +0x9373: "Jian " +0x9374: "Duan " +0x9375: "Jian " +0x9376: "Song " +0x9377: "Kui " +0x9378: "Hu " +0x9379: "Xuan " +0x937a: "Duo " +0x937b: "Jie " +0x937c: "Zhen " +0x937d: "Bian " +0x937e: "Zhong " +0x937f: "Zi " +0x9380: "Xiu " +0x9381: "Ye " +0x9382: "Mei " +0x9383: "Pai " +0x9384: "Ai " +0x9385: "Jie " +0x9386: "[?] " +0x9387: "Mei " +0x9388: "Chuo " +0x9389: "Ta " +0x938a: "Bang " +0x938b: "Xia " +0x938c: "Lian " +0x938d: "Suo " +0x938e: "Xi " +0x938f: "Liu " +0x9390: "Zu " +0x9391: "Ye " +0x9392: "Nou " +0x9393: "Weng " +0x9394: "Rong " +0x9395: "Tang " +0x9396: "Suo " +0x9397: "Qiang " +0x9398: "Ge " +0x9399: "Shuo " +0x939a: "Chui " +0x939b: "Bo " +0x939c: "Pan " +0x939d: "Sa " +0x939e: "Bi " +0x939f: "Sang " +0x93a0: "Gang " +0x93a1: "Zi " +0x93a2: "Wu " +0x93a3: "Ying " +0x93a4: "Huang " +0x93a5: "Tiao " +0x93a6: "Liu " +0x93a7: "Kai " +0x93a8: "Sun " +0x93a9: "Sha " +0x93aa: "Sou " +0x93ab: "Wan " +0x93ac: "Hao " +0x93ad: "Zhen " +0x93ae: "Zhen " +0x93af: "Luo " +0x93b0: "Yi " +0x93b1: "Yuan " +0x93b2: "Tang " +0x93b3: "Nie " +0x93b4: "Xi " +0x93b5: "Jia " +0x93b6: "Ge " +0x93b7: "Ma " +0x93b8: "Juan " +0x93b9: "Kasugai " +0x93ba: "Habaki " +0x93bb: "Suo " +0x93bc: "[?] " +0x93bd: "[?] " +0x93be: "[?] " +0x93bf: "Na " +0x93c0: "Lu " +0x93c1: "Suo " +0x93c2: "Ou " +0x93c3: "Zu " +0x93c4: "Tuan " +0x93c5: "Xiu " +0x93c6: "Guan " +0x93c7: "Xuan " +0x93c8: "Lian " +0x93c9: "Shou " +0x93ca: "Ao " +0x93cb: "Man " +0x93cc: "Mo " +0x93cd: "Luo " +0x93ce: "Bi " +0x93cf: "Wei " +0x93d0: "Liu " +0x93d1: "Di " +0x93d2: "Qiao " +0x93d3: "Cong " +0x93d4: "Yi " +0x93d5: "Lu " +0x93d6: "Ao " +0x93d7: "Keng " +0x93d8: "Qiang " +0x93d9: "Cui " +0x93da: "Qi " +0x93db: "Chang " +0x93dc: "Tang " +0x93dd: "Man " +0x93de: "Yong " +0x93df: "Chan " +0x93e0: "Feng " +0x93e1: "Jing " +0x93e2: "Biao " +0x93e3: "Shu " +0x93e4: "Lou " +0x93e5: "Xiu " +0x93e6: "Cong " +0x93e7: "Long " +0x93e8: "Zan " +0x93e9: "Jian " +0x93ea: "Cao " +0x93eb: "Li " +0x93ec: "Xia " +0x93ed: "Xi " +0x93ee: "Kang " +0x93ef: "[?] " +0x93f0: "Beng " +0x93f1: "[?] " +0x93f2: "[?] " +0x93f3: "Zheng " +0x93f4: "Lu " +0x93f5: "Hua " +0x93f6: "Ji " +0x93f7: "Pu " +0x93f8: "Hui " +0x93f9: "Qiang " +0x93fa: "Po " +0x93fb: "Lin " +0x93fc: "Suo " +0x93fd: "Xiu " +0x93fe: "San " +0x93ff: "Cheng " +/* x094 */ +0x9400: "Kui " +0x9401: "Si " +0x9402: "Liu " +0x9403: "Nao " +0x9404: "Heng " +0x9405: "Pie " +0x9406: "Sui " +0x9407: "Fan " +0x9408: "Qiao " +0x9409: "Quan " +0x940a: "Yang " +0x940b: "Tang " +0x940c: "Xiang " +0x940d: "Jue " +0x940e: "Jiao " +0x940f: "Zun " +0x9410: "Liao " +0x9411: "Jie " +0x9412: "Lao " +0x9413: "Dui " +0x9414: "Tan " +0x9415: "Zan " +0x9416: "Ji " +0x9417: "Jian " +0x9418: "Zhong " +0x9419: "Deng " +0x941a: "Ya " +0x941b: "Ying " +0x941c: "Dui " +0x941d: "Jue " +0x941e: "Nou " +0x941f: "Ti " +0x9420: "Pu " +0x9421: "Tie " +0x9422: "[?] " +0x9423: "[?] " +0x9424: "Ding " +0x9425: "Shan " +0x9426: "Kai " +0x9427: "Jian " +0x9428: "Fei " +0x9429: "Sui " +0x942a: "Lu " +0x942b: "Juan " +0x942c: "Hui " +0x942d: "Yu " +0x942e: "Lian " +0x942f: "Zhuo " +0x9430: "Qiao " +0x9431: "Qian " +0x9432: "Zhuo " +0x9433: "Lei " +0x9434: "Bi " +0x9435: "Tie " +0x9436: "Huan " +0x9437: "Ye " +0x9438: "Duo " +0x9439: "Guo " +0x943a: "Dang " +0x943b: "Ju " +0x943c: "Fen " +0x943d: "Da " +0x943e: "Bei " +0x943f: "Yi " +0x9440: "Ai " +0x9441: "Zong " +0x9442: "Xun " +0x9443: "Diao " +0x9444: "Zhu " +0x9445: "Heng " +0x9446: "Zhui " +0x9447: "Ji " +0x9448: "Nie " +0x9449: "Ta " +0x944a: "Huo " +0x944b: "Qing " +0x944c: "Bin " +0x944d: "Ying " +0x944e: "Kui " +0x944f: "Ning " +0x9450: "Xu " +0x9451: "Jian " +0x9452: "Jian " +0x9453: "Yari " +0x9454: "Cha " +0x9455: "Zhi " +0x9456: "Mie " +0x9457: "Li " +0x9458: "Lei " +0x9459: "Ji " +0x945a: "Zuan " +0x945b: "Kuang " +0x945c: "Shang " +0x945d: "Peng " +0x945e: "La " +0x945f: "Du " +0x9460: "Shuo " +0x9461: "Chuo " +0x9462: "Lu " +0x9463: "Biao " +0x9464: "Bao " +0x9465: "Lu " +0x9466: "[?] " +0x9467: "[?] " +0x9468: "Long " +0x9469: "E " +0x946a: "Lu " +0x946b: "Xin " +0x946c: "Jian " +0x946d: "Lan " +0x946e: "Bo " +0x946f: "Jian " +0x9470: "Yao " +0x9471: "Chan " +0x9472: "Xiang " +0x9473: "Jian " +0x9474: "Xi " +0x9475: "Guan " +0x9476: "Cang " +0x9477: "Nie " +0x9478: "Lei " +0x9479: "Cuan " +0x947a: "Qu " +0x947b: "Pan " +0x947c: "Luo " +0x947d: "Zuan " +0x947e: "Luan " +0x947f: "Zao " +0x9480: "Nie " +0x9481: "Jue " +0x9482: "Tang " +0x9483: "Shu " +0x9484: "Lan " +0x9485: "Jin " +0x9486: "Qiu " +0x9487: "Yi " +0x9488: "Zhen " +0x9489: "Ding " +0x948a: "Zhao " +0x948b: "Po " +0x948c: "Diao " +0x948d: "Tu " +0x948e: "Qian " +0x948f: "Chuan " +0x9490: "Shan " +0x9491: "Ji " +0x9492: "Fan " +0x9493: "Diao " +0x9494: "Men " +0x9495: "Nu " +0x9496: "Xi " +0x9497: "Chai " +0x9498: "Xing " +0x9499: "Gai " +0x949a: "Bu " +0x949b: "Tai " +0x949c: "Ju " +0x949d: "Dun " +0x949e: "Chao " +0x949f: "Zhong " +0x94a0: "Na " +0x94a1: "Bei " +0x94a2: "Gang " +0x94a3: "Ban " +0x94a4: "Qian " +0x94a5: "Yao " +0x94a6: "Qin " +0x94a7: "Jun " +0x94a8: "Wu " +0x94a9: "Gou " +0x94aa: "Kang " +0x94ab: "Fang " +0x94ac: "Huo " +0x94ad: "Tou " +0x94ae: "Niu " +0x94af: "Ba " +0x94b0: "Yu " +0x94b1: "Qian " +0x94b2: "Zheng " +0x94b3: "Qian " +0x94b4: "Gu " +0x94b5: "Bo " +0x94b6: "E " +0x94b7: "Po " +0x94b8: "Bu " +0x94b9: "Ba " +0x94ba: "Yue " +0x94bb: "Zuan " +0x94bc: "Mu " +0x94bd: "Dan " +0x94be: "Jia " +0x94bf: "Dian " +0x94c0: "You " +0x94c1: "Tie " +0x94c2: "Bo " +0x94c3: "Ling " +0x94c4: "Shuo " +0x94c5: "Qian " +0x94c6: "Liu " +0x94c7: "Bao " +0x94c8: "Shi " +0x94c9: "Xuan " +0x94ca: "She " +0x94cb: "Bi " +0x94cc: "Ni " +0x94cd: "Pi " +0x94ce: "Duo " +0x94cf: "Xing " +0x94d0: "Kao " +0x94d1: "Lao " +0x94d2: "Er " +0x94d3: "Mang " +0x94d4: "Ya " +0x94d5: "You " +0x94d6: "Cheng " +0x94d7: "Jia " +0x94d8: "Ye " +0x94d9: "Nao " +0x94da: "Zhi " +0x94db: "Dang " +0x94dc: "Tong " +0x94dd: "Lu " +0x94de: "Diao " +0x94df: "Yin " +0x94e0: "Kai " +0x94e1: "Zha " +0x94e2: "Zhu " +0x94e3: "Xian " +0x94e4: "Ting " +0x94e5: "Diu " +0x94e6: "Xian " +0x94e7: "Hua " +0x94e8: "Quan " +0x94e9: "Sha " +0x94ea: "Jia " +0x94eb: "Yao " +0x94ec: "Ge " +0x94ed: "Ming " +0x94ee: "Zheng " +0x94ef: "Se " +0x94f0: "Jiao " +0x94f1: "Yi " +0x94f2: "Chan " +0x94f3: "Chong " +0x94f4: "Tang " +0x94f5: "An " +0x94f6: "Yin " +0x94f7: "Ru " +0x94f8: "Zhu " +0x94f9: "Lao " +0x94fa: "Pu " +0x94fb: "Wu " +0x94fc: "Lai " +0x94fd: "Te " +0x94fe: "Lian " +0x94ff: "Keng " +/* x095 */ +0x9500: "Xiao " +0x9501: "Suo " +0x9502: "Li " +0x9503: "Zheng " +0x9504: "Chu " +0x9505: "Guo " +0x9506: "Gao " +0x9507: "Tie " +0x9508: "Xiu " +0x9509: "Cuo " +0x950a: "Lue " +0x950b: "Feng " +0x950c: "Xin " +0x950d: "Liu " +0x950e: "Kai " +0x950f: "Jian " +0x9510: "Rui " +0x9511: "Ti " +0x9512: "Lang " +0x9513: "Qian " +0x9514: "Ju " +0x9515: "A " +0x9516: "Qiang " +0x9517: "Duo " +0x9518: "Tian " +0x9519: "Cuo " +0x951a: "Mao " +0x951b: "Ben " +0x951c: "Qi " +0x951d: "De " +0x951e: "Kua " +0x951f: "Kun " +0x9520: "Chang " +0x9521: "Xi " +0x9522: "Gu " +0x9523: "Luo " +0x9524: "Chui " +0x9525: "Zhui " +0x9526: "Jin " +0x9527: "Zhi " +0x9528: "Xian " +0x9529: "Juan " +0x952a: "Huo " +0x952b: "Pou " +0x952c: "Tan " +0x952d: "Ding " +0x952e: "Jian " +0x952f: "Ju " +0x9530: "Meng " +0x9531: "Zi " +0x9532: "Qie " +0x9533: "Ying " +0x9534: "Kai " +0x9535: "Qiang " +0x9536: "Song " +0x9537: "E " +0x9538: "Cha " +0x9539: "Qiao " +0x953a: "Zhong " +0x953b: "Duan " +0x953c: "Sou " +0x953d: "Huang " +0x953e: "Huan " +0x953f: "Ai " +0x9540: "Du " +0x9541: "Mei " +0x9542: "Lou " +0x9543: "Zi " +0x9544: "Fei " +0x9545: "Mei " +0x9546: "Mo " +0x9547: "Zhen " +0x9548: "Bo " +0x9549: "Ge " +0x954a: "Nie " +0x954b: "Tang " +0x954c: "Juan " +0x954d: "Nie " +0x954e: "Na " +0x954f: "Liu " +0x9550: "Hao " +0x9551: "Bang " +0x9552: "Yi " +0x9553: "Jia " +0x9554: "Bin " +0x9555: "Rong " +0x9556: "Biao " +0x9557: "Tang " +0x9558: "Man " +0x9559: "Luo " +0x955a: "Beng " +0x955b: "Yong " +0x955c: "Jing " +0x955d: "Di " +0x955e: "Zu " +0x955f: "Xuan " +0x9560: "Liu " +0x9561: "Tan " +0x9562: "Jue " +0x9563: "Liao " +0x9564: "Pu " +0x9565: "Lu " +0x9566: "Dui " +0x9567: "Lan " +0x9568: "Pu " +0x9569: "Cuan " +0x956a: "Qiang " +0x956b: "Deng " +0x956c: "Huo " +0x956d: "Lei " +0x956e: "Huan " +0x956f: "Zhuo " +0x9570: "Lian " +0x9571: "Yi " +0x9572: "Cha " +0x9573: "Biao " +0x9574: "La " +0x9575: "Chan " +0x9576: "Xiang " +0x9577: "Chang " +0x9578: "Chang " +0x9579: "Jiu " +0x957a: "Ao " +0x957b: "Die " +0x957c: "Qu " +0x957d: "Liao " +0x957e: "Mi " +0x957f: "Chang " +0x9580: "Men " +0x9581: "Ma " +0x9582: "Shuan " +0x9583: "Shan " +0x9584: "Huo " +0x9585: "Men " +0x9586: "Yan " +0x9587: "Bi " +0x9588: "Han " +0x9589: "Bi " +0x958a: "San " +0x958b: "Kai " +0x958c: "Kang " +0x958d: "Beng " +0x958e: "Hong " +0x958f: "Run " +0x9590: "San " +0x9591: "Xian " +0x9592: "Xian " +0x9593: "Jian " +0x9594: "Min " +0x9595: "Xia " +0x9596: "Yuru " +0x9597: "Dou " +0x9598: "Zha " +0x9599: "Nao " +0x959a: "Jian " +0x959b: "Peng " +0x959c: "Xia " +0x959d: "Ling " +0x959e: "Bian " +0x959f: "Bi " +0x95a0: "Run " +0x95a1: "He " +0x95a2: "Guan " +0x95a3: "Ge " +0x95a4: "Ge " +0x95a5: "Fa " +0x95a6: "Chu " +0x95a7: "Hong " +0x95a8: "Gui " +0x95a9: "Min " +0x95aa: "Se " +0x95ab: "Kun " +0x95ac: "Lang " +0x95ad: "Lu " +0x95ae: "Ting " +0x95af: "Sha " +0x95b0: "Ju " +0x95b1: "Yue " +0x95b2: "Yue " +0x95b3: "Chan " +0x95b4: "Qu " +0x95b5: "Lin " +0x95b6: "Chang " +0x95b7: "Shai " +0x95b8: "Kun " +0x95b9: "Yan " +0x95ba: "Min " +0x95bb: "Yan " +0x95bc: "E " +0x95bd: "Hun " +0x95be: "Yu " +0x95bf: "Wen " +0x95c0: "Xiang " +0x95c1: "Bao " +0x95c2: "Xiang " +0x95c3: "Qu " +0x95c4: "Yao " +0x95c5: "Wen " +0x95c6: "Ban " +0x95c7: "An " +0x95c8: "Wei " +0x95c9: "Yin " +0x95ca: "Kuo " +0x95cb: "Que " +0x95cc: "Lan " +0x95cd: "Du " +0x95ce: "[?] " +0x95cf: "Phwung " +0x95d0: "Tian " +0x95d1: "Nie " +0x95d2: "Ta " +0x95d3: "Kai " +0x95d4: "He " +0x95d5: "Que " +0x95d6: "Chuang " +0x95d7: "Guan " +0x95d8: "Dou " +0x95d9: "Qi " +0x95da: "Kui " +0x95db: "Tang " +0x95dc: "Guan " +0x95dd: "Piao " +0x95de: "Kan " +0x95df: "Xi " +0x95e0: "Hui " +0x95e1: "Chan " +0x95e2: "Pi " +0x95e3: "Dang " +0x95e4: "Huan " +0x95e5: "Ta " +0x95e6: "Wen " +0x95e7: "[?] " +0x95e8: "Men " +0x95e9: "Shuan " +0x95ea: "Shan " +0x95eb: "Yan " +0x95ec: "Han " +0x95ed: "Bi " +0x95ee: "Wen " +0x95ef: "Chuang " +0x95f0: "Run " +0x95f1: "Wei " +0x95f2: "Xian " +0x95f3: "Hong " +0x95f4: "Jian " +0x95f5: "Min " +0x95f6: "Kang " +0x95f7: "Men " +0x95f8: "Zha " +0x95f9: "Nao " +0x95fa: "Gui " +0x95fb: "Wen " +0x95fc: "Ta " +0x95fd: "Min " +0x95fe: "Lu " +0x95ff: "Kai " +/* x096 */ +0x9600: "Fa " +0x9601: "Ge " +0x9602: "He " +0x9603: "Kun " +0x9604: "Jiu " +0x9605: "Yue " +0x9606: "Lang " +0x9607: "Du " +0x9608: "Yu " +0x9609: "Yan " +0x960a: "Chang " +0x960b: "Xi " +0x960c: "Wen " +0x960d: "Hun " +0x960e: "Yan " +0x960f: "E " +0x9610: "Chan " +0x9611: "Lan " +0x9612: "Qu " +0x9613: "Hui " +0x9614: "Kuo " +0x9615: "Que " +0x9616: "Ge " +0x9617: "Tian " +0x9618: "Ta " +0x9619: "Que " +0x961a: "Kan " +0x961b: "Huan " +0x961c: "Fu " +0x961d: "Fu " +0x961e: "Le " +0x961f: "Dui " +0x9620: "Xin " +0x9621: "Qian " +0x9622: "Wu " +0x9623: "Yi " +0x9624: "Tuo " +0x9625: "Yin " +0x9626: "Yang " +0x9627: "Dou " +0x9628: "E " +0x9629: "Sheng " +0x962a: "Ban " +0x962b: "Pei " +0x962c: "Keng " +0x962d: "Yun " +0x962e: "Ruan " +0x962f: "Zhi " +0x9630: "Pi " +0x9631: "Jing " +0x9632: "Fang " +0x9633: "Yang " +0x9634: "Yin " +0x9635: "Zhen " +0x9636: "Jie " +0x9637: "Cheng " +0x9638: "E " +0x9639: "Qu " +0x963a: "Di " +0x963b: "Zu " +0x963c: "Zuo " +0x963d: "Dian " +0x963e: "Ling " +0x963f: "A " +0x9640: "Tuo " +0x9641: "Tuo " +0x9642: "Po " +0x9643: "Bing " +0x9644: "Fu " +0x9645: "Ji " +0x9646: "Lu " +0x9647: "Long " +0x9648: "Chen " +0x9649: "Xing " +0x964a: "Duo " +0x964b: "Lou " +0x964c: "Mo " +0x964d: "Jiang " +0x964e: "Shu " +0x964f: "Duo " +0x9650: "Xian " +0x9651: "Er " +0x9652: "Gui " +0x9653: "Yu " +0x9654: "Gai " +0x9655: "Shan " +0x9656: "Xun " +0x9657: "Qiao " +0x9658: "Xing " +0x9659: "Chun " +0x965a: "Fu " +0x965b: "Bi " +0x965c: "Xia " +0x965d: "Shan " +0x965e: "Sheng " +0x965f: "Zhi " +0x9660: "Pu " +0x9661: "Dou " +0x9662: "Yuan " +0x9663: "Zhen " +0x9664: "Chu " +0x9665: "Xian " +0x9666: "Tou " +0x9667: "Nie " +0x9668: "Yun " +0x9669: "Xian " +0x966a: "Pei " +0x966b: "Pei " +0x966c: "Zou " +0x966d: "Yi " +0x966e: "Dui " +0x966f: "Lun " +0x9670: "Yin " +0x9671: "Ju " +0x9672: "Chui " +0x9673: "Chen " +0x9674: "Pi " +0x9675: "Ling " +0x9676: "Tao " +0x9677: "Xian " +0x9678: "Lu " +0x9679: "Sheng " +0x967a: "Xian " +0x967b: "Yin " +0x967c: "Zhu " +0x967d: "Yang " +0x967e: "Reng " +0x967f: "Shan " +0x9680: "Chong " +0x9681: "Yan " +0x9682: "Yin " +0x9683: "Yu " +0x9684: "Ti " +0x9685: "Yu " +0x9686: "Long " +0x9687: "Wei " +0x9688: "Wei " +0x9689: "Nie " +0x968a: "Dui " +0x968b: "Sui " +0x968c: "An " +0x968d: "Huang " +0x968e: "Jie " +0x968f: "Sui " +0x9690: "Yin " +0x9691: "Gai " +0x9692: "Yan " +0x9693: "Hui " +0x9694: "Ge " +0x9695: "Yun " +0x9696: "Wu " +0x9697: "Wei " +0x9698: "Ai " +0x9699: "Xi " +0x969a: "Tang " +0x969b: "Ji " +0x969c: "Zhang " +0x969d: "Dao " +0x969e: "Ao " +0x969f: "Xi " +0x96a0: "Yin " +0x96a1: "[?] " +0x96a2: "Rao " +0x96a3: "Lin " +0x96a4: "Tui " +0x96a5: "Deng " +0x96a6: "Pi " +0x96a7: "Sui " +0x96a8: "Sui " +0x96a9: "Yu " +0x96aa: "Xian " +0x96ab: "Fen " +0x96ac: "Ni " +0x96ad: "Er " +0x96ae: "Ji " +0x96af: "Dao " +0x96b0: "Xi " +0x96b1: "Yin " +0x96b2: "E " +0x96b3: "Hui " +0x96b4: "Long " +0x96b5: "Xi " +0x96b6: "Li " +0x96b7: "Li " +0x96b8: "Li " +0x96b9: "Zhui " +0x96ba: "He " +0x96bb: "Zhi " +0x96bc: "Zhun " +0x96bd: "Jun " +0x96be: "Nan " +0x96bf: "Yi " +0x96c0: "Que " +0x96c1: "Yan " +0x96c2: "Qian " +0x96c3: "Ya " +0x96c4: "Xiong " +0x96c5: "Ya " +0x96c6: "Ji " +0x96c7: "Gu " +0x96c8: "Huan " +0x96c9: "Zhi " +0x96ca: "Gou " +0x96cb: "Jun " +0x96cc: "Ci " +0x96cd: "Yong " +0x96ce: "Ju " +0x96cf: "Chu " +0x96d0: "Hu " +0x96d1: "Za " +0x96d2: "Luo " +0x96d3: "Yu " +0x96d4: "Chou " +0x96d5: "Diao " +0x96d6: "Sui " +0x96d7: "Han " +0x96d8: "Huo " +0x96d9: "Shuang " +0x96da: "Guan " +0x96db: "Chu " +0x96dc: "Za " +0x96dd: "Yong " +0x96de: "Ji " +0x96df: "Xi " +0x96e0: "Chou " +0x96e1: "Liu " +0x96e2: "Li " +0x96e3: "Nan " +0x96e4: "Xue " +0x96e5: "Za " +0x96e6: "Ji " +0x96e7: "Ji " +0x96e8: "Yu " +0x96e9: "Yu " +0x96ea: "Xue " +0x96eb: "Na " +0x96ec: "Fou " +0x96ed: "Se " +0x96ee: "Mu " +0x96ef: "Wen " +0x96f0: "Fen " +0x96f1: "Pang " +0x96f2: "Yun " +0x96f3: "Li " +0x96f4: "Li " +0x96f5: "Ang " +0x96f6: "Ling " +0x96f7: "Lei " +0x96f8: "An " +0x96f9: "Bao " +0x96fa: "Meng " +0x96fb: "Dian " +0x96fc: "Dang " +0x96fd: "Xing " +0x96fe: "Wu " +0x96ff: "Zhao " +/* x097 */ +0x9700: "Xu " +0x9701: "Ji " +0x9702: "Mu " +0x9703: "Chen " +0x9704: "Xiao " +0x9705: "Zha " +0x9706: "Ting " +0x9707: "Zhen " +0x9708: "Pei " +0x9709: "Mei " +0x970a: "Ling " +0x970b: "Qi " +0x970c: "Chou " +0x970d: "Huo " +0x970e: "Sha " +0x970f: "Fei " +0x9710: "Weng " +0x9711: "Zhan " +0x9712: "Yin " +0x9713: "Ni " +0x9714: "Chou " +0x9715: "Tun " +0x9716: "Lin " +0x9717: "[?] " +0x9718: "Dong " +0x9719: "Ying " +0x971a: "Wu " +0x971b: "Ling " +0x971c: "Shuang " +0x971d: "Ling " +0x971e: "Xia " +0x971f: "Hong " +0x9720: "Yin " +0x9721: "Mo " +0x9722: "Mai " +0x9723: "Yun " +0x9724: "Liu " +0x9725: "Meng " +0x9726: "Bin " +0x9727: "Wu " +0x9728: "Wei " +0x9729: "Huo " +0x972a: "Yin " +0x972b: "Xi " +0x972c: "Yi " +0x972d: "Ai " +0x972e: "Dan " +0x972f: "Deng " +0x9730: "Xian " +0x9731: "Yu " +0x9732: "Lu " +0x9733: "Long " +0x9734: "Dai " +0x9735: "Ji " +0x9736: "Pang " +0x9737: "Yang " +0x9738: "Ba " +0x9739: "Pi " +0x973a: "Wei " +0x973b: "[?] " +0x973c: "Xi " +0x973d: "Ji " +0x973e: "Mai " +0x973f: "Meng " +0x9740: "Meng " +0x9741: "Lei " +0x9742: "Li " +0x9743: "Huo " +0x9744: "Ai " +0x9745: "Fei " +0x9746: "Dai " +0x9747: "Long " +0x9748: "Ling " +0x9749: "Ai " +0x974a: "Feng " +0x974b: "Li " +0x974c: "Bao " +0x974d: "[?] " +0x974e: "He " +0x974f: "He " +0x9750: "Bing " +0x9751: "Qing " +0x9752: "Qing " +0x9753: "Jing " +0x9754: "Tian " +0x9755: "Zhen " +0x9756: "Jing " +0x9757: "Cheng " +0x9758: "Qing " +0x9759: "Jing " +0x975a: "Jing " +0x975b: "Dian " +0x975c: "Jing " +0x975d: "Tian " +0x975e: "Fei " +0x975f: "Fei " +0x9760: "Kao " +0x9761: "Mi " +0x9762: "Mian " +0x9763: "Mian " +0x9764: "Pao " +0x9765: "Ye " +0x9766: "Tian " +0x9767: "Hui " +0x9768: "Ye " +0x9769: "Ge " +0x976a: "Ding " +0x976b: "Cha " +0x976c: "Jian " +0x976d: "Ren " +0x976e: "Di " +0x976f: "Du " +0x9770: "Wu " +0x9771: "Ren " +0x9772: "Qin " +0x9773: "Jin " +0x9774: "Xue " +0x9775: "Niu " +0x9776: "Ba " +0x9777: "Yin " +0x9778: "Sa " +0x9779: "Na " +0x977a: "Mo " +0x977b: "Zu " +0x977c: "Da " +0x977d: "Ban " +0x977e: "Yi " +0x977f: "Yao " +0x9780: "Tao " +0x9781: "Tuo " +0x9782: "Jia " +0x9783: "Hong " +0x9784: "Pao " +0x9785: "Yang " +0x9786: "Tomo " +0x9787: "Yin " +0x9788: "Jia " +0x9789: "Tao " +0x978a: "Ji " +0x978b: "Xie " +0x978c: "An " +0x978d: "An " +0x978e: "Hen " +0x978f: "Gong " +0x9790: "Kohaze " +0x9791: "Da " +0x9792: "Qiao " +0x9793: "Ting " +0x9794: "Wan " +0x9795: "Ying " +0x9796: "Sui " +0x9797: "Tiao " +0x9798: "Qiao " +0x9799: "Xuan " +0x979a: "Kong " +0x979b: "Beng " +0x979c: "Ta " +0x979d: "Zhang " +0x979e: "Bing " +0x979f: "Kuo " +0x97a0: "Ju " +0x97a1: "La " +0x97a2: "Xie " +0x97a3: "Rou " +0x97a4: "Bang " +0x97a5: "Yi " +0x97a6: "Qiu " +0x97a7: "Qiu " +0x97a8: "He " +0x97a9: "Xiao " +0x97aa: "Mu " +0x97ab: "Ju " +0x97ac: "Jian " +0x97ad: "Bian " +0x97ae: "Di " +0x97af: "Jian " +0x97b0: "On " +0x97b1: "Tao " +0x97b2: "Gou " +0x97b3: "Ta " +0x97b4: "Bei " +0x97b5: "Xie " +0x97b6: "Pan " +0x97b7: "Ge " +0x97b8: "Bi " +0x97b9: "Kuo " +0x97ba: "Tang " +0x97bb: "Lou " +0x97bc: "Gui " +0x97bd: "Qiao " +0x97be: "Xue " +0x97bf: "Ji " +0x97c0: "Jian " +0x97c1: "Jiang " +0x97c2: "Chan " +0x97c3: "Da " +0x97c4: "Huo " +0x97c5: "Xian " +0x97c6: "Qian " +0x97c7: "Du " +0x97c8: "Wa " +0x97c9: "Jian " +0x97ca: "Lan " +0x97cb: "Wei " +0x97cc: "Ren " +0x97cd: "Fu " +0x97ce: "Mei " +0x97cf: "Juan " +0x97d0: "Ge " +0x97d1: "Wei " +0x97d2: "Qiao " +0x97d3: "Han " +0x97d4: "Chang " +0x97d5: "[?] " +0x97d6: "Rou " +0x97d7: "Xun " +0x97d8: "She " +0x97d9: "Wei " +0x97da: "Ge " +0x97db: "Bei " +0x97dc: "Tao " +0x97dd: "Gou " +0x97de: "Yun " +0x97df: "[?] " +0x97e0: "Bi " +0x97e1: "Wei " +0x97e2: "Hui " +0x97e3: "Du " +0x97e4: "Wa " +0x97e5: "Du " +0x97e6: "Wei " +0x97e7: "Ren " +0x97e8: "Fu " +0x97e9: "Han " +0x97ea: "Wei " +0x97eb: "Yun " +0x97ec: "Tao " +0x97ed: "Jiu " +0x97ee: "Jiu " +0x97ef: "Xian " +0x97f0: "Xie " +0x97f1: "Xian " +0x97f2: "Ji " +0x97f3: "Yin " +0x97f4: "Za " +0x97f5: "Yun " +0x97f6: "Shao " +0x97f7: "Le " +0x97f8: "Peng " +0x97f9: "Heng " +0x97fa: "Ying " +0x97fb: "Yun " +0x97fc: "Peng " +0x97fd: "Yin " +0x97fe: "Yin " +0x97ff: "Xiang " +/* x098 */ +0x9800: "Hu " +0x9801: "Ye " +0x9802: "Ding " +0x9803: "Qing " +0x9804: "Pan " +0x9805: "Xiang " +0x9806: "Shun " +0x9807: "Han " +0x9808: "Xu " +0x9809: "Yi " +0x980a: "Xu " +0x980b: "Gu " +0x980c: "Song " +0x980d: "Kui " +0x980e: "Qi " +0x980f: "Hang " +0x9810: "Yu " +0x9811: "Wan " +0x9812: "Ban " +0x9813: "Dun " +0x9814: "Di " +0x9815: "Dan " +0x9816: "Pan " +0x9817: "Po " +0x9818: "Ling " +0x9819: "Ce " +0x981a: "Jing " +0x981b: "Lei " +0x981c: "He " +0x981d: "Qiao " +0x981e: "E " +0x981f: "E " +0x9820: "Wei " +0x9821: "Jie " +0x9822: "Gua " +0x9823: "Shen " +0x9824: "Yi " +0x9825: "Shen " +0x9826: "Hai " +0x9827: "Dui " +0x9828: "Pian " +0x9829: "Ping " +0x982a: "Lei " +0x982b: "Fu " +0x982c: "Jia " +0x982d: "Tou " +0x982e: "Hui " +0x982f: "Kui " +0x9830: "Jia " +0x9831: "Le " +0x9832: "Tian " +0x9833: "Cheng " +0x9834: "Ying " +0x9835: "Jun " +0x9836: "Hu " +0x9837: "Han " +0x9838: "Jing " +0x9839: "Tui " +0x983a: "Tui " +0x983b: "Pin " +0x983c: "Lai " +0x983d: "Tui " +0x983e: "Zi " +0x983f: "Zi " +0x9840: "Chui " +0x9841: "Ding " +0x9842: "Lai " +0x9843: "Yan " +0x9844: "Han " +0x9845: "Jian " +0x9846: "Ke " +0x9847: "Cui " +0x9848: "Jiong " +0x9849: "Qin " +0x984a: "Yi " +0x984b: "Sai " +0x984c: "Ti " +0x984d: "E " +0x984e: "E " +0x984f: "Yan " +0x9850: "Hun " +0x9851: "Kan " +0x9852: "Yong " +0x9853: "Zhuan " +0x9854: "Yan " +0x9855: "Xian " +0x9856: "Xin " +0x9857: "Yi " +0x9858: "Yuan " +0x9859: "Sang " +0x985a: "Dian " +0x985b: "Dian " +0x985c: "Jiang " +0x985d: "Ku " +0x985e: "Lei " +0x985f: "Liao " +0x9860: "Piao " +0x9861: "Yi " +0x9862: "Man " +0x9863: "Qi " +0x9864: "Rao " +0x9865: "Hao " +0x9866: "Qiao " +0x9867: "Gu " +0x9868: "Xun " +0x9869: "Qian " +0x986a: "Hui " +0x986b: "Zhan " +0x986c: "Ru " +0x986d: "Hong " +0x986e: "Bin " +0x986f: "Xian " +0x9870: "Pin " +0x9871: "Lu " +0x9872: "Lan " +0x9873: "Nie " +0x9874: "Quan " +0x9875: "Ye " +0x9876: "Ding " +0x9877: "Qing " +0x9878: "Han " +0x9879: "Xiang " +0x987a: "Shun " +0x987b: "Xu " +0x987c: "Xu " +0x987d: "Wan " +0x987e: "Gu " +0x987f: "Dun " +0x9880: "Qi " +0x9881: "Ban " +0x9882: "Song " +0x9883: "Hang " +0x9884: "Yu " +0x9885: "Lu " +0x9886: "Ling " +0x9887: "Po " +0x9888: "Jing " +0x9889: "Jie " +0x988a: "Jia " +0x988b: "Tian " +0x988c: "Han " +0x988d: "Ying " +0x988e: "Jiong " +0x988f: "Hai " +0x9890: "Yi " +0x9891: "Pin " +0x9892: "Hui " +0x9893: "Tui " +0x9894: "Han " +0x9895: "Ying " +0x9896: "Ying " +0x9897: "Ke " +0x9898: "Ti " +0x9899: "Yong " +0x989a: "E " +0x989b: "Zhuan " +0x989c: "Yan " +0x989d: "E " +0x989e: "Nie " +0x989f: "Man " +0x98a0: "Dian " +0x98a1: "Sang " +0x98a2: "Hao " +0x98a3: "Lei " +0x98a4: "Zhan " +0x98a5: "Ru " +0x98a6: "Pin " +0x98a7: "Quan " +0x98a8: "Feng " +0x98a9: "Biao " +0x98aa: "Oroshi " +0x98ab: "Fu " +0x98ac: "Xia " +0x98ad: "Zhan " +0x98ae: "Biao " +0x98af: "Sa " +0x98b0: "Ba " +0x98b1: "Tai " +0x98b2: "Lie " +0x98b3: "Gua " +0x98b4: "Xuan " +0x98b5: "Shao " +0x98b6: "Ju " +0x98b7: "Bi " +0x98b8: "Si " +0x98b9: "Wei " +0x98ba: "Yang " +0x98bb: "Yao " +0x98bc: "Sou " +0x98bd: "Kai " +0x98be: "Sao " +0x98bf: "Fan " +0x98c0: "Liu " +0x98c1: "Xi " +0x98c2: "Liao " +0x98c3: "Piao " +0x98c4: "Piao " +0x98c5: "Liu " +0x98c6: "Biao " +0x98c7: "Biao " +0x98c8: "Biao " +0x98c9: "Liao " +0x98ca: "[?] " +0x98cb: "Se " +0x98cc: "Feng " +0x98cd: "Biao " +0x98ce: "Feng " +0x98cf: "Yang " +0x98d0: "Zhan " +0x98d1: "Biao " +0x98d2: "Sa " +0x98d3: "Ju " +0x98d4: "Si " +0x98d5: "Sou " +0x98d6: "Yao " +0x98d7: "Liu " +0x98d8: "Piao " +0x98d9: "Biao " +0x98da: "Biao " +0x98db: "Fei " +0x98dc: "Fan " +0x98dd: "Fei " +0x98de: "Fei " +0x98df: "Shi " +0x98e0: "Shi " +0x98e1: "Can " +0x98e2: "Ji " +0x98e3: "Ding " +0x98e4: "Si " +0x98e5: "Tuo " +0x98e6: "Zhan " +0x98e7: "Sun " +0x98e8: "Xiang " +0x98e9: "Tun " +0x98ea: "Ren " +0x98eb: "Yu " +0x98ec: "Juan " +0x98ed: "Chi " +0x98ee: "Yin " +0x98ef: "Fan " +0x98f0: "Fan " +0x98f1: "Sun " +0x98f2: "Yin " +0x98f3: "Zhu " +0x98f4: "Yi " +0x98f5: "Zhai " +0x98f6: "Bi " +0x98f7: "Jie " +0x98f8: "Tao " +0x98f9: "Liu " +0x98fa: "Ci " +0x98fb: "Tie " +0x98fc: "Si " +0x98fd: "Bao " +0x98fe: "Shi " +0x98ff: "Duo " +/* x099 */ +0x9900: "Hai " +0x9901: "Ren " +0x9902: "Tian " +0x9903: "Jiao " +0x9904: "Jia " +0x9905: "Bing " +0x9906: "Yao " +0x9907: "Tong " +0x9908: "Ci " +0x9909: "Xiang " +0x990a: "Yang " +0x990b: "Yang " +0x990c: "Er " +0x990d: "Yan " +0x990e: "Le " +0x990f: "Yi " +0x9910: "Can " +0x9911: "Bo " +0x9912: "Nei " +0x9913: "E " +0x9914: "Bu " +0x9915: "Jun " +0x9916: "Dou " +0x9917: "Su " +0x9918: "Yu " +0x9919: "Shi " +0x991a: "Yao " +0x991b: "Hun " +0x991c: "Guo " +0x991d: "Shi " +0x991e: "Jian " +0x991f: "Zhui " +0x9920: "Bing " +0x9921: "Xian " +0x9922: "Bu " +0x9923: "Ye " +0x9924: "Tan " +0x9925: "Fei " +0x9926: "Zhang " +0x9927: "Wei " +0x9928: "Guan " +0x9929: "E " +0x992a: "Nuan " +0x992b: "Hun " +0x992c: "Hu " +0x992d: "Huang " +0x992e: "Tie " +0x992f: "Hui " +0x9930: "Jian " +0x9931: "Hou " +0x9932: "He " +0x9933: "Xing " +0x9934: "Fen " +0x9935: "Wei " +0x9936: "Gu " +0x9937: "Cha " +0x9938: "Song " +0x9939: "Tang " +0x993a: "Bo " +0x993b: "Gao " +0x993c: "Xi " +0x993d: "Kui " +0x993e: "Liu " +0x993f: "Sou " +0x9940: "Tao " +0x9941: "Ye " +0x9942: "Yun " +0x9943: "Mo " +0x9944: "Tang " +0x9945: "Man " +0x9946: "Bi " +0x9947: "Yu " +0x9948: "Xiu " +0x9949: "Jin " +0x994a: "San " +0x994b: "Kui " +0x994c: "Zhuan " +0x994d: "Shan " +0x994e: "Chi " +0x994f: "Dan " +0x9950: "Yi " +0x9951: "Ji " +0x9952: "Rao " +0x9953: "Cheng " +0x9954: "Yong " +0x9955: "Tao " +0x9956: "Hui " +0x9957: "Xiang " +0x9958: "Zhan " +0x9959: "Fen " +0x995a: "Hai " +0x995b: "Meng " +0x995c: "Yan " +0x995d: "Mo " +0x995e: "Chan " +0x995f: "Xiang " +0x9960: "Luo " +0x9961: "Zuan " +0x9962: "Nang " +0x9963: "Shi " +0x9964: "Ding " +0x9965: "Ji " +0x9966: "Tuo " +0x9967: "Xing " +0x9968: "Tun " +0x9969: "Xi " +0x996a: "Ren " +0x996b: "Yu " +0x996c: "Chi " +0x996d: "Fan " +0x996e: "Yin " +0x996f: "Jian " +0x9970: "Shi " +0x9971: "Bao " +0x9972: "Si " +0x9973: "Duo " +0x9974: "Yi " +0x9975: "Er " +0x9976: "Rao " +0x9977: "Xiang " +0x9978: "Jia " +0x9979: "Le " +0x997a: "Jiao " +0x997b: "Yi " +0x997c: "Bing " +0x997d: "Bo " +0x997e: "Dou " +0x997f: "E " +0x9980: "Yu " +0x9981: "Nei " +0x9982: "Jun " +0x9983: "Guo " +0x9984: "Hun " +0x9985: "Xian " +0x9986: "Guan " +0x9987: "Cha " +0x9988: "Kui " +0x9989: "Gu " +0x998a: "Sou " +0x998b: "Chan " +0x998c: "Ye " +0x998d: "Mo " +0x998e: "Bo " +0x998f: "Liu " +0x9990: "Xiu " +0x9991: "Jin " +0x9992: "Man " +0x9993: "San " +0x9994: "Zhuan " +0x9995: "Nang " +0x9996: "Shou " +0x9997: "Kui " +0x9998: "Guo " +0x9999: "Xiang " +0x999a: "Fen " +0x999b: "Ba " +0x999c: "Ni " +0x999d: "Bi " +0x999e: "Bo " +0x999f: "Tu " +0x99a0: "Han " +0x99a1: "Fei " +0x99a2: "Jian " +0x99a3: "An " +0x99a4: "Ai " +0x99a5: "Fu " +0x99a6: "Xian " +0x99a7: "Wen " +0x99a8: "Xin " +0x99a9: "Fen " +0x99aa: "Bin " +0x99ab: "Xing " +0x99ac: "Ma " +0x99ad: "Yu " +0x99ae: "Feng " +0x99af: "Han " +0x99b0: "Di " +0x99b1: "Tuo " +0x99b2: "Tuo " +0x99b3: "Chi " +0x99b4: "Xun " +0x99b5: "Zhu " +0x99b6: "Zhi " +0x99b7: "Pei " +0x99b8: "Xin " +0x99b9: "Ri " +0x99ba: "Sa " +0x99bb: "Yin " +0x99bc: "Wen " +0x99bd: "Zhi " +0x99be: "Dan " +0x99bf: "Lu " +0x99c0: "You " +0x99c1: "Bo " +0x99c2: "Bao " +0x99c3: "Kuai " +0x99c4: "Tuo " +0x99c5: "Yi " +0x99c6: "Qu " +0x99c7: "[?] " +0x99c8: "Qu " +0x99c9: "Jiong " +0x99ca: "Bo " +0x99cb: "Zhao " +0x99cc: "Yuan " +0x99cd: "Peng " +0x99ce: "Zhou " +0x99cf: "Ju " +0x99d0: "Zhu " +0x99d1: "Nu " +0x99d2: "Ju " +0x99d3: "Pi " +0x99d4: "Zang " +0x99d5: "Jia " +0x99d6: "Ling " +0x99d7: "Zhen " +0x99d8: "Tai " +0x99d9: "Fu " +0x99da: "Yang " +0x99db: "Shi " +0x99dc: "Bi " +0x99dd: "Tuo " +0x99de: "Tuo " +0x99df: "Si " +0x99e0: "Liu " +0x99e1: "Ma " +0x99e2: "Pian " +0x99e3: "Tao " +0x99e4: "Zhi " +0x99e5: "Rong " +0x99e6: "Teng " +0x99e7: "Dong " +0x99e8: "Xun " +0x99e9: "Quan " +0x99ea: "Shen " +0x99eb: "Jiong " +0x99ec: "Er " +0x99ed: "Hai " +0x99ee: "Bo " +0x99ef: "Zhu " +0x99f0: "Yin " +0x99f1: "Luo " +0x99f2: "Shuu " +0x99f3: "Dan " +0x99f4: "Xie " +0x99f5: "Liu " +0x99f6: "Ju " +0x99f7: "Song " +0x99f8: "Qin " +0x99f9: "Mang " +0x99fa: "Liang " +0x99fb: "Han " +0x99fc: "Tu " +0x99fd: "Xuan " +0x99fe: "Tui " +0x99ff: "Jun " +/* x09a */ +0x9a00: "E " +0x9a01: "Cheng " +0x9a02: "Xin " +0x9a03: "Ai " +0x9a04: "Lu " +0x9a05: "Zhui " +0x9a06: "Zhou " +0x9a07: "She " +0x9a08: "Pian " +0x9a09: "Kun " +0x9a0a: "Tao " +0x9a0b: "Lai " +0x9a0c: "Zong " +0x9a0d: "Ke " +0x9a0e: "Qi " +0x9a0f: "Qi " +0x9a10: "Yan " +0x9a11: "Fei " +0x9a12: "Sao " +0x9a13: "Yan " +0x9a14: "Jie " +0x9a15: "Yao " +0x9a16: "Wu " +0x9a17: "Pian " +0x9a18: "Cong " +0x9a19: "Pian " +0x9a1a: "Qian " +0x9a1b: "Fei " +0x9a1c: "Huang " +0x9a1d: "Jian " +0x9a1e: "Huo " +0x9a1f: "Yu " +0x9a20: "Ti " +0x9a21: "Quan " +0x9a22: "Xia " +0x9a23: "Zong " +0x9a24: "Kui " +0x9a25: "Rou " +0x9a26: "Si " +0x9a27: "Gua " +0x9a28: "Tuo " +0x9a29: "Kui " +0x9a2a: "Sou " +0x9a2b: "Qian " +0x9a2c: "Cheng " +0x9a2d: "Zhi " +0x9a2e: "Liu " +0x9a2f: "Pang " +0x9a30: "Teng " +0x9a31: "Xi " +0x9a32: "Cao " +0x9a33: "Du " +0x9a34: "Yan " +0x9a35: "Yuan " +0x9a36: "Zou " +0x9a37: "Sao " +0x9a38: "Shan " +0x9a39: "Li " +0x9a3a: "Zhi " +0x9a3b: "Shuang " +0x9a3c: "Lu " +0x9a3d: "Xi " +0x9a3e: "Luo " +0x9a3f: "Zhang " +0x9a40: "Mo " +0x9a41: "Ao " +0x9a42: "Can " +0x9a43: "Piao " +0x9a44: "Cong " +0x9a45: "Qu " +0x9a46: "Bi " +0x9a47: "Zhi " +0x9a48: "Yu " +0x9a49: "Xu " +0x9a4a: "Hua " +0x9a4b: "Bo " +0x9a4c: "Su " +0x9a4d: "Xiao " +0x9a4e: "Lin " +0x9a4f: "Chan " +0x9a50: "Dun " +0x9a51: "Liu " +0x9a52: "Tuo " +0x9a53: "Zeng " +0x9a54: "Tan " +0x9a55: "Jiao " +0x9a56: "Tie " +0x9a57: "Yan " +0x9a58: "Luo " +0x9a59: "Zhan " +0x9a5a: "Jing " +0x9a5b: "Yi " +0x9a5c: "Ye " +0x9a5d: "Tuo " +0x9a5e: "Bin " +0x9a5f: "Zou " +0x9a60: "Yan " +0x9a61: "Peng " +0x9a62: "Lu " +0x9a63: "Teng " +0x9a64: "Xiang " +0x9a65: "Ji " +0x9a66: "Shuang " +0x9a67: "Ju " +0x9a68: "Xi " +0x9a69: "Huan " +0x9a6a: "Li " +0x9a6b: "Biao " +0x9a6c: "Ma " +0x9a6d: "Yu " +0x9a6e: "Tuo " +0x9a6f: "Xun " +0x9a70: "Chi " +0x9a71: "Qu " +0x9a72: "Ri " +0x9a73: "Bo " +0x9a74: "Lu " +0x9a75: "Zang " +0x9a76: "Shi " +0x9a77: "Si " +0x9a78: "Fu " +0x9a79: "Ju " +0x9a7a: "Zou " +0x9a7b: "Zhu " +0x9a7c: "Tuo " +0x9a7d: "Nu " +0x9a7e: "Jia " +0x9a7f: "Yi " +0x9a80: "Tai " +0x9a81: "Xiao " +0x9a82: "Ma " +0x9a83: "Yin " +0x9a84: "Jiao " +0x9a85: "Hua " +0x9a86: "Luo " +0x9a87: "Hai " +0x9a88: "Pian " +0x9a89: "Biao " +0x9a8a: "Li " +0x9a8b: "Cheng " +0x9a8c: "Yan " +0x9a8d: "Xin " +0x9a8e: "Qin " +0x9a8f: "Jun " +0x9a90: "Qi " +0x9a91: "Qi " +0x9a92: "Ke " +0x9a93: "Zhui " +0x9a94: "Zong " +0x9a95: "Su " +0x9a96: "Can " +0x9a97: "Pian " +0x9a98: "Zhi " +0x9a99: "Kui " +0x9a9a: "Sao " +0x9a9b: "Wu " +0x9a9c: "Ao " +0x9a9d: "Liu " +0x9a9e: "Qian " +0x9a9f: "Shan " +0x9aa0: "Piao " +0x9aa1: "Luo " +0x9aa2: "Cong " +0x9aa3: "Chan " +0x9aa4: "Zou " +0x9aa5: "Ji " +0x9aa6: "Shuang " +0x9aa7: "Xiang " +0x9aa8: "Gu " +0x9aa9: "Wei " +0x9aaa: "Wei " +0x9aab: "Wei " +0x9aac: "Yu " +0x9aad: "Gan " +0x9aae: "Yi " +0x9aaf: "Ang " +0x9ab0: "Tou " +0x9ab1: "Xie " +0x9ab2: "Bao " +0x9ab3: "Bi " +0x9ab4: "Chi " +0x9ab5: "Ti " +0x9ab6: "Di " +0x9ab7: "Ku " +0x9ab8: "Hai " +0x9ab9: "Qiao " +0x9aba: "Gou " +0x9abb: "Kua " +0x9abc: "Ge " +0x9abd: "Tui " +0x9abe: "Geng " +0x9abf: "Pian " +0x9ac0: "Bi " +0x9ac1: "Ke " +0x9ac2: "Ka " +0x9ac3: "Yu " +0x9ac4: "Sui " +0x9ac5: "Lou " +0x9ac6: "Bo " +0x9ac7: "Xiao " +0x9ac8: "Pang " +0x9ac9: "Bo " +0x9aca: "Ci " +0x9acb: "Kuan " +0x9acc: "Bin " +0x9acd: "Mo " +0x9ace: "Liao " +0x9acf: "Lou " +0x9ad0: "Nao " +0x9ad1: "Du " +0x9ad2: "Zang " +0x9ad3: "Sui " +0x9ad4: "Ti " +0x9ad5: "Bin " +0x9ad6: "Kuan " +0x9ad7: "Lu " +0x9ad8: "Gao " +0x9ad9: "Gao " +0x9ada: "Qiao " +0x9adb: "Kao " +0x9adc: "Qiao " +0x9add: "Lao " +0x9ade: "Zao " +0x9adf: "Biao " +0x9ae0: "Kun " +0x9ae1: "Kun " +0x9ae2: "Ti " +0x9ae3: "Fang " +0x9ae4: "Xiu " +0x9ae5: "Ran " +0x9ae6: "Mao " +0x9ae7: "Dan " +0x9ae8: "Kun " +0x9ae9: "Bin " +0x9aea: "Fa " +0x9aeb: "Tiao " +0x9aec: "Peng " +0x9aed: "Zi " +0x9aee: "Fa " +0x9aef: "Ran " +0x9af0: "Ti " +0x9af1: "Pao " +0x9af2: "Pi " +0x9af3: "Mao " +0x9af4: "Fu " +0x9af5: "Er " +0x9af6: "Rong " +0x9af7: "Qu " +0x9af8: "Gong " +0x9af9: "Xiu " +0x9afa: "Gua " +0x9afb: "Ji " +0x9afc: "Peng " +0x9afd: "Zhua " +0x9afe: "Shao " +0x9aff: "Sha " +/* x09b */ +0x9b00: "Ti " +0x9b01: "Li " +0x9b02: "Bin " +0x9b03: "Zong " +0x9b04: "Ti " +0x9b05: "Peng " +0x9b06: "Song " +0x9b07: "Zheng " +0x9b08: "Quan " +0x9b09: "Zong " +0x9b0a: "Shun " +0x9b0b: "Jian " +0x9b0c: "Duo " +0x9b0d: "Hu " +0x9b0e: "La " +0x9b0f: "Jiu " +0x9b10: "Qi " +0x9b11: "Lian " +0x9b12: "Zhen " +0x9b13: "Bin " +0x9b14: "Peng " +0x9b15: "Mo " +0x9b16: "San " +0x9b17: "Man " +0x9b18: "Man " +0x9b19: "Seng " +0x9b1a: "Xu " +0x9b1b: "Lie " +0x9b1c: "Qian " +0x9b1d: "Qian " +0x9b1e: "Nong " +0x9b1f: "Huan " +0x9b20: "Kuai " +0x9b21: "Ning " +0x9b22: "Bin " +0x9b23: "Lie " +0x9b24: "Rang " +0x9b25: "Dou " +0x9b26: "Dou " +0x9b27: "Nao " +0x9b28: "Hong " +0x9b29: "Xi " +0x9b2a: "Dou " +0x9b2b: "Han " +0x9b2c: "Dou " +0x9b2d: "Dou " +0x9b2e: "Jiu " +0x9b2f: "Chang " +0x9b30: "Yu " +0x9b31: "Yu " +0x9b32: "Li " +0x9b33: "Juan " +0x9b34: "Fu " +0x9b35: "Qian " +0x9b36: "Gui " +0x9b37: "Zong " +0x9b38: "Liu " +0x9b39: "Gui " +0x9b3a: "Shang " +0x9b3b: "Yu " +0x9b3c: "Gui " +0x9b3d: "Mei " +0x9b3e: "Ji " +0x9b3f: "Qi " +0x9b40: "Jie " +0x9b41: "Kui " +0x9b42: "Hun " +0x9b43: "Ba " +0x9b44: "Po " +0x9b45: "Mei " +0x9b46: "Xu " +0x9b47: "Yan " +0x9b48: "Xiao " +0x9b49: "Liang " +0x9b4a: "Yu " +0x9b4b: "Tui " +0x9b4c: "Qi " +0x9b4d: "Wang " +0x9b4e: "Liang " +0x9b4f: "Wei " +0x9b50: "Jian " +0x9b51: "Chi " +0x9b52: "Piao " +0x9b53: "Bi " +0x9b54: "Mo " +0x9b55: "Ji " +0x9b56: "Xu " +0x9b57: "Chou " +0x9b58: "Yan " +0x9b59: "Zhan " +0x9b5a: "Yu " +0x9b5b: "Dao " +0x9b5c: "Ren " +0x9b5d: "Ji " +0x9b5e: "Eri " +0x9b5f: "Gong " +0x9b60: "Tuo " +0x9b61: "Diao " +0x9b62: "Ji " +0x9b63: "Xu " +0x9b64: "E " +0x9b65: "E " +0x9b66: "Sha " +0x9b67: "Hang " +0x9b68: "Tun " +0x9b69: "Mo " +0x9b6a: "Jie " +0x9b6b: "Shen " +0x9b6c: "Fan " +0x9b6d: "Yuan " +0x9b6e: "Bi " +0x9b6f: "Lu " +0x9b70: "Wen " +0x9b71: "Hu " +0x9b72: "Lu " +0x9b73: "Za " +0x9b74: "Fang " +0x9b75: "Fen " +0x9b76: "Na " +0x9b77: "You " +0x9b78: "Namazu " +0x9b79: "Todo " +0x9b7a: "He " +0x9b7b: "Xia " +0x9b7c: "Qu " +0x9b7d: "Han " +0x9b7e: "Pi " +0x9b7f: "Ling " +0x9b80: "Tuo " +0x9b81: "Bo " +0x9b82: "Qiu " +0x9b83: "Ping " +0x9b84: "Fu " +0x9b85: "Bi " +0x9b86: "Ji " +0x9b87: "Wei " +0x9b88: "Ju " +0x9b89: "Diao " +0x9b8a: "Bo " +0x9b8b: "You " +0x9b8c: "Gun " +0x9b8d: "Pi " +0x9b8e: "Nian " +0x9b8f: "Xing " +0x9b90: "Tai " +0x9b91: "Bao " +0x9b92: "Fu " +0x9b93: "Zha " +0x9b94: "Ju " +0x9b95: "Gu " +0x9b96: "Kajika " +0x9b97: "Tong " +0x9b98: "[?] " +0x9b99: "Ta " +0x9b9a: "Jie " +0x9b9b: "Shu " +0x9b9c: "Hou " +0x9b9d: "Xiang " +0x9b9e: "Er " +0x9b9f: "An " +0x9ba0: "Wei " +0x9ba1: "Tiao " +0x9ba2: "Zhu " +0x9ba3: "Yin " +0x9ba4: "Lie " +0x9ba5: "Luo " +0x9ba6: "Tong " +0x9ba7: "Yi " +0x9ba8: "Qi " +0x9ba9: "Bing " +0x9baa: "Wei " +0x9bab: "Jiao " +0x9bac: "Bu " +0x9bad: "Gui " +0x9bae: "Xian " +0x9baf: "Ge " +0x9bb0: "Hui " +0x9bb1: "Bora " +0x9bb2: "Mate " +0x9bb3: "Kao " +0x9bb4: "Gori " +0x9bb5: "Duo " +0x9bb6: "Jun " +0x9bb7: "Ti " +0x9bb8: "Man " +0x9bb9: "Xiao " +0x9bba: "Za " +0x9bbb: "Sha " +0x9bbc: "Qin " +0x9bbd: "Yu " +0x9bbe: "Nei " +0x9bbf: "Zhe " +0x9bc0: "Gun " +0x9bc1: "Geng " +0x9bc2: "Su " +0x9bc3: "Wu " +0x9bc4: "Qiu " +0x9bc5: "Ting " +0x9bc6: "Fu " +0x9bc7: "Wan " +0x9bc8: "You " +0x9bc9: "Li " +0x9bca: "Sha " +0x9bcb: "Sha " +0x9bcc: "Gao " +0x9bcd: "Meng " +0x9bce: "Ugui " +0x9bcf: "Asari " +0x9bd0: "Subashiri " +0x9bd1: "Kazunoko " +0x9bd2: "Yong " +0x9bd3: "Ni " +0x9bd4: "Zi " +0x9bd5: "Qi " +0x9bd6: "Qing " +0x9bd7: "Xiang " +0x9bd8: "Nei " +0x9bd9: "Chun " +0x9bda: "Ji " +0x9bdb: "Diao " +0x9bdc: "Qie " +0x9bdd: "Gu " +0x9bde: "Zhou " +0x9bdf: "Dong " +0x9be0: "Lai " +0x9be1: "Fei " +0x9be2: "Ni " +0x9be3: "Yi " +0x9be4: "Kun " +0x9be5: "Lu " +0x9be6: "Jiu " +0x9be7: "Chang " +0x9be8: "Jing " +0x9be9: "Lun " +0x9bea: "Ling " +0x9beb: "Zou " +0x9bec: "Li " +0x9bed: "Meng " +0x9bee: "Zong " +0x9bef: "Zhi " +0x9bf0: "Nian " +0x9bf1: "Shachi " +0x9bf2: "Dojou " +0x9bf3: "Sukesou " +0x9bf4: "Shi " +0x9bf5: "Shen " +0x9bf6: "Hun " +0x9bf7: "Shi " +0x9bf8: "Hou " +0x9bf9: "Xing " +0x9bfa: "Zhu " +0x9bfb: "La " +0x9bfc: "Zong " +0x9bfd: "Ji " +0x9bfe: "Bian " +0x9bff: "Bian " +/* x09c */ +0x9c00: "Huan " +0x9c01: "Quan " +0x9c02: "Ze " +0x9c03: "Wei " +0x9c04: "Wei " +0x9c05: "Yu " +0x9c06: "Qun " +0x9c07: "Rou " +0x9c08: "Die " +0x9c09: "Huang " +0x9c0a: "Lian " +0x9c0b: "Yan " +0x9c0c: "Qiu " +0x9c0d: "Qiu " +0x9c0e: "Jian " +0x9c0f: "Bi " +0x9c10: "E " +0x9c11: "Yang " +0x9c12: "Fu " +0x9c13: "Sai " +0x9c14: "Jian " +0x9c15: "Xia " +0x9c16: "Tuo " +0x9c17: "Hu " +0x9c18: "Muroaji " +0x9c19: "Ruo " +0x9c1a: "Haraka " +0x9c1b: "Wen " +0x9c1c: "Jian " +0x9c1d: "Hao " +0x9c1e: "Wu " +0x9c1f: "Fang " +0x9c20: "Sao " +0x9c21: "Liu " +0x9c22: "Ma " +0x9c23: "Shi " +0x9c24: "Shi " +0x9c25: "Yin " +0x9c26: "Z " +0x9c27: "Teng " +0x9c28: "Ta " +0x9c29: "Yao " +0x9c2a: "Ge " +0x9c2b: "Rong " +0x9c2c: "Qian " +0x9c2d: "Qi " +0x9c2e: "Wen " +0x9c2f: "Ruo " +0x9c30: "Hatahata " +0x9c31: "Lian " +0x9c32: "Ao " +0x9c33: "Le " +0x9c34: "Hui " +0x9c35: "Min " +0x9c36: "Ji " +0x9c37: "Tiao " +0x9c38: "Qu " +0x9c39: "Jian " +0x9c3a: "Sao " +0x9c3b: "Man " +0x9c3c: "Xi " +0x9c3d: "Qiu " +0x9c3e: "Biao " +0x9c3f: "Ji " +0x9c40: "Ji " +0x9c41: "Zhu " +0x9c42: "Jiang " +0x9c43: "Qiu " +0x9c44: "Zhuan " +0x9c45: "Yong " +0x9c46: "Zhang " +0x9c47: "Kang " +0x9c48: "Xue " +0x9c49: "Bie " +0x9c4a: "Jue " +0x9c4b: "Qu " +0x9c4c: "Xiang " +0x9c4d: "Bo " +0x9c4e: "Jiao " +0x9c4f: "Xun " +0x9c50: "Su " +0x9c51: "Huang " +0x9c52: "Zun " +0x9c53: "Shan " +0x9c54: "Shan " +0x9c55: "Fan " +0x9c56: "Jue " +0x9c57: "Lin " +0x9c58: "Xun " +0x9c59: "Miao " +0x9c5a: "Xi " +0x9c5b: "Eso " +0x9c5c: "Kyou " +0x9c5d: "Fen " +0x9c5e: "Guan " +0x9c5f: "Hou " +0x9c60: "Kuai " +0x9c61: "Zei " +0x9c62: "Sao " +0x9c63: "Zhan " +0x9c64: "Gan " +0x9c65: "Gui " +0x9c66: "Sheng " +0x9c67: "Li " +0x9c68: "Chang " +0x9c69: "Hatahata " +0x9c6a: "Shiira " +0x9c6b: "Mutsu " +0x9c6c: "Ru " +0x9c6d: "Ji " +0x9c6e: "Xu " +0x9c6f: "Huo " +0x9c70: "Shiira " +0x9c71: "Li " +0x9c72: "Lie " +0x9c73: "Li " +0x9c74: "Mie " +0x9c75: "Zhen " +0x9c76: "Xiang " +0x9c77: "E " +0x9c78: "Lu " +0x9c79: "Guan " +0x9c7a: "Li " +0x9c7b: "Xian " +0x9c7c: "Yu " +0x9c7d: "Dao " +0x9c7e: "Ji " +0x9c7f: "You " +0x9c80: "Tun " +0x9c81: "Lu " +0x9c82: "Fang " +0x9c83: "Ba " +0x9c84: "He " +0x9c85: "Bo " +0x9c86: "Ping " +0x9c87: "Nian " +0x9c88: "Lu " +0x9c89: "You " +0x9c8a: "Zha " +0x9c8b: "Fu " +0x9c8c: "Bo " +0x9c8d: "Bao " +0x9c8e: "Hou " +0x9c8f: "Pi " +0x9c90: "Tai " +0x9c91: "Gui " +0x9c92: "Jie " +0x9c93: "Kao " +0x9c94: "Wei " +0x9c95: "Er " +0x9c96: "Tong " +0x9c97: "Ze " +0x9c98: "Hou " +0x9c99: "Kuai " +0x9c9a: "Ji " +0x9c9b: "Jiao " +0x9c9c: "Xian " +0x9c9d: "Za " +0x9c9e: "Xiang " +0x9c9f: "Xun " +0x9ca0: "Geng " +0x9ca1: "Li " +0x9ca2: "Lian " +0x9ca3: "Jian " +0x9ca4: "Li " +0x9ca5: "Shi " +0x9ca6: "Tiao " +0x9ca7: "Gun " +0x9ca8: "Sha " +0x9ca9: "Wan " +0x9caa: "Jun " +0x9cab: "Ji " +0x9cac: "Yong " +0x9cad: "Qing " +0x9cae: "Ling " +0x9caf: "Qi " +0x9cb0: "Zou " +0x9cb1: "Fei " +0x9cb2: "Kun " +0x9cb3: "Chang " +0x9cb4: "Gu " +0x9cb5: "Ni " +0x9cb6: "Nian " +0x9cb7: "Diao " +0x9cb8: "Jing " +0x9cb9: "Shen " +0x9cba: "Shi " +0x9cbb: "Zi " +0x9cbc: "Fen " +0x9cbd: "Die " +0x9cbe: "Bi " +0x9cbf: "Chang " +0x9cc0: "Shi " +0x9cc1: "Wen " +0x9cc2: "Wei " +0x9cc3: "Sai " +0x9cc4: "E " +0x9cc5: "Qiu " +0x9cc6: "Fu " +0x9cc7: "Huang " +0x9cc8: "Quan " +0x9cc9: "Jiang " +0x9cca: "Bian " +0x9ccb: "Sao " +0x9ccc: "Ao " +0x9ccd: "Qi " +0x9cce: "Ta " +0x9ccf: "Yin " +0x9cd0: "Yao " +0x9cd1: "Fang " +0x9cd2: "Jian " +0x9cd3: "Le " +0x9cd4: "Biao " +0x9cd5: "Xue " +0x9cd6: "Bie " +0x9cd7: "Man " +0x9cd8: "Min " +0x9cd9: "Yong " +0x9cda: "Wei " +0x9cdb: "Xi " +0x9cdc: "Jue " +0x9cdd: "Shan " +0x9cde: "Lin " +0x9cdf: "Zun " +0x9ce0: "Huo " +0x9ce1: "Gan " +0x9ce2: "Li " +0x9ce3: "Zhan " +0x9ce4: "Guan " +0x9ce5: "Niao " +0x9ce6: "Yi " +0x9ce7: "Fu " +0x9ce8: "Li " +0x9ce9: "Jiu " +0x9cea: "Bu " +0x9ceb: "Yan " +0x9cec: "Fu " +0x9ced: "Diao " +0x9cee: "Ji " +0x9cef: "Feng " +0x9cf0: "Nio " +0x9cf1: "Gan " +0x9cf2: "Shi " +0x9cf3: "Feng " +0x9cf4: "Ming " +0x9cf5: "Bao " +0x9cf6: "Yuan " +0x9cf7: "Zhi " +0x9cf8: "Hu " +0x9cf9: "Qin " +0x9cfa: "Fu " +0x9cfb: "Fen " +0x9cfc: "Wen " +0x9cfd: "Jian " +0x9cfe: "Shi " +0x9cff: "Yu " +/* x09d */ +0x9d00: "Fou " +0x9d01: "Yiao " +0x9d02: "Jue " +0x9d03: "Jue " +0x9d04: "Pi " +0x9d05: "Huan " +0x9d06: "Zhen " +0x9d07: "Bao " +0x9d08: "Yan " +0x9d09: "Ya " +0x9d0a: "Zheng " +0x9d0b: "Fang " +0x9d0c: "Feng " +0x9d0d: "Wen " +0x9d0e: "Ou " +0x9d0f: "Te " +0x9d10: "Jia " +0x9d11: "Nu " +0x9d12: "Ling " +0x9d13: "Mie " +0x9d14: "Fu " +0x9d15: "Tuo " +0x9d16: "Wen " +0x9d17: "Li " +0x9d18: "Bian " +0x9d19: "Zhi " +0x9d1a: "Ge " +0x9d1b: "Yuan " +0x9d1c: "Zi " +0x9d1d: "Qu " +0x9d1e: "Xiao " +0x9d1f: "Zhi " +0x9d20: "Dan " +0x9d21: "Ju " +0x9d22: "You " +0x9d23: "Gu " +0x9d24: "Zhong " +0x9d25: "Yu " +0x9d26: "Yang " +0x9d27: "Rong " +0x9d28: "Ya " +0x9d29: "Tie " +0x9d2a: "Yu " +0x9d2b: "Shigi " +0x9d2c: "Ying " +0x9d2d: "Zhui " +0x9d2e: "Wu " +0x9d2f: "Er " +0x9d30: "Gua " +0x9d31: "Ai " +0x9d32: "Zhi " +0x9d33: "Yan " +0x9d34: "Heng " +0x9d35: "Jiao " +0x9d36: "Ji " +0x9d37: "Lie " +0x9d38: "Zhu " +0x9d39: "Ren " +0x9d3a: "Yi " +0x9d3b: "Hong " +0x9d3c: "Luo " +0x9d3d: "Ru " +0x9d3e: "Mou " +0x9d3f: "Ge " +0x9d40: "Ren " +0x9d41: "Jiao " +0x9d42: "Xiu " +0x9d43: "Zhou " +0x9d44: "Zhi " +0x9d45: "Luo " +0x9d46: "Chidori " +0x9d47: "Toki " +0x9d48: "Ten " +0x9d49: "Luan " +0x9d4a: "Jia " +0x9d4b: "Ji " +0x9d4c: "Yu " +0x9d4d: "Huan " +0x9d4e: "Tuo " +0x9d4f: "Bu " +0x9d50: "Wu " +0x9d51: "Juan " +0x9d52: "Yu " +0x9d53: "Bo " +0x9d54: "Xun " +0x9d55: "Xun " +0x9d56: "Bi " +0x9d57: "Xi " +0x9d58: "Jun " +0x9d59: "Ju " +0x9d5a: "Tu " +0x9d5b: "Jing " +0x9d5c: "Ti " +0x9d5d: "E " +0x9d5e: "E " +0x9d5f: "Kuang " +0x9d60: "Hu " +0x9d61: "Wu " +0x9d62: "Shen " +0x9d63: "Lai " +0x9d64: "Ikaruga " +0x9d65: "Kakesu " +0x9d66: "Lu " +0x9d67: "Ping " +0x9d68: "Shu " +0x9d69: "Fu " +0x9d6a: "An " +0x9d6b: "Zhao " +0x9d6c: "Peng " +0x9d6d: "Qin " +0x9d6e: "Qian " +0x9d6f: "Bei " +0x9d70: "Diao " +0x9d71: "Lu " +0x9d72: "Que " +0x9d73: "Jian " +0x9d74: "Ju " +0x9d75: "Tu " +0x9d76: "Ya " +0x9d77: "Yuan " +0x9d78: "Qi " +0x9d79: "Li " +0x9d7a: "Ye " +0x9d7b: "Zhui " +0x9d7c: "Kong " +0x9d7d: "Zhui " +0x9d7e: "Kun " +0x9d7f: "Sheng " +0x9d80: "Qi " +0x9d81: "Jing " +0x9d82: "Yi " +0x9d83: "Yi " +0x9d84: "Jing " +0x9d85: "Zi " +0x9d86: "Lai " +0x9d87: "Dong " +0x9d88: "Qi " +0x9d89: "Chun " +0x9d8a: "Geng " +0x9d8b: "Ju " +0x9d8c: "Qu " +0x9d8d: "Isuka " +0x9d8e: "Kikuitadaki " +0x9d8f: "Ji " +0x9d90: "Shu " +0x9d91: "[?] " +0x9d92: "Chi " +0x9d93: "Miao " +0x9d94: "Rou " +0x9d95: "An " +0x9d96: "Qiu " +0x9d97: "Ti " +0x9d98: "Hu " +0x9d99: "Ti " +0x9d9a: "E " +0x9d9b: "Jie " +0x9d9c: "Mao " +0x9d9d: "Fu " +0x9d9e: "Chun " +0x9d9f: "Tu " +0x9da0: "Yan " +0x9da1: "He " +0x9da2: "Yuan " +0x9da3: "Pian " +0x9da4: "Yun " +0x9da5: "Mei " +0x9da6: "Hu " +0x9da7: "Ying " +0x9da8: "Dun " +0x9da9: "Mu " +0x9daa: "Ju " +0x9dab: "Tsugumi " +0x9dac: "Cang " +0x9dad: "Fang " +0x9dae: "Gu " +0x9daf: "Ying " +0x9db0: "Yuan " +0x9db1: "Xuan " +0x9db2: "Weng " +0x9db3: "Shi " +0x9db4: "He " +0x9db5: "Chu " +0x9db6: "Tang " +0x9db7: "Xia " +0x9db8: "Ruo " +0x9db9: "Liu " +0x9dba: "Ji " +0x9dbb: "Gu " +0x9dbc: "Jian " +0x9dbd: "Zhun " +0x9dbe: "Han " +0x9dbf: "Zi " +0x9dc0: "Zi " +0x9dc1: "Ni " +0x9dc2: "Yao " +0x9dc3: "Yan " +0x9dc4: "Ji " +0x9dc5: "Li " +0x9dc6: "Tian " +0x9dc7: "Kou " +0x9dc8: "Ti " +0x9dc9: "Ti " +0x9dca: "Ni " +0x9dcb: "Tu " +0x9dcc: "Ma " +0x9dcd: "Jiao " +0x9dce: "Gao " +0x9dcf: "Tian " +0x9dd0: "Chen " +0x9dd1: "Li " +0x9dd2: "Zhuan " +0x9dd3: "Zhe " +0x9dd4: "Ao " +0x9dd5: "Yao " +0x9dd6: "Yi " +0x9dd7: "Ou " +0x9dd8: "Chi " +0x9dd9: "Zhi " +0x9dda: "Liao " +0x9ddb: "Rong " +0x9ddc: "Lou " +0x9ddd: "Bi " +0x9dde: "Shuang " +0x9ddf: "Zhuo " +0x9de0: "Yu " +0x9de1: "Wu " +0x9de2: "Jue " +0x9de3: "Yin " +0x9de4: "Quan " +0x9de5: "Si " +0x9de6: "Jiao " +0x9de7: "Yi " +0x9de8: "Hua " +0x9de9: "Bi " +0x9dea: "Ying " +0x9deb: "Su " +0x9dec: "Huang " +0x9ded: "Fan " +0x9dee: "Jiao " +0x9def: "Liao " +0x9df0: "Yan " +0x9df1: "Kao " +0x9df2: "Jiu " +0x9df3: "Xian " +0x9df4: "Xian " +0x9df5: "Tu " +0x9df6: "Mai " +0x9df7: "Zun " +0x9df8: "Yu " +0x9df9: "Ying " +0x9dfa: "Lu " +0x9dfb: "Tuan " +0x9dfc: "Xian " +0x9dfd: "Xue " +0x9dfe: "Yi " +0x9dff: "Pi " +/* x09e */ +0x9e00: "Shu " +0x9e01: "Luo " +0x9e02: "Qi " +0x9e03: "Yi " +0x9e04: "Ji " +0x9e05: "Zhe " +0x9e06: "Yu " +0x9e07: "Zhan " +0x9e08: "Ye " +0x9e09: "Yang " +0x9e0a: "Pi " +0x9e0b: "Ning " +0x9e0c: "Huo " +0x9e0d: "Mi " +0x9e0e: "Ying " +0x9e0f: "Meng " +0x9e10: "Di " +0x9e11: "Yue " +0x9e12: "Yu " +0x9e13: "Lei " +0x9e14: "Bao " +0x9e15: "Lu " +0x9e16: "He " +0x9e17: "Long " +0x9e18: "Shuang " +0x9e19: "Yue " +0x9e1a: "Ying " +0x9e1b: "Guan " +0x9e1c: "Qu " +0x9e1d: "Li " +0x9e1e: "Luan " +0x9e1f: "Niao " +0x9e20: "Jiu " +0x9e21: "Ji " +0x9e22: "Yuan " +0x9e23: "Ming " +0x9e24: "Shi " +0x9e25: "Ou " +0x9e26: "Ya " +0x9e27: "Cang " +0x9e28: "Bao " +0x9e29: "Zhen " +0x9e2a: "Gu " +0x9e2b: "Dong " +0x9e2c: "Lu " +0x9e2d: "Ya " +0x9e2e: "Xiao " +0x9e2f: "Yang " +0x9e30: "Ling " +0x9e31: "Zhi " +0x9e32: "Qu " +0x9e33: "Yuan " +0x9e34: "Xue " +0x9e35: "Tuo " +0x9e36: "Si " +0x9e37: "Zhi " +0x9e38: "Er " +0x9e39: "Gua " +0x9e3a: "Xiu " +0x9e3b: "Heng " +0x9e3c: "Zhou " +0x9e3d: "Ge " +0x9e3e: "Luan " +0x9e3f: "Hong " +0x9e40: "Wu " +0x9e41: "Bo " +0x9e42: "Li " +0x9e43: "Juan " +0x9e44: "Hu " +0x9e45: "E " +0x9e46: "Yu " +0x9e47: "Xian " +0x9e48: "Ti " +0x9e49: "Wu " +0x9e4a: "Que " +0x9e4b: "Miao " +0x9e4c: "An " +0x9e4d: "Kun " +0x9e4e: "Bei " +0x9e4f: "Peng " +0x9e50: "Qian " +0x9e51: "Chun " +0x9e52: "Geng " +0x9e53: "Yuan " +0x9e54: "Su " +0x9e55: "Hu " +0x9e56: "He " +0x9e57: "E " +0x9e58: "Gu " +0x9e59: "Qiu " +0x9e5a: "Zi " +0x9e5b: "Mei " +0x9e5c: "Mu " +0x9e5d: "Ni " +0x9e5e: "Yao " +0x9e5f: "Weng " +0x9e60: "Liu " +0x9e61: "Ji " +0x9e62: "Ni " +0x9e63: "Jian " +0x9e64: "He " +0x9e65: "Yi " +0x9e66: "Ying " +0x9e67: "Zhe " +0x9e68: "Liao " +0x9e69: "Liao " +0x9e6a: "Jiao " +0x9e6b: "Jiu " +0x9e6c: "Yu " +0x9e6d: "Lu " +0x9e6e: "Xuan " +0x9e6f: "Zhan " +0x9e70: "Ying " +0x9e71: "Huo " +0x9e72: "Meng " +0x9e73: "Guan " +0x9e74: "Shuang " +0x9e75: "Lu " +0x9e76: "Jin " +0x9e77: "Ling " +0x9e78: "Jian " +0x9e79: "Xian " +0x9e7a: "Cuo " +0x9e7b: "Jian " +0x9e7c: "Jian " +0x9e7d: "Yan " +0x9e7e: "Cuo " +0x9e7f: "Lu " +0x9e80: "You " +0x9e81: "Cu " +0x9e82: "Ji " +0x9e83: "Biao " +0x9e84: "Cu " +0x9e85: "Biao " +0x9e86: "Zhu " +0x9e87: "Jun " +0x9e88: "Zhu " +0x9e89: "Jian " +0x9e8a: "Mi " +0x9e8b: "Mi " +0x9e8c: "Wu " +0x9e8d: "Liu " +0x9e8e: "Chen " +0x9e8f: "Jun " +0x9e90: "Lin " +0x9e91: "Ni " +0x9e92: "Qi " +0x9e93: "Lu " +0x9e94: "Jiu " +0x9e95: "Jun " +0x9e96: "Jing " +0x9e97: "Li " +0x9e98: "Xiang " +0x9e99: "Yan " +0x9e9a: "Jia " +0x9e9b: "Mi " +0x9e9c: "Li " +0x9e9d: "She " +0x9e9e: "Zhang " +0x9e9f: "Lin " +0x9ea0: "Jing " +0x9ea1: "Ji " +0x9ea2: "Ling " +0x9ea3: "Yan " +0x9ea4: "Cu " +0x9ea5: "Mai " +0x9ea6: "Mai " +0x9ea7: "Ge " +0x9ea8: "Chao " +0x9ea9: "Fu " +0x9eaa: "Mian " +0x9eab: "Mian " +0x9eac: "Fu " +0x9ead: "Pao " +0x9eae: "Qu " +0x9eaf: "Qu " +0x9eb0: "Mou " +0x9eb1: "Fu " +0x9eb2: "Xian " +0x9eb3: "Lai " +0x9eb4: "Qu " +0x9eb5: "Mian " +0x9eb6: "[?] " +0x9eb7: "Feng " +0x9eb8: "Fu " +0x9eb9: "Qu " +0x9eba: "Mian " +0x9ebb: "Ma " +0x9ebc: "Mo " +0x9ebd: "Mo " +0x9ebe: "Hui " +0x9ebf: "Ma " +0x9ec0: "Zou " +0x9ec1: "Nen " +0x9ec2: "Fen " +0x9ec3: "Huang " +0x9ec4: "Huang " +0x9ec5: "Jin " +0x9ec6: "Guang " +0x9ec7: "Tian " +0x9ec8: "Tou " +0x9ec9: "Heng " +0x9eca: "Xi " +0x9ecb: "Kuang " +0x9ecc: "Heng " +0x9ecd: "Shu " +0x9ece: "Li " +0x9ecf: "Nian " +0x9ed0: "Chi " +0x9ed1: "Hei " +0x9ed2: "Hei " +0x9ed3: "Yi " +0x9ed4: "Qian " +0x9ed5: "Dan " +0x9ed6: "Xi " +0x9ed7: "Tuan " +0x9ed8: "Mo " +0x9ed9: "Mo " +0x9eda: "Qian " +0x9edb: "Dai " +0x9edc: "Chu " +0x9edd: "You " +0x9ede: "Dian " +0x9edf: "Yi " +0x9ee0: "Xia " +0x9ee1: "Yan " +0x9ee2: "Qu " +0x9ee3: "Mei " +0x9ee4: "Yan " +0x9ee5: "Jing " +0x9ee6: "Yu " +0x9ee7: "Li " +0x9ee8: "Dang " +0x9ee9: "Du " +0x9eea: "Can " +0x9eeb: "Yin " +0x9eec: "An " +0x9eed: "Yan " +0x9eee: "Tan " +0x9eef: "An " +0x9ef0: "Zhen " +0x9ef1: "Dai " +0x9ef2: "Can " +0x9ef3: "Yi " +0x9ef4: "Mei " +0x9ef5: "Dan " +0x9ef6: "Yan " +0x9ef7: "Du " +0x9ef8: "Lu " +0x9ef9: "Zhi " +0x9efa: "Fen " +0x9efb: "Fu " +0x9efc: "Fu " +0x9efd: "Min " +0x9efe: "Min " +0x9eff: "Yuan " +/* x09f */ +0x9f00: "Cu " +0x9f01: "Qu " +0x9f02: "Chao " +0x9f03: "Wa " +0x9f04: "Zhu " +0x9f05: "Zhi " +0x9f06: "Mang " +0x9f07: "Ao " +0x9f08: "Bie " +0x9f09: "Tuo " +0x9f0a: "Bi " +0x9f0b: "Yuan " +0x9f0c: "Chao " +0x9f0d: "Tuo " +0x9f0e: "Ding " +0x9f0f: "Mi " +0x9f10: "Nai " +0x9f11: "Ding " +0x9f12: "Zi " +0x9f13: "Gu " +0x9f14: "Gu " +0x9f15: "Dong " +0x9f16: "Fen " +0x9f17: "Tao " +0x9f18: "Yuan " +0x9f19: "Pi " +0x9f1a: "Chang " +0x9f1b: "Gao " +0x9f1c: "Qi " +0x9f1d: "Yuan " +0x9f1e: "Tang " +0x9f1f: "Teng " +0x9f20: "Shu " +0x9f21: "Shu " +0x9f22: "Fen " +0x9f23: "Fei " +0x9f24: "Wen " +0x9f25: "Ba " +0x9f26: "Diao " +0x9f27: "Tuo " +0x9f28: "Tong " +0x9f29: "Qu " +0x9f2a: "Sheng " +0x9f2b: "Shi " +0x9f2c: "You " +0x9f2d: "Shi " +0x9f2e: "Ting " +0x9f2f: "Wu " +0x9f30: "Nian " +0x9f31: "Jing " +0x9f32: "Hun " +0x9f33: "Ju " +0x9f34: "Yan " +0x9f35: "Tu " +0x9f36: "Ti " +0x9f37: "Xi " +0x9f38: "Xian " +0x9f39: "Yan " +0x9f3a: "Lei " +0x9f3b: "Bi " +0x9f3c: "Yao " +0x9f3d: "Qiu " +0x9f3e: "Han " +0x9f3f: "Wu " +0x9f40: "Wu " +0x9f41: "Hou " +0x9f42: "Xi " +0x9f43: "Ge " +0x9f44: "Zha " +0x9f45: "Xiu " +0x9f46: "Weng " +0x9f47: "Zha " +0x9f48: "Nong " +0x9f49: "Nang " +0x9f4a: "Qi " +0x9f4b: "Zhai " +0x9f4c: "Ji " +0x9f4d: "Zi " +0x9f4e: "Ji " +0x9f4f: "Ji " +0x9f50: "Qi " +0x9f51: "Ji " +0x9f52: "Chi " +0x9f53: "Chen " +0x9f54: "Chen " +0x9f55: "He " +0x9f56: "Ya " +0x9f57: "Ken " +0x9f58: "Xie " +0x9f59: "Pao " +0x9f5a: "Cuo " +0x9f5b: "Shi " +0x9f5c: "Zi " +0x9f5d: "Chi " +0x9f5e: "Nian " +0x9f5f: "Ju " +0x9f60: "Tiao " +0x9f61: "Ling " +0x9f62: "Ling " +0x9f63: "Chu " +0x9f64: "Quan " +0x9f65: "Xie " +0x9f66: "Ken " +0x9f67: "Nie " +0x9f68: "Jiu " +0x9f69: "Yao " +0x9f6a: "Chuo " +0x9f6b: "Kun " +0x9f6c: "Yu " +0x9f6d: "Chu " +0x9f6e: "Yi " +0x9f6f: "Ni " +0x9f70: "Cuo " +0x9f71: "Zou " +0x9f72: "Qu " +0x9f73: "Nen " +0x9f74: "Xian " +0x9f75: "Ou " +0x9f76: "E " +0x9f77: "Wo " +0x9f78: "Yi " +0x9f79: "Chuo " +0x9f7a: "Zou " +0x9f7b: "Dian " +0x9f7c: "Chu " +0x9f7d: "Jin " +0x9f7e: "Ya " +0x9f7f: "Chi " +0x9f80: "Chen " +0x9f81: "He " +0x9f82: "Ken " +0x9f83: "Ju " +0x9f84: "Ling " +0x9f85: "Pao " +0x9f86: "Tiao " +0x9f87: "Zi " +0x9f88: "Ken " +0x9f89: "Yu " +0x9f8a: "Chuo " +0x9f8b: "Qu " +0x9f8c: "Wo " +0x9f8d: "Long " +0x9f8e: "Pang " +0x9f8f: "Gong " +0x9f90: "Pang " +0x9f91: "Yan " +0x9f92: "Long " +0x9f93: "Long " +0x9f94: "Gong " +0x9f95: "Kan " +0x9f96: "Ta " +0x9f97: "Ling " +0x9f98: "Ta " +0x9f99: "Long " +0x9f9a: "Gong " +0x9f9b: "Kan " +0x9f9c: "Gui " +0x9f9d: "Qiu " +0x9f9e: "Bie " +0x9f9f: "Gui " +0x9fa0: "Yue " +0x9fa1: "Chui " +0x9fa2: "He " +0x9fa3: "Jue " +0x9fa4: "Xie " +0x9fa5: "Yu " +0x9fa6: "[?]" +0x9fa7: "[?]" +0x9fa8: "[?]" +0x9fa9: "[?]" +0x9faa: "[?]" +0x9fab: "[?]" +0x9fac: "[?]" +0x9fad: "[?]" +0x9fae: "[?]" +0x9faf: "[?]" +0x9fb0: "[?]" +0x9fb1: "[?]" +0x9fb2: "[?]" +0x9fb3: "[?]" +0x9fb4: "[?]" +0x9fb5: "[?]" +0x9fb6: "[?]" +0x9fb7: "[?]" +0x9fb8: "[?]" +0x9fb9: "[?]" +0x9fba: "[?]" +0x9fbb: "[?]" +0x9fbc: "[?]" +0x9fbd: "[?]" +0x9fbe: "[?]" +0x9fbf: "[?]" +0x9fc0: "[?]" +0x9fc1: "[?]" +0x9fc2: "[?]" +0x9fc3: "[?]" +0x9fc4: "[?]" +0x9fc5: "[?]" +0x9fc6: "[?]" +0x9fc7: "[?]" +0x9fc8: "[?]" +0x9fc9: "[?]" +0x9fca: "[?]" +0x9fcb: "[?]" +0x9fcc: "[?]" +0x9fcd: "[?]" +0x9fce: "[?]" +0x9fcf: "[?]" +0x9fd0: "[?]" +0x9fd1: "[?]" +0x9fd2: "[?]" +0x9fd3: "[?]" +0x9fd4: "[?]" +0x9fd5: "[?]" +0x9fd6: "[?]" +0x9fd7: "[?]" +0x9fd8: "[?]" +0x9fd9: "[?]" +0x9fda: "[?]" +0x9fdb: "[?]" +0x9fdc: "[?]" +0x9fdd: "[?]" +0x9fde: "[?]" +0x9fdf: "[?]" +0x9fe0: "[?]" +0x9fe1: "[?]" +0x9fe2: "[?]" +0x9fe3: "[?]" +0x9fe4: "[?]" +0x9fe5: "[?]" +0x9fe6: "[?]" +0x9fe7: "[?]" +0x9fe8: "[?]" +0x9fe9: "[?]" +0x9fea: "[?]" +0x9feb: "[?]" +0x9fec: "[?]" +0x9fed: "[?]" +0x9fee: "[?]" +0x9fef: "[?]" +0x9ff0: "[?]" +0x9ff1: "[?]" +0x9ff2: "[?]" +0x9ff3: "[?]" +0x9ff4: "[?]" +0x9ff5: "[?]" +0x9ff6: "[?]" +0x9ff7: "[?]" +0x9ff8: "[?]" +0x9ff9: "[?]" +0x9ffa: "[?]" +0x9ffb: "[?]" +0x9ffc: "[?]" +0x9ffd: "[?]" +0x9ffe: "[?]" +/* x0a0 */ +0xa000: "it" +0xa001: "ix" +0xa002: "i" +0xa003: "ip" +0xa004: "iet" +0xa005: "iex" +0xa006: "ie" +0xa007: "iep" +0xa008: "at" +0xa009: "ax" +0xa00a: "a" +0xa00b: "ap" +0xa00c: "uox" +0xa00d: "uo" +0xa00e: "uop" +0xa00f: "ot" +0xa010: "ox" +0xa011: "o" +0xa012: "op" +0xa013: "ex" +0xa014: "e" +0xa015: "wu" +0xa016: "bit" +0xa017: "bix" +0xa018: "bi" +0xa019: "bip" +0xa01a: "biet" +0xa01b: "biex" +0xa01c: "bie" +0xa01d: "biep" +0xa01e: "bat" +0xa01f: "bax" +0xa020: "ba" +0xa021: "bap" +0xa022: "buox" +0xa023: "buo" +0xa024: "buop" +0xa025: "bot" +0xa026: "box" +0xa027: "bo" +0xa028: "bop" +0xa029: "bex" +0xa02a: "be" +0xa02b: "bep" +0xa02c: "but" +0xa02d: "bux" +0xa02e: "bu" +0xa02f: "bup" +0xa030: "burx" +0xa031: "bur" +0xa032: "byt" +0xa033: "byx" +0xa034: "by" +0xa035: "byp" +0xa036: "byrx" +0xa037: "byr" +0xa038: "pit" +0xa039: "pix" +0xa03a: "pi" +0xa03b: "pip" +0xa03c: "piex" +0xa03d: "pie" +0xa03e: "piep" +0xa03f: "pat" +0xa040: "pax" +0xa041: "pa" +0xa042: "pap" +0xa043: "puox" +0xa044: "puo" +0xa045: "puop" +0xa046: "pot" +0xa047: "pox" +0xa048: "po" +0xa049: "pop" +0xa04a: "put" +0xa04b: "pux" +0xa04c: "pu" +0xa04d: "pup" +0xa04e: "purx" +0xa04f: "pur" +0xa050: "pyt" +0xa051: "pyx" +0xa052: "py" +0xa053: "pyp" +0xa054: "pyrx" +0xa055: "pyr" +0xa056: "bbit" +0xa057: "bbix" +0xa058: "bbi" +0xa059: "bbip" +0xa05a: "bbiet" +0xa05b: "bbiex" +0xa05c: "bbie" +0xa05d: "bbiep" +0xa05e: "bbat" +0xa05f: "bbax" +0xa060: "bba" +0xa061: "bbap" +0xa062: "bbuox" +0xa063: "bbuo" +0xa064: "bbuop" +0xa065: "bbot" +0xa066: "bbox" +0xa067: "bbo" +0xa068: "bbop" +0xa069: "bbex" +0xa06a: "bbe" +0xa06b: "bbep" +0xa06c: "bbut" +0xa06d: "bbux" +0xa06e: "bbu" +0xa06f: "bbup" +0xa070: "bburx" +0xa071: "bbur" +0xa072: "bbyt" +0xa073: "bbyx" +0xa074: "bby" +0xa075: "bbyp" +0xa076: "nbit" +0xa077: "nbix" +0xa078: "nbi" +0xa079: "nbip" +0xa07a: "nbiex" +0xa07b: "nbie" +0xa07c: "nbiep" +0xa07d: "nbat" +0xa07e: "nbax" +0xa07f: "nba" +0xa080: "nbap" +0xa081: "nbot" +0xa082: "nbox" +0xa083: "nbo" +0xa084: "nbop" +0xa085: "nbut" +0xa086: "nbux" +0xa087: "nbu" +0xa088: "nbup" +0xa089: "nburx" +0xa08a: "nbur" +0xa08b: "nbyt" +0xa08c: "nbyx" +0xa08d: "nby" +0xa08e: "nbyp" +0xa08f: "nbyrx" +0xa090: "nbyr" +0xa091: "hmit" +0xa092: "hmix" +0xa093: "hmi" +0xa094: "hmip" +0xa095: "hmiex" +0xa096: "hmie" +0xa097: "hmiep" +0xa098: "hmat" +0xa099: "hmax" +0xa09a: "hma" +0xa09b: "hmap" +0xa09c: "hmuox" +0xa09d: "hmuo" +0xa09e: "hmuop" +0xa09f: "hmot" +0xa0a0: "hmox" +0xa0a1: "hmo" +0xa0a2: "hmop" +0xa0a3: "hmut" +0xa0a4: "hmux" +0xa0a5: "hmu" +0xa0a6: "hmup" +0xa0a7: "hmurx" +0xa0a8: "hmur" +0xa0a9: "hmyx" +0xa0aa: "hmy" +0xa0ab: "hmyp" +0xa0ac: "hmyrx" +0xa0ad: "hmyr" +0xa0ae: "mit" +0xa0af: "mix" +0xa0b0: "mi" +0xa0b1: "mip" +0xa0b2: "miex" +0xa0b3: "mie" +0xa0b4: "miep" +0xa0b5: "mat" +0xa0b6: "max" +0xa0b7: "ma" +0xa0b8: "map" +0xa0b9: "muot" +0xa0ba: "muox" +0xa0bb: "muo" +0xa0bc: "muop" +0xa0bd: "mot" +0xa0be: "mox" +0xa0bf: "mo" +0xa0c0: "mop" +0xa0c1: "mex" +0xa0c2: "me" +0xa0c3: "mut" +0xa0c4: "mux" +0xa0c5: "mu" +0xa0c6: "mup" +0xa0c7: "murx" +0xa0c8: "mur" +0xa0c9: "myt" +0xa0ca: "myx" +0xa0cb: "my" +0xa0cc: "myp" +0xa0cd: "fit" +0xa0ce: "fix" +0xa0cf: "fi" +0xa0d0: "fip" +0xa0d1: "fat" +0xa0d2: "fax" +0xa0d3: "fa" +0xa0d4: "fap" +0xa0d5: "fox" +0xa0d6: "fo" +0xa0d7: "fop" +0xa0d8: "fut" +0xa0d9: "fux" +0xa0da: "fu" +0xa0db: "fup" +0xa0dc: "furx" +0xa0dd: "fur" +0xa0de: "fyt" +0xa0df: "fyx" +0xa0e0: "fy" +0xa0e1: "fyp" +0xa0e2: "vit" +0xa0e3: "vix" +0xa0e4: "vi" +0xa0e5: "vip" +0xa0e6: "viet" +0xa0e7: "viex" +0xa0e8: "vie" +0xa0e9: "viep" +0xa0ea: "vat" +0xa0eb: "vax" +0xa0ec: "va" +0xa0ed: "vap" +0xa0ee: "vot" +0xa0ef: "vox" +0xa0f0: "vo" +0xa0f1: "vop" +0xa0f2: "vex" +0xa0f3: "vep" +0xa0f4: "vut" +0xa0f5: "vux" +0xa0f6: "vu" +0xa0f7: "vup" +0xa0f8: "vurx" +0xa0f9: "vur" +0xa0fa: "vyt" +0xa0fb: "vyx" +0xa0fc: "vy" +0xa0fd: "vyp" +0xa0fe: "vyrx" +0xa0ff: "vyr" +/* x0a1 */ +0xa100: "dit" +0xa101: "dix" +0xa102: "di" +0xa103: "dip" +0xa104: "diex" +0xa105: "die" +0xa106: "diep" +0xa107: "dat" +0xa108: "dax" +0xa109: "da" +0xa10a: "dap" +0xa10b: "duox" +0xa10c: "duo" +0xa10d: "dot" +0xa10e: "dox" +0xa10f: "do" +0xa110: "dop" +0xa111: "dex" +0xa112: "de" +0xa113: "dep" +0xa114: "dut" +0xa115: "dux" +0xa116: "du" +0xa117: "dup" +0xa118: "durx" +0xa119: "dur" +0xa11a: "tit" +0xa11b: "tix" +0xa11c: "ti" +0xa11d: "tip" +0xa11e: "tiex" +0xa11f: "tie" +0xa120: "tiep" +0xa121: "tat" +0xa122: "tax" +0xa123: "ta" +0xa124: "tap" +0xa125: "tuot" +0xa126: "tuox" +0xa127: "tuo" +0xa128: "tuop" +0xa129: "tot" +0xa12a: "tox" +0xa12b: "to" +0xa12c: "top" +0xa12d: "tex" +0xa12e: "te" +0xa12f: "tep" +0xa130: "tut" +0xa131: "tux" +0xa132: "tu" +0xa133: "tup" +0xa134: "turx" +0xa135: "tur" +0xa136: "ddit" +0xa137: "ddix" +0xa138: "ddi" +0xa139: "ddip" +0xa13a: "ddiex" +0xa13b: "ddie" +0xa13c: "ddiep" +0xa13d: "ddat" +0xa13e: "ddax" +0xa13f: "dda" +0xa140: "ddap" +0xa141: "dduox" +0xa142: "dduo" +0xa143: "dduop" +0xa144: "ddot" +0xa145: "ddox" +0xa146: "ddo" +0xa147: "ddop" +0xa148: "ddex" +0xa149: "dde" +0xa14a: "ddep" +0xa14b: "ddut" +0xa14c: "ddux" +0xa14d: "ddu" +0xa14e: "ddup" +0xa14f: "ddurx" +0xa150: "ddur" +0xa151: "ndit" +0xa152: "ndix" +0xa153: "ndi" +0xa154: "ndip" +0xa155: "ndiex" +0xa156: "ndie" +0xa157: "ndat" +0xa158: "ndax" +0xa159: "nda" +0xa15a: "ndap" +0xa15b: "ndot" +0xa15c: "ndox" +0xa15d: "ndo" +0xa15e: "ndop" +0xa15f: "ndex" +0xa160: "nde" +0xa161: "ndep" +0xa162: "ndut" +0xa163: "ndux" +0xa164: "ndu" +0xa165: "ndup" +0xa166: "ndurx" +0xa167: "ndur" +0xa168: "hnit" +0xa169: "hnix" +0xa16a: "hni" +0xa16b: "hnip" +0xa16c: "hniet" +0xa16d: "hniex" +0xa16e: "hnie" +0xa16f: "hniep" +0xa170: "hnat" +0xa171: "hnax" +0xa172: "hna" +0xa173: "hnap" +0xa174: "hnuox" +0xa175: "hnuo" +0xa176: "hnot" +0xa177: "hnox" +0xa178: "hnop" +0xa179: "hnex" +0xa17a: "hne" +0xa17b: "hnep" +0xa17c: "hnut" +0xa17d: "nit" +0xa17e: "nix" +0xa17f: "ni" +0xa180: "nip" +0xa181: "niex" +0xa182: "nie" +0xa183: "niep" +0xa184: "nax" +0xa185: "na" +0xa186: "nap" +0xa187: "nuox" +0xa188: "nuo" +0xa189: "nuop" +0xa18a: "not" +0xa18b: "nox" +0xa18c: "no" +0xa18d: "nop" +0xa18e: "nex" +0xa18f: "ne" +0xa190: "nep" +0xa191: "nut" +0xa192: "nux" +0xa193: "nu" +0xa194: "nup" +0xa195: "nurx" +0xa196: "nur" +0xa197: "hlit" +0xa198: "hlix" +0xa199: "hli" +0xa19a: "hlip" +0xa19b: "hliex" +0xa19c: "hlie" +0xa19d: "hliep" +0xa19e: "hlat" +0xa19f: "hlax" +0xa1a0: "hla" +0xa1a1: "hlap" +0xa1a2: "hluox" +0xa1a3: "hluo" +0xa1a4: "hluop" +0xa1a5: "hlox" +0xa1a6: "hlo" +0xa1a7: "hlop" +0xa1a8: "hlex" +0xa1a9: "hle" +0xa1aa: "hlep" +0xa1ab: "hlut" +0xa1ac: "hlux" +0xa1ad: "hlu" +0xa1ae: "hlup" +0xa1af: "hlurx" +0xa1b0: "hlur" +0xa1b1: "hlyt" +0xa1b2: "hlyx" +0xa1b3: "hly" +0xa1b4: "hlyp" +0xa1b5: "hlyrx" +0xa1b6: "hlyr" +0xa1b7: "lit" +0xa1b8: "lix" +0xa1b9: "li" +0xa1ba: "lip" +0xa1bb: "liet" +0xa1bc: "liex" +0xa1bd: "lie" +0xa1be: "liep" +0xa1bf: "lat" +0xa1c0: "lax" +0xa1c1: "la" +0xa1c2: "lap" +0xa1c3: "luot" +0xa1c4: "luox" +0xa1c5: "luo" +0xa1c6: "luop" +0xa1c7: "lot" +0xa1c8: "lox" +0xa1c9: "lo" +0xa1ca: "lop" +0xa1cb: "lex" +0xa1cc: "le" +0xa1cd: "lep" +0xa1ce: "lut" +0xa1cf: "lux" +0xa1d0: "lu" +0xa1d1: "lup" +0xa1d2: "lurx" +0xa1d3: "lur" +0xa1d4: "lyt" +0xa1d5: "lyx" +0xa1d6: "ly" +0xa1d7: "lyp" +0xa1d8: "lyrx" +0xa1d9: "lyr" +0xa1da: "git" +0xa1db: "gix" +0xa1dc: "gi" +0xa1dd: "gip" +0xa1de: "giet" +0xa1df: "giex" +0xa1e0: "gie" +0xa1e1: "giep" +0xa1e2: "gat" +0xa1e3: "gax" +0xa1e4: "ga" +0xa1e5: "gap" +0xa1e6: "guot" +0xa1e7: "guox" +0xa1e8: "guo" +0xa1e9: "guop" +0xa1ea: "got" +0xa1eb: "gox" +0xa1ec: "go" +0xa1ed: "gop" +0xa1ee: "get" +0xa1ef: "gex" +0xa1f0: "ge" +0xa1f1: "gep" +0xa1f2: "gut" +0xa1f3: "gux" +0xa1f4: "gu" +0xa1f5: "gup" +0xa1f6: "gurx" +0xa1f7: "gur" +0xa1f8: "kit" +0xa1f9: "kix" +0xa1fa: "ki" +0xa1fb: "kip" +0xa1fc: "kiex" +0xa1fd: "kie" +0xa1fe: "kiep" +0xa1ff: "kat" +/* x0a2 */ +0xa200: "kax" +0xa201: "ka" +0xa202: "kap" +0xa203: "kuox" +0xa204: "kuo" +0xa205: "kuop" +0xa206: "kot" +0xa207: "kox" +0xa208: "ko" +0xa209: "kop" +0xa20a: "ket" +0xa20b: "kex" +0xa20c: "ke" +0xa20d: "kep" +0xa20e: "kut" +0xa20f: "kux" +0xa210: "ku" +0xa211: "kup" +0xa212: "kurx" +0xa213: "kur" +0xa214: "ggit" +0xa215: "ggix" +0xa216: "ggi" +0xa217: "ggiex" +0xa218: "ggie" +0xa219: "ggiep" +0xa21a: "ggat" +0xa21b: "ggax" +0xa21c: "gga" +0xa21d: "ggap" +0xa21e: "gguot" +0xa21f: "gguox" +0xa220: "gguo" +0xa221: "gguop" +0xa222: "ggot" +0xa223: "ggox" +0xa224: "ggo" +0xa225: "ggop" +0xa226: "gget" +0xa227: "ggex" +0xa228: "gge" +0xa229: "ggep" +0xa22a: "ggut" +0xa22b: "ggux" +0xa22c: "ggu" +0xa22d: "ggup" +0xa22e: "ggurx" +0xa22f: "ggur" +0xa230: "mgiex" +0xa231: "mgie" +0xa232: "mgat" +0xa233: "mgax" +0xa234: "mga" +0xa235: "mgap" +0xa236: "mguox" +0xa237: "mguo" +0xa238: "mguop" +0xa239: "mgot" +0xa23a: "mgox" +0xa23b: "mgo" +0xa23c: "mgop" +0xa23d: "mgex" +0xa23e: "mge" +0xa23f: "mgep" +0xa240: "mgut" +0xa241: "mgux" +0xa242: "mgu" +0xa243: "mgup" +0xa244: "mgurx" +0xa245: "mgur" +0xa246: "hxit" +0xa247: "hxix" +0xa248: "hxi" +0xa249: "hxip" +0xa24a: "hxiet" +0xa24b: "hxiex" +0xa24c: "hxie" +0xa24d: "hxiep" +0xa24e: "hxat" +0xa24f: "hxax" +0xa250: "hxa" +0xa251: "hxap" +0xa252: "hxuot" +0xa253: "hxuox" +0xa254: "hxuo" +0xa255: "hxuop" +0xa256: "hxot" +0xa257: "hxox" +0xa258: "hxo" +0xa259: "hxop" +0xa25a: "hxex" +0xa25b: "hxe" +0xa25c: "hxep" +0xa25d: "ngiex" +0xa25e: "ngie" +0xa25f: "ngiep" +0xa260: "ngat" +0xa261: "ngax" +0xa262: "nga" +0xa263: "ngap" +0xa264: "nguot" +0xa265: "nguox" +0xa266: "nguo" +0xa267: "ngot" +0xa268: "ngox" +0xa269: "ngo" +0xa26a: "ngop" +0xa26b: "ngex" +0xa26c: "nge" +0xa26d: "ngep" +0xa26e: "hit" +0xa26f: "hiex" +0xa270: "hie" +0xa271: "hat" +0xa272: "hax" +0xa273: "ha" +0xa274: "hap" +0xa275: "huot" +0xa276: "huox" +0xa277: "huo" +0xa278: "huop" +0xa279: "hot" +0xa27a: "hox" +0xa27b: "ho" +0xa27c: "hop" +0xa27d: "hex" +0xa27e: "he" +0xa27f: "hep" +0xa280: "wat" +0xa281: "wax" +0xa282: "wa" +0xa283: "wap" +0xa284: "wuox" +0xa285: "wuo" +0xa286: "wuop" +0xa287: "wox" +0xa288: "wo" +0xa289: "wop" +0xa28a: "wex" +0xa28b: "we" +0xa28c: "wep" +0xa28d: "zit" +0xa28e: "zix" +0xa28f: "zi" +0xa290: "zip" +0xa291: "ziex" +0xa292: "zie" +0xa293: "ziep" +0xa294: "zat" +0xa295: "zax" +0xa296: "za" +0xa297: "zap" +0xa298: "zuox" +0xa299: "zuo" +0xa29a: "zuop" +0xa29b: "zot" +0xa29c: "zox" +0xa29d: "zo" +0xa29e: "zop" +0xa29f: "zex" +0xa2a0: "ze" +0xa2a1: "zep" +0xa2a2: "zut" +0xa2a3: "zux" +0xa2a4: "zu" +0xa2a5: "zup" +0xa2a6: "zurx" +0xa2a7: "zur" +0xa2a8: "zyt" +0xa2a9: "zyx" +0xa2aa: "zy" +0xa2ab: "zyp" +0xa2ac: "zyrx" +0xa2ad: "zyr" +0xa2ae: "cit" +0xa2af: "cix" +0xa2b0: "ci" +0xa2b1: "cip" +0xa2b2: "ciet" +0xa2b3: "ciex" +0xa2b4: "cie" +0xa2b5: "ciep" +0xa2b6: "cat" +0xa2b7: "cax" +0xa2b8: "ca" +0xa2b9: "cap" +0xa2ba: "cuox" +0xa2bb: "cuo" +0xa2bc: "cuop" +0xa2bd: "cot" +0xa2be: "cox" +0xa2bf: "co" +0xa2c0: "cop" +0xa2c1: "cex" +0xa2c2: "ce" +0xa2c3: "cep" +0xa2c4: "cut" +0xa2c5: "cux" +0xa2c6: "cu" +0xa2c7: "cup" +0xa2c8: "curx" +0xa2c9: "cur" +0xa2ca: "cyt" +0xa2cb: "cyx" +0xa2cc: "cy" +0xa2cd: "cyp" +0xa2ce: "cyrx" +0xa2cf: "cyr" +0xa2d0: "zzit" +0xa2d1: "zzix" +0xa2d2: "zzi" +0xa2d3: "zzip" +0xa2d4: "zziet" +0xa2d5: "zziex" +0xa2d6: "zzie" +0xa2d7: "zziep" +0xa2d8: "zzat" +0xa2d9: "zzax" +0xa2da: "zza" +0xa2db: "zzap" +0xa2dc: "zzox" +0xa2dd: "zzo" +0xa2de: "zzop" +0xa2df: "zzex" +0xa2e0: "zze" +0xa2e1: "zzep" +0xa2e2: "zzux" +0xa2e3: "zzu" +0xa2e4: "zzup" +0xa2e5: "zzurx" +0xa2e6: "zzur" +0xa2e7: "zzyt" +0xa2e8: "zzyx" +0xa2e9: "zzy" +0xa2ea: "zzyp" +0xa2eb: "zzyrx" +0xa2ec: "zzyr" +0xa2ed: "nzit" +0xa2ee: "nzix" +0xa2ef: "nzi" +0xa2f0: "nzip" +0xa2f1: "nziex" +0xa2f2: "nzie" +0xa2f3: "nziep" +0xa2f4: "nzat" +0xa2f5: "nzax" +0xa2f6: "nza" +0xa2f7: "nzap" +0xa2f8: "nzuox" +0xa2f9: "nzuo" +0xa2fa: "nzox" +0xa2fb: "nzop" +0xa2fc: "nzex" +0xa2fd: "nze" +0xa2fe: "nzux" +0xa2ff: "nzu" +/* x0a3 */ +0xa300: "nzup" +0xa301: "nzurx" +0xa302: "nzur" +0xa303: "nzyt" +0xa304: "nzyx" +0xa305: "nzy" +0xa306: "nzyp" +0xa307: "nzyrx" +0xa308: "nzyr" +0xa309: "sit" +0xa30a: "six" +0xa30b: "si" +0xa30c: "sip" +0xa30d: "siex" +0xa30e: "sie" +0xa30f: "siep" +0xa310: "sat" +0xa311: "sax" +0xa312: "sa" +0xa313: "sap" +0xa314: "suox" +0xa315: "suo" +0xa316: "suop" +0xa317: "sot" +0xa318: "sox" +0xa319: "so" +0xa31a: "sop" +0xa31b: "sex" +0xa31c: "se" +0xa31d: "sep" +0xa31e: "sut" +0xa31f: "sux" +0xa320: "su" +0xa321: "sup" +0xa322: "surx" +0xa323: "sur" +0xa324: "syt" +0xa325: "syx" +0xa326: "sy" +0xa327: "syp" +0xa328: "syrx" +0xa329: "syr" +0xa32a: "ssit" +0xa32b: "ssix" +0xa32c: "ssi" +0xa32d: "ssip" +0xa32e: "ssiex" +0xa32f: "ssie" +0xa330: "ssiep" +0xa331: "ssat" +0xa332: "ssax" +0xa333: "ssa" +0xa334: "ssap" +0xa335: "ssot" +0xa336: "ssox" +0xa337: "sso" +0xa338: "ssop" +0xa339: "ssex" +0xa33a: "sse" +0xa33b: "ssep" +0xa33c: "ssut" +0xa33d: "ssux" +0xa33e: "ssu" +0xa33f: "ssup" +0xa340: "ssyt" +0xa341: "ssyx" +0xa342: "ssy" +0xa343: "ssyp" +0xa344: "ssyrx" +0xa345: "ssyr" +0xa346: "zhat" +0xa347: "zhax" +0xa348: "zha" +0xa349: "zhap" +0xa34a: "zhuox" +0xa34b: "zhuo" +0xa34c: "zhuop" +0xa34d: "zhot" +0xa34e: "zhox" +0xa34f: "zho" +0xa350: "zhop" +0xa351: "zhet" +0xa352: "zhex" +0xa353: "zhe" +0xa354: "zhep" +0xa355: "zhut" +0xa356: "zhux" +0xa357: "zhu" +0xa358: "zhup" +0xa359: "zhurx" +0xa35a: "zhur" +0xa35b: "zhyt" +0xa35c: "zhyx" +0xa35d: "zhy" +0xa35e: "zhyp" +0xa35f: "zhyrx" +0xa360: "zhyr" +0xa361: "chat" +0xa362: "chax" +0xa363: "cha" +0xa364: "chap" +0xa365: "chuot" +0xa366: "chuox" +0xa367: "chuo" +0xa368: "chuop" +0xa369: "chot" +0xa36a: "chox" +0xa36b: "cho" +0xa36c: "chop" +0xa36d: "chet" +0xa36e: "chex" +0xa36f: "che" +0xa370: "chep" +0xa371: "chux" +0xa372: "chu" +0xa373: "chup" +0xa374: "churx" +0xa375: "chur" +0xa376: "chyt" +0xa377: "chyx" +0xa378: "chy" +0xa379: "chyp" +0xa37a: "chyrx" +0xa37b: "chyr" +0xa37c: "rrax" +0xa37d: "rra" +0xa37e: "rruox" +0xa37f: "rruo" +0xa380: "rrot" +0xa381: "rrox" +0xa382: "rro" +0xa383: "rrop" +0xa384: "rret" +0xa385: "rrex" +0xa386: "rre" +0xa387: "rrep" +0xa388: "rrut" +0xa389: "rrux" +0xa38a: "rru" +0xa38b: "rrup" +0xa38c: "rrurx" +0xa38d: "rrur" +0xa38e: "rryt" +0xa38f: "rryx" +0xa390: "rry" +0xa391: "rryp" +0xa392: "rryrx" +0xa393: "rryr" +0xa394: "nrat" +0xa395: "nrax" +0xa396: "nra" +0xa397: "nrap" +0xa398: "nrox" +0xa399: "nro" +0xa39a: "nrop" +0xa39b: "nret" +0xa39c: "nrex" +0xa39d: "nre" +0xa39e: "nrep" +0xa39f: "nrut" +0xa3a0: "nrux" +0xa3a1: "nru" +0xa3a2: "nrup" +0xa3a3: "nrurx" +0xa3a4: "nrur" +0xa3a5: "nryt" +0xa3a6: "nryx" +0xa3a7: "nry" +0xa3a8: "nryp" +0xa3a9: "nryrx" +0xa3aa: "nryr" +0xa3ab: "shat" +0xa3ac: "shax" +0xa3ad: "sha" +0xa3ae: "shap" +0xa3af: "shuox" +0xa3b0: "shuo" +0xa3b1: "shuop" +0xa3b2: "shot" +0xa3b3: "shox" +0xa3b4: "sho" +0xa3b5: "shop" +0xa3b6: "shet" +0xa3b7: "shex" +0xa3b8: "she" +0xa3b9: "shep" +0xa3ba: "shut" +0xa3bb: "shux" +0xa3bc: "shu" +0xa3bd: "shup" +0xa3be: "shurx" +0xa3bf: "shur" +0xa3c0: "shyt" +0xa3c1: "shyx" +0xa3c2: "shy" +0xa3c3: "shyp" +0xa3c4: "shyrx" +0xa3c5: "shyr" +0xa3c6: "rat" +0xa3c7: "rax" +0xa3c8: "ra" +0xa3c9: "rap" +0xa3ca: "ruox" +0xa3cb: "ruo" +0xa3cc: "ruop" +0xa3cd: "rot" +0xa3ce: "rox" +0xa3cf: "ro" +0xa3d0: "rop" +0xa3d1: "rex" +0xa3d2: "re" +0xa3d3: "rep" +0xa3d4: "rut" +0xa3d5: "rux" +0xa3d6: "ru" +0xa3d7: "rup" +0xa3d8: "rurx" +0xa3d9: "rur" +0xa3da: "ryt" +0xa3db: "ryx" +0xa3dc: "ry" +0xa3dd: "ryp" +0xa3de: "ryrx" +0xa3df: "ryr" +0xa3e0: "jit" +0xa3e1: "jix" +0xa3e2: "ji" +0xa3e3: "jip" +0xa3e4: "jiet" +0xa3e5: "jiex" +0xa3e6: "jie" +0xa3e7: "jiep" +0xa3e8: "juot" +0xa3e9: "juox" +0xa3ea: "juo" +0xa3eb: "juop" +0xa3ec: "jot" +0xa3ed: "jox" +0xa3ee: "jo" +0xa3ef: "jop" +0xa3f0: "jut" +0xa3f1: "jux" +0xa3f2: "ju" +0xa3f3: "jup" +0xa3f4: "jurx" +0xa3f5: "jur" +0xa3f6: "jyt" +0xa3f7: "jyx" +0xa3f8: "jy" +0xa3f9: "jyp" +0xa3fa: "jyrx" +0xa3fb: "jyr" +0xa3fc: "qit" +0xa3fd: "qix" +0xa3fe: "qi" +0xa3ff: "qip" +/* x0a4 */ +0xa400: "qiet" +0xa401: "qiex" +0xa402: "qie" +0xa403: "qiep" +0xa404: "quot" +0xa405: "quox" +0xa406: "quo" +0xa407: "quop" +0xa408: "qot" +0xa409: "qox" +0xa40a: "qo" +0xa40b: "qop" +0xa40c: "qut" +0xa40d: "qux" +0xa40e: "qu" +0xa40f: "qup" +0xa410: "qurx" +0xa411: "qur" +0xa412: "qyt" +0xa413: "qyx" +0xa414: "qy" +0xa415: "qyp" +0xa416: "qyrx" +0xa417: "qyr" +0xa418: "jjit" +0xa419: "jjix" +0xa41a: "jji" +0xa41b: "jjip" +0xa41c: "jjiet" +0xa41d: "jjiex" +0xa41e: "jjie" +0xa41f: "jjiep" +0xa420: "jjuox" +0xa421: "jjuo" +0xa422: "jjuop" +0xa423: "jjot" +0xa424: "jjox" +0xa425: "jjo" +0xa426: "jjop" +0xa427: "jjut" +0xa428: "jjux" +0xa429: "jju" +0xa42a: "jjup" +0xa42b: "jjurx" +0xa42c: "jjur" +0xa42d: "jjyt" +0xa42e: "jjyx" +0xa42f: "jjy" +0xa430: "jjyp" +0xa431: "njit" +0xa432: "njix" +0xa433: "nji" +0xa434: "njip" +0xa435: "njiet" +0xa436: "njiex" +0xa437: "njie" +0xa438: "njiep" +0xa439: "njuox" +0xa43a: "njuo" +0xa43b: "njot" +0xa43c: "njox" +0xa43d: "njo" +0xa43e: "njop" +0xa43f: "njux" +0xa440: "nju" +0xa441: "njup" +0xa442: "njurx" +0xa443: "njur" +0xa444: "njyt" +0xa445: "njyx" +0xa446: "njy" +0xa447: "njyp" +0xa448: "njyrx" +0xa449: "njyr" +0xa44a: "nyit" +0xa44b: "nyix" +0xa44c: "nyi" +0xa44d: "nyip" +0xa44e: "nyiet" +0xa44f: "nyiex" +0xa450: "nyie" +0xa451: "nyiep" +0xa452: "nyuox" +0xa453: "nyuo" +0xa454: "nyuop" +0xa455: "nyot" +0xa456: "nyox" +0xa457: "nyo" +0xa458: "nyop" +0xa459: "nyut" +0xa45a: "nyux" +0xa45b: "nyu" +0xa45c: "nyup" +0xa45d: "xit" +0xa45e: "xix" +0xa45f: "xi" +0xa460: "xip" +0xa461: "xiet" +0xa462: "xiex" +0xa463: "xie" +0xa464: "xiep" +0xa465: "xuox" +0xa466: "xuo" +0xa467: "xot" +0xa468: "xox" +0xa469: "xo" +0xa46a: "xop" +0xa46b: "xyt" +0xa46c: "xyx" +0xa46d: "xy" +0xa46e: "xyp" +0xa46f: "xyrx" +0xa470: "xyr" +0xa471: "yit" +0xa472: "yix" +0xa473: "yi" +0xa474: "yip" +0xa475: "yiet" +0xa476: "yiex" +0xa477: "yie" +0xa478: "yiep" +0xa479: "yuot" +0xa47a: "yuox" +0xa47b: "yuo" +0xa47c: "yuop" +0xa47d: "yot" +0xa47e: "yox" +0xa47f: "yo" +0xa480: "yop" +0xa481: "yut" +0xa482: "yux" +0xa483: "yu" +0xa484: "yup" +0xa485: "yurx" +0xa486: "yur" +0xa487: "yyt" +0xa488: "yyx" +0xa489: "yy" +0xa48a: "yyp" +0xa48b: "yyrx" +0xa48c: "yyr" +0xa48d: "[?]" +0xa48e: "[?]" +0xa48f: "[?]" +0xa490: "Qot" +0xa491: "Li" +0xa492: "Kit" +0xa493: "Nyip" +0xa494: "Cyp" +0xa495: "Ssi" +0xa496: "Ggop" +0xa497: "Gep" +0xa498: "Mi" +0xa499: "Hxit" +0xa49a: "Lyr" +0xa49b: "Bbut" +0xa49c: "Mop" +0xa49d: "Yo" +0xa49e: "Put" +0xa49f: "Hxuo" +0xa4a0: "Tat" +0xa4a1: "Ga" +0xa4a2: "[?]" +0xa4a3: "[?]" +0xa4a4: "Ddur" +0xa4a5: "Bur" +0xa4a6: "Gguo" +0xa4a7: "Nyop" +0xa4a8: "Tu" +0xa4a9: "Op" +0xa4aa: "Jjut" +0xa4ab: "Zot" +0xa4ac: "Pyt" +0xa4ad: "Hmo" +0xa4ae: "Yit" +0xa4af: "Vur" +0xa4b0: "Shy" +0xa4b1: "Vep" +0xa4b2: "Za" +0xa4b3: "Jo" +0xa4b4: "[?]" +0xa4b5: "Jjy" +0xa4b6: "Got" +0xa4b7: "Jjie" +0xa4b8: "Wo" +0xa4b9: "Du" +0xa4ba: "Shur" +0xa4bb: "Lie" +0xa4bc: "Cy" +0xa4bd: "Cuop" +0xa4be: "Cip" +0xa4bf: "Hxop" +0xa4c0: "Shat" +0xa4c1: "[?]" +0xa4c2: "Shop" +0xa4c3: "Che" +0xa4c4: "Zziet" +0xa4c5: "[?]" +0xa4c6: "Ke" +0xa4c7: "[?]" +0xa4c8: "[?]" +0xa4c9: "[?]" +0xa4ca: "[?]" +0xa4cb: "[?]" +0xa4cc: "[?]" +0xa4cd: "[?]" +0xa4ce: "[?]" +0xa4cf: "[?]" +0xa4d0: "[?]" +0xa4d1: "[?]" +0xa4d2: "[?]" +0xa4d3: "[?]" +0xa4d4: "[?]" +0xa4d5: "[?]" +0xa4d6: "[?]" +0xa4d7: "[?]" +0xa4d8: "[?]" +0xa4d9: "[?]" +0xa4da: "[?]" +0xa4db: "[?]" +0xa4dc: "[?]" +0xa4dd: "[?]" +0xa4de: "[?]" +0xa4df: "[?]" +0xa4e0: "[?]" +0xa4e1: "[?]" +0xa4e2: "[?]" +0xa4e3: "[?]" +0xa4e4: "[?]" +0xa4e5: "[?]" +0xa4e6: "[?]" +0xa4e7: "[?]" +0xa4e8: "[?]" +0xa4e9: "[?]" +0xa4ea: "[?]" +0xa4eb: "[?]" +0xa4ec: "[?]" +0xa4ed: "[?]" +0xa4ee: "[?]" +0xa4ef: "[?]" +0xa4f0: "[?]" +0xa4f1: "[?]" +0xa4f2: "[?]" +0xa4f3: "[?]" +0xa4f4: "[?]" +0xa4f5: "[?]" +0xa4f6: "[?]" +0xa4f7: "[?]" +0xa4f8: "[?]" +0xa4f9: "[?]" +0xa4fa: "[?]" +0xa4fb: "[?]" +0xa4fc: "[?]" +0xa4fd: "[?]" +0xa4fe: "[?]" +/* x0ac */ +0xac00: "ga" +0xac01: "gag" +0xac02: "gagg" +0xac03: "gags" +0xac04: "gan" +0xac05: "ganj" +0xac06: "ganh" +0xac07: "gad" +0xac08: "gal" +0xac09: "galg" +0xac0a: "galm" +0xac0b: "galb" +0xac0c: "gals" +0xac0d: "galt" +0xac0e: "galp" +0xac0f: "galh" +0xac10: "gam" +0xac11: "gab" +0xac12: "gabs" +0xac13: "gas" +0xac14: "gass" +0xac15: "gang" +0xac16: "gaj" +0xac17: "gac" +0xac18: "gak" +0xac19: "gat" +0xac1a: "gap" +0xac1b: "gah" +0xac1c: "gae" +0xac1d: "gaeg" +0xac1e: "gaegg" +0xac1f: "gaegs" +0xac20: "gaen" +0xac21: "gaenj" +0xac22: "gaenh" +0xac23: "gaed" +0xac24: "gael" +0xac25: "gaelg" +0xac26: "gaelm" +0xac27: "gaelb" +0xac28: "gaels" +0xac29: "gaelt" +0xac2a: "gaelp" +0xac2b: "gaelh" +0xac2c: "gaem" +0xac2d: "gaeb" +0xac2e: "gaebs" +0xac2f: "gaes" +0xac30: "gaess" +0xac31: "gaeng" +0xac32: "gaej" +0xac33: "gaec" +0xac34: "gaek" +0xac35: "gaet" +0xac36: "gaep" +0xac37: "gaeh" +0xac38: "gya" +0xac39: "gyag" +0xac3a: "gyagg" +0xac3b: "gyags" +0xac3c: "gyan" +0xac3d: "gyanj" +0xac3e: "gyanh" +0xac3f: "gyad" +0xac40: "gyal" +0xac41: "gyalg" +0xac42: "gyalm" +0xac43: "gyalb" +0xac44: "gyals" +0xac45: "gyalt" +0xac46: "gyalp" +0xac47: "gyalh" +0xac48: "gyam" +0xac49: "gyab" +0xac4a: "gyabs" +0xac4b: "gyas" +0xac4c: "gyass" +0xac4d: "gyang" +0xac4e: "gyaj" +0xac4f: "gyac" +0xac50: "gyak" +0xac51: "gyat" +0xac52: "gyap" +0xac53: "gyah" +0xac54: "gyae" +0xac55: "gyaeg" +0xac56: "gyaegg" +0xac57: "gyaegs" +0xac58: "gyaen" +0xac59: "gyaenj" +0xac5a: "gyaenh" +0xac5b: "gyaed" +0xac5c: "gyael" +0xac5d: "gyaelg" +0xac5e: "gyaelm" +0xac5f: "gyaelb" +0xac60: "gyaels" +0xac61: "gyaelt" +0xac62: "gyaelp" +0xac63: "gyaelh" +0xac64: "gyaem" +0xac65: "gyaeb" +0xac66: "gyaebs" +0xac67: "gyaes" +0xac68: "gyaess" +0xac69: "gyaeng" +0xac6a: "gyaej" +0xac6b: "gyaec" +0xac6c: "gyaek" +0xac6d: "gyaet" +0xac6e: "gyaep" +0xac6f: "gyaeh" +0xac70: "geo" +0xac71: "geog" +0xac72: "geogg" +0xac73: "geogs" +0xac74: "geon" +0xac75: "geonj" +0xac76: "geonh" +0xac77: "geod" +0xac78: "geol" +0xac79: "geolg" +0xac7a: "geolm" +0xac7b: "geolb" +0xac7c: "geols" +0xac7d: "geolt" +0xac7e: "geolp" +0xac7f: "geolh" +0xac80: "geom" +0xac81: "geob" +0xac82: "geobs" +0xac83: "geos" +0xac84: "geoss" +0xac85: "geong" +0xac86: "geoj" +0xac87: "geoc" +0xac88: "geok" +0xac89: "geot" +0xac8a: "geop" +0xac8b: "geoh" +0xac8c: "ge" +0xac8d: "geg" +0xac8e: "gegg" +0xac8f: "gegs" +0xac90: "gen" +0xac91: "genj" +0xac92: "genh" +0xac93: "ged" +0xac94: "gel" +0xac95: "gelg" +0xac96: "gelm" +0xac97: "gelb" +0xac98: "gels" +0xac99: "gelt" +0xac9a: "gelp" +0xac9b: "gelh" +0xac9c: "gem" +0xac9d: "geb" +0xac9e: "gebs" +0xac9f: "ges" +0xaca0: "gess" +0xaca1: "geng" +0xaca2: "gej" +0xaca3: "gec" +0xaca4: "gek" +0xaca5: "get" +0xaca6: "gep" +0xaca7: "geh" +0xaca8: "gyeo" +0xaca9: "gyeog" +0xacaa: "gyeogg" +0xacab: "gyeogs" +0xacac: "gyeon" +0xacad: "gyeonj" +0xacae: "gyeonh" +0xacaf: "gyeod" +0xacb0: "gyeol" +0xacb1: "gyeolg" +0xacb2: "gyeolm" +0xacb3: "gyeolb" +0xacb4: "gyeols" +0xacb5: "gyeolt" +0xacb6: "gyeolp" +0xacb7: "gyeolh" +0xacb8: "gyeom" +0xacb9: "gyeob" +0xacba: "gyeobs" +0xacbb: "gyeos" +0xacbc: "gyeoss" +0xacbd: "gyeong" +0xacbe: "gyeoj" +0xacbf: "gyeoc" +0xacc0: "gyeok" +0xacc1: "gyeot" +0xacc2: "gyeop" +0xacc3: "gyeoh" +0xacc4: "gye" +0xacc5: "gyeg" +0xacc6: "gyegg" +0xacc7: "gyegs" +0xacc8: "gyen" +0xacc9: "gyenj" +0xacca: "gyenh" +0xaccb: "gyed" +0xaccc: "gyel" +0xaccd: "gyelg" +0xacce: "gyelm" +0xaccf: "gyelb" +0xacd0: "gyels" +0xacd1: "gyelt" +0xacd2: "gyelp" +0xacd3: "gyelh" +0xacd4: "gyem" +0xacd5: "gyeb" +0xacd6: "gyebs" +0xacd7: "gyes" +0xacd8: "gyess" +0xacd9: "gyeng" +0xacda: "gyej" +0xacdb: "gyec" +0xacdc: "gyek" +0xacdd: "gyet" +0xacde: "gyep" +0xacdf: "gyeh" +0xace0: "go" +0xace1: "gog" +0xace2: "gogg" +0xace3: "gogs" +0xace4: "gon" +0xace5: "gonj" +0xace6: "gonh" +0xace7: "god" +0xace8: "gol" +0xace9: "golg" +0xacea: "golm" +0xaceb: "golb" +0xacec: "gols" +0xaced: "golt" +0xacee: "golp" +0xacef: "golh" +0xacf0: "gom" +0xacf1: "gob" +0xacf2: "gobs" +0xacf3: "gos" +0xacf4: "goss" +0xacf5: "gong" +0xacf6: "goj" +0xacf7: "goc" +0xacf8: "gok" +0xacf9: "got" +0xacfa: "gop" +0xacfb: "goh" +0xacfc: "gwa" +0xacfd: "gwag" +0xacfe: "gwagg" +0xacff: "gwags" +/* x0ad */ +0xad00: "gwan" +0xad01: "gwanj" +0xad02: "gwanh" +0xad03: "gwad" +0xad04: "gwal" +0xad05: "gwalg" +0xad06: "gwalm" +0xad07: "gwalb" +0xad08: "gwals" +0xad09: "gwalt" +0xad0a: "gwalp" +0xad0b: "gwalh" +0xad0c: "gwam" +0xad0d: "gwab" +0xad0e: "gwabs" +0xad0f: "gwas" +0xad10: "gwass" +0xad11: "gwang" +0xad12: "gwaj" +0xad13: "gwac" +0xad14: "gwak" +0xad15: "gwat" +0xad16: "gwap" +0xad17: "gwah" +0xad18: "gwae" +0xad19: "gwaeg" +0xad1a: "gwaegg" +0xad1b: "gwaegs" +0xad1c: "gwaen" +0xad1d: "gwaenj" +0xad1e: "gwaenh" +0xad1f: "gwaed" +0xad20: "gwael" +0xad21: "gwaelg" +0xad22: "gwaelm" +0xad23: "gwaelb" +0xad24: "gwaels" +0xad25: "gwaelt" +0xad26: "gwaelp" +0xad27: "gwaelh" +0xad28: "gwaem" +0xad29: "gwaeb" +0xad2a: "gwaebs" +0xad2b: "gwaes" +0xad2c: "gwaess" +0xad2d: "gwaeng" +0xad2e: "gwaej" +0xad2f: "gwaec" +0xad30: "gwaek" +0xad31: "gwaet" +0xad32: "gwaep" +0xad33: "gwaeh" +0xad34: "goe" +0xad35: "goeg" +0xad36: "goegg" +0xad37: "goegs" +0xad38: "goen" +0xad39: "goenj" +0xad3a: "goenh" +0xad3b: "goed" +0xad3c: "goel" +0xad3d: "goelg" +0xad3e: "goelm" +0xad3f: "goelb" +0xad40: "goels" +0xad41: "goelt" +0xad42: "goelp" +0xad43: "goelh" +0xad44: "goem" +0xad45: "goeb" +0xad46: "goebs" +0xad47: "goes" +0xad48: "goess" +0xad49: "goeng" +0xad4a: "goej" +0xad4b: "goec" +0xad4c: "goek" +0xad4d: "goet" +0xad4e: "goep" +0xad4f: "goeh" +0xad50: "gyo" +0xad51: "gyog" +0xad52: "gyogg" +0xad53: "gyogs" +0xad54: "gyon" +0xad55: "gyonj" +0xad56: "gyonh" +0xad57: "gyod" +0xad58: "gyol" +0xad59: "gyolg" +0xad5a: "gyolm" +0xad5b: "gyolb" +0xad5c: "gyols" +0xad5d: "gyolt" +0xad5e: "gyolp" +0xad5f: "gyolh" +0xad60: "gyom" +0xad61: "gyob" +0xad62: "gyobs" +0xad63: "gyos" +0xad64: "gyoss" +0xad65: "gyong" +0xad66: "gyoj" +0xad67: "gyoc" +0xad68: "gyok" +0xad69: "gyot" +0xad6a: "gyop" +0xad6b: "gyoh" +0xad6c: "gu" +0xad6d: "gug" +0xad6e: "gugg" +0xad6f: "gugs" +0xad70: "gun" +0xad71: "gunj" +0xad72: "gunh" +0xad73: "gud" +0xad74: "gul" +0xad75: "gulg" +0xad76: "gulm" +0xad77: "gulb" +0xad78: "guls" +0xad79: "gult" +0xad7a: "gulp" +0xad7b: "gulh" +0xad7c: "gum" +0xad7d: "gub" +0xad7e: "gubs" +0xad7f: "gus" +0xad80: "guss" +0xad81: "gung" +0xad82: "guj" +0xad83: "guc" +0xad84: "guk" +0xad85: "gut" +0xad86: "gup" +0xad87: "guh" +0xad88: "gweo" +0xad89: "gweog" +0xad8a: "gweogg" +0xad8b: "gweogs" +0xad8c: "gweon" +0xad8d: "gweonj" +0xad8e: "gweonh" +0xad8f: "gweod" +0xad90: "gweol" +0xad91: "gweolg" +0xad92: "gweolm" +0xad93: "gweolb" +0xad94: "gweols" +0xad95: "gweolt" +0xad96: "gweolp" +0xad97: "gweolh" +0xad98: "gweom" +0xad99: "gweob" +0xad9a: "gweobs" +0xad9b: "gweos" +0xad9c: "gweoss" +0xad9d: "gweong" +0xad9e: "gweoj" +0xad9f: "gweoc" +0xada0: "gweok" +0xada1: "gweot" +0xada2: "gweop" +0xada3: "gweoh" +0xada4: "gwe" +0xada5: "gweg" +0xada6: "gwegg" +0xada7: "gwegs" +0xada8: "gwen" +0xada9: "gwenj" +0xadaa: "gwenh" +0xadab: "gwed" +0xadac: "gwel" +0xadad: "gwelg" +0xadae: "gwelm" +0xadaf: "gwelb" +0xadb0: "gwels" +0xadb1: "gwelt" +0xadb2: "gwelp" +0xadb3: "gwelh" +0xadb4: "gwem" +0xadb5: "gweb" +0xadb6: "gwebs" +0xadb7: "gwes" +0xadb8: "gwess" +0xadb9: "gweng" +0xadba: "gwej" +0xadbb: "gwec" +0xadbc: "gwek" +0xadbd: "gwet" +0xadbe: "gwep" +0xadbf: "gweh" +0xadc0: "gwi" +0xadc1: "gwig" +0xadc2: "gwigg" +0xadc3: "gwigs" +0xadc4: "gwin" +0xadc5: "gwinj" +0xadc6: "gwinh" +0xadc7: "gwid" +0xadc8: "gwil" +0xadc9: "gwilg" +0xadca: "gwilm" +0xadcb: "gwilb" +0xadcc: "gwils" +0xadcd: "gwilt" +0xadce: "gwilp" +0xadcf: "gwilh" +0xadd0: "gwim" +0xadd1: "gwib" +0xadd2: "gwibs" +0xadd3: "gwis" +0xadd4: "gwiss" +0xadd5: "gwing" +0xadd6: "gwij" +0xadd7: "gwic" +0xadd8: "gwik" +0xadd9: "gwit" +0xadda: "gwip" +0xaddb: "gwih" +0xaddc: "gyu" +0xaddd: "gyug" +0xadde: "gyugg" +0xaddf: "gyugs" +0xade0: "gyun" +0xade1: "gyunj" +0xade2: "gyunh" +0xade3: "gyud" +0xade4: "gyul" +0xade5: "gyulg" +0xade6: "gyulm" +0xade7: "gyulb" +0xade8: "gyuls" +0xade9: "gyult" +0xadea: "gyulp" +0xadeb: "gyulh" +0xadec: "gyum" +0xaded: "gyub" +0xadee: "gyubs" +0xadef: "gyus" +0xadf0: "gyuss" +0xadf1: "gyung" +0xadf2: "gyuj" +0xadf3: "gyuc" +0xadf4: "gyuk" +0xadf5: "gyut" +0xadf6: "gyup" +0xadf7: "gyuh" +0xadf8: "geu" +0xadf9: "geug" +0xadfa: "geugg" +0xadfb: "geugs" +0xadfc: "geun" +0xadfd: "geunj" +0xadfe: "geunh" +0xadff: "geud" +/* x0ae */ +0xae00: "geul" +0xae01: "geulg" +0xae02: "geulm" +0xae03: "geulb" +0xae04: "geuls" +0xae05: "geult" +0xae06: "geulp" +0xae07: "geulh" +0xae08: "geum" +0xae09: "geub" +0xae0a: "geubs" +0xae0b: "geus" +0xae0c: "geuss" +0xae0d: "geung" +0xae0e: "geuj" +0xae0f: "geuc" +0xae10: "geuk" +0xae11: "geut" +0xae12: "geup" +0xae13: "geuh" +0xae14: "gyi" +0xae15: "gyig" +0xae16: "gyigg" +0xae17: "gyigs" +0xae18: "gyin" +0xae19: "gyinj" +0xae1a: "gyinh" +0xae1b: "gyid" +0xae1c: "gyil" +0xae1d: "gyilg" +0xae1e: "gyilm" +0xae1f: "gyilb" +0xae20: "gyils" +0xae21: "gyilt" +0xae22: "gyilp" +0xae23: "gyilh" +0xae24: "gyim" +0xae25: "gyib" +0xae26: "gyibs" +0xae27: "gyis" +0xae28: "gyiss" +0xae29: "gying" +0xae2a: "gyij" +0xae2b: "gyic" +0xae2c: "gyik" +0xae2d: "gyit" +0xae2e: "gyip" +0xae2f: "gyih" +0xae30: "gi" +0xae31: "gig" +0xae32: "gigg" +0xae33: "gigs" +0xae34: "gin" +0xae35: "ginj" +0xae36: "ginh" +0xae37: "gid" +0xae38: "gil" +0xae39: "gilg" +0xae3a: "gilm" +0xae3b: "gilb" +0xae3c: "gils" +0xae3d: "gilt" +0xae3e: "gilp" +0xae3f: "gilh" +0xae40: "gim" +0xae41: "gib" +0xae42: "gibs" +0xae43: "gis" +0xae44: "giss" +0xae45: "ging" +0xae46: "gij" +0xae47: "gic" +0xae48: "gik" +0xae49: "git" +0xae4a: "gip" +0xae4b: "gih" +0xae4c: "gga" +0xae4d: "ggag" +0xae4e: "ggagg" +0xae4f: "ggags" +0xae50: "ggan" +0xae51: "gganj" +0xae52: "gganh" +0xae53: "ggad" +0xae54: "ggal" +0xae55: "ggalg" +0xae56: "ggalm" +0xae57: "ggalb" +0xae58: "ggals" +0xae59: "ggalt" +0xae5a: "ggalp" +0xae5b: "ggalh" +0xae5c: "ggam" +0xae5d: "ggab" +0xae5e: "ggabs" +0xae5f: "ggas" +0xae60: "ggass" +0xae61: "ggang" +0xae62: "ggaj" +0xae63: "ggac" +0xae64: "ggak" +0xae65: "ggat" +0xae66: "ggap" +0xae67: "ggah" +0xae68: "ggae" +0xae69: "ggaeg" +0xae6a: "ggaegg" +0xae6b: "ggaegs" +0xae6c: "ggaen" +0xae6d: "ggaenj" +0xae6e: "ggaenh" +0xae6f: "ggaed" +0xae70: "ggael" +0xae71: "ggaelg" +0xae72: "ggaelm" +0xae73: "ggaelb" +0xae74: "ggaels" +0xae75: "ggaelt" +0xae76: "ggaelp" +0xae77: "ggaelh" +0xae78: "ggaem" +0xae79: "ggaeb" +0xae7a: "ggaebs" +0xae7b: "ggaes" +0xae7c: "ggaess" +0xae7d: "ggaeng" +0xae7e: "ggaej" +0xae7f: "ggaec" +0xae80: "ggaek" +0xae81: "ggaet" +0xae82: "ggaep" +0xae83: "ggaeh" +0xae84: "ggya" +0xae85: "ggyag" +0xae86: "ggyagg" +0xae87: "ggyags" +0xae88: "ggyan" +0xae89: "ggyanj" +0xae8a: "ggyanh" +0xae8b: "ggyad" +0xae8c: "ggyal" +0xae8d: "ggyalg" +0xae8e: "ggyalm" +0xae8f: "ggyalb" +0xae90: "ggyals" +0xae91: "ggyalt" +0xae92: "ggyalp" +0xae93: "ggyalh" +0xae94: "ggyam" +0xae95: "ggyab" +0xae96: "ggyabs" +0xae97: "ggyas" +0xae98: "ggyass" +0xae99: "ggyang" +0xae9a: "ggyaj" +0xae9b: "ggyac" +0xae9c: "ggyak" +0xae9d: "ggyat" +0xae9e: "ggyap" +0xae9f: "ggyah" +0xaea0: "ggyae" +0xaea1: "ggyaeg" +0xaea2: "ggyaegg" +0xaea3: "ggyaegs" +0xaea4: "ggyaen" +0xaea5: "ggyaenj" +0xaea6: "ggyaenh" +0xaea7: "ggyaed" +0xaea8: "ggyael" +0xaea9: "ggyaelg" +0xaeaa: "ggyaelm" +0xaeab: "ggyaelb" +0xaeac: "ggyaels" +0xaead: "ggyaelt" +0xaeae: "ggyaelp" +0xaeaf: "ggyaelh" +0xaeb0: "ggyaem" +0xaeb1: "ggyaeb" +0xaeb2: "ggyaebs" +0xaeb3: "ggyaes" +0xaeb4: "ggyaess" +0xaeb5: "ggyaeng" +0xaeb6: "ggyaej" +0xaeb7: "ggyaec" +0xaeb8: "ggyaek" +0xaeb9: "ggyaet" +0xaeba: "ggyaep" +0xaebb: "ggyaeh" +0xaebc: "ggeo" +0xaebd: "ggeog" +0xaebe: "ggeogg" +0xaebf: "ggeogs" +0xaec0: "ggeon" +0xaec1: "ggeonj" +0xaec2: "ggeonh" +0xaec3: "ggeod" +0xaec4: "ggeol" +0xaec5: "ggeolg" +0xaec6: "ggeolm" +0xaec7: "ggeolb" +0xaec8: "ggeols" +0xaec9: "ggeolt" +0xaeca: "ggeolp" +0xaecb: "ggeolh" +0xaecc: "ggeom" +0xaecd: "ggeob" +0xaece: "ggeobs" +0xaecf: "ggeos" +0xaed0: "ggeoss" +0xaed1: "ggeong" +0xaed2: "ggeoj" +0xaed3: "ggeoc" +0xaed4: "ggeok" +0xaed5: "ggeot" +0xaed6: "ggeop" +0xaed7: "ggeoh" +0xaed8: "gge" +0xaed9: "ggeg" +0xaeda: "ggegg" +0xaedb: "ggegs" +0xaedc: "ggen" +0xaedd: "ggenj" +0xaede: "ggenh" +0xaedf: "gged" +0xaee0: "ggel" +0xaee1: "ggelg" +0xaee2: "ggelm" +0xaee3: "ggelb" +0xaee4: "ggels" +0xaee5: "ggelt" +0xaee6: "ggelp" +0xaee7: "ggelh" +0xaee8: "ggem" +0xaee9: "ggeb" +0xaeea: "ggebs" +0xaeeb: "gges" +0xaeec: "ggess" +0xaeed: "ggeng" +0xaeee: "ggej" +0xaeef: "ggec" +0xaef0: "ggek" +0xaef1: "gget" +0xaef2: "ggep" +0xaef3: "ggeh" +0xaef4: "ggyeo" +0xaef5: "ggyeog" +0xaef6: "ggyeogg" +0xaef7: "ggyeogs" +0xaef8: "ggyeon" +0xaef9: "ggyeonj" +0xaefa: "ggyeonh" +0xaefb: "ggyeod" +0xaefc: "ggyeol" +0xaefd: "ggyeolg" +0xaefe: "ggyeolm" +0xaeff: "ggyeolb" +/* x0af */ +0xaf00: "ggyeols" +0xaf01: "ggyeolt" +0xaf02: "ggyeolp" +0xaf03: "ggyeolh" +0xaf04: "ggyeom" +0xaf05: "ggyeob" +0xaf06: "ggyeobs" +0xaf07: "ggyeos" +0xaf08: "ggyeoss" +0xaf09: "ggyeong" +0xaf0a: "ggyeoj" +0xaf0b: "ggyeoc" +0xaf0c: "ggyeok" +0xaf0d: "ggyeot" +0xaf0e: "ggyeop" +0xaf0f: "ggyeoh" +0xaf10: "ggye" +0xaf11: "ggyeg" +0xaf12: "ggyegg" +0xaf13: "ggyegs" +0xaf14: "ggyen" +0xaf15: "ggyenj" +0xaf16: "ggyenh" +0xaf17: "ggyed" +0xaf18: "ggyel" +0xaf19: "ggyelg" +0xaf1a: "ggyelm" +0xaf1b: "ggyelb" +0xaf1c: "ggyels" +0xaf1d: "ggyelt" +0xaf1e: "ggyelp" +0xaf1f: "ggyelh" +0xaf20: "ggyem" +0xaf21: "ggyeb" +0xaf22: "ggyebs" +0xaf23: "ggyes" +0xaf24: "ggyess" +0xaf25: "ggyeng" +0xaf26: "ggyej" +0xaf27: "ggyec" +0xaf28: "ggyek" +0xaf29: "ggyet" +0xaf2a: "ggyep" +0xaf2b: "ggyeh" +0xaf2c: "ggo" +0xaf2d: "ggog" +0xaf2e: "ggogg" +0xaf2f: "ggogs" +0xaf30: "ggon" +0xaf31: "ggonj" +0xaf32: "ggonh" +0xaf33: "ggod" +0xaf34: "ggol" +0xaf35: "ggolg" +0xaf36: "ggolm" +0xaf37: "ggolb" +0xaf38: "ggols" +0xaf39: "ggolt" +0xaf3a: "ggolp" +0xaf3b: "ggolh" +0xaf3c: "ggom" +0xaf3d: "ggob" +0xaf3e: "ggobs" +0xaf3f: "ggos" +0xaf40: "ggoss" +0xaf41: "ggong" +0xaf42: "ggoj" +0xaf43: "ggoc" +0xaf44: "ggok" +0xaf45: "ggot" +0xaf46: "ggop" +0xaf47: "ggoh" +0xaf48: "ggwa" +0xaf49: "ggwag" +0xaf4a: "ggwagg" +0xaf4b: "ggwags" +0xaf4c: "ggwan" +0xaf4d: "ggwanj" +0xaf4e: "ggwanh" +0xaf4f: "ggwad" +0xaf50: "ggwal" +0xaf51: "ggwalg" +0xaf52: "ggwalm" +0xaf53: "ggwalb" +0xaf54: "ggwals" +0xaf55: "ggwalt" +0xaf56: "ggwalp" +0xaf57: "ggwalh" +0xaf58: "ggwam" +0xaf59: "ggwab" +0xaf5a: "ggwabs" +0xaf5b: "ggwas" +0xaf5c: "ggwass" +0xaf5d: "ggwang" +0xaf5e: "ggwaj" +0xaf5f: "ggwac" +0xaf60: "ggwak" +0xaf61: "ggwat" +0xaf62: "ggwap" +0xaf63: "ggwah" +0xaf64: "ggwae" +0xaf65: "ggwaeg" +0xaf66: "ggwaegg" +0xaf67: "ggwaegs" +0xaf68: "ggwaen" +0xaf69: "ggwaenj" +0xaf6a: "ggwaenh" +0xaf6b: "ggwaed" +0xaf6c: "ggwael" +0xaf6d: "ggwaelg" +0xaf6e: "ggwaelm" +0xaf6f: "ggwaelb" +0xaf70: "ggwaels" +0xaf71: "ggwaelt" +0xaf72: "ggwaelp" +0xaf73: "ggwaelh" +0xaf74: "ggwaem" +0xaf75: "ggwaeb" +0xaf76: "ggwaebs" +0xaf77: "ggwaes" +0xaf78: "ggwaess" +0xaf79: "ggwaeng" +0xaf7a: "ggwaej" +0xaf7b: "ggwaec" +0xaf7c: "ggwaek" +0xaf7d: "ggwaet" +0xaf7e: "ggwaep" +0xaf7f: "ggwaeh" +0xaf80: "ggoe" +0xaf81: "ggoeg" +0xaf82: "ggoegg" +0xaf83: "ggoegs" +0xaf84: "ggoen" +0xaf85: "ggoenj" +0xaf86: "ggoenh" +0xaf87: "ggoed" +0xaf88: "ggoel" +0xaf89: "ggoelg" +0xaf8a: "ggoelm" +0xaf8b: "ggoelb" +0xaf8c: "ggoels" +0xaf8d: "ggoelt" +0xaf8e: "ggoelp" +0xaf8f: "ggoelh" +0xaf90: "ggoem" +0xaf91: "ggoeb" +0xaf92: "ggoebs" +0xaf93: "ggoes" +0xaf94: "ggoess" +0xaf95: "ggoeng" +0xaf96: "ggoej" +0xaf97: "ggoec" +0xaf98: "ggoek" +0xaf99: "ggoet" +0xaf9a: "ggoep" +0xaf9b: "ggoeh" +0xaf9c: "ggyo" +0xaf9d: "ggyog" +0xaf9e: "ggyogg" +0xaf9f: "ggyogs" +0xafa0: "ggyon" +0xafa1: "ggyonj" +0xafa2: "ggyonh" +0xafa3: "ggyod" +0xafa4: "ggyol" +0xafa5: "ggyolg" +0xafa6: "ggyolm" +0xafa7: "ggyolb" +0xafa8: "ggyols" +0xafa9: "ggyolt" +0xafaa: "ggyolp" +0xafab: "ggyolh" +0xafac: "ggyom" +0xafad: "ggyob" +0xafae: "ggyobs" +0xafaf: "ggyos" +0xafb0: "ggyoss" +0xafb1: "ggyong" +0xafb2: "ggyoj" +0xafb3: "ggyoc" +0xafb4: "ggyok" +0xafb5: "ggyot" +0xafb6: "ggyop" +0xafb7: "ggyoh" +0xafb8: "ggu" +0xafb9: "ggug" +0xafba: "ggugg" +0xafbb: "ggugs" +0xafbc: "ggun" +0xafbd: "ggunj" +0xafbe: "ggunh" +0xafbf: "ggud" +0xafc0: "ggul" +0xafc1: "ggulg" +0xafc2: "ggulm" +0xafc3: "ggulb" +0xafc4: "gguls" +0xafc5: "ggult" +0xafc6: "ggulp" +0xafc7: "ggulh" +0xafc8: "ggum" +0xafc9: "ggub" +0xafca: "ggubs" +0xafcb: "ggus" +0xafcc: "gguss" +0xafcd: "ggung" +0xafce: "gguj" +0xafcf: "gguc" +0xafd0: "gguk" +0xafd1: "ggut" +0xafd2: "ggup" +0xafd3: "gguh" +0xafd4: "ggweo" +0xafd5: "ggweog" +0xafd6: "ggweogg" +0xafd7: "ggweogs" +0xafd8: "ggweon" +0xafd9: "ggweonj" +0xafda: "ggweonh" +0xafdb: "ggweod" +0xafdc: "ggweol" +0xafdd: "ggweolg" +0xafde: "ggweolm" +0xafdf: "ggweolb" +0xafe0: "ggweols" +0xafe1: "ggweolt" +0xafe2: "ggweolp" +0xafe3: "ggweolh" +0xafe4: "ggweom" +0xafe5: "ggweob" +0xafe6: "ggweobs" +0xafe7: "ggweos" +0xafe8: "ggweoss" +0xafe9: "ggweong" +0xafea: "ggweoj" +0xafeb: "ggweoc" +0xafec: "ggweok" +0xafed: "ggweot" +0xafee: "ggweop" +0xafef: "ggweoh" +0xaff0: "ggwe" +0xaff1: "ggweg" +0xaff2: "ggwegg" +0xaff3: "ggwegs" +0xaff4: "ggwen" +0xaff5: "ggwenj" +0xaff6: "ggwenh" +0xaff7: "ggwed" +0xaff8: "ggwel" +0xaff9: "ggwelg" +0xaffa: "ggwelm" +0xaffb: "ggwelb" +0xaffc: "ggwels" +0xaffd: "ggwelt" +0xaffe: "ggwelp" +0xafff: "ggwelh" +/* x0b0 */ +0xb000: "ggwem" +0xb001: "ggweb" +0xb002: "ggwebs" +0xb003: "ggwes" +0xb004: "ggwess" +0xb005: "ggweng" +0xb006: "ggwej" +0xb007: "ggwec" +0xb008: "ggwek" +0xb009: "ggwet" +0xb00a: "ggwep" +0xb00b: "ggweh" +0xb00c: "ggwi" +0xb00d: "ggwig" +0xb00e: "ggwigg" +0xb00f: "ggwigs" +0xb010: "ggwin" +0xb011: "ggwinj" +0xb012: "ggwinh" +0xb013: "ggwid" +0xb014: "ggwil" +0xb015: "ggwilg" +0xb016: "ggwilm" +0xb017: "ggwilb" +0xb018: "ggwils" +0xb019: "ggwilt" +0xb01a: "ggwilp" +0xb01b: "ggwilh" +0xb01c: "ggwim" +0xb01d: "ggwib" +0xb01e: "ggwibs" +0xb01f: "ggwis" +0xb020: "ggwiss" +0xb021: "ggwing" +0xb022: "ggwij" +0xb023: "ggwic" +0xb024: "ggwik" +0xb025: "ggwit" +0xb026: "ggwip" +0xb027: "ggwih" +0xb028: "ggyu" +0xb029: "ggyug" +0xb02a: "ggyugg" +0xb02b: "ggyugs" +0xb02c: "ggyun" +0xb02d: "ggyunj" +0xb02e: "ggyunh" +0xb02f: "ggyud" +0xb030: "ggyul" +0xb031: "ggyulg" +0xb032: "ggyulm" +0xb033: "ggyulb" +0xb034: "ggyuls" +0xb035: "ggyult" +0xb036: "ggyulp" +0xb037: "ggyulh" +0xb038: "ggyum" +0xb039: "ggyub" +0xb03a: "ggyubs" +0xb03b: "ggyus" +0xb03c: "ggyuss" +0xb03d: "ggyung" +0xb03e: "ggyuj" +0xb03f: "ggyuc" +0xb040: "ggyuk" +0xb041: "ggyut" +0xb042: "ggyup" +0xb043: "ggyuh" +0xb044: "ggeu" +0xb045: "ggeug" +0xb046: "ggeugg" +0xb047: "ggeugs" +0xb048: "ggeun" +0xb049: "ggeunj" +0xb04a: "ggeunh" +0xb04b: "ggeud" +0xb04c: "ggeul" +0xb04d: "ggeulg" +0xb04e: "ggeulm" +0xb04f: "ggeulb" +0xb050: "ggeuls" +0xb051: "ggeult" +0xb052: "ggeulp" +0xb053: "ggeulh" +0xb054: "ggeum" +0xb055: "ggeub" +0xb056: "ggeubs" +0xb057: "ggeus" +0xb058: "ggeuss" +0xb059: "ggeung" +0xb05a: "ggeuj" +0xb05b: "ggeuc" +0xb05c: "ggeuk" +0xb05d: "ggeut" +0xb05e: "ggeup" +0xb05f: "ggeuh" +0xb060: "ggyi" +0xb061: "ggyig" +0xb062: "ggyigg" +0xb063: "ggyigs" +0xb064: "ggyin" +0xb065: "ggyinj" +0xb066: "ggyinh" +0xb067: "ggyid" +0xb068: "ggyil" +0xb069: "ggyilg" +0xb06a: "ggyilm" +0xb06b: "ggyilb" +0xb06c: "ggyils" +0xb06d: "ggyilt" +0xb06e: "ggyilp" +0xb06f: "ggyilh" +0xb070: "ggyim" +0xb071: "ggyib" +0xb072: "ggyibs" +0xb073: "ggyis" +0xb074: "ggyiss" +0xb075: "ggying" +0xb076: "ggyij" +0xb077: "ggyic" +0xb078: "ggyik" +0xb079: "ggyit" +0xb07a: "ggyip" +0xb07b: "ggyih" +0xb07c: "ggi" +0xb07d: "ggig" +0xb07e: "ggigg" +0xb07f: "ggigs" +0xb080: "ggin" +0xb081: "gginj" +0xb082: "gginh" +0xb083: "ggid" +0xb084: "ggil" +0xb085: "ggilg" +0xb086: "ggilm" +0xb087: "ggilb" +0xb088: "ggils" +0xb089: "ggilt" +0xb08a: "ggilp" +0xb08b: "ggilh" +0xb08c: "ggim" +0xb08d: "ggib" +0xb08e: "ggibs" +0xb08f: "ggis" +0xb090: "ggiss" +0xb091: "gging" +0xb092: "ggij" +0xb093: "ggic" +0xb094: "ggik" +0xb095: "ggit" +0xb096: "ggip" +0xb097: "ggih" +0xb098: "na" +0xb099: "nag" +0xb09a: "nagg" +0xb09b: "nags" +0xb09c: "nan" +0xb09d: "nanj" +0xb09e: "nanh" +0xb09f: "nad" +0xb0a0: "nal" +0xb0a1: "nalg" +0xb0a2: "nalm" +0xb0a3: "nalb" +0xb0a4: "nals" +0xb0a5: "nalt" +0xb0a6: "nalp" +0xb0a7: "nalh" +0xb0a8: "nam" +0xb0a9: "nab" +0xb0aa: "nabs" +0xb0ab: "nas" +0xb0ac: "nass" +0xb0ad: "nang" +0xb0ae: "naj" +0xb0af: "nac" +0xb0b0: "nak" +0xb0b1: "nat" +0xb0b2: "nap" +0xb0b3: "nah" +0xb0b4: "nae" +0xb0b5: "naeg" +0xb0b6: "naegg" +0xb0b7: "naegs" +0xb0b8: "naen" +0xb0b9: "naenj" +0xb0ba: "naenh" +0xb0bb: "naed" +0xb0bc: "nael" +0xb0bd: "naelg" +0xb0be: "naelm" +0xb0bf: "naelb" +0xb0c0: "naels" +0xb0c1: "naelt" +0xb0c2: "naelp" +0xb0c3: "naelh" +0xb0c4: "naem" +0xb0c5: "naeb" +0xb0c6: "naebs" +0xb0c7: "naes" +0xb0c8: "naess" +0xb0c9: "naeng" +0xb0ca: "naej" +0xb0cb: "naec" +0xb0cc: "naek" +0xb0cd: "naet" +0xb0ce: "naep" +0xb0cf: "naeh" +0xb0d0: "nya" +0xb0d1: "nyag" +0xb0d2: "nyagg" +0xb0d3: "nyags" +0xb0d4: "nyan" +0xb0d5: "nyanj" +0xb0d6: "nyanh" +0xb0d7: "nyad" +0xb0d8: "nyal" +0xb0d9: "nyalg" +0xb0da: "nyalm" +0xb0db: "nyalb" +0xb0dc: "nyals" +0xb0dd: "nyalt" +0xb0de: "nyalp" +0xb0df: "nyalh" +0xb0e0: "nyam" +0xb0e1: "nyab" +0xb0e2: "nyabs" +0xb0e3: "nyas" +0xb0e4: "nyass" +0xb0e5: "nyang" +0xb0e6: "nyaj" +0xb0e7: "nyac" +0xb0e8: "nyak" +0xb0e9: "nyat" +0xb0ea: "nyap" +0xb0eb: "nyah" +0xb0ec: "nyae" +0xb0ed: "nyaeg" +0xb0ee: "nyaegg" +0xb0ef: "nyaegs" +0xb0f0: "nyaen" +0xb0f1: "nyaenj" +0xb0f2: "nyaenh" +0xb0f3: "nyaed" +0xb0f4: "nyael" +0xb0f5: "nyaelg" +0xb0f6: "nyaelm" +0xb0f7: "nyaelb" +0xb0f8: "nyaels" +0xb0f9: "nyaelt" +0xb0fa: "nyaelp" +0xb0fb: "nyaelh" +0xb0fc: "nyaem" +0xb0fd: "nyaeb" +0xb0fe: "nyaebs" +0xb0ff: "nyaes" +/* x0b1 */ +0xb100: "nyaess" +0xb101: "nyaeng" +0xb102: "nyaej" +0xb103: "nyaec" +0xb104: "nyaek" +0xb105: "nyaet" +0xb106: "nyaep" +0xb107: "nyaeh" +0xb108: "neo" +0xb109: "neog" +0xb10a: "neogg" +0xb10b: "neogs" +0xb10c: "neon" +0xb10d: "neonj" +0xb10e: "neonh" +0xb10f: "neod" +0xb110: "neol" +0xb111: "neolg" +0xb112: "neolm" +0xb113: "neolb" +0xb114: "neols" +0xb115: "neolt" +0xb116: "neolp" +0xb117: "neolh" +0xb118: "neom" +0xb119: "neob" +0xb11a: "neobs" +0xb11b: "neos" +0xb11c: "neoss" +0xb11d: "neong" +0xb11e: "neoj" +0xb11f: "neoc" +0xb120: "neok" +0xb121: "neot" +0xb122: "neop" +0xb123: "neoh" +0xb124: "ne" +0xb125: "neg" +0xb126: "negg" +0xb127: "negs" +0xb128: "nen" +0xb129: "nenj" +0xb12a: "nenh" +0xb12b: "ned" +0xb12c: "nel" +0xb12d: "nelg" +0xb12e: "nelm" +0xb12f: "nelb" +0xb130: "nels" +0xb131: "nelt" +0xb132: "nelp" +0xb133: "nelh" +0xb134: "nem" +0xb135: "neb" +0xb136: "nebs" +0xb137: "nes" +0xb138: "ness" +0xb139: "neng" +0xb13a: "nej" +0xb13b: "nec" +0xb13c: "nek" +0xb13d: "net" +0xb13e: "nep" +0xb13f: "neh" +0xb140: "nyeo" +0xb141: "nyeog" +0xb142: "nyeogg" +0xb143: "nyeogs" +0xb144: "nyeon" +0xb145: "nyeonj" +0xb146: "nyeonh" +0xb147: "nyeod" +0xb148: "nyeol" +0xb149: "nyeolg" +0xb14a: "nyeolm" +0xb14b: "nyeolb" +0xb14c: "nyeols" +0xb14d: "nyeolt" +0xb14e: "nyeolp" +0xb14f: "nyeolh" +0xb150: "nyeom" +0xb151: "nyeob" +0xb152: "nyeobs" +0xb153: "nyeos" +0xb154: "nyeoss" +0xb155: "nyeong" +0xb156: "nyeoj" +0xb157: "nyeoc" +0xb158: "nyeok" +0xb159: "nyeot" +0xb15a: "nyeop" +0xb15b: "nyeoh" +0xb15c: "nye" +0xb15d: "nyeg" +0xb15e: "nyegg" +0xb15f: "nyegs" +0xb160: "nyen" +0xb161: "nyenj" +0xb162: "nyenh" +0xb163: "nyed" +0xb164: "nyel" +0xb165: "nyelg" +0xb166: "nyelm" +0xb167: "nyelb" +0xb168: "nyels" +0xb169: "nyelt" +0xb16a: "nyelp" +0xb16b: "nyelh" +0xb16c: "nyem" +0xb16d: "nyeb" +0xb16e: "nyebs" +0xb16f: "nyes" +0xb170: "nyess" +0xb171: "nyeng" +0xb172: "nyej" +0xb173: "nyec" +0xb174: "nyek" +0xb175: "nyet" +0xb176: "nyep" +0xb177: "nyeh" +0xb178: "no" +0xb179: "nog" +0xb17a: "nogg" +0xb17b: "nogs" +0xb17c: "non" +0xb17d: "nonj" +0xb17e: "nonh" +0xb17f: "nod" +0xb180: "nol" +0xb181: "nolg" +0xb182: "nolm" +0xb183: "nolb" +0xb184: "nols" +0xb185: "nolt" +0xb186: "nolp" +0xb187: "nolh" +0xb188: "nom" +0xb189: "nob" +0xb18a: "nobs" +0xb18b: "nos" +0xb18c: "noss" +0xb18d: "nong" +0xb18e: "noj" +0xb18f: "noc" +0xb190: "nok" +0xb191: "not" +0xb192: "nop" +0xb193: "noh" +0xb194: "nwa" +0xb195: "nwag" +0xb196: "nwagg" +0xb197: "nwags" +0xb198: "nwan" +0xb199: "nwanj" +0xb19a: "nwanh" +0xb19b: "nwad" +0xb19c: "nwal" +0xb19d: "nwalg" +0xb19e: "nwalm" +0xb19f: "nwalb" +0xb1a0: "nwals" +0xb1a1: "nwalt" +0xb1a2: "nwalp" +0xb1a3: "nwalh" +0xb1a4: "nwam" +0xb1a5: "nwab" +0xb1a6: "nwabs" +0xb1a7: "nwas" +0xb1a8: "nwass" +0xb1a9: "nwang" +0xb1aa: "nwaj" +0xb1ab: "nwac" +0xb1ac: "nwak" +0xb1ad: "nwat" +0xb1ae: "nwap" +0xb1af: "nwah" +0xb1b0: "nwae" +0xb1b1: "nwaeg" +0xb1b2: "nwaegg" +0xb1b3: "nwaegs" +0xb1b4: "nwaen" +0xb1b5: "nwaenj" +0xb1b6: "nwaenh" +0xb1b7: "nwaed" +0xb1b8: "nwael" +0xb1b9: "nwaelg" +0xb1ba: "nwaelm" +0xb1bb: "nwaelb" +0xb1bc: "nwaels" +0xb1bd: "nwaelt" +0xb1be: "nwaelp" +0xb1bf: "nwaelh" +0xb1c0: "nwaem" +0xb1c1: "nwaeb" +0xb1c2: "nwaebs" +0xb1c3: "nwaes" +0xb1c4: "nwaess" +0xb1c5: "nwaeng" +0xb1c6: "nwaej" +0xb1c7: "nwaec" +0xb1c8: "nwaek" +0xb1c9: "nwaet" +0xb1ca: "nwaep" +0xb1cb: "nwaeh" +0xb1cc: "noe" +0xb1cd: "noeg" +0xb1ce: "noegg" +0xb1cf: "noegs" +0xb1d0: "noen" +0xb1d1: "noenj" +0xb1d2: "noenh" +0xb1d3: "noed" +0xb1d4: "noel" +0xb1d5: "noelg" +0xb1d6: "noelm" +0xb1d7: "noelb" +0xb1d8: "noels" +0xb1d9: "noelt" +0xb1da: "noelp" +0xb1db: "noelh" +0xb1dc: "noem" +0xb1dd: "noeb" +0xb1de: "noebs" +0xb1df: "noes" +0xb1e0: "noess" +0xb1e1: "noeng" +0xb1e2: "noej" +0xb1e3: "noec" +0xb1e4: "noek" +0xb1e5: "noet" +0xb1e6: "noep" +0xb1e7: "noeh" +0xb1e8: "nyo" +0xb1e9: "nyog" +0xb1ea: "nyogg" +0xb1eb: "nyogs" +0xb1ec: "nyon" +0xb1ed: "nyonj" +0xb1ee: "nyonh" +0xb1ef: "nyod" +0xb1f0: "nyol" +0xb1f1: "nyolg" +0xb1f2: "nyolm" +0xb1f3: "nyolb" +0xb1f4: "nyols" +0xb1f5: "nyolt" +0xb1f6: "nyolp" +0xb1f7: "nyolh" +0xb1f8: "nyom" +0xb1f9: "nyob" +0xb1fa: "nyobs" +0xb1fb: "nyos" +0xb1fc: "nyoss" +0xb1fd: "nyong" +0xb1fe: "nyoj" +0xb1ff: "nyoc" +/* x0b2 */ +0xb200: "nyok" +0xb201: "nyot" +0xb202: "nyop" +0xb203: "nyoh" +0xb204: "nu" +0xb205: "nug" +0xb206: "nugg" +0xb207: "nugs" +0xb208: "nun" +0xb209: "nunj" +0xb20a: "nunh" +0xb20b: "nud" +0xb20c: "nul" +0xb20d: "nulg" +0xb20e: "nulm" +0xb20f: "nulb" +0xb210: "nuls" +0xb211: "nult" +0xb212: "nulp" +0xb213: "nulh" +0xb214: "num" +0xb215: "nub" +0xb216: "nubs" +0xb217: "nus" +0xb218: "nuss" +0xb219: "nung" +0xb21a: "nuj" +0xb21b: "nuc" +0xb21c: "nuk" +0xb21d: "nut" +0xb21e: "nup" +0xb21f: "nuh" +0xb220: "nweo" +0xb221: "nweog" +0xb222: "nweogg" +0xb223: "nweogs" +0xb224: "nweon" +0xb225: "nweonj" +0xb226: "nweonh" +0xb227: "nweod" +0xb228: "nweol" +0xb229: "nweolg" +0xb22a: "nweolm" +0xb22b: "nweolb" +0xb22c: "nweols" +0xb22d: "nweolt" +0xb22e: "nweolp" +0xb22f: "nweolh" +0xb230: "nweom" +0xb231: "nweob" +0xb232: "nweobs" +0xb233: "nweos" +0xb234: "nweoss" +0xb235: "nweong" +0xb236: "nweoj" +0xb237: "nweoc" +0xb238: "nweok" +0xb239: "nweot" +0xb23a: "nweop" +0xb23b: "nweoh" +0xb23c: "nwe" +0xb23d: "nweg" +0xb23e: "nwegg" +0xb23f: "nwegs" +0xb240: "nwen" +0xb241: "nwenj" +0xb242: "nwenh" +0xb243: "nwed" +0xb244: "nwel" +0xb245: "nwelg" +0xb246: "nwelm" +0xb247: "nwelb" +0xb248: "nwels" +0xb249: "nwelt" +0xb24a: "nwelp" +0xb24b: "nwelh" +0xb24c: "nwem" +0xb24d: "nweb" +0xb24e: "nwebs" +0xb24f: "nwes" +0xb250: "nwess" +0xb251: "nweng" +0xb252: "nwej" +0xb253: "nwec" +0xb254: "nwek" +0xb255: "nwet" +0xb256: "nwep" +0xb257: "nweh" +0xb258: "nwi" +0xb259: "nwig" +0xb25a: "nwigg" +0xb25b: "nwigs" +0xb25c: "nwin" +0xb25d: "nwinj" +0xb25e: "nwinh" +0xb25f: "nwid" +0xb260: "nwil" +0xb261: "nwilg" +0xb262: "nwilm" +0xb263: "nwilb" +0xb264: "nwils" +0xb265: "nwilt" +0xb266: "nwilp" +0xb267: "nwilh" +0xb268: "nwim" +0xb269: "nwib" +0xb26a: "nwibs" +0xb26b: "nwis" +0xb26c: "nwiss" +0xb26d: "nwing" +0xb26e: "nwij" +0xb26f: "nwic" +0xb270: "nwik" +0xb271: "nwit" +0xb272: "nwip" +0xb273: "nwih" +0xb274: "nyu" +0xb275: "nyug" +0xb276: "nyugg" +0xb277: "nyugs" +0xb278: "nyun" +0xb279: "nyunj" +0xb27a: "nyunh" +0xb27b: "nyud" +0xb27c: "nyul" +0xb27d: "nyulg" +0xb27e: "nyulm" +0xb27f: "nyulb" +0xb280: "nyuls" +0xb281: "nyult" +0xb282: "nyulp" +0xb283: "nyulh" +0xb284: "nyum" +0xb285: "nyub" +0xb286: "nyubs" +0xb287: "nyus" +0xb288: "nyuss" +0xb289: "nyung" +0xb28a: "nyuj" +0xb28b: "nyuc" +0xb28c: "nyuk" +0xb28d: "nyut" +0xb28e: "nyup" +0xb28f: "nyuh" +0xb290: "neu" +0xb291: "neug" +0xb292: "neugg" +0xb293: "neugs" +0xb294: "neun" +0xb295: "neunj" +0xb296: "neunh" +0xb297: "neud" +0xb298: "neul" +0xb299: "neulg" +0xb29a: "neulm" +0xb29b: "neulb" +0xb29c: "neuls" +0xb29d: "neult" +0xb29e: "neulp" +0xb29f: "neulh" +0xb2a0: "neum" +0xb2a1: "neub" +0xb2a2: "neubs" +0xb2a3: "neus" +0xb2a4: "neuss" +0xb2a5: "neung" +0xb2a6: "neuj" +0xb2a7: "neuc" +0xb2a8: "neuk" +0xb2a9: "neut" +0xb2aa: "neup" +0xb2ab: "neuh" +0xb2ac: "nyi" +0xb2ad: "nyig" +0xb2ae: "nyigg" +0xb2af: "nyigs" +0xb2b0: "nyin" +0xb2b1: "nyinj" +0xb2b2: "nyinh" +0xb2b3: "nyid" +0xb2b4: "nyil" +0xb2b5: "nyilg" +0xb2b6: "nyilm" +0xb2b7: "nyilb" +0xb2b8: "nyils" +0xb2b9: "nyilt" +0xb2ba: "nyilp" +0xb2bb: "nyilh" +0xb2bc: "nyim" +0xb2bd: "nyib" +0xb2be: "nyibs" +0xb2bf: "nyis" +0xb2c0: "nyiss" +0xb2c1: "nying" +0xb2c2: "nyij" +0xb2c3: "nyic" +0xb2c4: "nyik" +0xb2c5: "nyit" +0xb2c6: "nyip" +0xb2c7: "nyih" +0xb2c8: "ni" +0xb2c9: "nig" +0xb2ca: "nigg" +0xb2cb: "nigs" +0xb2cc: "nin" +0xb2cd: "ninj" +0xb2ce: "ninh" +0xb2cf: "nid" +0xb2d0: "nil" +0xb2d1: "nilg" +0xb2d2: "nilm" +0xb2d3: "nilb" +0xb2d4: "nils" +0xb2d5: "nilt" +0xb2d6: "nilp" +0xb2d7: "nilh" +0xb2d8: "nim" +0xb2d9: "nib" +0xb2da: "nibs" +0xb2db: "nis" +0xb2dc: "niss" +0xb2dd: "ning" +0xb2de: "nij" +0xb2df: "nic" +0xb2e0: "nik" +0xb2e1: "nit" +0xb2e2: "nip" +0xb2e3: "nih" +0xb2e4: "da" +0xb2e5: "dag" +0xb2e6: "dagg" +0xb2e7: "dags" +0xb2e8: "dan" +0xb2e9: "danj" +0xb2ea: "danh" +0xb2eb: "dad" +0xb2ec: "dal" +0xb2ed: "dalg" +0xb2ee: "dalm" +0xb2ef: "dalb" +0xb2f0: "dals" +0xb2f1: "dalt" +0xb2f2: "dalp" +0xb2f3: "dalh" +0xb2f4: "dam" +0xb2f5: "dab" +0xb2f6: "dabs" +0xb2f7: "das" +0xb2f8: "dass" +0xb2f9: "dang" +0xb2fa: "daj" +0xb2fb: "dac" +0xb2fc: "dak" +0xb2fd: "dat" +0xb2fe: "dap" +0xb2ff: "dah" +/* x0b3 */ +0xb300: "dae" +0xb301: "daeg" +0xb302: "daegg" +0xb303: "daegs" +0xb304: "daen" +0xb305: "daenj" +0xb306: "daenh" +0xb307: "daed" +0xb308: "dael" +0xb309: "daelg" +0xb30a: "daelm" +0xb30b: "daelb" +0xb30c: "daels" +0xb30d: "daelt" +0xb30e: "daelp" +0xb30f: "daelh" +0xb310: "daem" +0xb311: "daeb" +0xb312: "daebs" +0xb313: "daes" +0xb314: "daess" +0xb315: "daeng" +0xb316: "daej" +0xb317: "daec" +0xb318: "daek" +0xb319: "daet" +0xb31a: "daep" +0xb31b: "daeh" +0xb31c: "dya" +0xb31d: "dyag" +0xb31e: "dyagg" +0xb31f: "dyags" +0xb320: "dyan" +0xb321: "dyanj" +0xb322: "dyanh" +0xb323: "dyad" +0xb324: "dyal" +0xb325: "dyalg" +0xb326: "dyalm" +0xb327: "dyalb" +0xb328: "dyals" +0xb329: "dyalt" +0xb32a: "dyalp" +0xb32b: "dyalh" +0xb32c: "dyam" +0xb32d: "dyab" +0xb32e: "dyabs" +0xb32f: "dyas" +0xb330: "dyass" +0xb331: "dyang" +0xb332: "dyaj" +0xb333: "dyac" +0xb334: "dyak" +0xb335: "dyat" +0xb336: "dyap" +0xb337: "dyah" +0xb338: "dyae" +0xb339: "dyaeg" +0xb33a: "dyaegg" +0xb33b: "dyaegs" +0xb33c: "dyaen" +0xb33d: "dyaenj" +0xb33e: "dyaenh" +0xb33f: "dyaed" +0xb340: "dyael" +0xb341: "dyaelg" +0xb342: "dyaelm" +0xb343: "dyaelb" +0xb344: "dyaels" +0xb345: "dyaelt" +0xb346: "dyaelp" +0xb347: "dyaelh" +0xb348: "dyaem" +0xb349: "dyaeb" +0xb34a: "dyaebs" +0xb34b: "dyaes" +0xb34c: "dyaess" +0xb34d: "dyaeng" +0xb34e: "dyaej" +0xb34f: "dyaec" +0xb350: "dyaek" +0xb351: "dyaet" +0xb352: "dyaep" +0xb353: "dyaeh" +0xb354: "deo" +0xb355: "deog" +0xb356: "deogg" +0xb357: "deogs" +0xb358: "deon" +0xb359: "deonj" +0xb35a: "deonh" +0xb35b: "deod" +0xb35c: "deol" +0xb35d: "deolg" +0xb35e: "deolm" +0xb35f: "deolb" +0xb360: "deols" +0xb361: "deolt" +0xb362: "deolp" +0xb363: "deolh" +0xb364: "deom" +0xb365: "deob" +0xb366: "deobs" +0xb367: "deos" +0xb368: "deoss" +0xb369: "deong" +0xb36a: "deoj" +0xb36b: "deoc" +0xb36c: "deok" +0xb36d: "deot" +0xb36e: "deop" +0xb36f: "deoh" +0xb370: "de" +0xb371: "deg" +0xb372: "degg" +0xb373: "degs" +0xb374: "den" +0xb375: "denj" +0xb376: "denh" +0xb377: "ded" +0xb378: "del" +0xb379: "delg" +0xb37a: "delm" +0xb37b: "delb" +0xb37c: "dels" +0xb37d: "delt" +0xb37e: "delp" +0xb37f: "delh" +0xb380: "dem" +0xb381: "deb" +0xb382: "debs" +0xb383: "des" +0xb384: "dess" +0xb385: "deng" +0xb386: "dej" +0xb387: "dec" +0xb388: "dek" +0xb389: "det" +0xb38a: "dep" +0xb38b: "deh" +0xb38c: "dyeo" +0xb38d: "dyeog" +0xb38e: "dyeogg" +0xb38f: "dyeogs" +0xb390: "dyeon" +0xb391: "dyeonj" +0xb392: "dyeonh" +0xb393: "dyeod" +0xb394: "dyeol" +0xb395: "dyeolg" +0xb396: "dyeolm" +0xb397: "dyeolb" +0xb398: "dyeols" +0xb399: "dyeolt" +0xb39a: "dyeolp" +0xb39b: "dyeolh" +0xb39c: "dyeom" +0xb39d: "dyeob" +0xb39e: "dyeobs" +0xb39f: "dyeos" +0xb3a0: "dyeoss" +0xb3a1: "dyeong" +0xb3a2: "dyeoj" +0xb3a3: "dyeoc" +0xb3a4: "dyeok" +0xb3a5: "dyeot" +0xb3a6: "dyeop" +0xb3a7: "dyeoh" +0xb3a8: "dye" +0xb3a9: "dyeg" +0xb3aa: "dyegg" +0xb3ab: "dyegs" +0xb3ac: "dyen" +0xb3ad: "dyenj" +0xb3ae: "dyenh" +0xb3af: "dyed" +0xb3b0: "dyel" +0xb3b1: "dyelg" +0xb3b2: "dyelm" +0xb3b3: "dyelb" +0xb3b4: "dyels" +0xb3b5: "dyelt" +0xb3b6: "dyelp" +0xb3b7: "dyelh" +0xb3b8: "dyem" +0xb3b9: "dyeb" +0xb3ba: "dyebs" +0xb3bb: "dyes" +0xb3bc: "dyess" +0xb3bd: "dyeng" +0xb3be: "dyej" +0xb3bf: "dyec" +0xb3c0: "dyek" +0xb3c1: "dyet" +0xb3c2: "dyep" +0xb3c3: "dyeh" +0xb3c4: "do" +0xb3c5: "dog" +0xb3c6: "dogg" +0xb3c7: "dogs" +0xb3c8: "don" +0xb3c9: "donj" +0xb3ca: "donh" +0xb3cb: "dod" +0xb3cc: "dol" +0xb3cd: "dolg" +0xb3ce: "dolm" +0xb3cf: "dolb" +0xb3d0: "dols" +0xb3d1: "dolt" +0xb3d2: "dolp" +0xb3d3: "dolh" +0xb3d4: "dom" +0xb3d5: "dob" +0xb3d6: "dobs" +0xb3d7: "dos" +0xb3d8: "doss" +0xb3d9: "dong" +0xb3da: "doj" +0xb3db: "doc" +0xb3dc: "dok" +0xb3dd: "dot" +0xb3de: "dop" +0xb3df: "doh" +0xb3e0: "dwa" +0xb3e1: "dwag" +0xb3e2: "dwagg" +0xb3e3: "dwags" +0xb3e4: "dwan" +0xb3e5: "dwanj" +0xb3e6: "dwanh" +0xb3e7: "dwad" +0xb3e8: "dwal" +0xb3e9: "dwalg" +0xb3ea: "dwalm" +0xb3eb: "dwalb" +0xb3ec: "dwals" +0xb3ed: "dwalt" +0xb3ee: "dwalp" +0xb3ef: "dwalh" +0xb3f0: "dwam" +0xb3f1: "dwab" +0xb3f2: "dwabs" +0xb3f3: "dwas" +0xb3f4: "dwass" +0xb3f5: "dwang" +0xb3f6: "dwaj" +0xb3f7: "dwac" +0xb3f8: "dwak" +0xb3f9: "dwat" +0xb3fa: "dwap" +0xb3fb: "dwah" +0xb3fc: "dwae" +0xb3fd: "dwaeg" +0xb3fe: "dwaegg" +0xb3ff: "dwaegs" +/* x0b4 */ +0xb400: "dwaen" +0xb401: "dwaenj" +0xb402: "dwaenh" +0xb403: "dwaed" +0xb404: "dwael" +0xb405: "dwaelg" +0xb406: "dwaelm" +0xb407: "dwaelb" +0xb408: "dwaels" +0xb409: "dwaelt" +0xb40a: "dwaelp" +0xb40b: "dwaelh" +0xb40c: "dwaem" +0xb40d: "dwaeb" +0xb40e: "dwaebs" +0xb40f: "dwaes" +0xb410: "dwaess" +0xb411: "dwaeng" +0xb412: "dwaej" +0xb413: "dwaec" +0xb414: "dwaek" +0xb415: "dwaet" +0xb416: "dwaep" +0xb417: "dwaeh" +0xb418: "doe" +0xb419: "doeg" +0xb41a: "doegg" +0xb41b: "doegs" +0xb41c: "doen" +0xb41d: "doenj" +0xb41e: "doenh" +0xb41f: "doed" +0xb420: "doel" +0xb421: "doelg" +0xb422: "doelm" +0xb423: "doelb" +0xb424: "doels" +0xb425: "doelt" +0xb426: "doelp" +0xb427: "doelh" +0xb428: "doem" +0xb429: "doeb" +0xb42a: "doebs" +0xb42b: "does" +0xb42c: "doess" +0xb42d: "doeng" +0xb42e: "doej" +0xb42f: "doec" +0xb430: "doek" +0xb431: "doet" +0xb432: "doep" +0xb433: "doeh" +0xb434: "dyo" +0xb435: "dyog" +0xb436: "dyogg" +0xb437: "dyogs" +0xb438: "dyon" +0xb439: "dyonj" +0xb43a: "dyonh" +0xb43b: "dyod" +0xb43c: "dyol" +0xb43d: "dyolg" +0xb43e: "dyolm" +0xb43f: "dyolb" +0xb440: "dyols" +0xb441: "dyolt" +0xb442: "dyolp" +0xb443: "dyolh" +0xb444: "dyom" +0xb445: "dyob" +0xb446: "dyobs" +0xb447: "dyos" +0xb448: "dyoss" +0xb449: "dyong" +0xb44a: "dyoj" +0xb44b: "dyoc" +0xb44c: "dyok" +0xb44d: "dyot" +0xb44e: "dyop" +0xb44f: "dyoh" +0xb450: "du" +0xb451: "dug" +0xb452: "dugg" +0xb453: "dugs" +0xb454: "dun" +0xb455: "dunj" +0xb456: "dunh" +0xb457: "dud" +0xb458: "dul" +0xb459: "dulg" +0xb45a: "dulm" +0xb45b: "dulb" +0xb45c: "duls" +0xb45d: "dult" +0xb45e: "dulp" +0xb45f: "dulh" +0xb460: "dum" +0xb461: "dub" +0xb462: "dubs" +0xb463: "dus" +0xb464: "duss" +0xb465: "dung" +0xb466: "duj" +0xb467: "duc" +0xb468: "duk" +0xb469: "dut" +0xb46a: "dup" +0xb46b: "duh" +0xb46c: "dweo" +0xb46d: "dweog" +0xb46e: "dweogg" +0xb46f: "dweogs" +0xb470: "dweon" +0xb471: "dweonj" +0xb472: "dweonh" +0xb473: "dweod" +0xb474: "dweol" +0xb475: "dweolg" +0xb476: "dweolm" +0xb477: "dweolb" +0xb478: "dweols" +0xb479: "dweolt" +0xb47a: "dweolp" +0xb47b: "dweolh" +0xb47c: "dweom" +0xb47d: "dweob" +0xb47e: "dweobs" +0xb47f: "dweos" +0xb480: "dweoss" +0xb481: "dweong" +0xb482: "dweoj" +0xb483: "dweoc" +0xb484: "dweok" +0xb485: "dweot" +0xb486: "dweop" +0xb487: "dweoh" +0xb488: "dwe" +0xb489: "dweg" +0xb48a: "dwegg" +0xb48b: "dwegs" +0xb48c: "dwen" +0xb48d: "dwenj" +0xb48e: "dwenh" +0xb48f: "dwed" +0xb490: "dwel" +0xb491: "dwelg" +0xb492: "dwelm" +0xb493: "dwelb" +0xb494: "dwels" +0xb495: "dwelt" +0xb496: "dwelp" +0xb497: "dwelh" +0xb498: "dwem" +0xb499: "dweb" +0xb49a: "dwebs" +0xb49b: "dwes" +0xb49c: "dwess" +0xb49d: "dweng" +0xb49e: "dwej" +0xb49f: "dwec" +0xb4a0: "dwek" +0xb4a1: "dwet" +0xb4a2: "dwep" +0xb4a3: "dweh" +0xb4a4: "dwi" +0xb4a5: "dwig" +0xb4a6: "dwigg" +0xb4a7: "dwigs" +0xb4a8: "dwin" +0xb4a9: "dwinj" +0xb4aa: "dwinh" +0xb4ab: "dwid" +0xb4ac: "dwil" +0xb4ad: "dwilg" +0xb4ae: "dwilm" +0xb4af: "dwilb" +0xb4b0: "dwils" +0xb4b1: "dwilt" +0xb4b2: "dwilp" +0xb4b3: "dwilh" +0xb4b4: "dwim" +0xb4b5: "dwib" +0xb4b6: "dwibs" +0xb4b7: "dwis" +0xb4b8: "dwiss" +0xb4b9: "dwing" +0xb4ba: "dwij" +0xb4bb: "dwic" +0xb4bc: "dwik" +0xb4bd: "dwit" +0xb4be: "dwip" +0xb4bf: "dwih" +0xb4c0: "dyu" +0xb4c1: "dyug" +0xb4c2: "dyugg" +0xb4c3: "dyugs" +0xb4c4: "dyun" +0xb4c5: "dyunj" +0xb4c6: "dyunh" +0xb4c7: "dyud" +0xb4c8: "dyul" +0xb4c9: "dyulg" +0xb4ca: "dyulm" +0xb4cb: "dyulb" +0xb4cc: "dyuls" +0xb4cd: "dyult" +0xb4ce: "dyulp" +0xb4cf: "dyulh" +0xb4d0: "dyum" +0xb4d1: "dyub" +0xb4d2: "dyubs" +0xb4d3: "dyus" +0xb4d4: "dyuss" +0xb4d5: "dyung" +0xb4d6: "dyuj" +0xb4d7: "dyuc" +0xb4d8: "dyuk" +0xb4d9: "dyut" +0xb4da: "dyup" +0xb4db: "dyuh" +0xb4dc: "deu" +0xb4dd: "deug" +0xb4de: "deugg" +0xb4df: "deugs" +0xb4e0: "deun" +0xb4e1: "deunj" +0xb4e2: "deunh" +0xb4e3: "deud" +0xb4e4: "deul" +0xb4e5: "deulg" +0xb4e6: "deulm" +0xb4e7: "deulb" +0xb4e8: "deuls" +0xb4e9: "deult" +0xb4ea: "deulp" +0xb4eb: "deulh" +0xb4ec: "deum" +0xb4ed: "deub" +0xb4ee: "deubs" +0xb4ef: "deus" +0xb4f0: "deuss" +0xb4f1: "deung" +0xb4f2: "deuj" +0xb4f3: "deuc" +0xb4f4: "deuk" +0xb4f5: "deut" +0xb4f6: "deup" +0xb4f7: "deuh" +0xb4f8: "dyi" +0xb4f9: "dyig" +0xb4fa: "dyigg" +0xb4fb: "dyigs" +0xb4fc: "dyin" +0xb4fd: "dyinj" +0xb4fe: "dyinh" +0xb4ff: "dyid" +/* x0b5 */ +0xb500: "dyil" +0xb501: "dyilg" +0xb502: "dyilm" +0xb503: "dyilb" +0xb504: "dyils" +0xb505: "dyilt" +0xb506: "dyilp" +0xb507: "dyilh" +0xb508: "dyim" +0xb509: "dyib" +0xb50a: "dyibs" +0xb50b: "dyis" +0xb50c: "dyiss" +0xb50d: "dying" +0xb50e: "dyij" +0xb50f: "dyic" +0xb510: "dyik" +0xb511: "dyit" +0xb512: "dyip" +0xb513: "dyih" +0xb514: "di" +0xb515: "dig" +0xb516: "digg" +0xb517: "digs" +0xb518: "din" +0xb519: "dinj" +0xb51a: "dinh" +0xb51b: "did" +0xb51c: "dil" +0xb51d: "dilg" +0xb51e: "dilm" +0xb51f: "dilb" +0xb520: "dils" +0xb521: "dilt" +0xb522: "dilp" +0xb523: "dilh" +0xb524: "dim" +0xb525: "dib" +0xb526: "dibs" +0xb527: "dis" +0xb528: "diss" +0xb529: "ding" +0xb52a: "dij" +0xb52b: "dic" +0xb52c: "dik" +0xb52d: "dit" +0xb52e: "dip" +0xb52f: "dih" +0xb530: "dda" +0xb531: "ddag" +0xb532: "ddagg" +0xb533: "ddags" +0xb534: "ddan" +0xb535: "ddanj" +0xb536: "ddanh" +0xb537: "ddad" +0xb538: "ddal" +0xb539: "ddalg" +0xb53a: "ddalm" +0xb53b: "ddalb" +0xb53c: "ddals" +0xb53d: "ddalt" +0xb53e: "ddalp" +0xb53f: "ddalh" +0xb540: "ddam" +0xb541: "ddab" +0xb542: "ddabs" +0xb543: "ddas" +0xb544: "ddass" +0xb545: "ddang" +0xb546: "ddaj" +0xb547: "ddac" +0xb548: "ddak" +0xb549: "ddat" +0xb54a: "ddap" +0xb54b: "ddah" +0xb54c: "ddae" +0xb54d: "ddaeg" +0xb54e: "ddaegg" +0xb54f: "ddaegs" +0xb550: "ddaen" +0xb551: "ddaenj" +0xb552: "ddaenh" +0xb553: "ddaed" +0xb554: "ddael" +0xb555: "ddaelg" +0xb556: "ddaelm" +0xb557: "ddaelb" +0xb558: "ddaels" +0xb559: "ddaelt" +0xb55a: "ddaelp" +0xb55b: "ddaelh" +0xb55c: "ddaem" +0xb55d: "ddaeb" +0xb55e: "ddaebs" +0xb55f: "ddaes" +0xb560: "ddaess" +0xb561: "ddaeng" +0xb562: "ddaej" +0xb563: "ddaec" +0xb564: "ddaek" +0xb565: "ddaet" +0xb566: "ddaep" +0xb567: "ddaeh" +0xb568: "ddya" +0xb569: "ddyag" +0xb56a: "ddyagg" +0xb56b: "ddyags" +0xb56c: "ddyan" +0xb56d: "ddyanj" +0xb56e: "ddyanh" +0xb56f: "ddyad" +0xb570: "ddyal" +0xb571: "ddyalg" +0xb572: "ddyalm" +0xb573: "ddyalb" +0xb574: "ddyals" +0xb575: "ddyalt" +0xb576: "ddyalp" +0xb577: "ddyalh" +0xb578: "ddyam" +0xb579: "ddyab" +0xb57a: "ddyabs" +0xb57b: "ddyas" +0xb57c: "ddyass" +0xb57d: "ddyang" +0xb57e: "ddyaj" +0xb57f: "ddyac" +0xb580: "ddyak" +0xb581: "ddyat" +0xb582: "ddyap" +0xb583: "ddyah" +0xb584: "ddyae" +0xb585: "ddyaeg" +0xb586: "ddyaegg" +0xb587: "ddyaegs" +0xb588: "ddyaen" +0xb589: "ddyaenj" +0xb58a: "ddyaenh" +0xb58b: "ddyaed" +0xb58c: "ddyael" +0xb58d: "ddyaelg" +0xb58e: "ddyaelm" +0xb58f: "ddyaelb" +0xb590: "ddyaels" +0xb591: "ddyaelt" +0xb592: "ddyaelp" +0xb593: "ddyaelh" +0xb594: "ddyaem" +0xb595: "ddyaeb" +0xb596: "ddyaebs" +0xb597: "ddyaes" +0xb598: "ddyaess" +0xb599: "ddyaeng" +0xb59a: "ddyaej" +0xb59b: "ddyaec" +0xb59c: "ddyaek" +0xb59d: "ddyaet" +0xb59e: "ddyaep" +0xb59f: "ddyaeh" +0xb5a0: "ddeo" +0xb5a1: "ddeog" +0xb5a2: "ddeogg" +0xb5a3: "ddeogs" +0xb5a4: "ddeon" +0xb5a5: "ddeonj" +0xb5a6: "ddeonh" +0xb5a7: "ddeod" +0xb5a8: "ddeol" +0xb5a9: "ddeolg" +0xb5aa: "ddeolm" +0xb5ab: "ddeolb" +0xb5ac: "ddeols" +0xb5ad: "ddeolt" +0xb5ae: "ddeolp" +0xb5af: "ddeolh" +0xb5b0: "ddeom" +0xb5b1: "ddeob" +0xb5b2: "ddeobs" +0xb5b3: "ddeos" +0xb5b4: "ddeoss" +0xb5b5: "ddeong" +0xb5b6: "ddeoj" +0xb5b7: "ddeoc" +0xb5b8: "ddeok" +0xb5b9: "ddeot" +0xb5ba: "ddeop" +0xb5bb: "ddeoh" +0xb5bc: "dde" +0xb5bd: "ddeg" +0xb5be: "ddegg" +0xb5bf: "ddegs" +0xb5c0: "dden" +0xb5c1: "ddenj" +0xb5c2: "ddenh" +0xb5c3: "dded" +0xb5c4: "ddel" +0xb5c5: "ddelg" +0xb5c6: "ddelm" +0xb5c7: "ddelb" +0xb5c8: "ddels" +0xb5c9: "ddelt" +0xb5ca: "ddelp" +0xb5cb: "ddelh" +0xb5cc: "ddem" +0xb5cd: "ddeb" +0xb5ce: "ddebs" +0xb5cf: "ddes" +0xb5d0: "ddess" +0xb5d1: "ddeng" +0xb5d2: "ddej" +0xb5d3: "ddec" +0xb5d4: "ddek" +0xb5d5: "ddet" +0xb5d6: "ddep" +0xb5d7: "ddeh" +0xb5d8: "ddyeo" +0xb5d9: "ddyeog" +0xb5da: "ddyeogg" +0xb5db: "ddyeogs" +0xb5dc: "ddyeon" +0xb5dd: "ddyeonj" +0xb5de: "ddyeonh" +0xb5df: "ddyeod" +0xb5e0: "ddyeol" +0xb5e1: "ddyeolg" +0xb5e2: "ddyeolm" +0xb5e3: "ddyeolb" +0xb5e4: "ddyeols" +0xb5e5: "ddyeolt" +0xb5e6: "ddyeolp" +0xb5e7: "ddyeolh" +0xb5e8: "ddyeom" +0xb5e9: "ddyeob" +0xb5ea: "ddyeobs" +0xb5eb: "ddyeos" +0xb5ec: "ddyeoss" +0xb5ed: "ddyeong" +0xb5ee: "ddyeoj" +0xb5ef: "ddyeoc" +0xb5f0: "ddyeok" +0xb5f1: "ddyeot" +0xb5f2: "ddyeop" +0xb5f3: "ddyeoh" +0xb5f4: "ddye" +0xb5f5: "ddyeg" +0xb5f6: "ddyegg" +0xb5f7: "ddyegs" +0xb5f8: "ddyen" +0xb5f9: "ddyenj" +0xb5fa: "ddyenh" +0xb5fb: "ddyed" +0xb5fc: "ddyel" +0xb5fd: "ddyelg" +0xb5fe: "ddyelm" +0xb5ff: "ddyelb" +/* x0b6 */ +0xb600: "ddyels" +0xb601: "ddyelt" +0xb602: "ddyelp" +0xb603: "ddyelh" +0xb604: "ddyem" +0xb605: "ddyeb" +0xb606: "ddyebs" +0xb607: "ddyes" +0xb608: "ddyess" +0xb609: "ddyeng" +0xb60a: "ddyej" +0xb60b: "ddyec" +0xb60c: "ddyek" +0xb60d: "ddyet" +0xb60e: "ddyep" +0xb60f: "ddyeh" +0xb610: "ddo" +0xb611: "ddog" +0xb612: "ddogg" +0xb613: "ddogs" +0xb614: "ddon" +0xb615: "ddonj" +0xb616: "ddonh" +0xb617: "ddod" +0xb618: "ddol" +0xb619: "ddolg" +0xb61a: "ddolm" +0xb61b: "ddolb" +0xb61c: "ddols" +0xb61d: "ddolt" +0xb61e: "ddolp" +0xb61f: "ddolh" +0xb620: "ddom" +0xb621: "ddob" +0xb622: "ddobs" +0xb623: "ddos" +0xb624: "ddoss" +0xb625: "ddong" +0xb626: "ddoj" +0xb627: "ddoc" +0xb628: "ddok" +0xb629: "ddot" +0xb62a: "ddop" +0xb62b: "ddoh" +0xb62c: "ddwa" +0xb62d: "ddwag" +0xb62e: "ddwagg" +0xb62f: "ddwags" +0xb630: "ddwan" +0xb631: "ddwanj" +0xb632: "ddwanh" +0xb633: "ddwad" +0xb634: "ddwal" +0xb635: "ddwalg" +0xb636: "ddwalm" +0xb637: "ddwalb" +0xb638: "ddwals" +0xb639: "ddwalt" +0xb63a: "ddwalp" +0xb63b: "ddwalh" +0xb63c: "ddwam" +0xb63d: "ddwab" +0xb63e: "ddwabs" +0xb63f: "ddwas" +0xb640: "ddwass" +0xb641: "ddwang" +0xb642: "ddwaj" +0xb643: "ddwac" +0xb644: "ddwak" +0xb645: "ddwat" +0xb646: "ddwap" +0xb647: "ddwah" +0xb648: "ddwae" +0xb649: "ddwaeg" +0xb64a: "ddwaegg" +0xb64b: "ddwaegs" +0xb64c: "ddwaen" +0xb64d: "ddwaenj" +0xb64e: "ddwaenh" +0xb64f: "ddwaed" +0xb650: "ddwael" +0xb651: "ddwaelg" +0xb652: "ddwaelm" +0xb653: "ddwaelb" +0xb654: "ddwaels" +0xb655: "ddwaelt" +0xb656: "ddwaelp" +0xb657: "ddwaelh" +0xb658: "ddwaem" +0xb659: "ddwaeb" +0xb65a: "ddwaebs" +0xb65b: "ddwaes" +0xb65c: "ddwaess" +0xb65d: "ddwaeng" +0xb65e: "ddwaej" +0xb65f: "ddwaec" +0xb660: "ddwaek" +0xb661: "ddwaet" +0xb662: "ddwaep" +0xb663: "ddwaeh" +0xb664: "ddoe" +0xb665: "ddoeg" +0xb666: "ddoegg" +0xb667: "ddoegs" +0xb668: "ddoen" +0xb669: "ddoenj" +0xb66a: "ddoenh" +0xb66b: "ddoed" +0xb66c: "ddoel" +0xb66d: "ddoelg" +0xb66e: "ddoelm" +0xb66f: "ddoelb" +0xb670: "ddoels" +0xb671: "ddoelt" +0xb672: "ddoelp" +0xb673: "ddoelh" +0xb674: "ddoem" +0xb675: "ddoeb" +0xb676: "ddoebs" +0xb677: "ddoes" +0xb678: "ddoess" +0xb679: "ddoeng" +0xb67a: "ddoej" +0xb67b: "ddoec" +0xb67c: "ddoek" +0xb67d: "ddoet" +0xb67e: "ddoep" +0xb67f: "ddoeh" +0xb680: "ddyo" +0xb681: "ddyog" +0xb682: "ddyogg" +0xb683: "ddyogs" +0xb684: "ddyon" +0xb685: "ddyonj" +0xb686: "ddyonh" +0xb687: "ddyod" +0xb688: "ddyol" +0xb689: "ddyolg" +0xb68a: "ddyolm" +0xb68b: "ddyolb" +0xb68c: "ddyols" +0xb68d: "ddyolt" +0xb68e: "ddyolp" +0xb68f: "ddyolh" +0xb690: "ddyom" +0xb691: "ddyob" +0xb692: "ddyobs" +0xb693: "ddyos" +0xb694: "ddyoss" +0xb695: "ddyong" +0xb696: "ddyoj" +0xb697: "ddyoc" +0xb698: "ddyok" +0xb699: "ddyot" +0xb69a: "ddyop" +0xb69b: "ddyoh" +0xb69c: "ddu" +0xb69d: "ddug" +0xb69e: "ddugg" +0xb69f: "ddugs" +0xb6a0: "ddun" +0xb6a1: "ddunj" +0xb6a2: "ddunh" +0xb6a3: "ddud" +0xb6a4: "ddul" +0xb6a5: "ddulg" +0xb6a6: "ddulm" +0xb6a7: "ddulb" +0xb6a8: "dduls" +0xb6a9: "ddult" +0xb6aa: "ddulp" +0xb6ab: "ddulh" +0xb6ac: "ddum" +0xb6ad: "ddub" +0xb6ae: "ddubs" +0xb6af: "ddus" +0xb6b0: "dduss" +0xb6b1: "ddung" +0xb6b2: "dduj" +0xb6b3: "dduc" +0xb6b4: "dduk" +0xb6b5: "ddut" +0xb6b6: "ddup" +0xb6b7: "dduh" +0xb6b8: "ddweo" +0xb6b9: "ddweog" +0xb6ba: "ddweogg" +0xb6bb: "ddweogs" +0xb6bc: "ddweon" +0xb6bd: "ddweonj" +0xb6be: "ddweonh" +0xb6bf: "ddweod" +0xb6c0: "ddweol" +0xb6c1: "ddweolg" +0xb6c2: "ddweolm" +0xb6c3: "ddweolb" +0xb6c4: "ddweols" +0xb6c5: "ddweolt" +0xb6c6: "ddweolp" +0xb6c7: "ddweolh" +0xb6c8: "ddweom" +0xb6c9: "ddweob" +0xb6ca: "ddweobs" +0xb6cb: "ddweos" +0xb6cc: "ddweoss" +0xb6cd: "ddweong" +0xb6ce: "ddweoj" +0xb6cf: "ddweoc" +0xb6d0: "ddweok" +0xb6d1: "ddweot" +0xb6d2: "ddweop" +0xb6d3: "ddweoh" +0xb6d4: "ddwe" +0xb6d5: "ddweg" +0xb6d6: "ddwegg" +0xb6d7: "ddwegs" +0xb6d8: "ddwen" +0xb6d9: "ddwenj" +0xb6da: "ddwenh" +0xb6db: "ddwed" +0xb6dc: "ddwel" +0xb6dd: "ddwelg" +0xb6de: "ddwelm" +0xb6df: "ddwelb" +0xb6e0: "ddwels" +0xb6e1: "ddwelt" +0xb6e2: "ddwelp" +0xb6e3: "ddwelh" +0xb6e4: "ddwem" +0xb6e5: "ddweb" +0xb6e6: "ddwebs" +0xb6e7: "ddwes" +0xb6e8: "ddwess" +0xb6e9: "ddweng" +0xb6ea: "ddwej" +0xb6eb: "ddwec" +0xb6ec: "ddwek" +0xb6ed: "ddwet" +0xb6ee: "ddwep" +0xb6ef: "ddweh" +0xb6f0: "ddwi" +0xb6f1: "ddwig" +0xb6f2: "ddwigg" +0xb6f3: "ddwigs" +0xb6f4: "ddwin" +0xb6f5: "ddwinj" +0xb6f6: "ddwinh" +0xb6f7: "ddwid" +0xb6f8: "ddwil" +0xb6f9: "ddwilg" +0xb6fa: "ddwilm" +0xb6fb: "ddwilb" +0xb6fc: "ddwils" +0xb6fd: "ddwilt" +0xb6fe: "ddwilp" +0xb6ff: "ddwilh" +/* x0b7 */ +0xb700: "ddwim" +0xb701: "ddwib" +0xb702: "ddwibs" +0xb703: "ddwis" +0xb704: "ddwiss" +0xb705: "ddwing" +0xb706: "ddwij" +0xb707: "ddwic" +0xb708: "ddwik" +0xb709: "ddwit" +0xb70a: "ddwip" +0xb70b: "ddwih" +0xb70c: "ddyu" +0xb70d: "ddyug" +0xb70e: "ddyugg" +0xb70f: "ddyugs" +0xb710: "ddyun" +0xb711: "ddyunj" +0xb712: "ddyunh" +0xb713: "ddyud" +0xb714: "ddyul" +0xb715: "ddyulg" +0xb716: "ddyulm" +0xb717: "ddyulb" +0xb718: "ddyuls" +0xb719: "ddyult" +0xb71a: "ddyulp" +0xb71b: "ddyulh" +0xb71c: "ddyum" +0xb71d: "ddyub" +0xb71e: "ddyubs" +0xb71f: "ddyus" +0xb720: "ddyuss" +0xb721: "ddyung" +0xb722: "ddyuj" +0xb723: "ddyuc" +0xb724: "ddyuk" +0xb725: "ddyut" +0xb726: "ddyup" +0xb727: "ddyuh" +0xb728: "ddeu" +0xb729: "ddeug" +0xb72a: "ddeugg" +0xb72b: "ddeugs" +0xb72c: "ddeun" +0xb72d: "ddeunj" +0xb72e: "ddeunh" +0xb72f: "ddeud" +0xb730: "ddeul" +0xb731: "ddeulg" +0xb732: "ddeulm" +0xb733: "ddeulb" +0xb734: "ddeuls" +0xb735: "ddeult" +0xb736: "ddeulp" +0xb737: "ddeulh" +0xb738: "ddeum" +0xb739: "ddeub" +0xb73a: "ddeubs" +0xb73b: "ddeus" +0xb73c: "ddeuss" +0xb73d: "ddeung" +0xb73e: "ddeuj" +0xb73f: "ddeuc" +0xb740: "ddeuk" +0xb741: "ddeut" +0xb742: "ddeup" +0xb743: "ddeuh" +0xb744: "ddyi" +0xb745: "ddyig" +0xb746: "ddyigg" +0xb747: "ddyigs" +0xb748: "ddyin" +0xb749: "ddyinj" +0xb74a: "ddyinh" +0xb74b: "ddyid" +0xb74c: "ddyil" +0xb74d: "ddyilg" +0xb74e: "ddyilm" +0xb74f: "ddyilb" +0xb750: "ddyils" +0xb751: "ddyilt" +0xb752: "ddyilp" +0xb753: "ddyilh" +0xb754: "ddyim" +0xb755: "ddyib" +0xb756: "ddyibs" +0xb757: "ddyis" +0xb758: "ddyiss" +0xb759: "ddying" +0xb75a: "ddyij" +0xb75b: "ddyic" +0xb75c: "ddyik" +0xb75d: "ddyit" +0xb75e: "ddyip" +0xb75f: "ddyih" +0xb760: "ddi" +0xb761: "ddig" +0xb762: "ddigg" +0xb763: "ddigs" +0xb764: "ddin" +0xb765: "ddinj" +0xb766: "ddinh" +0xb767: "ddid" +0xb768: "ddil" +0xb769: "ddilg" +0xb76a: "ddilm" +0xb76b: "ddilb" +0xb76c: "ddils" +0xb76d: "ddilt" +0xb76e: "ddilp" +0xb76f: "ddilh" +0xb770: "ddim" +0xb771: "ddib" +0xb772: "ddibs" +0xb773: "ddis" +0xb774: "ddiss" +0xb775: "dding" +0xb776: "ddij" +0xb777: "ddic" +0xb778: "ddik" +0xb779: "ddit" +0xb77a: "ddip" +0xb77b: "ddih" +0xb77c: "ra" +0xb77d: "rag" +0xb77e: "ragg" +0xb77f: "rags" +0xb780: "ran" +0xb781: "ranj" +0xb782: "ranh" +0xb783: "rad" +0xb784: "ral" +0xb785: "ralg" +0xb786: "ralm" +0xb787: "ralb" +0xb788: "rals" +0xb789: "ralt" +0xb78a: "ralp" +0xb78b: "ralh" +0xb78c: "ram" +0xb78d: "rab" +0xb78e: "rabs" +0xb78f: "ras" +0xb790: "rass" +0xb791: "rang" +0xb792: "raj" +0xb793: "rac" +0xb794: "rak" +0xb795: "rat" +0xb796: "rap" +0xb797: "rah" +0xb798: "rae" +0xb799: "raeg" +0xb79a: "raegg" +0xb79b: "raegs" +0xb79c: "raen" +0xb79d: "raenj" +0xb79e: "raenh" +0xb79f: "raed" +0xb7a0: "rael" +0xb7a1: "raelg" +0xb7a2: "raelm" +0xb7a3: "raelb" +0xb7a4: "raels" +0xb7a5: "raelt" +0xb7a6: "raelp" +0xb7a7: "raelh" +0xb7a8: "raem" +0xb7a9: "raeb" +0xb7aa: "raebs" +0xb7ab: "raes" +0xb7ac: "raess" +0xb7ad: "raeng" +0xb7ae: "raej" +0xb7af: "raec" +0xb7b0: "raek" +0xb7b1: "raet" +0xb7b2: "raep" +0xb7b3: "raeh" +0xb7b4: "rya" +0xb7b5: "ryag" +0xb7b6: "ryagg" +0xb7b7: "ryags" +0xb7b8: "ryan" +0xb7b9: "ryanj" +0xb7ba: "ryanh" +0xb7bb: "ryad" +0xb7bc: "ryal" +0xb7bd: "ryalg" +0xb7be: "ryalm" +0xb7bf: "ryalb" +0xb7c0: "ryals" +0xb7c1: "ryalt" +0xb7c2: "ryalp" +0xb7c3: "ryalh" +0xb7c4: "ryam" +0xb7c5: "ryab" +0xb7c6: "ryabs" +0xb7c7: "ryas" +0xb7c8: "ryass" +0xb7c9: "ryang" +0xb7ca: "ryaj" +0xb7cb: "ryac" +0xb7cc: "ryak" +0xb7cd: "ryat" +0xb7ce: "ryap" +0xb7cf: "ryah" +0xb7d0: "ryae" +0xb7d1: "ryaeg" +0xb7d2: "ryaegg" +0xb7d3: "ryaegs" +0xb7d4: "ryaen" +0xb7d5: "ryaenj" +0xb7d6: "ryaenh" +0xb7d7: "ryaed" +0xb7d8: "ryael" +0xb7d9: "ryaelg" +0xb7da: "ryaelm" +0xb7db: "ryaelb" +0xb7dc: "ryaels" +0xb7dd: "ryaelt" +0xb7de: "ryaelp" +0xb7df: "ryaelh" +0xb7e0: "ryaem" +0xb7e1: "ryaeb" +0xb7e2: "ryaebs" +0xb7e3: "ryaes" +0xb7e4: "ryaess" +0xb7e5: "ryaeng" +0xb7e6: "ryaej" +0xb7e7: "ryaec" +0xb7e8: "ryaek" +0xb7e9: "ryaet" +0xb7ea: "ryaep" +0xb7eb: "ryaeh" +0xb7ec: "reo" +0xb7ed: "reog" +0xb7ee: "reogg" +0xb7ef: "reogs" +0xb7f0: "reon" +0xb7f1: "reonj" +0xb7f2: "reonh" +0xb7f3: "reod" +0xb7f4: "reol" +0xb7f5: "reolg" +0xb7f6: "reolm" +0xb7f7: "reolb" +0xb7f8: "reols" +0xb7f9: "reolt" +0xb7fa: "reolp" +0xb7fb: "reolh" +0xb7fc: "reom" +0xb7fd: "reob" +0xb7fe: "reobs" +0xb7ff: "reos" +/* x0b8 */ +0xb800: "reoss" +0xb801: "reong" +0xb802: "reoj" +0xb803: "reoc" +0xb804: "reok" +0xb805: "reot" +0xb806: "reop" +0xb807: "reoh" +0xb808: "re" +0xb809: "reg" +0xb80a: "regg" +0xb80b: "regs" +0xb80c: "ren" +0xb80d: "renj" +0xb80e: "renh" +0xb80f: "red" +0xb810: "rel" +0xb811: "relg" +0xb812: "relm" +0xb813: "relb" +0xb814: "rels" +0xb815: "relt" +0xb816: "relp" +0xb817: "relh" +0xb818: "rem" +0xb819: "reb" +0xb81a: "rebs" +0xb81b: "res" +0xb81c: "ress" +0xb81d: "reng" +0xb81e: "rej" +0xb81f: "rec" +0xb820: "rek" +0xb821: "ret" +0xb822: "rep" +0xb823: "reh" +0xb824: "ryeo" +0xb825: "ryeog" +0xb826: "ryeogg" +0xb827: "ryeogs" +0xb828: "ryeon" +0xb829: "ryeonj" +0xb82a: "ryeonh" +0xb82b: "ryeod" +0xb82c: "ryeol" +0xb82d: "ryeolg" +0xb82e: "ryeolm" +0xb82f: "ryeolb" +0xb830: "ryeols" +0xb831: "ryeolt" +0xb832: "ryeolp" +0xb833: "ryeolh" +0xb834: "ryeom" +0xb835: "ryeob" +0xb836: "ryeobs" +0xb837: "ryeos" +0xb838: "ryeoss" +0xb839: "ryeong" +0xb83a: "ryeoj" +0xb83b: "ryeoc" +0xb83c: "ryeok" +0xb83d: "ryeot" +0xb83e: "ryeop" +0xb83f: "ryeoh" +0xb840: "rye" +0xb841: "ryeg" +0xb842: "ryegg" +0xb843: "ryegs" +0xb844: "ryen" +0xb845: "ryenj" +0xb846: "ryenh" +0xb847: "ryed" +0xb848: "ryel" +0xb849: "ryelg" +0xb84a: "ryelm" +0xb84b: "ryelb" +0xb84c: "ryels" +0xb84d: "ryelt" +0xb84e: "ryelp" +0xb84f: "ryelh" +0xb850: "ryem" +0xb851: "ryeb" +0xb852: "ryebs" +0xb853: "ryes" +0xb854: "ryess" +0xb855: "ryeng" +0xb856: "ryej" +0xb857: "ryec" +0xb858: "ryek" +0xb859: "ryet" +0xb85a: "ryep" +0xb85b: "ryeh" +0xb85c: "ro" +0xb85d: "rog" +0xb85e: "rogg" +0xb85f: "rogs" +0xb860: "ron" +0xb861: "ronj" +0xb862: "ronh" +0xb863: "rod" +0xb864: "rol" +0xb865: "rolg" +0xb866: "rolm" +0xb867: "rolb" +0xb868: "rols" +0xb869: "rolt" +0xb86a: "rolp" +0xb86b: "rolh" +0xb86c: "rom" +0xb86d: "rob" +0xb86e: "robs" +0xb86f: "ros" +0xb870: "ross" +0xb871: "rong" +0xb872: "roj" +0xb873: "roc" +0xb874: "rok" +0xb875: "rot" +0xb876: "rop" +0xb877: "roh" +0xb878: "rwa" +0xb879: "rwag" +0xb87a: "rwagg" +0xb87b: "rwags" +0xb87c: "rwan" +0xb87d: "rwanj" +0xb87e: "rwanh" +0xb87f: "rwad" +0xb880: "rwal" +0xb881: "rwalg" +0xb882: "rwalm" +0xb883: "rwalb" +0xb884: "rwals" +0xb885: "rwalt" +0xb886: "rwalp" +0xb887: "rwalh" +0xb888: "rwam" +0xb889: "rwab" +0xb88a: "rwabs" +0xb88b: "rwas" +0xb88c: "rwass" +0xb88d: "rwang" +0xb88e: "rwaj" +0xb88f: "rwac" +0xb890: "rwak" +0xb891: "rwat" +0xb892: "rwap" +0xb893: "rwah" +0xb894: "rwae" +0xb895: "rwaeg" +0xb896: "rwaegg" +0xb897: "rwaegs" +0xb898: "rwaen" +0xb899: "rwaenj" +0xb89a: "rwaenh" +0xb89b: "rwaed" +0xb89c: "rwael" +0xb89d: "rwaelg" +0xb89e: "rwaelm" +0xb89f: "rwaelb" +0xb8a0: "rwaels" +0xb8a1: "rwaelt" +0xb8a2: "rwaelp" +0xb8a3: "rwaelh" +0xb8a4: "rwaem" +0xb8a5: "rwaeb" +0xb8a6: "rwaebs" +0xb8a7: "rwaes" +0xb8a8: "rwaess" +0xb8a9: "rwaeng" +0xb8aa: "rwaej" +0xb8ab: "rwaec" +0xb8ac: "rwaek" +0xb8ad: "rwaet" +0xb8ae: "rwaep" +0xb8af: "rwaeh" +0xb8b0: "roe" +0xb8b1: "roeg" +0xb8b2: "roegg" +0xb8b3: "roegs" +0xb8b4: "roen" +0xb8b5: "roenj" +0xb8b6: "roenh" +0xb8b7: "roed" +0xb8b8: "roel" +0xb8b9: "roelg" +0xb8ba: "roelm" +0xb8bb: "roelb" +0xb8bc: "roels" +0xb8bd: "roelt" +0xb8be: "roelp" +0xb8bf: "roelh" +0xb8c0: "roem" +0xb8c1: "roeb" +0xb8c2: "roebs" +0xb8c3: "roes" +0xb8c4: "roess" +0xb8c5: "roeng" +0xb8c6: "roej" +0xb8c7: "roec" +0xb8c8: "roek" +0xb8c9: "roet" +0xb8ca: "roep" +0xb8cb: "roeh" +0xb8cc: "ryo" +0xb8cd: "ryog" +0xb8ce: "ryogg" +0xb8cf: "ryogs" +0xb8d0: "ryon" +0xb8d1: "ryonj" +0xb8d2: "ryonh" +0xb8d3: "ryod" +0xb8d4: "ryol" +0xb8d5: "ryolg" +0xb8d6: "ryolm" +0xb8d7: "ryolb" +0xb8d8: "ryols" +0xb8d9: "ryolt" +0xb8da: "ryolp" +0xb8db: "ryolh" +0xb8dc: "ryom" +0xb8dd: "ryob" +0xb8de: "ryobs" +0xb8df: "ryos" +0xb8e0: "ryoss" +0xb8e1: "ryong" +0xb8e2: "ryoj" +0xb8e3: "ryoc" +0xb8e4: "ryok" +0xb8e5: "ryot" +0xb8e6: "ryop" +0xb8e7: "ryoh" +0xb8e8: "ru" +0xb8e9: "rug" +0xb8ea: "rugg" +0xb8eb: "rugs" +0xb8ec: "run" +0xb8ed: "runj" +0xb8ee: "runh" +0xb8ef: "rud" +0xb8f0: "rul" +0xb8f1: "rulg" +0xb8f2: "rulm" +0xb8f3: "rulb" +0xb8f4: "ruls" +0xb8f5: "rult" +0xb8f6: "rulp" +0xb8f7: "rulh" +0xb8f8: "rum" +0xb8f9: "rub" +0xb8fa: "rubs" +0xb8fb: "rus" +0xb8fc: "russ" +0xb8fd: "rung" +0xb8fe: "ruj" +0xb8ff: "ruc" +/* x0b9 */ +0xb900: "ruk" +0xb901: "rut" +0xb902: "rup" +0xb903: "ruh" +0xb904: "rweo" +0xb905: "rweog" +0xb906: "rweogg" +0xb907: "rweogs" +0xb908: "rweon" +0xb909: "rweonj" +0xb90a: "rweonh" +0xb90b: "rweod" +0xb90c: "rweol" +0xb90d: "rweolg" +0xb90e: "rweolm" +0xb90f: "rweolb" +0xb910: "rweols" +0xb911: "rweolt" +0xb912: "rweolp" +0xb913: "rweolh" +0xb914: "rweom" +0xb915: "rweob" +0xb916: "rweobs" +0xb917: "rweos" +0xb918: "rweoss" +0xb919: "rweong" +0xb91a: "rweoj" +0xb91b: "rweoc" +0xb91c: "rweok" +0xb91d: "rweot" +0xb91e: "rweop" +0xb91f: "rweoh" +0xb920: "rwe" +0xb921: "rweg" +0xb922: "rwegg" +0xb923: "rwegs" +0xb924: "rwen" +0xb925: "rwenj" +0xb926: "rwenh" +0xb927: "rwed" +0xb928: "rwel" +0xb929: "rwelg" +0xb92a: "rwelm" +0xb92b: "rwelb" +0xb92c: "rwels" +0xb92d: "rwelt" +0xb92e: "rwelp" +0xb92f: "rwelh" +0xb930: "rwem" +0xb931: "rweb" +0xb932: "rwebs" +0xb933: "rwes" +0xb934: "rwess" +0xb935: "rweng" +0xb936: "rwej" +0xb937: "rwec" +0xb938: "rwek" +0xb939: "rwet" +0xb93a: "rwep" +0xb93b: "rweh" +0xb93c: "rwi" +0xb93d: "rwig" +0xb93e: "rwigg" +0xb93f: "rwigs" +0xb940: "rwin" +0xb941: "rwinj" +0xb942: "rwinh" +0xb943: "rwid" +0xb944: "rwil" +0xb945: "rwilg" +0xb946: "rwilm" +0xb947: "rwilb" +0xb948: "rwils" +0xb949: "rwilt" +0xb94a: "rwilp" +0xb94b: "rwilh" +0xb94c: "rwim" +0xb94d: "rwib" +0xb94e: "rwibs" +0xb94f: "rwis" +0xb950: "rwiss" +0xb951: "rwing" +0xb952: "rwij" +0xb953: "rwic" +0xb954: "rwik" +0xb955: "rwit" +0xb956: "rwip" +0xb957: "rwih" +0xb958: "ryu" +0xb959: "ryug" +0xb95a: "ryugg" +0xb95b: "ryugs" +0xb95c: "ryun" +0xb95d: "ryunj" +0xb95e: "ryunh" +0xb95f: "ryud" +0xb960: "ryul" +0xb961: "ryulg" +0xb962: "ryulm" +0xb963: "ryulb" +0xb964: "ryuls" +0xb965: "ryult" +0xb966: "ryulp" +0xb967: "ryulh" +0xb968: "ryum" +0xb969: "ryub" +0xb96a: "ryubs" +0xb96b: "ryus" +0xb96c: "ryuss" +0xb96d: "ryung" +0xb96e: "ryuj" +0xb96f: "ryuc" +0xb970: "ryuk" +0xb971: "ryut" +0xb972: "ryup" +0xb973: "ryuh" +0xb974: "reu" +0xb975: "reug" +0xb976: "reugg" +0xb977: "reugs" +0xb978: "reun" +0xb979: "reunj" +0xb97a: "reunh" +0xb97b: "reud" +0xb97c: "reul" +0xb97d: "reulg" +0xb97e: "reulm" +0xb97f: "reulb" +0xb980: "reuls" +0xb981: "reult" +0xb982: "reulp" +0xb983: "reulh" +0xb984: "reum" +0xb985: "reub" +0xb986: "reubs" +0xb987: "reus" +0xb988: "reuss" +0xb989: "reung" +0xb98a: "reuj" +0xb98b: "reuc" +0xb98c: "reuk" +0xb98d: "reut" +0xb98e: "reup" +0xb98f: "reuh" +0xb990: "ryi" +0xb991: "ryig" +0xb992: "ryigg" +0xb993: "ryigs" +0xb994: "ryin" +0xb995: "ryinj" +0xb996: "ryinh" +0xb997: "ryid" +0xb998: "ryil" +0xb999: "ryilg" +0xb99a: "ryilm" +0xb99b: "ryilb" +0xb99c: "ryils" +0xb99d: "ryilt" +0xb99e: "ryilp" +0xb99f: "ryilh" +0xb9a0: "ryim" +0xb9a1: "ryib" +0xb9a2: "ryibs" +0xb9a3: "ryis" +0xb9a4: "ryiss" +0xb9a5: "rying" +0xb9a6: "ryij" +0xb9a7: "ryic" +0xb9a8: "ryik" +0xb9a9: "ryit" +0xb9aa: "ryip" +0xb9ab: "ryih" +0xb9ac: "ri" +0xb9ad: "rig" +0xb9ae: "rigg" +0xb9af: "rigs" +0xb9b0: "rin" +0xb9b1: "rinj" +0xb9b2: "rinh" +0xb9b3: "rid" +0xb9b4: "ril" +0xb9b5: "rilg" +0xb9b6: "rilm" +0xb9b7: "rilb" +0xb9b8: "rils" +0xb9b9: "rilt" +0xb9ba: "rilp" +0xb9bb: "rilh" +0xb9bc: "rim" +0xb9bd: "rib" +0xb9be: "ribs" +0xb9bf: "ris" +0xb9c0: "riss" +0xb9c1: "ring" +0xb9c2: "rij" +0xb9c3: "ric" +0xb9c4: "rik" +0xb9c5: "rit" +0xb9c6: "rip" +0xb9c7: "rih" +0xb9c8: "ma" +0xb9c9: "mag" +0xb9ca: "magg" +0xb9cb: "mags" +0xb9cc: "man" +0xb9cd: "manj" +0xb9ce: "manh" +0xb9cf: "mad" +0xb9d0: "mal" +0xb9d1: "malg" +0xb9d2: "malm" +0xb9d3: "malb" +0xb9d4: "mals" +0xb9d5: "malt" +0xb9d6: "malp" +0xb9d7: "malh" +0xb9d8: "mam" +0xb9d9: "mab" +0xb9da: "mabs" +0xb9db: "mas" +0xb9dc: "mass" +0xb9dd: "mang" +0xb9de: "maj" +0xb9df: "mac" +0xb9e0: "mak" +0xb9e1: "mat" +0xb9e2: "map" +0xb9e3: "mah" +0xb9e4: "mae" +0xb9e5: "maeg" +0xb9e6: "maegg" +0xb9e7: "maegs" +0xb9e8: "maen" +0xb9e9: "maenj" +0xb9ea: "maenh" +0xb9eb: "maed" +0xb9ec: "mael" +0xb9ed: "maelg" +0xb9ee: "maelm" +0xb9ef: "maelb" +0xb9f0: "maels" +0xb9f1: "maelt" +0xb9f2: "maelp" +0xb9f3: "maelh" +0xb9f4: "maem" +0xb9f5: "maeb" +0xb9f6: "maebs" +0xb9f7: "maes" +0xb9f8: "maess" +0xb9f9: "maeng" +0xb9fa: "maej" +0xb9fb: "maec" +0xb9fc: "maek" +0xb9fd: "maet" +0xb9fe: "maep" +0xb9ff: "maeh" +/* x0ba */ +0xba00: "mya" +0xba01: "myag" +0xba02: "myagg" +0xba03: "myags" +0xba04: "myan" +0xba05: "myanj" +0xba06: "myanh" +0xba07: "myad" +0xba08: "myal" +0xba09: "myalg" +0xba0a: "myalm" +0xba0b: "myalb" +0xba0c: "myals" +0xba0d: "myalt" +0xba0e: "myalp" +0xba0f: "myalh" +0xba10: "myam" +0xba11: "myab" +0xba12: "myabs" +0xba13: "myas" +0xba14: "myass" +0xba15: "myang" +0xba16: "myaj" +0xba17: "myac" +0xba18: "myak" +0xba19: "myat" +0xba1a: "myap" +0xba1b: "myah" +0xba1c: "myae" +0xba1d: "myaeg" +0xba1e: "myaegg" +0xba1f: "myaegs" +0xba20: "myaen" +0xba21: "myaenj" +0xba22: "myaenh" +0xba23: "myaed" +0xba24: "myael" +0xba25: "myaelg" +0xba26: "myaelm" +0xba27: "myaelb" +0xba28: "myaels" +0xba29: "myaelt" +0xba2a: "myaelp" +0xba2b: "myaelh" +0xba2c: "myaem" +0xba2d: "myaeb" +0xba2e: "myaebs" +0xba2f: "myaes" +0xba30: "myaess" +0xba31: "myaeng" +0xba32: "myaej" +0xba33: "myaec" +0xba34: "myaek" +0xba35: "myaet" +0xba36: "myaep" +0xba37: "myaeh" +0xba38: "meo" +0xba39: "meog" +0xba3a: "meogg" +0xba3b: "meogs" +0xba3c: "meon" +0xba3d: "meonj" +0xba3e: "meonh" +0xba3f: "meod" +0xba40: "meol" +0xba41: "meolg" +0xba42: "meolm" +0xba43: "meolb" +0xba44: "meols" +0xba45: "meolt" +0xba46: "meolp" +0xba47: "meolh" +0xba48: "meom" +0xba49: "meob" +0xba4a: "meobs" +0xba4b: "meos" +0xba4c: "meoss" +0xba4d: "meong" +0xba4e: "meoj" +0xba4f: "meoc" +0xba50: "meok" +0xba51: "meot" +0xba52: "meop" +0xba53: "meoh" +0xba54: "me" +0xba55: "meg" +0xba56: "megg" +0xba57: "megs" +0xba58: "men" +0xba59: "menj" +0xba5a: "menh" +0xba5b: "med" +0xba5c: "mel" +0xba5d: "melg" +0xba5e: "melm" +0xba5f: "melb" +0xba60: "mels" +0xba61: "melt" +0xba62: "melp" +0xba63: "melh" +0xba64: "mem" +0xba65: "meb" +0xba66: "mebs" +0xba67: "mes" +0xba68: "mess" +0xba69: "meng" +0xba6a: "mej" +0xba6b: "mec" +0xba6c: "mek" +0xba6d: "met" +0xba6e: "mep" +0xba6f: "meh" +0xba70: "myeo" +0xba71: "myeog" +0xba72: "myeogg" +0xba73: "myeogs" +0xba74: "myeon" +0xba75: "myeonj" +0xba76: "myeonh" +0xba77: "myeod" +0xba78: "myeol" +0xba79: "myeolg" +0xba7a: "myeolm" +0xba7b: "myeolb" +0xba7c: "myeols" +0xba7d: "myeolt" +0xba7e: "myeolp" +0xba7f: "myeolh" +0xba80: "myeom" +0xba81: "myeob" +0xba82: "myeobs" +0xba83: "myeos" +0xba84: "myeoss" +0xba85: "myeong" +0xba86: "myeoj" +0xba87: "myeoc" +0xba88: "myeok" +0xba89: "myeot" +0xba8a: "myeop" +0xba8b: "myeoh" +0xba8c: "mye" +0xba8d: "myeg" +0xba8e: "myegg" +0xba8f: "myegs" +0xba90: "myen" +0xba91: "myenj" +0xba92: "myenh" +0xba93: "myed" +0xba94: "myel" +0xba95: "myelg" +0xba96: "myelm" +0xba97: "myelb" +0xba98: "myels" +0xba99: "myelt" +0xba9a: "myelp" +0xba9b: "myelh" +0xba9c: "myem" +0xba9d: "myeb" +0xba9e: "myebs" +0xba9f: "myes" +0xbaa0: "myess" +0xbaa1: "myeng" +0xbaa2: "myej" +0xbaa3: "myec" +0xbaa4: "myek" +0xbaa5: "myet" +0xbaa6: "myep" +0xbaa7: "myeh" +0xbaa8: "mo" +0xbaa9: "mog" +0xbaaa: "mogg" +0xbaab: "mogs" +0xbaac: "mon" +0xbaad: "monj" +0xbaae: "monh" +0xbaaf: "mod" +0xbab0: "mol" +0xbab1: "molg" +0xbab2: "molm" +0xbab3: "molb" +0xbab4: "mols" +0xbab5: "molt" +0xbab6: "molp" +0xbab7: "molh" +0xbab8: "mom" +0xbab9: "mob" +0xbaba: "mobs" +0xbabb: "mos" +0xbabc: "moss" +0xbabd: "mong" +0xbabe: "moj" +0xbabf: "moc" +0xbac0: "mok" +0xbac1: "mot" +0xbac2: "mop" +0xbac3: "moh" +0xbac4: "mwa" +0xbac5: "mwag" +0xbac6: "mwagg" +0xbac7: "mwags" +0xbac8: "mwan" +0xbac9: "mwanj" +0xbaca: "mwanh" +0xbacb: "mwad" +0xbacc: "mwal" +0xbacd: "mwalg" +0xbace: "mwalm" +0xbacf: "mwalb" +0xbad0: "mwals" +0xbad1: "mwalt" +0xbad2: "mwalp" +0xbad3: "mwalh" +0xbad4: "mwam" +0xbad5: "mwab" +0xbad6: "mwabs" +0xbad7: "mwas" +0xbad8: "mwass" +0xbad9: "mwang" +0xbada: "mwaj" +0xbadb: "mwac" +0xbadc: "mwak" +0xbadd: "mwat" +0xbade: "mwap" +0xbadf: "mwah" +0xbae0: "mwae" +0xbae1: "mwaeg" +0xbae2: "mwaegg" +0xbae3: "mwaegs" +0xbae4: "mwaen" +0xbae5: "mwaenj" +0xbae6: "mwaenh" +0xbae7: "mwaed" +0xbae8: "mwael" +0xbae9: "mwaelg" +0xbaea: "mwaelm" +0xbaeb: "mwaelb" +0xbaec: "mwaels" +0xbaed: "mwaelt" +0xbaee: "mwaelp" +0xbaef: "mwaelh" +0xbaf0: "mwaem" +0xbaf1: "mwaeb" +0xbaf2: "mwaebs" +0xbaf3: "mwaes" +0xbaf4: "mwaess" +0xbaf5: "mwaeng" +0xbaf6: "mwaej" +0xbaf7: "mwaec" +0xbaf8: "mwaek" +0xbaf9: "mwaet" +0xbafa: "mwaep" +0xbafb: "mwaeh" +0xbafc: "moe" +0xbafd: "moeg" +0xbafe: "moegg" +0xbaff: "moegs" +/* x0bb */ +0xbb00: "moen" +0xbb01: "moenj" +0xbb02: "moenh" +0xbb03: "moed" +0xbb04: "moel" +0xbb05: "moelg" +0xbb06: "moelm" +0xbb07: "moelb" +0xbb08: "moels" +0xbb09: "moelt" +0xbb0a: "moelp" +0xbb0b: "moelh" +0xbb0c: "moem" +0xbb0d: "moeb" +0xbb0e: "moebs" +0xbb0f: "moes" +0xbb10: "moess" +0xbb11: "moeng" +0xbb12: "moej" +0xbb13: "moec" +0xbb14: "moek" +0xbb15: "moet" +0xbb16: "moep" +0xbb17: "moeh" +0xbb18: "myo" +0xbb19: "myog" +0xbb1a: "myogg" +0xbb1b: "myogs" +0xbb1c: "myon" +0xbb1d: "myonj" +0xbb1e: "myonh" +0xbb1f: "myod" +0xbb20: "myol" +0xbb21: "myolg" +0xbb22: "myolm" +0xbb23: "myolb" +0xbb24: "myols" +0xbb25: "myolt" +0xbb26: "myolp" +0xbb27: "myolh" +0xbb28: "myom" +0xbb29: "myob" +0xbb2a: "myobs" +0xbb2b: "myos" +0xbb2c: "myoss" +0xbb2d: "myong" +0xbb2e: "myoj" +0xbb2f: "myoc" +0xbb30: "myok" +0xbb31: "myot" +0xbb32: "myop" +0xbb33: "myoh" +0xbb34: "mu" +0xbb35: "mug" +0xbb36: "mugg" +0xbb37: "mugs" +0xbb38: "mun" +0xbb39: "munj" +0xbb3a: "munh" +0xbb3b: "mud" +0xbb3c: "mul" +0xbb3d: "mulg" +0xbb3e: "mulm" +0xbb3f: "mulb" +0xbb40: "muls" +0xbb41: "mult" +0xbb42: "mulp" +0xbb43: "mulh" +0xbb44: "mum" +0xbb45: "mub" +0xbb46: "mubs" +0xbb47: "mus" +0xbb48: "muss" +0xbb49: "mung" +0xbb4a: "muj" +0xbb4b: "muc" +0xbb4c: "muk" +0xbb4d: "mut" +0xbb4e: "mup" +0xbb4f: "muh" +0xbb50: "mweo" +0xbb51: "mweog" +0xbb52: "mweogg" +0xbb53: "mweogs" +0xbb54: "mweon" +0xbb55: "mweonj" +0xbb56: "mweonh" +0xbb57: "mweod" +0xbb58: "mweol" +0xbb59: "mweolg" +0xbb5a: "mweolm" +0xbb5b: "mweolb" +0xbb5c: "mweols" +0xbb5d: "mweolt" +0xbb5e: "mweolp" +0xbb5f: "mweolh" +0xbb60: "mweom" +0xbb61: "mweob" +0xbb62: "mweobs" +0xbb63: "mweos" +0xbb64: "mweoss" +0xbb65: "mweong" +0xbb66: "mweoj" +0xbb67: "mweoc" +0xbb68: "mweok" +0xbb69: "mweot" +0xbb6a: "mweop" +0xbb6b: "mweoh" +0xbb6c: "mwe" +0xbb6d: "mweg" +0xbb6e: "mwegg" +0xbb6f: "mwegs" +0xbb70: "mwen" +0xbb71: "mwenj" +0xbb72: "mwenh" +0xbb73: "mwed" +0xbb74: "mwel" +0xbb75: "mwelg" +0xbb76: "mwelm" +0xbb77: "mwelb" +0xbb78: "mwels" +0xbb79: "mwelt" +0xbb7a: "mwelp" +0xbb7b: "mwelh" +0xbb7c: "mwem" +0xbb7d: "mweb" +0xbb7e: "mwebs" +0xbb7f: "mwes" +0xbb80: "mwess" +0xbb81: "mweng" +0xbb82: "mwej" +0xbb83: "mwec" +0xbb84: "mwek" +0xbb85: "mwet" +0xbb86: "mwep" +0xbb87: "mweh" +0xbb88: "mwi" +0xbb89: "mwig" +0xbb8a: "mwigg" +0xbb8b: "mwigs" +0xbb8c: "mwin" +0xbb8d: "mwinj" +0xbb8e: "mwinh" +0xbb8f: "mwid" +0xbb90: "mwil" +0xbb91: "mwilg" +0xbb92: "mwilm" +0xbb93: "mwilb" +0xbb94: "mwils" +0xbb95: "mwilt" +0xbb96: "mwilp" +0xbb97: "mwilh" +0xbb98: "mwim" +0xbb99: "mwib" +0xbb9a: "mwibs" +0xbb9b: "mwis" +0xbb9c: "mwiss" +0xbb9d: "mwing" +0xbb9e: "mwij" +0xbb9f: "mwic" +0xbba0: "mwik" +0xbba1: "mwit" +0xbba2: "mwip" +0xbba3: "mwih" +0xbba4: "myu" +0xbba5: "myug" +0xbba6: "myugg" +0xbba7: "myugs" +0xbba8: "myun" +0xbba9: "myunj" +0xbbaa: "myunh" +0xbbab: "myud" +0xbbac: "myul" +0xbbad: "myulg" +0xbbae: "myulm" +0xbbaf: "myulb" +0xbbb0: "myuls" +0xbbb1: "myult" +0xbbb2: "myulp" +0xbbb3: "myulh" +0xbbb4: "myum" +0xbbb5: "myub" +0xbbb6: "myubs" +0xbbb7: "myus" +0xbbb8: "myuss" +0xbbb9: "myung" +0xbbba: "myuj" +0xbbbb: "myuc" +0xbbbc: "myuk" +0xbbbd: "myut" +0xbbbe: "myup" +0xbbbf: "myuh" +0xbbc0: "meu" +0xbbc1: "meug" +0xbbc2: "meugg" +0xbbc3: "meugs" +0xbbc4: "meun" +0xbbc5: "meunj" +0xbbc6: "meunh" +0xbbc7: "meud" +0xbbc8: "meul" +0xbbc9: "meulg" +0xbbca: "meulm" +0xbbcb: "meulb" +0xbbcc: "meuls" +0xbbcd: "meult" +0xbbce: "meulp" +0xbbcf: "meulh" +0xbbd0: "meum" +0xbbd1: "meub" +0xbbd2: "meubs" +0xbbd3: "meus" +0xbbd4: "meuss" +0xbbd5: "meung" +0xbbd6: "meuj" +0xbbd7: "meuc" +0xbbd8: "meuk" +0xbbd9: "meut" +0xbbda: "meup" +0xbbdb: "meuh" +0xbbdc: "myi" +0xbbdd: "myig" +0xbbde: "myigg" +0xbbdf: "myigs" +0xbbe0: "myin" +0xbbe1: "myinj" +0xbbe2: "myinh" +0xbbe3: "myid" +0xbbe4: "myil" +0xbbe5: "myilg" +0xbbe6: "myilm" +0xbbe7: "myilb" +0xbbe8: "myils" +0xbbe9: "myilt" +0xbbea: "myilp" +0xbbeb: "myilh" +0xbbec: "myim" +0xbbed: "myib" +0xbbee: "myibs" +0xbbef: "myis" +0xbbf0: "myiss" +0xbbf1: "mying" +0xbbf2: "myij" +0xbbf3: "myic" +0xbbf4: "myik" +0xbbf5: "myit" +0xbbf6: "myip" +0xbbf7: "myih" +0xbbf8: "mi" +0xbbf9: "mig" +0xbbfa: "migg" +0xbbfb: "migs" +0xbbfc: "min" +0xbbfd: "minj" +0xbbfe: "minh" +0xbbff: "mid" +/* x0bc */ +0xbc00: "mil" +0xbc01: "milg" +0xbc02: "milm" +0xbc03: "milb" +0xbc04: "mils" +0xbc05: "milt" +0xbc06: "milp" +0xbc07: "milh" +0xbc08: "mim" +0xbc09: "mib" +0xbc0a: "mibs" +0xbc0b: "mis" +0xbc0c: "miss" +0xbc0d: "ming" +0xbc0e: "mij" +0xbc0f: "mic" +0xbc10: "mik" +0xbc11: "mit" +0xbc12: "mip" +0xbc13: "mih" +0xbc14: "ba" +0xbc15: "bag" +0xbc16: "bagg" +0xbc17: "bags" +0xbc18: "ban" +0xbc19: "banj" +0xbc1a: "banh" +0xbc1b: "bad" +0xbc1c: "bal" +0xbc1d: "balg" +0xbc1e: "balm" +0xbc1f: "balb" +0xbc20: "bals" +0xbc21: "balt" +0xbc22: "balp" +0xbc23: "balh" +0xbc24: "bam" +0xbc25: "bab" +0xbc26: "babs" +0xbc27: "bas" +0xbc28: "bass" +0xbc29: "bang" +0xbc2a: "baj" +0xbc2b: "bac" +0xbc2c: "bak" +0xbc2d: "bat" +0xbc2e: "bap" +0xbc2f: "bah" +0xbc30: "bae" +0xbc31: "baeg" +0xbc32: "baegg" +0xbc33: "baegs" +0xbc34: "baen" +0xbc35: "baenj" +0xbc36: "baenh" +0xbc37: "baed" +0xbc38: "bael" +0xbc39: "baelg" +0xbc3a: "baelm" +0xbc3b: "baelb" +0xbc3c: "baels" +0xbc3d: "baelt" +0xbc3e: "baelp" +0xbc3f: "baelh" +0xbc40: "baem" +0xbc41: "baeb" +0xbc42: "baebs" +0xbc43: "baes" +0xbc44: "baess" +0xbc45: "baeng" +0xbc46: "baej" +0xbc47: "baec" +0xbc48: "baek" +0xbc49: "baet" +0xbc4a: "baep" +0xbc4b: "baeh" +0xbc4c: "bya" +0xbc4d: "byag" +0xbc4e: "byagg" +0xbc4f: "byags" +0xbc50: "byan" +0xbc51: "byanj" +0xbc52: "byanh" +0xbc53: "byad" +0xbc54: "byal" +0xbc55: "byalg" +0xbc56: "byalm" +0xbc57: "byalb" +0xbc58: "byals" +0xbc59: "byalt" +0xbc5a: "byalp" +0xbc5b: "byalh" +0xbc5c: "byam" +0xbc5d: "byab" +0xbc5e: "byabs" +0xbc5f: "byas" +0xbc60: "byass" +0xbc61: "byang" +0xbc62: "byaj" +0xbc63: "byac" +0xbc64: "byak" +0xbc65: "byat" +0xbc66: "byap" +0xbc67: "byah" +0xbc68: "byae" +0xbc69: "byaeg" +0xbc6a: "byaegg" +0xbc6b: "byaegs" +0xbc6c: "byaen" +0xbc6d: "byaenj" +0xbc6e: "byaenh" +0xbc6f: "byaed" +0xbc70: "byael" +0xbc71: "byaelg" +0xbc72: "byaelm" +0xbc73: "byaelb" +0xbc74: "byaels" +0xbc75: "byaelt" +0xbc76: "byaelp" +0xbc77: "byaelh" +0xbc78: "byaem" +0xbc79: "byaeb" +0xbc7a: "byaebs" +0xbc7b: "byaes" +0xbc7c: "byaess" +0xbc7d: "byaeng" +0xbc7e: "byaej" +0xbc7f: "byaec" +0xbc80: "byaek" +0xbc81: "byaet" +0xbc82: "byaep" +0xbc83: "byaeh" +0xbc84: "beo" +0xbc85: "beog" +0xbc86: "beogg" +0xbc87: "beogs" +0xbc88: "beon" +0xbc89: "beonj" +0xbc8a: "beonh" +0xbc8b: "beod" +0xbc8c: "beol" +0xbc8d: "beolg" +0xbc8e: "beolm" +0xbc8f: "beolb" +0xbc90: "beols" +0xbc91: "beolt" +0xbc92: "beolp" +0xbc93: "beolh" +0xbc94: "beom" +0xbc95: "beob" +0xbc96: "beobs" +0xbc97: "beos" +0xbc98: "beoss" +0xbc99: "beong" +0xbc9a: "beoj" +0xbc9b: "beoc" +0xbc9c: "beok" +0xbc9d: "beot" +0xbc9e: "beop" +0xbc9f: "beoh" +0xbca0: "be" +0xbca1: "beg" +0xbca2: "begg" +0xbca3: "begs" +0xbca4: "ben" +0xbca5: "benj" +0xbca6: "benh" +0xbca7: "bed" +0xbca8: "bel" +0xbca9: "belg" +0xbcaa: "belm" +0xbcab: "belb" +0xbcac: "bels" +0xbcad: "belt" +0xbcae: "belp" +0xbcaf: "belh" +0xbcb0: "bem" +0xbcb1: "beb" +0xbcb2: "bebs" +0xbcb3: "bes" +0xbcb4: "bess" +0xbcb5: "beng" +0xbcb6: "bej" +0xbcb7: "bec" +0xbcb8: "bek" +0xbcb9: "bet" +0xbcba: "bep" +0xbcbb: "beh" +0xbcbc: "byeo" +0xbcbd: "byeog" +0xbcbe: "byeogg" +0xbcbf: "byeogs" +0xbcc0: "byeon" +0xbcc1: "byeonj" +0xbcc2: "byeonh" +0xbcc3: "byeod" +0xbcc4: "byeol" +0xbcc5: "byeolg" +0xbcc6: "byeolm" +0xbcc7: "byeolb" +0xbcc8: "byeols" +0xbcc9: "byeolt" +0xbcca: "byeolp" +0xbccb: "byeolh" +0xbccc: "byeom" +0xbccd: "byeob" +0xbcce: "byeobs" +0xbccf: "byeos" +0xbcd0: "byeoss" +0xbcd1: "byeong" +0xbcd2: "byeoj" +0xbcd3: "byeoc" +0xbcd4: "byeok" +0xbcd5: "byeot" +0xbcd6: "byeop" +0xbcd7: "byeoh" +0xbcd8: "bye" +0xbcd9: "byeg" +0xbcda: "byegg" +0xbcdb: "byegs" +0xbcdc: "byen" +0xbcdd: "byenj" +0xbcde: "byenh" +0xbcdf: "byed" +0xbce0: "byel" +0xbce1: "byelg" +0xbce2: "byelm" +0xbce3: "byelb" +0xbce4: "byels" +0xbce5: "byelt" +0xbce6: "byelp" +0xbce7: "byelh" +0xbce8: "byem" +0xbce9: "byeb" +0xbcea: "byebs" +0xbceb: "byes" +0xbcec: "byess" +0xbced: "byeng" +0xbcee: "byej" +0xbcef: "byec" +0xbcf0: "byek" +0xbcf1: "byet" +0xbcf2: "byep" +0xbcf3: "byeh" +0xbcf4: "bo" +0xbcf5: "bog" +0xbcf6: "bogg" +0xbcf7: "bogs" +0xbcf8: "bon" +0xbcf9: "bonj" +0xbcfa: "bonh" +0xbcfb: "bod" +0xbcfc: "bol" +0xbcfd: "bolg" +0xbcfe: "bolm" +0xbcff: "bolb" +/* x0bd */ +0xbd00: "bols" +0xbd01: "bolt" +0xbd02: "bolp" +0xbd03: "bolh" +0xbd04: "bom" +0xbd05: "bob" +0xbd06: "bobs" +0xbd07: "bos" +0xbd08: "boss" +0xbd09: "bong" +0xbd0a: "boj" +0xbd0b: "boc" +0xbd0c: "bok" +0xbd0d: "bot" +0xbd0e: "bop" +0xbd0f: "boh" +0xbd10: "bwa" +0xbd11: "bwag" +0xbd12: "bwagg" +0xbd13: "bwags" +0xbd14: "bwan" +0xbd15: "bwanj" +0xbd16: "bwanh" +0xbd17: "bwad" +0xbd18: "bwal" +0xbd19: "bwalg" +0xbd1a: "bwalm" +0xbd1b: "bwalb" +0xbd1c: "bwals" +0xbd1d: "bwalt" +0xbd1e: "bwalp" +0xbd1f: "bwalh" +0xbd20: "bwam" +0xbd21: "bwab" +0xbd22: "bwabs" +0xbd23: "bwas" +0xbd24: "bwass" +0xbd25: "bwang" +0xbd26: "bwaj" +0xbd27: "bwac" +0xbd28: "bwak" +0xbd29: "bwat" +0xbd2a: "bwap" +0xbd2b: "bwah" +0xbd2c: "bwae" +0xbd2d: "bwaeg" +0xbd2e: "bwaegg" +0xbd2f: "bwaegs" +0xbd30: "bwaen" +0xbd31: "bwaenj" +0xbd32: "bwaenh" +0xbd33: "bwaed" +0xbd34: "bwael" +0xbd35: "bwaelg" +0xbd36: "bwaelm" +0xbd37: "bwaelb" +0xbd38: "bwaels" +0xbd39: "bwaelt" +0xbd3a: "bwaelp" +0xbd3b: "bwaelh" +0xbd3c: "bwaem" +0xbd3d: "bwaeb" +0xbd3e: "bwaebs" +0xbd3f: "bwaes" +0xbd40: "bwaess" +0xbd41: "bwaeng" +0xbd42: "bwaej" +0xbd43: "bwaec" +0xbd44: "bwaek" +0xbd45: "bwaet" +0xbd46: "bwaep" +0xbd47: "bwaeh" +0xbd48: "boe" +0xbd49: "boeg" +0xbd4a: "boegg" +0xbd4b: "boegs" +0xbd4c: "boen" +0xbd4d: "boenj" +0xbd4e: "boenh" +0xbd4f: "boed" +0xbd50: "boel" +0xbd51: "boelg" +0xbd52: "boelm" +0xbd53: "boelb" +0xbd54: "boels" +0xbd55: "boelt" +0xbd56: "boelp" +0xbd57: "boelh" +0xbd58: "boem" +0xbd59: "boeb" +0xbd5a: "boebs" +0xbd5b: "boes" +0xbd5c: "boess" +0xbd5d: "boeng" +0xbd5e: "boej" +0xbd5f: "boec" +0xbd60: "boek" +0xbd61: "boet" +0xbd62: "boep" +0xbd63: "boeh" +0xbd64: "byo" +0xbd65: "byog" +0xbd66: "byogg" +0xbd67: "byogs" +0xbd68: "byon" +0xbd69: "byonj" +0xbd6a: "byonh" +0xbd6b: "byod" +0xbd6c: "byol" +0xbd6d: "byolg" +0xbd6e: "byolm" +0xbd6f: "byolb" +0xbd70: "byols" +0xbd71: "byolt" +0xbd72: "byolp" +0xbd73: "byolh" +0xbd74: "byom" +0xbd75: "byob" +0xbd76: "byobs" +0xbd77: "byos" +0xbd78: "byoss" +0xbd79: "byong" +0xbd7a: "byoj" +0xbd7b: "byoc" +0xbd7c: "byok" +0xbd7d: "byot" +0xbd7e: "byop" +0xbd7f: "byoh" +0xbd80: "bu" +0xbd81: "bug" +0xbd82: "bugg" +0xbd83: "bugs" +0xbd84: "bun" +0xbd85: "bunj" +0xbd86: "bunh" +0xbd87: "bud" +0xbd88: "bul" +0xbd89: "bulg" +0xbd8a: "bulm" +0xbd8b: "bulb" +0xbd8c: "buls" +0xbd8d: "bult" +0xbd8e: "bulp" +0xbd8f: "bulh" +0xbd90: "bum" +0xbd91: "bub" +0xbd92: "bubs" +0xbd93: "bus" +0xbd94: "buss" +0xbd95: "bung" +0xbd96: "buj" +0xbd97: "buc" +0xbd98: "buk" +0xbd99: "but" +0xbd9a: "bup" +0xbd9b: "buh" +0xbd9c: "bweo" +0xbd9d: "bweog" +0xbd9e: "bweogg" +0xbd9f: "bweogs" +0xbda0: "bweon" +0xbda1: "bweonj" +0xbda2: "bweonh" +0xbda3: "bweod" +0xbda4: "bweol" +0xbda5: "bweolg" +0xbda6: "bweolm" +0xbda7: "bweolb" +0xbda8: "bweols" +0xbda9: "bweolt" +0xbdaa: "bweolp" +0xbdab: "bweolh" +0xbdac: "bweom" +0xbdad: "bweob" +0xbdae: "bweobs" +0xbdaf: "bweos" +0xbdb0: "bweoss" +0xbdb1: "bweong" +0xbdb2: "bweoj" +0xbdb3: "bweoc" +0xbdb4: "bweok" +0xbdb5: "bweot" +0xbdb6: "bweop" +0xbdb7: "bweoh" +0xbdb8: "bwe" +0xbdb9: "bweg" +0xbdba: "bwegg" +0xbdbb: "bwegs" +0xbdbc: "bwen" +0xbdbd: "bwenj" +0xbdbe: "bwenh" +0xbdbf: "bwed" +0xbdc0: "bwel" +0xbdc1: "bwelg" +0xbdc2: "bwelm" +0xbdc3: "bwelb" +0xbdc4: "bwels" +0xbdc5: "bwelt" +0xbdc6: "bwelp" +0xbdc7: "bwelh" +0xbdc8: "bwem" +0xbdc9: "bweb" +0xbdca: "bwebs" +0xbdcb: "bwes" +0xbdcc: "bwess" +0xbdcd: "bweng" +0xbdce: "bwej" +0xbdcf: "bwec" +0xbdd0: "bwek" +0xbdd1: "bwet" +0xbdd2: "bwep" +0xbdd3: "bweh" +0xbdd4: "bwi" +0xbdd5: "bwig" +0xbdd6: "bwigg" +0xbdd7: "bwigs" +0xbdd8: "bwin" +0xbdd9: "bwinj" +0xbdda: "bwinh" +0xbddb: "bwid" +0xbddc: "bwil" +0xbddd: "bwilg" +0xbdde: "bwilm" +0xbddf: "bwilb" +0xbde0: "bwils" +0xbde1: "bwilt" +0xbde2: "bwilp" +0xbde3: "bwilh" +0xbde4: "bwim" +0xbde5: "bwib" +0xbde6: "bwibs" +0xbde7: "bwis" +0xbde8: "bwiss" +0xbde9: "bwing" +0xbdea: "bwij" +0xbdeb: "bwic" +0xbdec: "bwik" +0xbded: "bwit" +0xbdee: "bwip" +0xbdef: "bwih" +0xbdf0: "byu" +0xbdf1: "byug" +0xbdf2: "byugg" +0xbdf3: "byugs" +0xbdf4: "byun" +0xbdf5: "byunj" +0xbdf6: "byunh" +0xbdf7: "byud" +0xbdf8: "byul" +0xbdf9: "byulg" +0xbdfa: "byulm" +0xbdfb: "byulb" +0xbdfc: "byuls" +0xbdfd: "byult" +0xbdfe: "byulp" +0xbdff: "byulh" +/* x0be */ +0xbe00: "byum" +0xbe01: "byub" +0xbe02: "byubs" +0xbe03: "byus" +0xbe04: "byuss" +0xbe05: "byung" +0xbe06: "byuj" +0xbe07: "byuc" +0xbe08: "byuk" +0xbe09: "byut" +0xbe0a: "byup" +0xbe0b: "byuh" +0xbe0c: "beu" +0xbe0d: "beug" +0xbe0e: "beugg" +0xbe0f: "beugs" +0xbe10: "beun" +0xbe11: "beunj" +0xbe12: "beunh" +0xbe13: "beud" +0xbe14: "beul" +0xbe15: "beulg" +0xbe16: "beulm" +0xbe17: "beulb" +0xbe18: "beuls" +0xbe19: "beult" +0xbe1a: "beulp" +0xbe1b: "beulh" +0xbe1c: "beum" +0xbe1d: "beub" +0xbe1e: "beubs" +0xbe1f: "beus" +0xbe20: "beuss" +0xbe21: "beung" +0xbe22: "beuj" +0xbe23: "beuc" +0xbe24: "beuk" +0xbe25: "beut" +0xbe26: "beup" +0xbe27: "beuh" +0xbe28: "byi" +0xbe29: "byig" +0xbe2a: "byigg" +0xbe2b: "byigs" +0xbe2c: "byin" +0xbe2d: "byinj" +0xbe2e: "byinh" +0xbe2f: "byid" +0xbe30: "byil" +0xbe31: "byilg" +0xbe32: "byilm" +0xbe33: "byilb" +0xbe34: "byils" +0xbe35: "byilt" +0xbe36: "byilp" +0xbe37: "byilh" +0xbe38: "byim" +0xbe39: "byib" +0xbe3a: "byibs" +0xbe3b: "byis" +0xbe3c: "byiss" +0xbe3d: "bying" +0xbe3e: "byij" +0xbe3f: "byic" +0xbe40: "byik" +0xbe41: "byit" +0xbe42: "byip" +0xbe43: "byih" +0xbe44: "bi" +0xbe45: "big" +0xbe46: "bigg" +0xbe47: "bigs" +0xbe48: "bin" +0xbe49: "binj" +0xbe4a: "binh" +0xbe4b: "bid" +0xbe4c: "bil" +0xbe4d: "bilg" +0xbe4e: "bilm" +0xbe4f: "bilb" +0xbe50: "bils" +0xbe51: "bilt" +0xbe52: "bilp" +0xbe53: "bilh" +0xbe54: "bim" +0xbe55: "bib" +0xbe56: "bibs" +0xbe57: "bis" +0xbe58: "biss" +0xbe59: "bing" +0xbe5a: "bij" +0xbe5b: "bic" +0xbe5c: "bik" +0xbe5d: "bit" +0xbe5e: "bip" +0xbe5f: "bih" +0xbe60: "bba" +0xbe61: "bbag" +0xbe62: "bbagg" +0xbe63: "bbags" +0xbe64: "bban" +0xbe65: "bbanj" +0xbe66: "bbanh" +0xbe67: "bbad" +0xbe68: "bbal" +0xbe69: "bbalg" +0xbe6a: "bbalm" +0xbe6b: "bbalb" +0xbe6c: "bbals" +0xbe6d: "bbalt" +0xbe6e: "bbalp" +0xbe6f: "bbalh" +0xbe70: "bbam" +0xbe71: "bbab" +0xbe72: "bbabs" +0xbe73: "bbas" +0xbe74: "bbass" +0xbe75: "bbang" +0xbe76: "bbaj" +0xbe77: "bbac" +0xbe78: "bbak" +0xbe79: "bbat" +0xbe7a: "bbap" +0xbe7b: "bbah" +0xbe7c: "bbae" +0xbe7d: "bbaeg" +0xbe7e: "bbaegg" +0xbe7f: "bbaegs" +0xbe80: "bbaen" +0xbe81: "bbaenj" +0xbe82: "bbaenh" +0xbe83: "bbaed" +0xbe84: "bbael" +0xbe85: "bbaelg" +0xbe86: "bbaelm" +0xbe87: "bbaelb" +0xbe88: "bbaels" +0xbe89: "bbaelt" +0xbe8a: "bbaelp" +0xbe8b: "bbaelh" +0xbe8c: "bbaem" +0xbe8d: "bbaeb" +0xbe8e: "bbaebs" +0xbe8f: "bbaes" +0xbe90: "bbaess" +0xbe91: "bbaeng" +0xbe92: "bbaej" +0xbe93: "bbaec" +0xbe94: "bbaek" +0xbe95: "bbaet" +0xbe96: "bbaep" +0xbe97: "bbaeh" +0xbe98: "bbya" +0xbe99: "bbyag" +0xbe9a: "bbyagg" +0xbe9b: "bbyags" +0xbe9c: "bbyan" +0xbe9d: "bbyanj" +0xbe9e: "bbyanh" +0xbe9f: "bbyad" +0xbea0: "bbyal" +0xbea1: "bbyalg" +0xbea2: "bbyalm" +0xbea3: "bbyalb" +0xbea4: "bbyals" +0xbea5: "bbyalt" +0xbea6: "bbyalp" +0xbea7: "bbyalh" +0xbea8: "bbyam" +0xbea9: "bbyab" +0xbeaa: "bbyabs" +0xbeab: "bbyas" +0xbeac: "bbyass" +0xbead: "bbyang" +0xbeae: "bbyaj" +0xbeaf: "bbyac" +0xbeb0: "bbyak" +0xbeb1: "bbyat" +0xbeb2: "bbyap" +0xbeb3: "bbyah" +0xbeb4: "bbyae" +0xbeb5: "bbyaeg" +0xbeb6: "bbyaegg" +0xbeb7: "bbyaegs" +0xbeb8: "bbyaen" +0xbeb9: "bbyaenj" +0xbeba: "bbyaenh" +0xbebb: "bbyaed" +0xbebc: "bbyael" +0xbebd: "bbyaelg" +0xbebe: "bbyaelm" +0xbebf: "bbyaelb" +0xbec0: "bbyaels" +0xbec1: "bbyaelt" +0xbec2: "bbyaelp" +0xbec3: "bbyaelh" +0xbec4: "bbyaem" +0xbec5: "bbyaeb" +0xbec6: "bbyaebs" +0xbec7: "bbyaes" +0xbec8: "bbyaess" +0xbec9: "bbyaeng" +0xbeca: "bbyaej" +0xbecb: "bbyaec" +0xbecc: "bbyaek" +0xbecd: "bbyaet" +0xbece: "bbyaep" +0xbecf: "bbyaeh" +0xbed0: "bbeo" +0xbed1: "bbeog" +0xbed2: "bbeogg" +0xbed3: "bbeogs" +0xbed4: "bbeon" +0xbed5: "bbeonj" +0xbed6: "bbeonh" +0xbed7: "bbeod" +0xbed8: "bbeol" +0xbed9: "bbeolg" +0xbeda: "bbeolm" +0xbedb: "bbeolb" +0xbedc: "bbeols" +0xbedd: "bbeolt" +0xbede: "bbeolp" +0xbedf: "bbeolh" +0xbee0: "bbeom" +0xbee1: "bbeob" +0xbee2: "bbeobs" +0xbee3: "bbeos" +0xbee4: "bbeoss" +0xbee5: "bbeong" +0xbee6: "bbeoj" +0xbee7: "bbeoc" +0xbee8: "bbeok" +0xbee9: "bbeot" +0xbeea: "bbeop" +0xbeeb: "bbeoh" +0xbeec: "bbe" +0xbeed: "bbeg" +0xbeee: "bbegg" +0xbeef: "bbegs" +0xbef0: "bben" +0xbef1: "bbenj" +0xbef2: "bbenh" +0xbef3: "bbed" +0xbef4: "bbel" +0xbef5: "bbelg" +0xbef6: "bbelm" +0xbef7: "bbelb" +0xbef8: "bbels" +0xbef9: "bbelt" +0xbefa: "bbelp" +0xbefb: "bbelh" +0xbefc: "bbem" +0xbefd: "bbeb" +0xbefe: "bbebs" +0xbeff: "bbes" +/* x0bf */ +0xbf00: "bbess" +0xbf01: "bbeng" +0xbf02: "bbej" +0xbf03: "bbec" +0xbf04: "bbek" +0xbf05: "bbet" +0xbf06: "bbep" +0xbf07: "bbeh" +0xbf08: "bbyeo" +0xbf09: "bbyeog" +0xbf0a: "bbyeogg" +0xbf0b: "bbyeogs" +0xbf0c: "bbyeon" +0xbf0d: "bbyeonj" +0xbf0e: "bbyeonh" +0xbf0f: "bbyeod" +0xbf10: "bbyeol" +0xbf11: "bbyeolg" +0xbf12: "bbyeolm" +0xbf13: "bbyeolb" +0xbf14: "bbyeols" +0xbf15: "bbyeolt" +0xbf16: "bbyeolp" +0xbf17: "bbyeolh" +0xbf18: "bbyeom" +0xbf19: "bbyeob" +0xbf1a: "bbyeobs" +0xbf1b: "bbyeos" +0xbf1c: "bbyeoss" +0xbf1d: "bbyeong" +0xbf1e: "bbyeoj" +0xbf1f: "bbyeoc" +0xbf20: "bbyeok" +0xbf21: "bbyeot" +0xbf22: "bbyeop" +0xbf23: "bbyeoh" +0xbf24: "bbye" +0xbf25: "bbyeg" +0xbf26: "bbyegg" +0xbf27: "bbyegs" +0xbf28: "bbyen" +0xbf29: "bbyenj" +0xbf2a: "bbyenh" +0xbf2b: "bbyed" +0xbf2c: "bbyel" +0xbf2d: "bbyelg" +0xbf2e: "bbyelm" +0xbf2f: "bbyelb" +0xbf30: "bbyels" +0xbf31: "bbyelt" +0xbf32: "bbyelp" +0xbf33: "bbyelh" +0xbf34: "bbyem" +0xbf35: "bbyeb" +0xbf36: "bbyebs" +0xbf37: "bbyes" +0xbf38: "bbyess" +0xbf39: "bbyeng" +0xbf3a: "bbyej" +0xbf3b: "bbyec" +0xbf3c: "bbyek" +0xbf3d: "bbyet" +0xbf3e: "bbyep" +0xbf3f: "bbyeh" +0xbf40: "bbo" +0xbf41: "bbog" +0xbf42: "bbogg" +0xbf43: "bbogs" +0xbf44: "bbon" +0xbf45: "bbonj" +0xbf46: "bbonh" +0xbf47: "bbod" +0xbf48: "bbol" +0xbf49: "bbolg" +0xbf4a: "bbolm" +0xbf4b: "bbolb" +0xbf4c: "bbols" +0xbf4d: "bbolt" +0xbf4e: "bbolp" +0xbf4f: "bbolh" +0xbf50: "bbom" +0xbf51: "bbob" +0xbf52: "bbobs" +0xbf53: "bbos" +0xbf54: "bboss" +0xbf55: "bbong" +0xbf56: "bboj" +0xbf57: "bboc" +0xbf58: "bbok" +0xbf59: "bbot" +0xbf5a: "bbop" +0xbf5b: "bboh" +0xbf5c: "bbwa" +0xbf5d: "bbwag" +0xbf5e: "bbwagg" +0xbf5f: "bbwags" +0xbf60: "bbwan" +0xbf61: "bbwanj" +0xbf62: "bbwanh" +0xbf63: "bbwad" +0xbf64: "bbwal" +0xbf65: "bbwalg" +0xbf66: "bbwalm" +0xbf67: "bbwalb" +0xbf68: "bbwals" +0xbf69: "bbwalt" +0xbf6a: "bbwalp" +0xbf6b: "bbwalh" +0xbf6c: "bbwam" +0xbf6d: "bbwab" +0xbf6e: "bbwabs" +0xbf6f: "bbwas" +0xbf70: "bbwass" +0xbf71: "bbwang" +0xbf72: "bbwaj" +0xbf73: "bbwac" +0xbf74: "bbwak" +0xbf75: "bbwat" +0xbf76: "bbwap" +0xbf77: "bbwah" +0xbf78: "bbwae" +0xbf79: "bbwaeg" +0xbf7a: "bbwaegg" +0xbf7b: "bbwaegs" +0xbf7c: "bbwaen" +0xbf7d: "bbwaenj" +0xbf7e: "bbwaenh" +0xbf7f: "bbwaed" +0xbf80: "bbwael" +0xbf81: "bbwaelg" +0xbf82: "bbwaelm" +0xbf83: "bbwaelb" +0xbf84: "bbwaels" +0xbf85: "bbwaelt" +0xbf86: "bbwaelp" +0xbf87: "bbwaelh" +0xbf88: "bbwaem" +0xbf89: "bbwaeb" +0xbf8a: "bbwaebs" +0xbf8b: "bbwaes" +0xbf8c: "bbwaess" +0xbf8d: "bbwaeng" +0xbf8e: "bbwaej" +0xbf8f: "bbwaec" +0xbf90: "bbwaek" +0xbf91: "bbwaet" +0xbf92: "bbwaep" +0xbf93: "bbwaeh" +0xbf94: "bboe" +0xbf95: "bboeg" +0xbf96: "bboegg" +0xbf97: "bboegs" +0xbf98: "bboen" +0xbf99: "bboenj" +0xbf9a: "bboenh" +0xbf9b: "bboed" +0xbf9c: "bboel" +0xbf9d: "bboelg" +0xbf9e: "bboelm" +0xbf9f: "bboelb" +0xbfa0: "bboels" +0xbfa1: "bboelt" +0xbfa2: "bboelp" +0xbfa3: "bboelh" +0xbfa4: "bboem" +0xbfa5: "bboeb" +0xbfa6: "bboebs" +0xbfa7: "bboes" +0xbfa8: "bboess" +0xbfa9: "bboeng" +0xbfaa: "bboej" +0xbfab: "bboec" +0xbfac: "bboek" +0xbfad: "bboet" +0xbfae: "bboep" +0xbfaf: "bboeh" +0xbfb0: "bbyo" +0xbfb1: "bbyog" +0xbfb2: "bbyogg" +0xbfb3: "bbyogs" +0xbfb4: "bbyon" +0xbfb5: "bbyonj" +0xbfb6: "bbyonh" +0xbfb7: "bbyod" +0xbfb8: "bbyol" +0xbfb9: "bbyolg" +0xbfba: "bbyolm" +0xbfbb: "bbyolb" +0xbfbc: "bbyols" +0xbfbd: "bbyolt" +0xbfbe: "bbyolp" +0xbfbf: "bbyolh" +0xbfc0: "bbyom" +0xbfc1: "bbyob" +0xbfc2: "bbyobs" +0xbfc3: "bbyos" +0xbfc4: "bbyoss" +0xbfc5: "bbyong" +0xbfc6: "bbyoj" +0xbfc7: "bbyoc" +0xbfc8: "bbyok" +0xbfc9: "bbyot" +0xbfca: "bbyop" +0xbfcb: "bbyoh" +0xbfcc: "bbu" +0xbfcd: "bbug" +0xbfce: "bbugg" +0xbfcf: "bbugs" +0xbfd0: "bbun" +0xbfd1: "bbunj" +0xbfd2: "bbunh" +0xbfd3: "bbud" +0xbfd4: "bbul" +0xbfd5: "bbulg" +0xbfd6: "bbulm" +0xbfd7: "bbulb" +0xbfd8: "bbuls" +0xbfd9: "bbult" +0xbfda: "bbulp" +0xbfdb: "bbulh" +0xbfdc: "bbum" +0xbfdd: "bbub" +0xbfde: "bbubs" +0xbfdf: "bbus" +0xbfe0: "bbuss" +0xbfe1: "bbung" +0xbfe2: "bbuj" +0xbfe3: "bbuc" +0xbfe4: "bbuk" +0xbfe5: "bbut" +0xbfe6: "bbup" +0xbfe7: "bbuh" +0xbfe8: "bbweo" +0xbfe9: "bbweog" +0xbfea: "bbweogg" +0xbfeb: "bbweogs" +0xbfec: "bbweon" +0xbfed: "bbweonj" +0xbfee: "bbweonh" +0xbfef: "bbweod" +0xbff0: "bbweol" +0xbff1: "bbweolg" +0xbff2: "bbweolm" +0xbff3: "bbweolb" +0xbff4: "bbweols" +0xbff5: "bbweolt" +0xbff6: "bbweolp" +0xbff7: "bbweolh" +0xbff8: "bbweom" +0xbff9: "bbweob" +0xbffa: "bbweobs" +0xbffb: "bbweos" +0xbffc: "bbweoss" +0xbffd: "bbweong" +0xbffe: "bbweoj" +0xbfff: "bbweoc" +/* x0c0 */ +0xc000: "bbweok" +0xc001: "bbweot" +0xc002: "bbweop" +0xc003: "bbweoh" +0xc004: "bbwe" +0xc005: "bbweg" +0xc006: "bbwegg" +0xc007: "bbwegs" +0xc008: "bbwen" +0xc009: "bbwenj" +0xc00a: "bbwenh" +0xc00b: "bbwed" +0xc00c: "bbwel" +0xc00d: "bbwelg" +0xc00e: "bbwelm" +0xc00f: "bbwelb" +0xc010: "bbwels" +0xc011: "bbwelt" +0xc012: "bbwelp" +0xc013: "bbwelh" +0xc014: "bbwem" +0xc015: "bbweb" +0xc016: "bbwebs" +0xc017: "bbwes" +0xc018: "bbwess" +0xc019: "bbweng" +0xc01a: "bbwej" +0xc01b: "bbwec" +0xc01c: "bbwek" +0xc01d: "bbwet" +0xc01e: "bbwep" +0xc01f: "bbweh" +0xc020: "bbwi" +0xc021: "bbwig" +0xc022: "bbwigg" +0xc023: "bbwigs" +0xc024: "bbwin" +0xc025: "bbwinj" +0xc026: "bbwinh" +0xc027: "bbwid" +0xc028: "bbwil" +0xc029: "bbwilg" +0xc02a: "bbwilm" +0xc02b: "bbwilb" +0xc02c: "bbwils" +0xc02d: "bbwilt" +0xc02e: "bbwilp" +0xc02f: "bbwilh" +0xc030: "bbwim" +0xc031: "bbwib" +0xc032: "bbwibs" +0xc033: "bbwis" +0xc034: "bbwiss" +0xc035: "bbwing" +0xc036: "bbwij" +0xc037: "bbwic" +0xc038: "bbwik" +0xc039: "bbwit" +0xc03a: "bbwip" +0xc03b: "bbwih" +0xc03c: "bbyu" +0xc03d: "bbyug" +0xc03e: "bbyugg" +0xc03f: "bbyugs" +0xc040: "bbyun" +0xc041: "bbyunj" +0xc042: "bbyunh" +0xc043: "bbyud" +0xc044: "bbyul" +0xc045: "bbyulg" +0xc046: "bbyulm" +0xc047: "bbyulb" +0xc048: "bbyuls" +0xc049: "bbyult" +0xc04a: "bbyulp" +0xc04b: "bbyulh" +0xc04c: "bbyum" +0xc04d: "bbyub" +0xc04e: "bbyubs" +0xc04f: "bbyus" +0xc050: "bbyuss" +0xc051: "bbyung" +0xc052: "bbyuj" +0xc053: "bbyuc" +0xc054: "bbyuk" +0xc055: "bbyut" +0xc056: "bbyup" +0xc057: "bbyuh" +0xc058: "bbeu" +0xc059: "bbeug" +0xc05a: "bbeugg" +0xc05b: "bbeugs" +0xc05c: "bbeun" +0xc05d: "bbeunj" +0xc05e: "bbeunh" +0xc05f: "bbeud" +0xc060: "bbeul" +0xc061: "bbeulg" +0xc062: "bbeulm" +0xc063: "bbeulb" +0xc064: "bbeuls" +0xc065: "bbeult" +0xc066: "bbeulp" +0xc067: "bbeulh" +0xc068: "bbeum" +0xc069: "bbeub" +0xc06a: "bbeubs" +0xc06b: "bbeus" +0xc06c: "bbeuss" +0xc06d: "bbeung" +0xc06e: "bbeuj" +0xc06f: "bbeuc" +0xc070: "bbeuk" +0xc071: "bbeut" +0xc072: "bbeup" +0xc073: "bbeuh" +0xc074: "bbyi" +0xc075: "bbyig" +0xc076: "bbyigg" +0xc077: "bbyigs" +0xc078: "bbyin" +0xc079: "bbyinj" +0xc07a: "bbyinh" +0xc07b: "bbyid" +0xc07c: "bbyil" +0xc07d: "bbyilg" +0xc07e: "bbyilm" +0xc07f: "bbyilb" +0xc080: "bbyils" +0xc081: "bbyilt" +0xc082: "bbyilp" +0xc083: "bbyilh" +0xc084: "bbyim" +0xc085: "bbyib" +0xc086: "bbyibs" +0xc087: "bbyis" +0xc088: "bbyiss" +0xc089: "bbying" +0xc08a: "bbyij" +0xc08b: "bbyic" +0xc08c: "bbyik" +0xc08d: "bbyit" +0xc08e: "bbyip" +0xc08f: "bbyih" +0xc090: "bbi" +0xc091: "bbig" +0xc092: "bbigg" +0xc093: "bbigs" +0xc094: "bbin" +0xc095: "bbinj" +0xc096: "bbinh" +0xc097: "bbid" +0xc098: "bbil" +0xc099: "bbilg" +0xc09a: "bbilm" +0xc09b: "bbilb" +0xc09c: "bbils" +0xc09d: "bbilt" +0xc09e: "bbilp" +0xc09f: "bbilh" +0xc0a0: "bbim" +0xc0a1: "bbib" +0xc0a2: "bbibs" +0xc0a3: "bbis" +0xc0a4: "bbiss" +0xc0a5: "bbing" +0xc0a6: "bbij" +0xc0a7: "bbic" +0xc0a8: "bbik" +0xc0a9: "bbit" +0xc0aa: "bbip" +0xc0ab: "bbih" +0xc0ac: "sa" +0xc0ad: "sag" +0xc0ae: "sagg" +0xc0af: "sags" +0xc0b0: "san" +0xc0b1: "sanj" +0xc0b2: "sanh" +0xc0b3: "sad" +0xc0b4: "sal" +0xc0b5: "salg" +0xc0b6: "salm" +0xc0b7: "salb" +0xc0b8: "sals" +0xc0b9: "salt" +0xc0ba: "salp" +0xc0bb: "salh" +0xc0bc: "sam" +0xc0bd: "sab" +0xc0be: "sabs" +0xc0bf: "sas" +0xc0c0: "sass" +0xc0c1: "sang" +0xc0c2: "saj" +0xc0c3: "sac" +0xc0c4: "sak" +0xc0c5: "sat" +0xc0c6: "sap" +0xc0c7: "sah" +0xc0c8: "sae" +0xc0c9: "saeg" +0xc0ca: "saegg" +0xc0cb: "saegs" +0xc0cc: "saen" +0xc0cd: "saenj" +0xc0ce: "saenh" +0xc0cf: "saed" +0xc0d0: "sael" +0xc0d1: "saelg" +0xc0d2: "saelm" +0xc0d3: "saelb" +0xc0d4: "saels" +0xc0d5: "saelt" +0xc0d6: "saelp" +0xc0d7: "saelh" +0xc0d8: "saem" +0xc0d9: "saeb" +0xc0da: "saebs" +0xc0db: "saes" +0xc0dc: "saess" +0xc0dd: "saeng" +0xc0de: "saej" +0xc0df: "saec" +0xc0e0: "saek" +0xc0e1: "saet" +0xc0e2: "saep" +0xc0e3: "saeh" +0xc0e4: "sya" +0xc0e5: "syag" +0xc0e6: "syagg" +0xc0e7: "syags" +0xc0e8: "syan" +0xc0e9: "syanj" +0xc0ea: "syanh" +0xc0eb: "syad" +0xc0ec: "syal" +0xc0ed: "syalg" +0xc0ee: "syalm" +0xc0ef: "syalb" +0xc0f0: "syals" +0xc0f1: "syalt" +0xc0f2: "syalp" +0xc0f3: "syalh" +0xc0f4: "syam" +0xc0f5: "syab" +0xc0f6: "syabs" +0xc0f7: "syas" +0xc0f8: "syass" +0xc0f9: "syang" +0xc0fa: "syaj" +0xc0fb: "syac" +0xc0fc: "syak" +0xc0fd: "syat" +0xc0fe: "syap" +0xc0ff: "syah" +/* x0c1 */ +0xc100: "syae" +0xc101: "syaeg" +0xc102: "syaegg" +0xc103: "syaegs" +0xc104: "syaen" +0xc105: "syaenj" +0xc106: "syaenh" +0xc107: "syaed" +0xc108: "syael" +0xc109: "syaelg" +0xc10a: "syaelm" +0xc10b: "syaelb" +0xc10c: "syaels" +0xc10d: "syaelt" +0xc10e: "syaelp" +0xc10f: "syaelh" +0xc110: "syaem" +0xc111: "syaeb" +0xc112: "syaebs" +0xc113: "syaes" +0xc114: "syaess" +0xc115: "syaeng" +0xc116: "syaej" +0xc117: "syaec" +0xc118: "syaek" +0xc119: "syaet" +0xc11a: "syaep" +0xc11b: "syaeh" +0xc11c: "seo" +0xc11d: "seog" +0xc11e: "seogg" +0xc11f: "seogs" +0xc120: "seon" +0xc121: "seonj" +0xc122: "seonh" +0xc123: "seod" +0xc124: "seol" +0xc125: "seolg" +0xc126: "seolm" +0xc127: "seolb" +0xc128: "seols" +0xc129: "seolt" +0xc12a: "seolp" +0xc12b: "seolh" +0xc12c: "seom" +0xc12d: "seob" +0xc12e: "seobs" +0xc12f: "seos" +0xc130: "seoss" +0xc131: "seong" +0xc132: "seoj" +0xc133: "seoc" +0xc134: "seok" +0xc135: "seot" +0xc136: "seop" +0xc137: "seoh" +0xc138: "se" +0xc139: "seg" +0xc13a: "segg" +0xc13b: "segs" +0xc13c: "sen" +0xc13d: "senj" +0xc13e: "senh" +0xc13f: "sed" +0xc140: "sel" +0xc141: "selg" +0xc142: "selm" +0xc143: "selb" +0xc144: "sels" +0xc145: "selt" +0xc146: "selp" +0xc147: "selh" +0xc148: "sem" +0xc149: "seb" +0xc14a: "sebs" +0xc14b: "ses" +0xc14c: "sess" +0xc14d: "seng" +0xc14e: "sej" +0xc14f: "sec" +0xc150: "sek" +0xc151: "set" +0xc152: "sep" +0xc153: "seh" +0xc154: "syeo" +0xc155: "syeog" +0xc156: "syeogg" +0xc157: "syeogs" +0xc158: "syeon" +0xc159: "syeonj" +0xc15a: "syeonh" +0xc15b: "syeod" +0xc15c: "syeol" +0xc15d: "syeolg" +0xc15e: "syeolm" +0xc15f: "syeolb" +0xc160: "syeols" +0xc161: "syeolt" +0xc162: "syeolp" +0xc163: "syeolh" +0xc164: "syeom" +0xc165: "syeob" +0xc166: "syeobs" +0xc167: "syeos" +0xc168: "syeoss" +0xc169: "syeong" +0xc16a: "syeoj" +0xc16b: "syeoc" +0xc16c: "syeok" +0xc16d: "syeot" +0xc16e: "syeop" +0xc16f: "syeoh" +0xc170: "sye" +0xc171: "syeg" +0xc172: "syegg" +0xc173: "syegs" +0xc174: "syen" +0xc175: "syenj" +0xc176: "syenh" +0xc177: "syed" +0xc178: "syel" +0xc179: "syelg" +0xc17a: "syelm" +0xc17b: "syelb" +0xc17c: "syels" +0xc17d: "syelt" +0xc17e: "syelp" +0xc17f: "syelh" +0xc180: "syem" +0xc181: "syeb" +0xc182: "syebs" +0xc183: "syes" +0xc184: "syess" +0xc185: "syeng" +0xc186: "syej" +0xc187: "syec" +0xc188: "syek" +0xc189: "syet" +0xc18a: "syep" +0xc18b: "syeh" +0xc18c: "so" +0xc18d: "sog" +0xc18e: "sogg" +0xc18f: "sogs" +0xc190: "son" +0xc191: "sonj" +0xc192: "sonh" +0xc193: "sod" +0xc194: "sol" +0xc195: "solg" +0xc196: "solm" +0xc197: "solb" +0xc198: "sols" +0xc199: "solt" +0xc19a: "solp" +0xc19b: "solh" +0xc19c: "som" +0xc19d: "sob" +0xc19e: "sobs" +0xc19f: "sos" +0xc1a0: "soss" +0xc1a1: "song" +0xc1a2: "soj" +0xc1a3: "soc" +0xc1a4: "sok" +0xc1a5: "sot" +0xc1a6: "sop" +0xc1a7: "soh" +0xc1a8: "swa" +0xc1a9: "swag" +0xc1aa: "swagg" +0xc1ab: "swags" +0xc1ac: "swan" +0xc1ad: "swanj" +0xc1ae: "swanh" +0xc1af: "swad" +0xc1b0: "swal" +0xc1b1: "swalg" +0xc1b2: "swalm" +0xc1b3: "swalb" +0xc1b4: "swals" +0xc1b5: "swalt" +0xc1b6: "swalp" +0xc1b7: "swalh" +0xc1b8: "swam" +0xc1b9: "swab" +0xc1ba: "swabs" +0xc1bb: "swas" +0xc1bc: "swass" +0xc1bd: "swang" +0xc1be: "swaj" +0xc1bf: "swac" +0xc1c0: "swak" +0xc1c1: "swat" +0xc1c2: "swap" +0xc1c3: "swah" +0xc1c4: "swae" +0xc1c5: "swaeg" +0xc1c6: "swaegg" +0xc1c7: "swaegs" +0xc1c8: "swaen" +0xc1c9: "swaenj" +0xc1ca: "swaenh" +0xc1cb: "swaed" +0xc1cc: "swael" +0xc1cd: "swaelg" +0xc1ce: "swaelm" +0xc1cf: "swaelb" +0xc1d0: "swaels" +0xc1d1: "swaelt" +0xc1d2: "swaelp" +0xc1d3: "swaelh" +0xc1d4: "swaem" +0xc1d5: "swaeb" +0xc1d6: "swaebs" +0xc1d7: "swaes" +0xc1d8: "swaess" +0xc1d9: "swaeng" +0xc1da: "swaej" +0xc1db: "swaec" +0xc1dc: "swaek" +0xc1dd: "swaet" +0xc1de: "swaep" +0xc1df: "swaeh" +0xc1e0: "soe" +0xc1e1: "soeg" +0xc1e2: "soegg" +0xc1e3: "soegs" +0xc1e4: "soen" +0xc1e5: "soenj" +0xc1e6: "soenh" +0xc1e7: "soed" +0xc1e8: "soel" +0xc1e9: "soelg" +0xc1ea: "soelm" +0xc1eb: "soelb" +0xc1ec: "soels" +0xc1ed: "soelt" +0xc1ee: "soelp" +0xc1ef: "soelh" +0xc1f0: "soem" +0xc1f1: "soeb" +0xc1f2: "soebs" +0xc1f3: "soes" +0xc1f4: "soess" +0xc1f5: "soeng" +0xc1f6: "soej" +0xc1f7: "soec" +0xc1f8: "soek" +0xc1f9: "soet" +0xc1fa: "soep" +0xc1fb: "soeh" +0xc1fc: "syo" +0xc1fd: "syog" +0xc1fe: "syogg" +0xc1ff: "syogs" +/* x0c2 */ +0xc200: "syon" +0xc201: "syonj" +0xc202: "syonh" +0xc203: "syod" +0xc204: "syol" +0xc205: "syolg" +0xc206: "syolm" +0xc207: "syolb" +0xc208: "syols" +0xc209: "syolt" +0xc20a: "syolp" +0xc20b: "syolh" +0xc20c: "syom" +0xc20d: "syob" +0xc20e: "syobs" +0xc20f: "syos" +0xc210: "syoss" +0xc211: "syong" +0xc212: "syoj" +0xc213: "syoc" +0xc214: "syok" +0xc215: "syot" +0xc216: "syop" +0xc217: "syoh" +0xc218: "su" +0xc219: "sug" +0xc21a: "sugg" +0xc21b: "sugs" +0xc21c: "sun" +0xc21d: "sunj" +0xc21e: "sunh" +0xc21f: "sud" +0xc220: "sul" +0xc221: "sulg" +0xc222: "sulm" +0xc223: "sulb" +0xc224: "suls" +0xc225: "sult" +0xc226: "sulp" +0xc227: "sulh" +0xc228: "sum" +0xc229: "sub" +0xc22a: "subs" +0xc22b: "sus" +0xc22c: "suss" +0xc22d: "sung" +0xc22e: "suj" +0xc22f: "suc" +0xc230: "suk" +0xc231: "sut" +0xc232: "sup" +0xc233: "suh" +0xc234: "sweo" +0xc235: "sweog" +0xc236: "sweogg" +0xc237: "sweogs" +0xc238: "sweon" +0xc239: "sweonj" +0xc23a: "sweonh" +0xc23b: "sweod" +0xc23c: "sweol" +0xc23d: "sweolg" +0xc23e: "sweolm" +0xc23f: "sweolb" +0xc240: "sweols" +0xc241: "sweolt" +0xc242: "sweolp" +0xc243: "sweolh" +0xc244: "sweom" +0xc245: "sweob" +0xc246: "sweobs" +0xc247: "sweos" +0xc248: "sweoss" +0xc249: "sweong" +0xc24a: "sweoj" +0xc24b: "sweoc" +0xc24c: "sweok" +0xc24d: "sweot" +0xc24e: "sweop" +0xc24f: "sweoh" +0xc250: "swe" +0xc251: "sweg" +0xc252: "swegg" +0xc253: "swegs" +0xc254: "swen" +0xc255: "swenj" +0xc256: "swenh" +0xc257: "swed" +0xc258: "swel" +0xc259: "swelg" +0xc25a: "swelm" +0xc25b: "swelb" +0xc25c: "swels" +0xc25d: "swelt" +0xc25e: "swelp" +0xc25f: "swelh" +0xc260: "swem" +0xc261: "sweb" +0xc262: "swebs" +0xc263: "swes" +0xc264: "swess" +0xc265: "sweng" +0xc266: "swej" +0xc267: "swec" +0xc268: "swek" +0xc269: "swet" +0xc26a: "swep" +0xc26b: "sweh" +0xc26c: "swi" +0xc26d: "swig" +0xc26e: "swigg" +0xc26f: "swigs" +0xc270: "swin" +0xc271: "swinj" +0xc272: "swinh" +0xc273: "swid" +0xc274: "swil" +0xc275: "swilg" +0xc276: "swilm" +0xc277: "swilb" +0xc278: "swils" +0xc279: "swilt" +0xc27a: "swilp" +0xc27b: "swilh" +0xc27c: "swim" +0xc27d: "swib" +0xc27e: "swibs" +0xc27f: "swis" +0xc280: "swiss" +0xc281: "swing" +0xc282: "swij" +0xc283: "swic" +0xc284: "swik" +0xc285: "swit" +0xc286: "swip" +0xc287: "swih" +0xc288: "syu" +0xc289: "syug" +0xc28a: "syugg" +0xc28b: "syugs" +0xc28c: "syun" +0xc28d: "syunj" +0xc28e: "syunh" +0xc28f: "syud" +0xc290: "syul" +0xc291: "syulg" +0xc292: "syulm" +0xc293: "syulb" +0xc294: "syuls" +0xc295: "syult" +0xc296: "syulp" +0xc297: "syulh" +0xc298: "syum" +0xc299: "syub" +0xc29a: "syubs" +0xc29b: "syus" +0xc29c: "syuss" +0xc29d: "syung" +0xc29e: "syuj" +0xc29f: "syuc" +0xc2a0: "syuk" +0xc2a1: "syut" +0xc2a2: "syup" +0xc2a3: "syuh" +0xc2a4: "seu" +0xc2a5: "seug" +0xc2a6: "seugg" +0xc2a7: "seugs" +0xc2a8: "seun" +0xc2a9: "seunj" +0xc2aa: "seunh" +0xc2ab: "seud" +0xc2ac: "seul" +0xc2ad: "seulg" +0xc2ae: "seulm" +0xc2af: "seulb" +0xc2b0: "seuls" +0xc2b1: "seult" +0xc2b2: "seulp" +0xc2b3: "seulh" +0xc2b4: "seum" +0xc2b5: "seub" +0xc2b6: "seubs" +0xc2b7: "seus" +0xc2b8: "seuss" +0xc2b9: "seung" +0xc2ba: "seuj" +0xc2bb: "seuc" +0xc2bc: "seuk" +0xc2bd: "seut" +0xc2be: "seup" +0xc2bf: "seuh" +0xc2c0: "syi" +0xc2c1: "syig" +0xc2c2: "syigg" +0xc2c3: "syigs" +0xc2c4: "syin" +0xc2c5: "syinj" +0xc2c6: "syinh" +0xc2c7: "syid" +0xc2c8: "syil" +0xc2c9: "syilg" +0xc2ca: "syilm" +0xc2cb: "syilb" +0xc2cc: "syils" +0xc2cd: "syilt" +0xc2ce: "syilp" +0xc2cf: "syilh" +0xc2d0: "syim" +0xc2d1: "syib" +0xc2d2: "syibs" +0xc2d3: "syis" +0xc2d4: "syiss" +0xc2d5: "sying" +0xc2d6: "syij" +0xc2d7: "syic" +0xc2d8: "syik" +0xc2d9: "syit" +0xc2da: "syip" +0xc2db: "syih" +0xc2dc: "si" +0xc2dd: "sig" +0xc2de: "sigg" +0xc2df: "sigs" +0xc2e0: "sin" +0xc2e1: "sinj" +0xc2e2: "sinh" +0xc2e3: "sid" +0xc2e4: "sil" +0xc2e5: "silg" +0xc2e6: "silm" +0xc2e7: "silb" +0xc2e8: "sils" +0xc2e9: "silt" +0xc2ea: "silp" +0xc2eb: "silh" +0xc2ec: "sim" +0xc2ed: "sib" +0xc2ee: "sibs" +0xc2ef: "sis" +0xc2f0: "siss" +0xc2f1: "sing" +0xc2f2: "sij" +0xc2f3: "sic" +0xc2f4: "sik" +0xc2f5: "sit" +0xc2f6: "sip" +0xc2f7: "sih" +0xc2f8: "ssa" +0xc2f9: "ssag" +0xc2fa: "ssagg" +0xc2fb: "ssags" +0xc2fc: "ssan" +0xc2fd: "ssanj" +0xc2fe: "ssanh" +0xc2ff: "ssad" +/* x0c3 */ +0xc300: "ssal" +0xc301: "ssalg" +0xc302: "ssalm" +0xc303: "ssalb" +0xc304: "ssals" +0xc305: "ssalt" +0xc306: "ssalp" +0xc307: "ssalh" +0xc308: "ssam" +0xc309: "ssab" +0xc30a: "ssabs" +0xc30b: "ssas" +0xc30c: "ssass" +0xc30d: "ssang" +0xc30e: "ssaj" +0xc30f: "ssac" +0xc310: "ssak" +0xc311: "ssat" +0xc312: "ssap" +0xc313: "ssah" +0xc314: "ssae" +0xc315: "ssaeg" +0xc316: "ssaegg" +0xc317: "ssaegs" +0xc318: "ssaen" +0xc319: "ssaenj" +0xc31a: "ssaenh" +0xc31b: "ssaed" +0xc31c: "ssael" +0xc31d: "ssaelg" +0xc31e: "ssaelm" +0xc31f: "ssaelb" +0xc320: "ssaels" +0xc321: "ssaelt" +0xc322: "ssaelp" +0xc323: "ssaelh" +0xc324: "ssaem" +0xc325: "ssaeb" +0xc326: "ssaebs" +0xc327: "ssaes" +0xc328: "ssaess" +0xc329: "ssaeng" +0xc32a: "ssaej" +0xc32b: "ssaec" +0xc32c: "ssaek" +0xc32d: "ssaet" +0xc32e: "ssaep" +0xc32f: "ssaeh" +0xc330: "ssya" +0xc331: "ssyag" +0xc332: "ssyagg" +0xc333: "ssyags" +0xc334: "ssyan" +0xc335: "ssyanj" +0xc336: "ssyanh" +0xc337: "ssyad" +0xc338: "ssyal" +0xc339: "ssyalg" +0xc33a: "ssyalm" +0xc33b: "ssyalb" +0xc33c: "ssyals" +0xc33d: "ssyalt" +0xc33e: "ssyalp" +0xc33f: "ssyalh" +0xc340: "ssyam" +0xc341: "ssyab" +0xc342: "ssyabs" +0xc343: "ssyas" +0xc344: "ssyass" +0xc345: "ssyang" +0xc346: "ssyaj" +0xc347: "ssyac" +0xc348: "ssyak" +0xc349: "ssyat" +0xc34a: "ssyap" +0xc34b: "ssyah" +0xc34c: "ssyae" +0xc34d: "ssyaeg" +0xc34e: "ssyaegg" +0xc34f: "ssyaegs" +0xc350: "ssyaen" +0xc351: "ssyaenj" +0xc352: "ssyaenh" +0xc353: "ssyaed" +0xc354: "ssyael" +0xc355: "ssyaelg" +0xc356: "ssyaelm" +0xc357: "ssyaelb" +0xc358: "ssyaels" +0xc359: "ssyaelt" +0xc35a: "ssyaelp" +0xc35b: "ssyaelh" +0xc35c: "ssyaem" +0xc35d: "ssyaeb" +0xc35e: "ssyaebs" +0xc35f: "ssyaes" +0xc360: "ssyaess" +0xc361: "ssyaeng" +0xc362: "ssyaej" +0xc363: "ssyaec" +0xc364: "ssyaek" +0xc365: "ssyaet" +0xc366: "ssyaep" +0xc367: "ssyaeh" +0xc368: "sseo" +0xc369: "sseog" +0xc36a: "sseogg" +0xc36b: "sseogs" +0xc36c: "sseon" +0xc36d: "sseonj" +0xc36e: "sseonh" +0xc36f: "sseod" +0xc370: "sseol" +0xc371: "sseolg" +0xc372: "sseolm" +0xc373: "sseolb" +0xc374: "sseols" +0xc375: "sseolt" +0xc376: "sseolp" +0xc377: "sseolh" +0xc378: "sseom" +0xc379: "sseob" +0xc37a: "sseobs" +0xc37b: "sseos" +0xc37c: "sseoss" +0xc37d: "sseong" +0xc37e: "sseoj" +0xc37f: "sseoc" +0xc380: "sseok" +0xc381: "sseot" +0xc382: "sseop" +0xc383: "sseoh" +0xc384: "sse" +0xc385: "sseg" +0xc386: "ssegg" +0xc387: "ssegs" +0xc388: "ssen" +0xc389: "ssenj" +0xc38a: "ssenh" +0xc38b: "ssed" +0xc38c: "ssel" +0xc38d: "sselg" +0xc38e: "sselm" +0xc38f: "sselb" +0xc390: "ssels" +0xc391: "sselt" +0xc392: "sselp" +0xc393: "sselh" +0xc394: "ssem" +0xc395: "sseb" +0xc396: "ssebs" +0xc397: "sses" +0xc398: "ssess" +0xc399: "sseng" +0xc39a: "ssej" +0xc39b: "ssec" +0xc39c: "ssek" +0xc39d: "sset" +0xc39e: "ssep" +0xc39f: "sseh" +0xc3a0: "ssyeo" +0xc3a1: "ssyeog" +0xc3a2: "ssyeogg" +0xc3a3: "ssyeogs" +0xc3a4: "ssyeon" +0xc3a5: "ssyeonj" +0xc3a6: "ssyeonh" +0xc3a7: "ssyeod" +0xc3a8: "ssyeol" +0xc3a9: "ssyeolg" +0xc3aa: "ssyeolm" +0xc3ab: "ssyeolb" +0xc3ac: "ssyeols" +0xc3ad: "ssyeolt" +0xc3ae: "ssyeolp" +0xc3af: "ssyeolh" +0xc3b0: "ssyeom" +0xc3b1: "ssyeob" +0xc3b2: "ssyeobs" +0xc3b3: "ssyeos" +0xc3b4: "ssyeoss" +0xc3b5: "ssyeong" +0xc3b6: "ssyeoj" +0xc3b7: "ssyeoc" +0xc3b8: "ssyeok" +0xc3b9: "ssyeot" +0xc3ba: "ssyeop" +0xc3bb: "ssyeoh" +0xc3bc: "ssye" +0xc3bd: "ssyeg" +0xc3be: "ssyegg" +0xc3bf: "ssyegs" +0xc3c0: "ssyen" +0xc3c1: "ssyenj" +0xc3c2: "ssyenh" +0xc3c3: "ssyed" +0xc3c4: "ssyel" +0xc3c5: "ssyelg" +0xc3c6: "ssyelm" +0xc3c7: "ssyelb" +0xc3c8: "ssyels" +0xc3c9: "ssyelt" +0xc3ca: "ssyelp" +0xc3cb: "ssyelh" +0xc3cc: "ssyem" +0xc3cd: "ssyeb" +0xc3ce: "ssyebs" +0xc3cf: "ssyes" +0xc3d0: "ssyess" +0xc3d1: "ssyeng" +0xc3d2: "ssyej" +0xc3d3: "ssyec" +0xc3d4: "ssyek" +0xc3d5: "ssyet" +0xc3d6: "ssyep" +0xc3d7: "ssyeh" +0xc3d8: "sso" +0xc3d9: "ssog" +0xc3da: "ssogg" +0xc3db: "ssogs" +0xc3dc: "sson" +0xc3dd: "ssonj" +0xc3de: "ssonh" +0xc3df: "ssod" +0xc3e0: "ssol" +0xc3e1: "ssolg" +0xc3e2: "ssolm" +0xc3e3: "ssolb" +0xc3e4: "ssols" +0xc3e5: "ssolt" +0xc3e6: "ssolp" +0xc3e7: "ssolh" +0xc3e8: "ssom" +0xc3e9: "ssob" +0xc3ea: "ssobs" +0xc3eb: "ssos" +0xc3ec: "ssoss" +0xc3ed: "ssong" +0xc3ee: "ssoj" +0xc3ef: "ssoc" +0xc3f0: "ssok" +0xc3f1: "ssot" +0xc3f2: "ssop" +0xc3f3: "ssoh" +0xc3f4: "sswa" +0xc3f5: "sswag" +0xc3f6: "sswagg" +0xc3f7: "sswags" +0xc3f8: "sswan" +0xc3f9: "sswanj" +0xc3fa: "sswanh" +0xc3fb: "sswad" +0xc3fc: "sswal" +0xc3fd: "sswalg" +0xc3fe: "sswalm" +0xc3ff: "sswalb" +/* x0c4 */ +0xc400: "sswals" +0xc401: "sswalt" +0xc402: "sswalp" +0xc403: "sswalh" +0xc404: "sswam" +0xc405: "sswab" +0xc406: "sswabs" +0xc407: "sswas" +0xc408: "sswass" +0xc409: "sswang" +0xc40a: "sswaj" +0xc40b: "sswac" +0xc40c: "sswak" +0xc40d: "sswat" +0xc40e: "sswap" +0xc40f: "sswah" +0xc410: "sswae" +0xc411: "sswaeg" +0xc412: "sswaegg" +0xc413: "sswaegs" +0xc414: "sswaen" +0xc415: "sswaenj" +0xc416: "sswaenh" +0xc417: "sswaed" +0xc418: "sswael" +0xc419: "sswaelg" +0xc41a: "sswaelm" +0xc41b: "sswaelb" +0xc41c: "sswaels" +0xc41d: "sswaelt" +0xc41e: "sswaelp" +0xc41f: "sswaelh" +0xc420: "sswaem" +0xc421: "sswaeb" +0xc422: "sswaebs" +0xc423: "sswaes" +0xc424: "sswaess" +0xc425: "sswaeng" +0xc426: "sswaej" +0xc427: "sswaec" +0xc428: "sswaek" +0xc429: "sswaet" +0xc42a: "sswaep" +0xc42b: "sswaeh" +0xc42c: "ssoe" +0xc42d: "ssoeg" +0xc42e: "ssoegg" +0xc42f: "ssoegs" +0xc430: "ssoen" +0xc431: "ssoenj" +0xc432: "ssoenh" +0xc433: "ssoed" +0xc434: "ssoel" +0xc435: "ssoelg" +0xc436: "ssoelm" +0xc437: "ssoelb" +0xc438: "ssoels" +0xc439: "ssoelt" +0xc43a: "ssoelp" +0xc43b: "ssoelh" +0xc43c: "ssoem" +0xc43d: "ssoeb" +0xc43e: "ssoebs" +0xc43f: "ssoes" +0xc440: "ssoess" +0xc441: "ssoeng" +0xc442: "ssoej" +0xc443: "ssoec" +0xc444: "ssoek" +0xc445: "ssoet" +0xc446: "ssoep" +0xc447: "ssoeh" +0xc448: "ssyo" +0xc449: "ssyog" +0xc44a: "ssyogg" +0xc44b: "ssyogs" +0xc44c: "ssyon" +0xc44d: "ssyonj" +0xc44e: "ssyonh" +0xc44f: "ssyod" +0xc450: "ssyol" +0xc451: "ssyolg" +0xc452: "ssyolm" +0xc453: "ssyolb" +0xc454: "ssyols" +0xc455: "ssyolt" +0xc456: "ssyolp" +0xc457: "ssyolh" +0xc458: "ssyom" +0xc459: "ssyob" +0xc45a: "ssyobs" +0xc45b: "ssyos" +0xc45c: "ssyoss" +0xc45d: "ssyong" +0xc45e: "ssyoj" +0xc45f: "ssyoc" +0xc460: "ssyok" +0xc461: "ssyot" +0xc462: "ssyop" +0xc463: "ssyoh" +0xc464: "ssu" +0xc465: "ssug" +0xc466: "ssugg" +0xc467: "ssugs" +0xc468: "ssun" +0xc469: "ssunj" +0xc46a: "ssunh" +0xc46b: "ssud" +0xc46c: "ssul" +0xc46d: "ssulg" +0xc46e: "ssulm" +0xc46f: "ssulb" +0xc470: "ssuls" +0xc471: "ssult" +0xc472: "ssulp" +0xc473: "ssulh" +0xc474: "ssum" +0xc475: "ssub" +0xc476: "ssubs" +0xc477: "ssus" +0xc478: "ssuss" +0xc479: "ssung" +0xc47a: "ssuj" +0xc47b: "ssuc" +0xc47c: "ssuk" +0xc47d: "ssut" +0xc47e: "ssup" +0xc47f: "ssuh" +0xc480: "ssweo" +0xc481: "ssweog" +0xc482: "ssweogg" +0xc483: "ssweogs" +0xc484: "ssweon" +0xc485: "ssweonj" +0xc486: "ssweonh" +0xc487: "ssweod" +0xc488: "ssweol" +0xc489: "ssweolg" +0xc48a: "ssweolm" +0xc48b: "ssweolb" +0xc48c: "ssweols" +0xc48d: "ssweolt" +0xc48e: "ssweolp" +0xc48f: "ssweolh" +0xc490: "ssweom" +0xc491: "ssweob" +0xc492: "ssweobs" +0xc493: "ssweos" +0xc494: "ssweoss" +0xc495: "ssweong" +0xc496: "ssweoj" +0xc497: "ssweoc" +0xc498: "ssweok" +0xc499: "ssweot" +0xc49a: "ssweop" +0xc49b: "ssweoh" +0xc49c: "sswe" +0xc49d: "ssweg" +0xc49e: "sswegg" +0xc49f: "sswegs" +0xc4a0: "sswen" +0xc4a1: "sswenj" +0xc4a2: "sswenh" +0xc4a3: "sswed" +0xc4a4: "sswel" +0xc4a5: "sswelg" +0xc4a6: "sswelm" +0xc4a7: "sswelb" +0xc4a8: "sswels" +0xc4a9: "sswelt" +0xc4aa: "sswelp" +0xc4ab: "sswelh" +0xc4ac: "sswem" +0xc4ad: "ssweb" +0xc4ae: "sswebs" +0xc4af: "sswes" +0xc4b0: "sswess" +0xc4b1: "ssweng" +0xc4b2: "sswej" +0xc4b3: "sswec" +0xc4b4: "sswek" +0xc4b5: "sswet" +0xc4b6: "sswep" +0xc4b7: "ssweh" +0xc4b8: "sswi" +0xc4b9: "sswig" +0xc4ba: "sswigg" +0xc4bb: "sswigs" +0xc4bc: "sswin" +0xc4bd: "sswinj" +0xc4be: "sswinh" +0xc4bf: "sswid" +0xc4c0: "sswil" +0xc4c1: "sswilg" +0xc4c2: "sswilm" +0xc4c3: "sswilb" +0xc4c4: "sswils" +0xc4c5: "sswilt" +0xc4c6: "sswilp" +0xc4c7: "sswilh" +0xc4c8: "sswim" +0xc4c9: "sswib" +0xc4ca: "sswibs" +0xc4cb: "sswis" +0xc4cc: "sswiss" +0xc4cd: "sswing" +0xc4ce: "sswij" +0xc4cf: "sswic" +0xc4d0: "sswik" +0xc4d1: "sswit" +0xc4d2: "sswip" +0xc4d3: "sswih" +0xc4d4: "ssyu" +0xc4d5: "ssyug" +0xc4d6: "ssyugg" +0xc4d7: "ssyugs" +0xc4d8: "ssyun" +0xc4d9: "ssyunj" +0xc4da: "ssyunh" +0xc4db: "ssyud" +0xc4dc: "ssyul" +0xc4dd: "ssyulg" +0xc4de: "ssyulm" +0xc4df: "ssyulb" +0xc4e0: "ssyuls" +0xc4e1: "ssyult" +0xc4e2: "ssyulp" +0xc4e3: "ssyulh" +0xc4e4: "ssyum" +0xc4e5: "ssyub" +0xc4e6: "ssyubs" +0xc4e7: "ssyus" +0xc4e8: "ssyuss" +0xc4e9: "ssyung" +0xc4ea: "ssyuj" +0xc4eb: "ssyuc" +0xc4ec: "ssyuk" +0xc4ed: "ssyut" +0xc4ee: "ssyup" +0xc4ef: "ssyuh" +0xc4f0: "sseu" +0xc4f1: "sseug" +0xc4f2: "sseugg" +0xc4f3: "sseugs" +0xc4f4: "sseun" +0xc4f5: "sseunj" +0xc4f6: "sseunh" +0xc4f7: "sseud" +0xc4f8: "sseul" +0xc4f9: "sseulg" +0xc4fa: "sseulm" +0xc4fb: "sseulb" +0xc4fc: "sseuls" +0xc4fd: "sseult" +0xc4fe: "sseulp" +0xc4ff: "sseulh" +/* x0c5 */ +0xc500: "sseum" +0xc501: "sseub" +0xc502: "sseubs" +0xc503: "sseus" +0xc504: "sseuss" +0xc505: "sseung" +0xc506: "sseuj" +0xc507: "sseuc" +0xc508: "sseuk" +0xc509: "sseut" +0xc50a: "sseup" +0xc50b: "sseuh" +0xc50c: "ssyi" +0xc50d: "ssyig" +0xc50e: "ssyigg" +0xc50f: "ssyigs" +0xc510: "ssyin" +0xc511: "ssyinj" +0xc512: "ssyinh" +0xc513: "ssyid" +0xc514: "ssyil" +0xc515: "ssyilg" +0xc516: "ssyilm" +0xc517: "ssyilb" +0xc518: "ssyils" +0xc519: "ssyilt" +0xc51a: "ssyilp" +0xc51b: "ssyilh" +0xc51c: "ssyim" +0xc51d: "ssyib" +0xc51e: "ssyibs" +0xc51f: "ssyis" +0xc520: "ssyiss" +0xc521: "ssying" +0xc522: "ssyij" +0xc523: "ssyic" +0xc524: "ssyik" +0xc525: "ssyit" +0xc526: "ssyip" +0xc527: "ssyih" +0xc528: "ssi" +0xc529: "ssig" +0xc52a: "ssigg" +0xc52b: "ssigs" +0xc52c: "ssin" +0xc52d: "ssinj" +0xc52e: "ssinh" +0xc52f: "ssid" +0xc530: "ssil" +0xc531: "ssilg" +0xc532: "ssilm" +0xc533: "ssilb" +0xc534: "ssils" +0xc535: "ssilt" +0xc536: "ssilp" +0xc537: "ssilh" +0xc538: "ssim" +0xc539: "ssib" +0xc53a: "ssibs" +0xc53b: "ssis" +0xc53c: "ssiss" +0xc53d: "ssing" +0xc53e: "ssij" +0xc53f: "ssic" +0xc540: "ssik" +0xc541: "ssit" +0xc542: "ssip" +0xc543: "ssih" +0xc544: "a" +0xc545: "ag" +0xc546: "agg" +0xc547: "ags" +0xc548: "an" +0xc549: "anj" +0xc54a: "anh" +0xc54b: "ad" +0xc54c: "al" +0xc54d: "alg" +0xc54e: "alm" +0xc54f: "alb" +0xc550: "als" +0xc551: "alt" +0xc552: "alp" +0xc553: "alh" +0xc554: "am" +0xc555: "ab" +0xc556: "abs" +0xc557: "as" +0xc558: "ass" +0xc559: "ang" +0xc55a: "aj" +0xc55b: "ac" +0xc55c: "ak" +0xc55d: "at" +0xc55e: "ap" +0xc55f: "ah" +0xc560: "ae" +0xc561: "aeg" +0xc562: "aegg" +0xc563: "aegs" +0xc564: "aen" +0xc565: "aenj" +0xc566: "aenh" +0xc567: "aed" +0xc568: "ael" +0xc569: "aelg" +0xc56a: "aelm" +0xc56b: "aelb" +0xc56c: "aels" +0xc56d: "aelt" +0xc56e: "aelp" +0xc56f: "aelh" +0xc570: "aem" +0xc571: "aeb" +0xc572: "aebs" +0xc573: "aes" +0xc574: "aess" +0xc575: "aeng" +0xc576: "aej" +0xc577: "aec" +0xc578: "aek" +0xc579: "aet" +0xc57a: "aep" +0xc57b: "aeh" +0xc57c: "ya" +0xc57d: "yag" +0xc57e: "yagg" +0xc57f: "yags" +0xc580: "yan" +0xc581: "yanj" +0xc582: "yanh" +0xc583: "yad" +0xc584: "yal" +0xc585: "yalg" +0xc586: "yalm" +0xc587: "yalb" +0xc588: "yals" +0xc589: "yalt" +0xc58a: "yalp" +0xc58b: "yalh" +0xc58c: "yam" +0xc58d: "yab" +0xc58e: "yabs" +0xc58f: "yas" +0xc590: "yass" +0xc591: "yang" +0xc592: "yaj" +0xc593: "yac" +0xc594: "yak" +0xc595: "yat" +0xc596: "yap" +0xc597: "yah" +0xc598: "yae" +0xc599: "yaeg" +0xc59a: "yaegg" +0xc59b: "yaegs" +0xc59c: "yaen" +0xc59d: "yaenj" +0xc59e: "yaenh" +0xc59f: "yaed" +0xc5a0: "yael" +0xc5a1: "yaelg" +0xc5a2: "yaelm" +0xc5a3: "yaelb" +0xc5a4: "yaels" +0xc5a5: "yaelt" +0xc5a6: "yaelp" +0xc5a7: "yaelh" +0xc5a8: "yaem" +0xc5a9: "yaeb" +0xc5aa: "yaebs" +0xc5ab: "yaes" +0xc5ac: "yaess" +0xc5ad: "yaeng" +0xc5ae: "yaej" +0xc5af: "yaec" +0xc5b0: "yaek" +0xc5b1: "yaet" +0xc5b2: "yaep" +0xc5b3: "yaeh" +0xc5b4: "eo" +0xc5b5: "eog" +0xc5b6: "eogg" +0xc5b7: "eogs" +0xc5b8: "eon" +0xc5b9: "eonj" +0xc5ba: "eonh" +0xc5bb: "eod" +0xc5bc: "eol" +0xc5bd: "eolg" +0xc5be: "eolm" +0xc5bf: "eolb" +0xc5c0: "eols" +0xc5c1: "eolt" +0xc5c2: "eolp" +0xc5c3: "eolh" +0xc5c4: "eom" +0xc5c5: "eob" +0xc5c6: "eobs" +0xc5c7: "eos" +0xc5c8: "eoss" +0xc5c9: "eong" +0xc5ca: "eoj" +0xc5cb: "eoc" +0xc5cc: "eok" +0xc5cd: "eot" +0xc5ce: "eop" +0xc5cf: "eoh" +0xc5d0: "e" +0xc5d1: "eg" +0xc5d2: "egg" +0xc5d3: "egs" +0xc5d4: "en" +0xc5d5: "enj" +0xc5d6: "enh" +0xc5d7: "ed" +0xc5d8: "el" +0xc5d9: "elg" +0xc5da: "elm" +0xc5db: "elb" +0xc5dc: "els" +0xc5dd: "elt" +0xc5de: "elp" +0xc5df: "elh" +0xc5e0: "em" +0xc5e1: "eb" +0xc5e2: "ebs" +0xc5e3: "es" +0xc5e4: "ess" +0xc5e5: "eng" +0xc5e6: "ej" +0xc5e7: "ec" +0xc5e8: "ek" +0xc5e9: "et" +0xc5ea: "ep" +0xc5eb: "eh" +0xc5ec: "yeo" +0xc5ed: "yeog" +0xc5ee: "yeogg" +0xc5ef: "yeogs" +0xc5f0: "yeon" +0xc5f1: "yeonj" +0xc5f2: "yeonh" +0xc5f3: "yeod" +0xc5f4: "yeol" +0xc5f5: "yeolg" +0xc5f6: "yeolm" +0xc5f7: "yeolb" +0xc5f8: "yeols" +0xc5f9: "yeolt" +0xc5fa: "yeolp" +0xc5fb: "yeolh" +0xc5fc: "yeom" +0xc5fd: "yeob" +0xc5fe: "yeobs" +0xc5ff: "yeos" +/* x0c6 */ +0xc600: "yeoss" +0xc601: "yeong" +0xc602: "yeoj" +0xc603: "yeoc" +0xc604: "yeok" +0xc605: "yeot" +0xc606: "yeop" +0xc607: "yeoh" +0xc608: "ye" +0xc609: "yeg" +0xc60a: "yegg" +0xc60b: "yegs" +0xc60c: "yen" +0xc60d: "yenj" +0xc60e: "yenh" +0xc60f: "yed" +0xc610: "yel" +0xc611: "yelg" +0xc612: "yelm" +0xc613: "yelb" +0xc614: "yels" +0xc615: "yelt" +0xc616: "yelp" +0xc617: "yelh" +0xc618: "yem" +0xc619: "yeb" +0xc61a: "yebs" +0xc61b: "yes" +0xc61c: "yess" +0xc61d: "yeng" +0xc61e: "yej" +0xc61f: "yec" +0xc620: "yek" +0xc621: "yet" +0xc622: "yep" +0xc623: "yeh" +0xc624: "o" +0xc625: "og" +0xc626: "ogg" +0xc627: "ogs" +0xc628: "on" +0xc629: "onj" +0xc62a: "onh" +0xc62b: "od" +0xc62c: "ol" +0xc62d: "olg" +0xc62e: "olm" +0xc62f: "olb" +0xc630: "ols" +0xc631: "olt" +0xc632: "olp" +0xc633: "olh" +0xc634: "om" +0xc635: "ob" +0xc636: "obs" +0xc637: "os" +0xc638: "oss" +0xc639: "ong" +0xc63a: "oj" +0xc63b: "oc" +0xc63c: "ok" +0xc63d: "ot" +0xc63e: "op" +0xc63f: "oh" +0xc640: "wa" +0xc641: "wag" +0xc642: "wagg" +0xc643: "wags" +0xc644: "wan" +0xc645: "wanj" +0xc646: "wanh" +0xc647: "wad" +0xc648: "wal" +0xc649: "walg" +0xc64a: "walm" +0xc64b: "walb" +0xc64c: "wals" +0xc64d: "walt" +0xc64e: "walp" +0xc64f: "walh" +0xc650: "wam" +0xc651: "wab" +0xc652: "wabs" +0xc653: "was" +0xc654: "wass" +0xc655: "wang" +0xc656: "waj" +0xc657: "wac" +0xc658: "wak" +0xc659: "wat" +0xc65a: "wap" +0xc65b: "wah" +0xc65c: "wae" +0xc65d: "waeg" +0xc65e: "waegg" +0xc65f: "waegs" +0xc660: "waen" +0xc661: "waenj" +0xc662: "waenh" +0xc663: "waed" +0xc664: "wael" +0xc665: "waelg" +0xc666: "waelm" +0xc667: "waelb" +0xc668: "waels" +0xc669: "waelt" +0xc66a: "waelp" +0xc66b: "waelh" +0xc66c: "waem" +0xc66d: "waeb" +0xc66e: "waebs" +0xc66f: "waes" +0xc670: "waess" +0xc671: "waeng" +0xc672: "waej" +0xc673: "waec" +0xc674: "waek" +0xc675: "waet" +0xc676: "waep" +0xc677: "waeh" +0xc678: "oe" +0xc679: "oeg" +0xc67a: "oegg" +0xc67b: "oegs" +0xc67c: "oen" +0xc67d: "oenj" +0xc67e: "oenh" +0xc67f: "oed" +0xc680: "oel" +0xc681: "oelg" +0xc682: "oelm" +0xc683: "oelb" +0xc684: "oels" +0xc685: "oelt" +0xc686: "oelp" +0xc687: "oelh" +0xc688: "oem" +0xc689: "oeb" +0xc68a: "oebs" +0xc68b: "oes" +0xc68c: "oess" +0xc68d: "oeng" +0xc68e: "oej" +0xc68f: "oec" +0xc690: "oek" +0xc691: "oet" +0xc692: "oep" +0xc693: "oeh" +0xc694: "yo" +0xc695: "yog" +0xc696: "yogg" +0xc697: "yogs" +0xc698: "yon" +0xc699: "yonj" +0xc69a: "yonh" +0xc69b: "yod" +0xc69c: "yol" +0xc69d: "yolg" +0xc69e: "yolm" +0xc69f: "yolb" +0xc6a0: "yols" +0xc6a1: "yolt" +0xc6a2: "yolp" +0xc6a3: "yolh" +0xc6a4: "yom" +0xc6a5: "yob" +0xc6a6: "yobs" +0xc6a7: "yos" +0xc6a8: "yoss" +0xc6a9: "yong" +0xc6aa: "yoj" +0xc6ab: "yoc" +0xc6ac: "yok" +0xc6ad: "yot" +0xc6ae: "yop" +0xc6af: "yoh" +0xc6b0: "u" +0xc6b1: "ug" +0xc6b2: "ugg" +0xc6b3: "ugs" +0xc6b4: "un" +0xc6b5: "unj" +0xc6b6: "unh" +0xc6b7: "ud" +0xc6b8: "ul" +0xc6b9: "ulg" +0xc6ba: "ulm" +0xc6bb: "ulb" +0xc6bc: "uls" +0xc6bd: "ult" +0xc6be: "ulp" +0xc6bf: "ulh" +0xc6c0: "um" +0xc6c1: "ub" +0xc6c2: "ubs" +0xc6c3: "us" +0xc6c4: "uss" +0xc6c5: "ung" +0xc6c6: "uj" +0xc6c7: "uc" +0xc6c8: "uk" +0xc6c9: "ut" +0xc6ca: "up" +0xc6cb: "uh" +0xc6cc: "weo" +0xc6cd: "weog" +0xc6ce: "weogg" +0xc6cf: "weogs" +0xc6d0: "weon" +0xc6d1: "weonj" +0xc6d2: "weonh" +0xc6d3: "weod" +0xc6d4: "weol" +0xc6d5: "weolg" +0xc6d6: "weolm" +0xc6d7: "weolb" +0xc6d8: "weols" +0xc6d9: "weolt" +0xc6da: "weolp" +0xc6db: "weolh" +0xc6dc: "weom" +0xc6dd: "weob" +0xc6de: "weobs" +0xc6df: "weos" +0xc6e0: "weoss" +0xc6e1: "weong" +0xc6e2: "weoj" +0xc6e3: "weoc" +0xc6e4: "weok" +0xc6e5: "weot" +0xc6e6: "weop" +0xc6e7: "weoh" +0xc6e8: "we" +0xc6e9: "weg" +0xc6ea: "wegg" +0xc6eb: "wegs" +0xc6ec: "wen" +0xc6ed: "wenj" +0xc6ee: "wenh" +0xc6ef: "wed" +0xc6f0: "wel" +0xc6f1: "welg" +0xc6f2: "welm" +0xc6f3: "welb" +0xc6f4: "wels" +0xc6f5: "welt" +0xc6f6: "welp" +0xc6f7: "welh" +0xc6f8: "wem" +0xc6f9: "web" +0xc6fa: "webs" +0xc6fb: "wes" +0xc6fc: "wess" +0xc6fd: "weng" +0xc6fe: "wej" +0xc6ff: "wec" +/* x0c7 */ +0xc700: "wek" +0xc701: "wet" +0xc702: "wep" +0xc703: "weh" +0xc704: "wi" +0xc705: "wig" +0xc706: "wigg" +0xc707: "wigs" +0xc708: "win" +0xc709: "winj" +0xc70a: "winh" +0xc70b: "wid" +0xc70c: "wil" +0xc70d: "wilg" +0xc70e: "wilm" +0xc70f: "wilb" +0xc710: "wils" +0xc711: "wilt" +0xc712: "wilp" +0xc713: "wilh" +0xc714: "wim" +0xc715: "wib" +0xc716: "wibs" +0xc717: "wis" +0xc718: "wiss" +0xc719: "wing" +0xc71a: "wij" +0xc71b: "wic" +0xc71c: "wik" +0xc71d: "wit" +0xc71e: "wip" +0xc71f: "wih" +0xc720: "yu" +0xc721: "yug" +0xc722: "yugg" +0xc723: "yugs" +0xc724: "yun" +0xc725: "yunj" +0xc726: "yunh" +0xc727: "yud" +0xc728: "yul" +0xc729: "yulg" +0xc72a: "yulm" +0xc72b: "yulb" +0xc72c: "yuls" +0xc72d: "yult" +0xc72e: "yulp" +0xc72f: "yulh" +0xc730: "yum" +0xc731: "yub" +0xc732: "yubs" +0xc733: "yus" +0xc734: "yuss" +0xc735: "yung" +0xc736: "yuj" +0xc737: "yuc" +0xc738: "yuk" +0xc739: "yut" +0xc73a: "yup" +0xc73b: "yuh" +0xc73c: "eu" +0xc73d: "eug" +0xc73e: "eugg" +0xc73f: "eugs" +0xc740: "eun" +0xc741: "eunj" +0xc742: "eunh" +0xc743: "eud" +0xc744: "eul" +0xc745: "eulg" +0xc746: "eulm" +0xc747: "eulb" +0xc748: "euls" +0xc749: "eult" +0xc74a: "eulp" +0xc74b: "eulh" +0xc74c: "eum" +0xc74d: "eub" +0xc74e: "eubs" +0xc74f: "eus" +0xc750: "euss" +0xc751: "eung" +0xc752: "euj" +0xc753: "euc" +0xc754: "euk" +0xc755: "eut" +0xc756: "eup" +0xc757: "euh" +0xc758: "yi" +0xc759: "yig" +0xc75a: "yigg" +0xc75b: "yigs" +0xc75c: "yin" +0xc75d: "yinj" +0xc75e: "yinh" +0xc75f: "yid" +0xc760: "yil" +0xc761: "yilg" +0xc762: "yilm" +0xc763: "yilb" +0xc764: "yils" +0xc765: "yilt" +0xc766: "yilp" +0xc767: "yilh" +0xc768: "yim" +0xc769: "yib" +0xc76a: "yibs" +0xc76b: "yis" +0xc76c: "yiss" +0xc76d: "ying" +0xc76e: "yij" +0xc76f: "yic" +0xc770: "yik" +0xc771: "yit" +0xc772: "yip" +0xc773: "yih" +0xc774: "i" +0xc775: "ig" +0xc776: "igg" +0xc777: "igs" +0xc778: "in" +0xc779: "inj" +0xc77a: "inh" +0xc77b: "id" +0xc77c: "il" +0xc77d: "ilg" +0xc77e: "ilm" +0xc77f: "ilb" +0xc780: "ils" +0xc781: "ilt" +0xc782: "ilp" +0xc783: "ilh" +0xc784: "im" +0xc785: "ib" +0xc786: "ibs" +0xc787: "is" +0xc788: "iss" +0xc789: "ing" +0xc78a: "ij" +0xc78b: "ic" +0xc78c: "ik" +0xc78d: "it" +0xc78e: "ip" +0xc78f: "ih" +0xc790: "ja" +0xc791: "jag" +0xc792: "jagg" +0xc793: "jags" +0xc794: "jan" +0xc795: "janj" +0xc796: "janh" +0xc797: "jad" +0xc798: "jal" +0xc799: "jalg" +0xc79a: "jalm" +0xc79b: "jalb" +0xc79c: "jals" +0xc79d: "jalt" +0xc79e: "jalp" +0xc79f: "jalh" +0xc7a0: "jam" +0xc7a1: "jab" +0xc7a2: "jabs" +0xc7a3: "jas" +0xc7a4: "jass" +0xc7a5: "jang" +0xc7a6: "jaj" +0xc7a7: "jac" +0xc7a8: "jak" +0xc7a9: "jat" +0xc7aa: "jap" +0xc7ab: "jah" +0xc7ac: "jae" +0xc7ad: "jaeg" +0xc7ae: "jaegg" +0xc7af: "jaegs" +0xc7b0: "jaen" +0xc7b1: "jaenj" +0xc7b2: "jaenh" +0xc7b3: "jaed" +0xc7b4: "jael" +0xc7b5: "jaelg" +0xc7b6: "jaelm" +0xc7b7: "jaelb" +0xc7b8: "jaels" +0xc7b9: "jaelt" +0xc7ba: "jaelp" +0xc7bb: "jaelh" +0xc7bc: "jaem" +0xc7bd: "jaeb" +0xc7be: "jaebs" +0xc7bf: "jaes" +0xc7c0: "jaess" +0xc7c1: "jaeng" +0xc7c2: "jaej" +0xc7c3: "jaec" +0xc7c4: "jaek" +0xc7c5: "jaet" +0xc7c6: "jaep" +0xc7c7: "jaeh" +0xc7c8: "jya" +0xc7c9: "jyag" +0xc7ca: "jyagg" +0xc7cb: "jyags" +0xc7cc: "jyan" +0xc7cd: "jyanj" +0xc7ce: "jyanh" +0xc7cf: "jyad" +0xc7d0: "jyal" +0xc7d1: "jyalg" +0xc7d2: "jyalm" +0xc7d3: "jyalb" +0xc7d4: "jyals" +0xc7d5: "jyalt" +0xc7d6: "jyalp" +0xc7d7: "jyalh" +0xc7d8: "jyam" +0xc7d9: "jyab" +0xc7da: "jyabs" +0xc7db: "jyas" +0xc7dc: "jyass" +0xc7dd: "jyang" +0xc7de: "jyaj" +0xc7df: "jyac" +0xc7e0: "jyak" +0xc7e1: "jyat" +0xc7e2: "jyap" +0xc7e3: "jyah" +0xc7e4: "jyae" +0xc7e5: "jyaeg" +0xc7e6: "jyaegg" +0xc7e7: "jyaegs" +0xc7e8: "jyaen" +0xc7e9: "jyaenj" +0xc7ea: "jyaenh" +0xc7eb: "jyaed" +0xc7ec: "jyael" +0xc7ed: "jyaelg" +0xc7ee: "jyaelm" +0xc7ef: "jyaelb" +0xc7f0: "jyaels" +0xc7f1: "jyaelt" +0xc7f2: "jyaelp" +0xc7f3: "jyaelh" +0xc7f4: "jyaem" +0xc7f5: "jyaeb" +0xc7f6: "jyaebs" +0xc7f7: "jyaes" +0xc7f8: "jyaess" +0xc7f9: "jyaeng" +0xc7fa: "jyaej" +0xc7fb: "jyaec" +0xc7fc: "jyaek" +0xc7fd: "jyaet" +0xc7fe: "jyaep" +0xc7ff: "jyaeh" +/* x0c8 */ +0xc800: "jeo" +0xc801: "jeog" +0xc802: "jeogg" +0xc803: "jeogs" +0xc804: "jeon" +0xc805: "jeonj" +0xc806: "jeonh" +0xc807: "jeod" +0xc808: "jeol" +0xc809: "jeolg" +0xc80a: "jeolm" +0xc80b: "jeolb" +0xc80c: "jeols" +0xc80d: "jeolt" +0xc80e: "jeolp" +0xc80f: "jeolh" +0xc810: "jeom" +0xc811: "jeob" +0xc812: "jeobs" +0xc813: "jeos" +0xc814: "jeoss" +0xc815: "jeong" +0xc816: "jeoj" +0xc817: "jeoc" +0xc818: "jeok" +0xc819: "jeot" +0xc81a: "jeop" +0xc81b: "jeoh" +0xc81c: "je" +0xc81d: "jeg" +0xc81e: "jegg" +0xc81f: "jegs" +0xc820: "jen" +0xc821: "jenj" +0xc822: "jenh" +0xc823: "jed" +0xc824: "jel" +0xc825: "jelg" +0xc826: "jelm" +0xc827: "jelb" +0xc828: "jels" +0xc829: "jelt" +0xc82a: "jelp" +0xc82b: "jelh" +0xc82c: "jem" +0xc82d: "jeb" +0xc82e: "jebs" +0xc82f: "jes" +0xc830: "jess" +0xc831: "jeng" +0xc832: "jej" +0xc833: "jec" +0xc834: "jek" +0xc835: "jet" +0xc836: "jep" +0xc837: "jeh" +0xc838: "jyeo" +0xc839: "jyeog" +0xc83a: "jyeogg" +0xc83b: "jyeogs" +0xc83c: "jyeon" +0xc83d: "jyeonj" +0xc83e: "jyeonh" +0xc83f: "jyeod" +0xc840: "jyeol" +0xc841: "jyeolg" +0xc842: "jyeolm" +0xc843: "jyeolb" +0xc844: "jyeols" +0xc845: "jyeolt" +0xc846: "jyeolp" +0xc847: "jyeolh" +0xc848: "jyeom" +0xc849: "jyeob" +0xc84a: "jyeobs" +0xc84b: "jyeos" +0xc84c: "jyeoss" +0xc84d: "jyeong" +0xc84e: "jyeoj" +0xc84f: "jyeoc" +0xc850: "jyeok" +0xc851: "jyeot" +0xc852: "jyeop" +0xc853: "jyeoh" +0xc854: "jye" +0xc855: "jyeg" +0xc856: "jyegg" +0xc857: "jyegs" +0xc858: "jyen" +0xc859: "jyenj" +0xc85a: "jyenh" +0xc85b: "jyed" +0xc85c: "jyel" +0xc85d: "jyelg" +0xc85e: "jyelm" +0xc85f: "jyelb" +0xc860: "jyels" +0xc861: "jyelt" +0xc862: "jyelp" +0xc863: "jyelh" +0xc864: "jyem" +0xc865: "jyeb" +0xc866: "jyebs" +0xc867: "jyes" +0xc868: "jyess" +0xc869: "jyeng" +0xc86a: "jyej" +0xc86b: "jyec" +0xc86c: "jyek" +0xc86d: "jyet" +0xc86e: "jyep" +0xc86f: "jyeh" +0xc870: "jo" +0xc871: "jog" +0xc872: "jogg" +0xc873: "jogs" +0xc874: "jon" +0xc875: "jonj" +0xc876: "jonh" +0xc877: "jod" +0xc878: "jol" +0xc879: "jolg" +0xc87a: "jolm" +0xc87b: "jolb" +0xc87c: "jols" +0xc87d: "jolt" +0xc87e: "jolp" +0xc87f: "jolh" +0xc880: "jom" +0xc881: "job" +0xc882: "jobs" +0xc883: "jos" +0xc884: "joss" +0xc885: "jong" +0xc886: "joj" +0xc887: "joc" +0xc888: "jok" +0xc889: "jot" +0xc88a: "jop" +0xc88b: "joh" +0xc88c: "jwa" +0xc88d: "jwag" +0xc88e: "jwagg" +0xc88f: "jwags" +0xc890: "jwan" +0xc891: "jwanj" +0xc892: "jwanh" +0xc893: "jwad" +0xc894: "jwal" +0xc895: "jwalg" +0xc896: "jwalm" +0xc897: "jwalb" +0xc898: "jwals" +0xc899: "jwalt" +0xc89a: "jwalp" +0xc89b: "jwalh" +0xc89c: "jwam" +0xc89d: "jwab" +0xc89e: "jwabs" +0xc89f: "jwas" +0xc8a0: "jwass" +0xc8a1: "jwang" +0xc8a2: "jwaj" +0xc8a3: "jwac" +0xc8a4: "jwak" +0xc8a5: "jwat" +0xc8a6: "jwap" +0xc8a7: "jwah" +0xc8a8: "jwae" +0xc8a9: "jwaeg" +0xc8aa: "jwaegg" +0xc8ab: "jwaegs" +0xc8ac: "jwaen" +0xc8ad: "jwaenj" +0xc8ae: "jwaenh" +0xc8af: "jwaed" +0xc8b0: "jwael" +0xc8b1: "jwaelg" +0xc8b2: "jwaelm" +0xc8b3: "jwaelb" +0xc8b4: "jwaels" +0xc8b5: "jwaelt" +0xc8b6: "jwaelp" +0xc8b7: "jwaelh" +0xc8b8: "jwaem" +0xc8b9: "jwaeb" +0xc8ba: "jwaebs" +0xc8bb: "jwaes" +0xc8bc: "jwaess" +0xc8bd: "jwaeng" +0xc8be: "jwaej" +0xc8bf: "jwaec" +0xc8c0: "jwaek" +0xc8c1: "jwaet" +0xc8c2: "jwaep" +0xc8c3: "jwaeh" +0xc8c4: "joe" +0xc8c5: "joeg" +0xc8c6: "joegg" +0xc8c7: "joegs" +0xc8c8: "joen" +0xc8c9: "joenj" +0xc8ca: "joenh" +0xc8cb: "joed" +0xc8cc: "joel" +0xc8cd: "joelg" +0xc8ce: "joelm" +0xc8cf: "joelb" +0xc8d0: "joels" +0xc8d1: "joelt" +0xc8d2: "joelp" +0xc8d3: "joelh" +0xc8d4: "joem" +0xc8d5: "joeb" +0xc8d6: "joebs" +0xc8d7: "joes" +0xc8d8: "joess" +0xc8d9: "joeng" +0xc8da: "joej" +0xc8db: "joec" +0xc8dc: "joek" +0xc8dd: "joet" +0xc8de: "joep" +0xc8df: "joeh" +0xc8e0: "jyo" +0xc8e1: "jyog" +0xc8e2: "jyogg" +0xc8e3: "jyogs" +0xc8e4: "jyon" +0xc8e5: "jyonj" +0xc8e6: "jyonh" +0xc8e7: "jyod" +0xc8e8: "jyol" +0xc8e9: "jyolg" +0xc8ea: "jyolm" +0xc8eb: "jyolb" +0xc8ec: "jyols" +0xc8ed: "jyolt" +0xc8ee: "jyolp" +0xc8ef: "jyolh" +0xc8f0: "jyom" +0xc8f1: "jyob" +0xc8f2: "jyobs" +0xc8f3: "jyos" +0xc8f4: "jyoss" +0xc8f5: "jyong" +0xc8f6: "jyoj" +0xc8f7: "jyoc" +0xc8f8: "jyok" +0xc8f9: "jyot" +0xc8fa: "jyop" +0xc8fb: "jyoh" +0xc8fc: "ju" +0xc8fd: "jug" +0xc8fe: "jugg" +0xc8ff: "jugs" +/* x0c9 */ +0xc900: "jun" +0xc901: "junj" +0xc902: "junh" +0xc903: "jud" +0xc904: "jul" +0xc905: "julg" +0xc906: "julm" +0xc907: "julb" +0xc908: "juls" +0xc909: "jult" +0xc90a: "julp" +0xc90b: "julh" +0xc90c: "jum" +0xc90d: "jub" +0xc90e: "jubs" +0xc90f: "jus" +0xc910: "juss" +0xc911: "jung" +0xc912: "juj" +0xc913: "juc" +0xc914: "juk" +0xc915: "jut" +0xc916: "jup" +0xc917: "juh" +0xc918: "jweo" +0xc919: "jweog" +0xc91a: "jweogg" +0xc91b: "jweogs" +0xc91c: "jweon" +0xc91d: "jweonj" +0xc91e: "jweonh" +0xc91f: "jweod" +0xc920: "jweol" +0xc921: "jweolg" +0xc922: "jweolm" +0xc923: "jweolb" +0xc924: "jweols" +0xc925: "jweolt" +0xc926: "jweolp" +0xc927: "jweolh" +0xc928: "jweom" +0xc929: "jweob" +0xc92a: "jweobs" +0xc92b: "jweos" +0xc92c: "jweoss" +0xc92d: "jweong" +0xc92e: "jweoj" +0xc92f: "jweoc" +0xc930: "jweok" +0xc931: "jweot" +0xc932: "jweop" +0xc933: "jweoh" +0xc934: "jwe" +0xc935: "jweg" +0xc936: "jwegg" +0xc937: "jwegs" +0xc938: "jwen" +0xc939: "jwenj" +0xc93a: "jwenh" +0xc93b: "jwed" +0xc93c: "jwel" +0xc93d: "jwelg" +0xc93e: "jwelm" +0xc93f: "jwelb" +0xc940: "jwels" +0xc941: "jwelt" +0xc942: "jwelp" +0xc943: "jwelh" +0xc944: "jwem" +0xc945: "jweb" +0xc946: "jwebs" +0xc947: "jwes" +0xc948: "jwess" +0xc949: "jweng" +0xc94a: "jwej" +0xc94b: "jwec" +0xc94c: "jwek" +0xc94d: "jwet" +0xc94e: "jwep" +0xc94f: "jweh" +0xc950: "jwi" +0xc951: "jwig" +0xc952: "jwigg" +0xc953: "jwigs" +0xc954: "jwin" +0xc955: "jwinj" +0xc956: "jwinh" +0xc957: "jwid" +0xc958: "jwil" +0xc959: "jwilg" +0xc95a: "jwilm" +0xc95b: "jwilb" +0xc95c: "jwils" +0xc95d: "jwilt" +0xc95e: "jwilp" +0xc95f: "jwilh" +0xc960: "jwim" +0xc961: "jwib" +0xc962: "jwibs" +0xc963: "jwis" +0xc964: "jwiss" +0xc965: "jwing" +0xc966: "jwij" +0xc967: "jwic" +0xc968: "jwik" +0xc969: "jwit" +0xc96a: "jwip" +0xc96b: "jwih" +0xc96c: "jyu" +0xc96d: "jyug" +0xc96e: "jyugg" +0xc96f: "jyugs" +0xc970: "jyun" +0xc971: "jyunj" +0xc972: "jyunh" +0xc973: "jyud" +0xc974: "jyul" +0xc975: "jyulg" +0xc976: "jyulm" +0xc977: "jyulb" +0xc978: "jyuls" +0xc979: "jyult" +0xc97a: "jyulp" +0xc97b: "jyulh" +0xc97c: "jyum" +0xc97d: "jyub" +0xc97e: "jyubs" +0xc97f: "jyus" +0xc980: "jyuss" +0xc981: "jyung" +0xc982: "jyuj" +0xc983: "jyuc" +0xc984: "jyuk" +0xc985: "jyut" +0xc986: "jyup" +0xc987: "jyuh" +0xc988: "jeu" +0xc989: "jeug" +0xc98a: "jeugg" +0xc98b: "jeugs" +0xc98c: "jeun" +0xc98d: "jeunj" +0xc98e: "jeunh" +0xc98f: "jeud" +0xc990: "jeul" +0xc991: "jeulg" +0xc992: "jeulm" +0xc993: "jeulb" +0xc994: "jeuls" +0xc995: "jeult" +0xc996: "jeulp" +0xc997: "jeulh" +0xc998: "jeum" +0xc999: "jeub" +0xc99a: "jeubs" +0xc99b: "jeus" +0xc99c: "jeuss" +0xc99d: "jeung" +0xc99e: "jeuj" +0xc99f: "jeuc" +0xc9a0: "jeuk" +0xc9a1: "jeut" +0xc9a2: "jeup" +0xc9a3: "jeuh" +0xc9a4: "jyi" +0xc9a5: "jyig" +0xc9a6: "jyigg" +0xc9a7: "jyigs" +0xc9a8: "jyin" +0xc9a9: "jyinj" +0xc9aa: "jyinh" +0xc9ab: "jyid" +0xc9ac: "jyil" +0xc9ad: "jyilg" +0xc9ae: "jyilm" +0xc9af: "jyilb" +0xc9b0: "jyils" +0xc9b1: "jyilt" +0xc9b2: "jyilp" +0xc9b3: "jyilh" +0xc9b4: "jyim" +0xc9b5: "jyib" +0xc9b6: "jyibs" +0xc9b7: "jyis" +0xc9b8: "jyiss" +0xc9b9: "jying" +0xc9ba: "jyij" +0xc9bb: "jyic" +0xc9bc: "jyik" +0xc9bd: "jyit" +0xc9be: "jyip" +0xc9bf: "jyih" +0xc9c0: "ji" +0xc9c1: "jig" +0xc9c2: "jigg" +0xc9c3: "jigs" +0xc9c4: "jin" +0xc9c5: "jinj" +0xc9c6: "jinh" +0xc9c7: "jid" +0xc9c8: "jil" +0xc9c9: "jilg" +0xc9ca: "jilm" +0xc9cb: "jilb" +0xc9cc: "jils" +0xc9cd: "jilt" +0xc9ce: "jilp" +0xc9cf: "jilh" +0xc9d0: "jim" +0xc9d1: "jib" +0xc9d2: "jibs" +0xc9d3: "jis" +0xc9d4: "jiss" +0xc9d5: "jing" +0xc9d6: "jij" +0xc9d7: "jic" +0xc9d8: "jik" +0xc9d9: "jit" +0xc9da: "jip" +0xc9db: "jih" +0xc9dc: "jja" +0xc9dd: "jjag" +0xc9de: "jjagg" +0xc9df: "jjags" +0xc9e0: "jjan" +0xc9e1: "jjanj" +0xc9e2: "jjanh" +0xc9e3: "jjad" +0xc9e4: "jjal" +0xc9e5: "jjalg" +0xc9e6: "jjalm" +0xc9e7: "jjalb" +0xc9e8: "jjals" +0xc9e9: "jjalt" +0xc9ea: "jjalp" +0xc9eb: "jjalh" +0xc9ec: "jjam" +0xc9ed: "jjab" +0xc9ee: "jjabs" +0xc9ef: "jjas" +0xc9f0: "jjass" +0xc9f1: "jjang" +0xc9f2: "jjaj" +0xc9f3: "jjac" +0xc9f4: "jjak" +0xc9f5: "jjat" +0xc9f6: "jjap" +0xc9f7: "jjah" +0xc9f8: "jjae" +0xc9f9: "jjaeg" +0xc9fa: "jjaegg" +0xc9fb: "jjaegs" +0xc9fc: "jjaen" +0xc9fd: "jjaenj" +0xc9fe: "jjaenh" +0xc9ff: "jjaed" +/* x0ca */ +0xca00: "jjael" +0xca01: "jjaelg" +0xca02: "jjaelm" +0xca03: "jjaelb" +0xca04: "jjaels" +0xca05: "jjaelt" +0xca06: "jjaelp" +0xca07: "jjaelh" +0xca08: "jjaem" +0xca09: "jjaeb" +0xca0a: "jjaebs" +0xca0b: "jjaes" +0xca0c: "jjaess" +0xca0d: "jjaeng" +0xca0e: "jjaej" +0xca0f: "jjaec" +0xca10: "jjaek" +0xca11: "jjaet" +0xca12: "jjaep" +0xca13: "jjaeh" +0xca14: "jjya" +0xca15: "jjyag" +0xca16: "jjyagg" +0xca17: "jjyags" +0xca18: "jjyan" +0xca19: "jjyanj" +0xca1a: "jjyanh" +0xca1b: "jjyad" +0xca1c: "jjyal" +0xca1d: "jjyalg" +0xca1e: "jjyalm" +0xca1f: "jjyalb" +0xca20: "jjyals" +0xca21: "jjyalt" +0xca22: "jjyalp" +0xca23: "jjyalh" +0xca24: "jjyam" +0xca25: "jjyab" +0xca26: "jjyabs" +0xca27: "jjyas" +0xca28: "jjyass" +0xca29: "jjyang" +0xca2a: "jjyaj" +0xca2b: "jjyac" +0xca2c: "jjyak" +0xca2d: "jjyat" +0xca2e: "jjyap" +0xca2f: "jjyah" +0xca30: "jjyae" +0xca31: "jjyaeg" +0xca32: "jjyaegg" +0xca33: "jjyaegs" +0xca34: "jjyaen" +0xca35: "jjyaenj" +0xca36: "jjyaenh" +0xca37: "jjyaed" +0xca38: "jjyael" +0xca39: "jjyaelg" +0xca3a: "jjyaelm" +0xca3b: "jjyaelb" +0xca3c: "jjyaels" +0xca3d: "jjyaelt" +0xca3e: "jjyaelp" +0xca3f: "jjyaelh" +0xca40: "jjyaem" +0xca41: "jjyaeb" +0xca42: "jjyaebs" +0xca43: "jjyaes" +0xca44: "jjyaess" +0xca45: "jjyaeng" +0xca46: "jjyaej" +0xca47: "jjyaec" +0xca48: "jjyaek" +0xca49: "jjyaet" +0xca4a: "jjyaep" +0xca4b: "jjyaeh" +0xca4c: "jjeo" +0xca4d: "jjeog" +0xca4e: "jjeogg" +0xca4f: "jjeogs" +0xca50: "jjeon" +0xca51: "jjeonj" +0xca52: "jjeonh" +0xca53: "jjeod" +0xca54: "jjeol" +0xca55: "jjeolg" +0xca56: "jjeolm" +0xca57: "jjeolb" +0xca58: "jjeols" +0xca59: "jjeolt" +0xca5a: "jjeolp" +0xca5b: "jjeolh" +0xca5c: "jjeom" +0xca5d: "jjeob" +0xca5e: "jjeobs" +0xca5f: "jjeos" +0xca60: "jjeoss" +0xca61: "jjeong" +0xca62: "jjeoj" +0xca63: "jjeoc" +0xca64: "jjeok" +0xca65: "jjeot" +0xca66: "jjeop" +0xca67: "jjeoh" +0xca68: "jje" +0xca69: "jjeg" +0xca6a: "jjegg" +0xca6b: "jjegs" +0xca6c: "jjen" +0xca6d: "jjenj" +0xca6e: "jjenh" +0xca6f: "jjed" +0xca70: "jjel" +0xca71: "jjelg" +0xca72: "jjelm" +0xca73: "jjelb" +0xca74: "jjels" +0xca75: "jjelt" +0xca76: "jjelp" +0xca77: "jjelh" +0xca78: "jjem" +0xca79: "jjeb" +0xca7a: "jjebs" +0xca7b: "jjes" +0xca7c: "jjess" +0xca7d: "jjeng" +0xca7e: "jjej" +0xca7f: "jjec" +0xca80: "jjek" +0xca81: "jjet" +0xca82: "jjep" +0xca83: "jjeh" +0xca84: "jjyeo" +0xca85: "jjyeog" +0xca86: "jjyeogg" +0xca87: "jjyeogs" +0xca88: "jjyeon" +0xca89: "jjyeonj" +0xca8a: "jjyeonh" +0xca8b: "jjyeod" +0xca8c: "jjyeol" +0xca8d: "jjyeolg" +0xca8e: "jjyeolm" +0xca8f: "jjyeolb" +0xca90: "jjyeols" +0xca91: "jjyeolt" +0xca92: "jjyeolp" +0xca93: "jjyeolh" +0xca94: "jjyeom" +0xca95: "jjyeob" +0xca96: "jjyeobs" +0xca97: "jjyeos" +0xca98: "jjyeoss" +0xca99: "jjyeong" +0xca9a: "jjyeoj" +0xca9b: "jjyeoc" +0xca9c: "jjyeok" +0xca9d: "jjyeot" +0xca9e: "jjyeop" +0xca9f: "jjyeoh" +0xcaa0: "jjye" +0xcaa1: "jjyeg" +0xcaa2: "jjyegg" +0xcaa3: "jjyegs" +0xcaa4: "jjyen" +0xcaa5: "jjyenj" +0xcaa6: "jjyenh" +0xcaa7: "jjyed" +0xcaa8: "jjyel" +0xcaa9: "jjyelg" +0xcaaa: "jjyelm" +0xcaab: "jjyelb" +0xcaac: "jjyels" +0xcaad: "jjyelt" +0xcaae: "jjyelp" +0xcaaf: "jjyelh" +0xcab0: "jjyem" +0xcab1: "jjyeb" +0xcab2: "jjyebs" +0xcab3: "jjyes" +0xcab4: "jjyess" +0xcab5: "jjyeng" +0xcab6: "jjyej" +0xcab7: "jjyec" +0xcab8: "jjyek" +0xcab9: "jjyet" +0xcaba: "jjyep" +0xcabb: "jjyeh" +0xcabc: "jjo" +0xcabd: "jjog" +0xcabe: "jjogg" +0xcabf: "jjogs" +0xcac0: "jjon" +0xcac1: "jjonj" +0xcac2: "jjonh" +0xcac3: "jjod" +0xcac4: "jjol" +0xcac5: "jjolg" +0xcac6: "jjolm" +0xcac7: "jjolb" +0xcac8: "jjols" +0xcac9: "jjolt" +0xcaca: "jjolp" +0xcacb: "jjolh" +0xcacc: "jjom" +0xcacd: "jjob" +0xcace: "jjobs" +0xcacf: "jjos" +0xcad0: "jjoss" +0xcad1: "jjong" +0xcad2: "jjoj" +0xcad3: "jjoc" +0xcad4: "jjok" +0xcad5: "jjot" +0xcad6: "jjop" +0xcad7: "jjoh" +0xcad8: "jjwa" +0xcad9: "jjwag" +0xcada: "jjwagg" +0xcadb: "jjwags" +0xcadc: "jjwan" +0xcadd: "jjwanj" +0xcade: "jjwanh" +0xcadf: "jjwad" +0xcae0: "jjwal" +0xcae1: "jjwalg" +0xcae2: "jjwalm" +0xcae3: "jjwalb" +0xcae4: "jjwals" +0xcae5: "jjwalt" +0xcae6: "jjwalp" +0xcae7: "jjwalh" +0xcae8: "jjwam" +0xcae9: "jjwab" +0xcaea: "jjwabs" +0xcaeb: "jjwas" +0xcaec: "jjwass" +0xcaed: "jjwang" +0xcaee: "jjwaj" +0xcaef: "jjwac" +0xcaf0: "jjwak" +0xcaf1: "jjwat" +0xcaf2: "jjwap" +0xcaf3: "jjwah" +0xcaf4: "jjwae" +0xcaf5: "jjwaeg" +0xcaf6: "jjwaegg" +0xcaf7: "jjwaegs" +0xcaf8: "jjwaen" +0xcaf9: "jjwaenj" +0xcafa: "jjwaenh" +0xcafb: "jjwaed" +0xcafc: "jjwael" +0xcafd: "jjwaelg" +0xcafe: "jjwaelm" +0xcaff: "jjwaelb" +/* x0cb */ +0xcb00: "jjwaels" +0xcb01: "jjwaelt" +0xcb02: "jjwaelp" +0xcb03: "jjwaelh" +0xcb04: "jjwaem" +0xcb05: "jjwaeb" +0xcb06: "jjwaebs" +0xcb07: "jjwaes" +0xcb08: "jjwaess" +0xcb09: "jjwaeng" +0xcb0a: "jjwaej" +0xcb0b: "jjwaec" +0xcb0c: "jjwaek" +0xcb0d: "jjwaet" +0xcb0e: "jjwaep" +0xcb0f: "jjwaeh" +0xcb10: "jjoe" +0xcb11: "jjoeg" +0xcb12: "jjoegg" +0xcb13: "jjoegs" +0xcb14: "jjoen" +0xcb15: "jjoenj" +0xcb16: "jjoenh" +0xcb17: "jjoed" +0xcb18: "jjoel" +0xcb19: "jjoelg" +0xcb1a: "jjoelm" +0xcb1b: "jjoelb" +0xcb1c: "jjoels" +0xcb1d: "jjoelt" +0xcb1e: "jjoelp" +0xcb1f: "jjoelh" +0xcb20: "jjoem" +0xcb21: "jjoeb" +0xcb22: "jjoebs" +0xcb23: "jjoes" +0xcb24: "jjoess" +0xcb25: "jjoeng" +0xcb26: "jjoej" +0xcb27: "jjoec" +0xcb28: "jjoek" +0xcb29: "jjoet" +0xcb2a: "jjoep" +0xcb2b: "jjoeh" +0xcb2c: "jjyo" +0xcb2d: "jjyog" +0xcb2e: "jjyogg" +0xcb2f: "jjyogs" +0xcb30: "jjyon" +0xcb31: "jjyonj" +0xcb32: "jjyonh" +0xcb33: "jjyod" +0xcb34: "jjyol" +0xcb35: "jjyolg" +0xcb36: "jjyolm" +0xcb37: "jjyolb" +0xcb38: "jjyols" +0xcb39: "jjyolt" +0xcb3a: "jjyolp" +0xcb3b: "jjyolh" +0xcb3c: "jjyom" +0xcb3d: "jjyob" +0xcb3e: "jjyobs" +0xcb3f: "jjyos" +0xcb40: "jjyoss" +0xcb41: "jjyong" +0xcb42: "jjyoj" +0xcb43: "jjyoc" +0xcb44: "jjyok" +0xcb45: "jjyot" +0xcb46: "jjyop" +0xcb47: "jjyoh" +0xcb48: "jju" +0xcb49: "jjug" +0xcb4a: "jjugg" +0xcb4b: "jjugs" +0xcb4c: "jjun" +0xcb4d: "jjunj" +0xcb4e: "jjunh" +0xcb4f: "jjud" +0xcb50: "jjul" +0xcb51: "jjulg" +0xcb52: "jjulm" +0xcb53: "jjulb" +0xcb54: "jjuls" +0xcb55: "jjult" +0xcb56: "jjulp" +0xcb57: "jjulh" +0xcb58: "jjum" +0xcb59: "jjub" +0xcb5a: "jjubs" +0xcb5b: "jjus" +0xcb5c: "jjuss" +0xcb5d: "jjung" +0xcb5e: "jjuj" +0xcb5f: "jjuc" +0xcb60: "jjuk" +0xcb61: "jjut" +0xcb62: "jjup" +0xcb63: "jjuh" +0xcb64: "jjweo" +0xcb65: "jjweog" +0xcb66: "jjweogg" +0xcb67: "jjweogs" +0xcb68: "jjweon" +0xcb69: "jjweonj" +0xcb6a: "jjweonh" +0xcb6b: "jjweod" +0xcb6c: "jjweol" +0xcb6d: "jjweolg" +0xcb6e: "jjweolm" +0xcb6f: "jjweolb" +0xcb70: "jjweols" +0xcb71: "jjweolt" +0xcb72: "jjweolp" +0xcb73: "jjweolh" +0xcb74: "jjweom" +0xcb75: "jjweob" +0xcb76: "jjweobs" +0xcb77: "jjweos" +0xcb78: "jjweoss" +0xcb79: "jjweong" +0xcb7a: "jjweoj" +0xcb7b: "jjweoc" +0xcb7c: "jjweok" +0xcb7d: "jjweot" +0xcb7e: "jjweop" +0xcb7f: "jjweoh" +0xcb80: "jjwe" +0xcb81: "jjweg" +0xcb82: "jjwegg" +0xcb83: "jjwegs" +0xcb84: "jjwen" +0xcb85: "jjwenj" +0xcb86: "jjwenh" +0xcb87: "jjwed" +0xcb88: "jjwel" +0xcb89: "jjwelg" +0xcb8a: "jjwelm" +0xcb8b: "jjwelb" +0xcb8c: "jjwels" +0xcb8d: "jjwelt" +0xcb8e: "jjwelp" +0xcb8f: "jjwelh" +0xcb90: "jjwem" +0xcb91: "jjweb" +0xcb92: "jjwebs" +0xcb93: "jjwes" +0xcb94: "jjwess" +0xcb95: "jjweng" +0xcb96: "jjwej" +0xcb97: "jjwec" +0xcb98: "jjwek" +0xcb99: "jjwet" +0xcb9a: "jjwep" +0xcb9b: "jjweh" +0xcb9c: "jjwi" +0xcb9d: "jjwig" +0xcb9e: "jjwigg" +0xcb9f: "jjwigs" +0xcba0: "jjwin" +0xcba1: "jjwinj" +0xcba2: "jjwinh" +0xcba3: "jjwid" +0xcba4: "jjwil" +0xcba5: "jjwilg" +0xcba6: "jjwilm" +0xcba7: "jjwilb" +0xcba8: "jjwils" +0xcba9: "jjwilt" +0xcbaa: "jjwilp" +0xcbab: "jjwilh" +0xcbac: "jjwim" +0xcbad: "jjwib" +0xcbae: "jjwibs" +0xcbaf: "jjwis" +0xcbb0: "jjwiss" +0xcbb1: "jjwing" +0xcbb2: "jjwij" +0xcbb3: "jjwic" +0xcbb4: "jjwik" +0xcbb5: "jjwit" +0xcbb6: "jjwip" +0xcbb7: "jjwih" +0xcbb8: "jjyu" +0xcbb9: "jjyug" +0xcbba: "jjyugg" +0xcbbb: "jjyugs" +0xcbbc: "jjyun" +0xcbbd: "jjyunj" +0xcbbe: "jjyunh" +0xcbbf: "jjyud" +0xcbc0: "jjyul" +0xcbc1: "jjyulg" +0xcbc2: "jjyulm" +0xcbc3: "jjyulb" +0xcbc4: "jjyuls" +0xcbc5: "jjyult" +0xcbc6: "jjyulp" +0xcbc7: "jjyulh" +0xcbc8: "jjyum" +0xcbc9: "jjyub" +0xcbca: "jjyubs" +0xcbcb: "jjyus" +0xcbcc: "jjyuss" +0xcbcd: "jjyung" +0xcbce: "jjyuj" +0xcbcf: "jjyuc" +0xcbd0: "jjyuk" +0xcbd1: "jjyut" +0xcbd2: "jjyup" +0xcbd3: "jjyuh" +0xcbd4: "jjeu" +0xcbd5: "jjeug" +0xcbd6: "jjeugg" +0xcbd7: "jjeugs" +0xcbd8: "jjeun" +0xcbd9: "jjeunj" +0xcbda: "jjeunh" +0xcbdb: "jjeud" +0xcbdc: "jjeul" +0xcbdd: "jjeulg" +0xcbde: "jjeulm" +0xcbdf: "jjeulb" +0xcbe0: "jjeuls" +0xcbe1: "jjeult" +0xcbe2: "jjeulp" +0xcbe3: "jjeulh" +0xcbe4: "jjeum" +0xcbe5: "jjeub" +0xcbe6: "jjeubs" +0xcbe7: "jjeus" +0xcbe8: "jjeuss" +0xcbe9: "jjeung" +0xcbea: "jjeuj" +0xcbeb: "jjeuc" +0xcbec: "jjeuk" +0xcbed: "jjeut" +0xcbee: "jjeup" +0xcbef: "jjeuh" +0xcbf0: "jjyi" +0xcbf1: "jjyig" +0xcbf2: "jjyigg" +0xcbf3: "jjyigs" +0xcbf4: "jjyin" +0xcbf5: "jjyinj" +0xcbf6: "jjyinh" +0xcbf7: "jjyid" +0xcbf8: "jjyil" +0xcbf9: "jjyilg" +0xcbfa: "jjyilm" +0xcbfb: "jjyilb" +0xcbfc: "jjyils" +0xcbfd: "jjyilt" +0xcbfe: "jjyilp" +0xcbff: "jjyilh" +/* x0cc */ +0xcc00: "jjyim" +0xcc01: "jjyib" +0xcc02: "jjyibs" +0xcc03: "jjyis" +0xcc04: "jjyiss" +0xcc05: "jjying" +0xcc06: "jjyij" +0xcc07: "jjyic" +0xcc08: "jjyik" +0xcc09: "jjyit" +0xcc0a: "jjyip" +0xcc0b: "jjyih" +0xcc0c: "jji" +0xcc0d: "jjig" +0xcc0e: "jjigg" +0xcc0f: "jjigs" +0xcc10: "jjin" +0xcc11: "jjinj" +0xcc12: "jjinh" +0xcc13: "jjid" +0xcc14: "jjil" +0xcc15: "jjilg" +0xcc16: "jjilm" +0xcc17: "jjilb" +0xcc18: "jjils" +0xcc19: "jjilt" +0xcc1a: "jjilp" +0xcc1b: "jjilh" +0xcc1c: "jjim" +0xcc1d: "jjib" +0xcc1e: "jjibs" +0xcc1f: "jjis" +0xcc20: "jjiss" +0xcc21: "jjing" +0xcc22: "jjij" +0xcc23: "jjic" +0xcc24: "jjik" +0xcc25: "jjit" +0xcc26: "jjip" +0xcc27: "jjih" +0xcc28: "ca" +0xcc29: "cag" +0xcc2a: "cagg" +0xcc2b: "cags" +0xcc2c: "can" +0xcc2d: "canj" +0xcc2e: "canh" +0xcc2f: "cad" +0xcc30: "cal" +0xcc31: "calg" +0xcc32: "calm" +0xcc33: "calb" +0xcc34: "cals" +0xcc35: "calt" +0xcc36: "calp" +0xcc37: "calh" +0xcc38: "cam" +0xcc39: "cab" +0xcc3a: "cabs" +0xcc3b: "cas" +0xcc3c: "cass" +0xcc3d: "cang" +0xcc3e: "caj" +0xcc3f: "cac" +0xcc40: "cak" +0xcc41: "cat" +0xcc42: "cap" +0xcc43: "cah" +0xcc44: "cae" +0xcc45: "caeg" +0xcc46: "caegg" +0xcc47: "caegs" +0xcc48: "caen" +0xcc49: "caenj" +0xcc4a: "caenh" +0xcc4b: "caed" +0xcc4c: "cael" +0xcc4d: "caelg" +0xcc4e: "caelm" +0xcc4f: "caelb" +0xcc50: "caels" +0xcc51: "caelt" +0xcc52: "caelp" +0xcc53: "caelh" +0xcc54: "caem" +0xcc55: "caeb" +0xcc56: "caebs" +0xcc57: "caes" +0xcc58: "caess" +0xcc59: "caeng" +0xcc5a: "caej" +0xcc5b: "caec" +0xcc5c: "caek" +0xcc5d: "caet" +0xcc5e: "caep" +0xcc5f: "caeh" +0xcc60: "cya" +0xcc61: "cyag" +0xcc62: "cyagg" +0xcc63: "cyags" +0xcc64: "cyan" +0xcc65: "cyanj" +0xcc66: "cyanh" +0xcc67: "cyad" +0xcc68: "cyal" +0xcc69: "cyalg" +0xcc6a: "cyalm" +0xcc6b: "cyalb" +0xcc6c: "cyals" +0xcc6d: "cyalt" +0xcc6e: "cyalp" +0xcc6f: "cyalh" +0xcc70: "cyam" +0xcc71: "cyab" +0xcc72: "cyabs" +0xcc73: "cyas" +0xcc74: "cyass" +0xcc75: "cyang" +0xcc76: "cyaj" +0xcc77: "cyac" +0xcc78: "cyak" +0xcc79: "cyat" +0xcc7a: "cyap" +0xcc7b: "cyah" +0xcc7c: "cyae" +0xcc7d: "cyaeg" +0xcc7e: "cyaegg" +0xcc7f: "cyaegs" +0xcc80: "cyaen" +0xcc81: "cyaenj" +0xcc82: "cyaenh" +0xcc83: "cyaed" +0xcc84: "cyael" +0xcc85: "cyaelg" +0xcc86: "cyaelm" +0xcc87: "cyaelb" +0xcc88: "cyaels" +0xcc89: "cyaelt" +0xcc8a: "cyaelp" +0xcc8b: "cyaelh" +0xcc8c: "cyaem" +0xcc8d: "cyaeb" +0xcc8e: "cyaebs" +0xcc8f: "cyaes" +0xcc90: "cyaess" +0xcc91: "cyaeng" +0xcc92: "cyaej" +0xcc93: "cyaec" +0xcc94: "cyaek" +0xcc95: "cyaet" +0xcc96: "cyaep" +0xcc97: "cyaeh" +0xcc98: "ceo" +0xcc99: "ceog" +0xcc9a: "ceogg" +0xcc9b: "ceogs" +0xcc9c: "ceon" +0xcc9d: "ceonj" +0xcc9e: "ceonh" +0xcc9f: "ceod" +0xcca0: "ceol" +0xcca1: "ceolg" +0xcca2: "ceolm" +0xcca3: "ceolb" +0xcca4: "ceols" +0xcca5: "ceolt" +0xcca6: "ceolp" +0xcca7: "ceolh" +0xcca8: "ceom" +0xcca9: "ceob" +0xccaa: "ceobs" +0xccab: "ceos" +0xccac: "ceoss" +0xccad: "ceong" +0xccae: "ceoj" +0xccaf: "ceoc" +0xccb0: "ceok" +0xccb1: "ceot" +0xccb2: "ceop" +0xccb3: "ceoh" +0xccb4: "ce" +0xccb5: "ceg" +0xccb6: "cegg" +0xccb7: "cegs" +0xccb8: "cen" +0xccb9: "cenj" +0xccba: "cenh" +0xccbb: "ced" +0xccbc: "cel" +0xccbd: "celg" +0xccbe: "celm" +0xccbf: "celb" +0xccc0: "cels" +0xccc1: "celt" +0xccc2: "celp" +0xccc3: "celh" +0xccc4: "cem" +0xccc5: "ceb" +0xccc6: "cebs" +0xccc7: "ces" +0xccc8: "cess" +0xccc9: "ceng" +0xccca: "cej" +0xcccb: "cec" +0xcccc: "cek" +0xcccd: "cet" +0xccce: "cep" +0xcccf: "ceh" +0xccd0: "cyeo" +0xccd1: "cyeog" +0xccd2: "cyeogg" +0xccd3: "cyeogs" +0xccd4: "cyeon" +0xccd5: "cyeonj" +0xccd6: "cyeonh" +0xccd7: "cyeod" +0xccd8: "cyeol" +0xccd9: "cyeolg" +0xccda: "cyeolm" +0xccdb: "cyeolb" +0xccdc: "cyeols" +0xccdd: "cyeolt" +0xccde: "cyeolp" +0xccdf: "cyeolh" +0xcce0: "cyeom" +0xcce1: "cyeob" +0xcce2: "cyeobs" +0xcce3: "cyeos" +0xcce4: "cyeoss" +0xcce5: "cyeong" +0xcce6: "cyeoj" +0xcce7: "cyeoc" +0xcce8: "cyeok" +0xcce9: "cyeot" +0xccea: "cyeop" +0xcceb: "cyeoh" +0xccec: "cye" +0xcced: "cyeg" +0xccee: "cyegg" +0xccef: "cyegs" +0xccf0: "cyen" +0xccf1: "cyenj" +0xccf2: "cyenh" +0xccf3: "cyed" +0xccf4: "cyel" +0xccf5: "cyelg" +0xccf6: "cyelm" +0xccf7: "cyelb" +0xccf8: "cyels" +0xccf9: "cyelt" +0xccfa: "cyelp" +0xccfb: "cyelh" +0xccfc: "cyem" +0xccfd: "cyeb" +0xccfe: "cyebs" +0xccff: "cyes" +/* x0cd */ +0xcd00: "cyess" +0xcd01: "cyeng" +0xcd02: "cyej" +0xcd03: "cyec" +0xcd04: "cyek" +0xcd05: "cyet" +0xcd06: "cyep" +0xcd07: "cyeh" +0xcd08: "co" +0xcd09: "cog" +0xcd0a: "cogg" +0xcd0b: "cogs" +0xcd0c: "con" +0xcd0d: "conj" +0xcd0e: "conh" +0xcd0f: "cod" +0xcd10: "col" +0xcd11: "colg" +0xcd12: "colm" +0xcd13: "colb" +0xcd14: "cols" +0xcd15: "colt" +0xcd16: "colp" +0xcd17: "colh" +0xcd18: "com" +0xcd19: "cob" +0xcd1a: "cobs" +0xcd1b: "cos" +0xcd1c: "coss" +0xcd1d: "cong" +0xcd1e: "coj" +0xcd1f: "coc" +0xcd20: "cok" +0xcd21: "cot" +0xcd22: "cop" +0xcd23: "coh" +0xcd24: "cwa" +0xcd25: "cwag" +0xcd26: "cwagg" +0xcd27: "cwags" +0xcd28: "cwan" +0xcd29: "cwanj" +0xcd2a: "cwanh" +0xcd2b: "cwad" +0xcd2c: "cwal" +0xcd2d: "cwalg" +0xcd2e: "cwalm" +0xcd2f: "cwalb" +0xcd30: "cwals" +0xcd31: "cwalt" +0xcd32: "cwalp" +0xcd33: "cwalh" +0xcd34: "cwam" +0xcd35: "cwab" +0xcd36: "cwabs" +0xcd37: "cwas" +0xcd38: "cwass" +0xcd39: "cwang" +0xcd3a: "cwaj" +0xcd3b: "cwac" +0xcd3c: "cwak" +0xcd3d: "cwat" +0xcd3e: "cwap" +0xcd3f: "cwah" +0xcd40: "cwae" +0xcd41: "cwaeg" +0xcd42: "cwaegg" +0xcd43: "cwaegs" +0xcd44: "cwaen" +0xcd45: "cwaenj" +0xcd46: "cwaenh" +0xcd47: "cwaed" +0xcd48: "cwael" +0xcd49: "cwaelg" +0xcd4a: "cwaelm" +0xcd4b: "cwaelb" +0xcd4c: "cwaels" +0xcd4d: "cwaelt" +0xcd4e: "cwaelp" +0xcd4f: "cwaelh" +0xcd50: "cwaem" +0xcd51: "cwaeb" +0xcd52: "cwaebs" +0xcd53: "cwaes" +0xcd54: "cwaess" +0xcd55: "cwaeng" +0xcd56: "cwaej" +0xcd57: "cwaec" +0xcd58: "cwaek" +0xcd59: "cwaet" +0xcd5a: "cwaep" +0xcd5b: "cwaeh" +0xcd5c: "coe" +0xcd5d: "coeg" +0xcd5e: "coegg" +0xcd5f: "coegs" +0xcd60: "coen" +0xcd61: "coenj" +0xcd62: "coenh" +0xcd63: "coed" +0xcd64: "coel" +0xcd65: "coelg" +0xcd66: "coelm" +0xcd67: "coelb" +0xcd68: "coels" +0xcd69: "coelt" +0xcd6a: "coelp" +0xcd6b: "coelh" +0xcd6c: "coem" +0xcd6d: "coeb" +0xcd6e: "coebs" +0xcd6f: "coes" +0xcd70: "coess" +0xcd71: "coeng" +0xcd72: "coej" +0xcd73: "coec" +0xcd74: "coek" +0xcd75: "coet" +0xcd76: "coep" +0xcd77: "coeh" +0xcd78: "cyo" +0xcd79: "cyog" +0xcd7a: "cyogg" +0xcd7b: "cyogs" +0xcd7c: "cyon" +0xcd7d: "cyonj" +0xcd7e: "cyonh" +0xcd7f: "cyod" +0xcd80: "cyol" +0xcd81: "cyolg" +0xcd82: "cyolm" +0xcd83: "cyolb" +0xcd84: "cyols" +0xcd85: "cyolt" +0xcd86: "cyolp" +0xcd87: "cyolh" +0xcd88: "cyom" +0xcd89: "cyob" +0xcd8a: "cyobs" +0xcd8b: "cyos" +0xcd8c: "cyoss" +0xcd8d: "cyong" +0xcd8e: "cyoj" +0xcd8f: "cyoc" +0xcd90: "cyok" +0xcd91: "cyot" +0xcd92: "cyop" +0xcd93: "cyoh" +0xcd94: "cu" +0xcd95: "cug" +0xcd96: "cugg" +0xcd97: "cugs" +0xcd98: "cun" +0xcd99: "cunj" +0xcd9a: "cunh" +0xcd9b: "cud" +0xcd9c: "cul" +0xcd9d: "culg" +0xcd9e: "culm" +0xcd9f: "culb" +0xcda0: "culs" +0xcda1: "cult" +0xcda2: "culp" +0xcda3: "culh" +0xcda4: "cum" +0xcda5: "cub" +0xcda6: "cubs" +0xcda7: "cus" +0xcda8: "cuss" +0xcda9: "cung" +0xcdaa: "cuj" +0xcdab: "cuc" +0xcdac: "cuk" +0xcdad: "cut" +0xcdae: "cup" +0xcdaf: "cuh" +0xcdb0: "cweo" +0xcdb1: "cweog" +0xcdb2: "cweogg" +0xcdb3: "cweogs" +0xcdb4: "cweon" +0xcdb5: "cweonj" +0xcdb6: "cweonh" +0xcdb7: "cweod" +0xcdb8: "cweol" +0xcdb9: "cweolg" +0xcdba: "cweolm" +0xcdbb: "cweolb" +0xcdbc: "cweols" +0xcdbd: "cweolt" +0xcdbe: "cweolp" +0xcdbf: "cweolh" +0xcdc0: "cweom" +0xcdc1: "cweob" +0xcdc2: "cweobs" +0xcdc3: "cweos" +0xcdc4: "cweoss" +0xcdc5: "cweong" +0xcdc6: "cweoj" +0xcdc7: "cweoc" +0xcdc8: "cweok" +0xcdc9: "cweot" +0xcdca: "cweop" +0xcdcb: "cweoh" +0xcdcc: "cwe" +0xcdcd: "cweg" +0xcdce: "cwegg" +0xcdcf: "cwegs" +0xcdd0: "cwen" +0xcdd1: "cwenj" +0xcdd2: "cwenh" +0xcdd3: "cwed" +0xcdd4: "cwel" +0xcdd5: "cwelg" +0xcdd6: "cwelm" +0xcdd7: "cwelb" +0xcdd8: "cwels" +0xcdd9: "cwelt" +0xcdda: "cwelp" +0xcddb: "cwelh" +0xcddc: "cwem" +0xcddd: "cweb" +0xcdde: "cwebs" +0xcddf: "cwes" +0xcde0: "cwess" +0xcde1: "cweng" +0xcde2: "cwej" +0xcde3: "cwec" +0xcde4: "cwek" +0xcde5: "cwet" +0xcde6: "cwep" +0xcde7: "cweh" +0xcde8: "cwi" +0xcde9: "cwig" +0xcdea: "cwigg" +0xcdeb: "cwigs" +0xcdec: "cwin" +0xcded: "cwinj" +0xcdee: "cwinh" +0xcdef: "cwid" +0xcdf0: "cwil" +0xcdf1: "cwilg" +0xcdf2: "cwilm" +0xcdf3: "cwilb" +0xcdf4: "cwils" +0xcdf5: "cwilt" +0xcdf6: "cwilp" +0xcdf7: "cwilh" +0xcdf8: "cwim" +0xcdf9: "cwib" +0xcdfa: "cwibs" +0xcdfb: "cwis" +0xcdfc: "cwiss" +0xcdfd: "cwing" +0xcdfe: "cwij" +0xcdff: "cwic" +/* x0ce */ +0xce00: "cwik" +0xce01: "cwit" +0xce02: "cwip" +0xce03: "cwih" +0xce04: "cyu" +0xce05: "cyug" +0xce06: "cyugg" +0xce07: "cyugs" +0xce08: "cyun" +0xce09: "cyunj" +0xce0a: "cyunh" +0xce0b: "cyud" +0xce0c: "cyul" +0xce0d: "cyulg" +0xce0e: "cyulm" +0xce0f: "cyulb" +0xce10: "cyuls" +0xce11: "cyult" +0xce12: "cyulp" +0xce13: "cyulh" +0xce14: "cyum" +0xce15: "cyub" +0xce16: "cyubs" +0xce17: "cyus" +0xce18: "cyuss" +0xce19: "cyung" +0xce1a: "cyuj" +0xce1b: "cyuc" +0xce1c: "cyuk" +0xce1d: "cyut" +0xce1e: "cyup" +0xce1f: "cyuh" +0xce20: "ceu" +0xce21: "ceug" +0xce22: "ceugg" +0xce23: "ceugs" +0xce24: "ceun" +0xce25: "ceunj" +0xce26: "ceunh" +0xce27: "ceud" +0xce28: "ceul" +0xce29: "ceulg" +0xce2a: "ceulm" +0xce2b: "ceulb" +0xce2c: "ceuls" +0xce2d: "ceult" +0xce2e: "ceulp" +0xce2f: "ceulh" +0xce30: "ceum" +0xce31: "ceub" +0xce32: "ceubs" +0xce33: "ceus" +0xce34: "ceuss" +0xce35: "ceung" +0xce36: "ceuj" +0xce37: "ceuc" +0xce38: "ceuk" +0xce39: "ceut" +0xce3a: "ceup" +0xce3b: "ceuh" +0xce3c: "cyi" +0xce3d: "cyig" +0xce3e: "cyigg" +0xce3f: "cyigs" +0xce40: "cyin" +0xce41: "cyinj" +0xce42: "cyinh" +0xce43: "cyid" +0xce44: "cyil" +0xce45: "cyilg" +0xce46: "cyilm" +0xce47: "cyilb" +0xce48: "cyils" +0xce49: "cyilt" +0xce4a: "cyilp" +0xce4b: "cyilh" +0xce4c: "cyim" +0xce4d: "cyib" +0xce4e: "cyibs" +0xce4f: "cyis" +0xce50: "cyiss" +0xce51: "cying" +0xce52: "cyij" +0xce53: "cyic" +0xce54: "cyik" +0xce55: "cyit" +0xce56: "cyip" +0xce57: "cyih" +0xce58: "ci" +0xce59: "cig" +0xce5a: "cigg" +0xce5b: "cigs" +0xce5c: "cin" +0xce5d: "cinj" +0xce5e: "cinh" +0xce5f: "cid" +0xce60: "cil" +0xce61: "cilg" +0xce62: "cilm" +0xce63: "cilb" +0xce64: "cils" +0xce65: "cilt" +0xce66: "cilp" +0xce67: "cilh" +0xce68: "cim" +0xce69: "cib" +0xce6a: "cibs" +0xce6b: "cis" +0xce6c: "ciss" +0xce6d: "cing" +0xce6e: "cij" +0xce6f: "cic" +0xce70: "cik" +0xce71: "cit" +0xce72: "cip" +0xce73: "cih" +0xce74: "ka" +0xce75: "kag" +0xce76: "kagg" +0xce77: "kags" +0xce78: "kan" +0xce79: "kanj" +0xce7a: "kanh" +0xce7b: "kad" +0xce7c: "kal" +0xce7d: "kalg" +0xce7e: "kalm" +0xce7f: "kalb" +0xce80: "kals" +0xce81: "kalt" +0xce82: "kalp" +0xce83: "kalh" +0xce84: "kam" +0xce85: "kab" +0xce86: "kabs" +0xce87: "kas" +0xce88: "kass" +0xce89: "kang" +0xce8a: "kaj" +0xce8b: "kac" +0xce8c: "kak" +0xce8d: "kat" +0xce8e: "kap" +0xce8f: "kah" +0xce90: "kae" +0xce91: "kaeg" +0xce92: "kaegg" +0xce93: "kaegs" +0xce94: "kaen" +0xce95: "kaenj" +0xce96: "kaenh" +0xce97: "kaed" +0xce98: "kael" +0xce99: "kaelg" +0xce9a: "kaelm" +0xce9b: "kaelb" +0xce9c: "kaels" +0xce9d: "kaelt" +0xce9e: "kaelp" +0xce9f: "kaelh" +0xcea0: "kaem" +0xcea1: "kaeb" +0xcea2: "kaebs" +0xcea3: "kaes" +0xcea4: "kaess" +0xcea5: "kaeng" +0xcea6: "kaej" +0xcea7: "kaec" +0xcea8: "kaek" +0xcea9: "kaet" +0xceaa: "kaep" +0xceab: "kaeh" +0xceac: "kya" +0xcead: "kyag" +0xceae: "kyagg" +0xceaf: "kyags" +0xceb0: "kyan" +0xceb1: "kyanj" +0xceb2: "kyanh" +0xceb3: "kyad" +0xceb4: "kyal" +0xceb5: "kyalg" +0xceb6: "kyalm" +0xceb7: "kyalb" +0xceb8: "kyals" +0xceb9: "kyalt" +0xceba: "kyalp" +0xcebb: "kyalh" +0xcebc: "kyam" +0xcebd: "kyab" +0xcebe: "kyabs" +0xcebf: "kyas" +0xcec0: "kyass" +0xcec1: "kyang" +0xcec2: "kyaj" +0xcec3: "kyac" +0xcec4: "kyak" +0xcec5: "kyat" +0xcec6: "kyap" +0xcec7: "kyah" +0xcec8: "kyae" +0xcec9: "kyaeg" +0xceca: "kyaegg" +0xcecb: "kyaegs" +0xcecc: "kyaen" +0xcecd: "kyaenj" +0xcece: "kyaenh" +0xcecf: "kyaed" +0xced0: "kyael" +0xced1: "kyaelg" +0xced2: "kyaelm" +0xced3: "kyaelb" +0xced4: "kyaels" +0xced5: "kyaelt" +0xced6: "kyaelp" +0xced7: "kyaelh" +0xced8: "kyaem" +0xced9: "kyaeb" +0xceda: "kyaebs" +0xcedb: "kyaes" +0xcedc: "kyaess" +0xcedd: "kyaeng" +0xcede: "kyaej" +0xcedf: "kyaec" +0xcee0: "kyaek" +0xcee1: "kyaet" +0xcee2: "kyaep" +0xcee3: "kyaeh" +0xcee4: "keo" +0xcee5: "keog" +0xcee6: "keogg" +0xcee7: "keogs" +0xcee8: "keon" +0xcee9: "keonj" +0xceea: "keonh" +0xceeb: "keod" +0xceec: "keol" +0xceed: "keolg" +0xceee: "keolm" +0xceef: "keolb" +0xcef0: "keols" +0xcef1: "keolt" +0xcef2: "keolp" +0xcef3: "keolh" +0xcef4: "keom" +0xcef5: "keob" +0xcef6: "keobs" +0xcef7: "keos" +0xcef8: "keoss" +0xcef9: "keong" +0xcefa: "keoj" +0xcefb: "keoc" +0xcefc: "keok" +0xcefd: "keot" +0xcefe: "keop" +0xceff: "keoh" +/* x0cf */ +0xcf00: "ke" +0xcf01: "keg" +0xcf02: "kegg" +0xcf03: "kegs" +0xcf04: "ken" +0xcf05: "kenj" +0xcf06: "kenh" +0xcf07: "ked" +0xcf08: "kel" +0xcf09: "kelg" +0xcf0a: "kelm" +0xcf0b: "kelb" +0xcf0c: "kels" +0xcf0d: "kelt" +0xcf0e: "kelp" +0xcf0f: "kelh" +0xcf10: "kem" +0xcf11: "keb" +0xcf12: "kebs" +0xcf13: "kes" +0xcf14: "kess" +0xcf15: "keng" +0xcf16: "kej" +0xcf17: "kec" +0xcf18: "kek" +0xcf19: "ket" +0xcf1a: "kep" +0xcf1b: "keh" +0xcf1c: "kyeo" +0xcf1d: "kyeog" +0xcf1e: "kyeogg" +0xcf1f: "kyeogs" +0xcf20: "kyeon" +0xcf21: "kyeonj" +0xcf22: "kyeonh" +0xcf23: "kyeod" +0xcf24: "kyeol" +0xcf25: "kyeolg" +0xcf26: "kyeolm" +0xcf27: "kyeolb" +0xcf28: "kyeols" +0xcf29: "kyeolt" +0xcf2a: "kyeolp" +0xcf2b: "kyeolh" +0xcf2c: "kyeom" +0xcf2d: "kyeob" +0xcf2e: "kyeobs" +0xcf2f: "kyeos" +0xcf30: "kyeoss" +0xcf31: "kyeong" +0xcf32: "kyeoj" +0xcf33: "kyeoc" +0xcf34: "kyeok" +0xcf35: "kyeot" +0xcf36: "kyeop" +0xcf37: "kyeoh" +0xcf38: "kye" +0xcf39: "kyeg" +0xcf3a: "kyegg" +0xcf3b: "kyegs" +0xcf3c: "kyen" +0xcf3d: "kyenj" +0xcf3e: "kyenh" +0xcf3f: "kyed" +0xcf40: "kyel" +0xcf41: "kyelg" +0xcf42: "kyelm" +0xcf43: "kyelb" +0xcf44: "kyels" +0xcf45: "kyelt" +0xcf46: "kyelp" +0xcf47: "kyelh" +0xcf48: "kyem" +0xcf49: "kyeb" +0xcf4a: "kyebs" +0xcf4b: "kyes" +0xcf4c: "kyess" +0xcf4d: "kyeng" +0xcf4e: "kyej" +0xcf4f: "kyec" +0xcf50: "kyek" +0xcf51: "kyet" +0xcf52: "kyep" +0xcf53: "kyeh" +0xcf54: "ko" +0xcf55: "kog" +0xcf56: "kogg" +0xcf57: "kogs" +0xcf58: "kon" +0xcf59: "konj" +0xcf5a: "konh" +0xcf5b: "kod" +0xcf5c: "kol" +0xcf5d: "kolg" +0xcf5e: "kolm" +0xcf5f: "kolb" +0xcf60: "kols" +0xcf61: "kolt" +0xcf62: "kolp" +0xcf63: "kolh" +0xcf64: "kom" +0xcf65: "kob" +0xcf66: "kobs" +0xcf67: "kos" +0xcf68: "koss" +0xcf69: "kong" +0xcf6a: "koj" +0xcf6b: "koc" +0xcf6c: "kok" +0xcf6d: "kot" +0xcf6e: "kop" +0xcf6f: "koh" +0xcf70: "kwa" +0xcf71: "kwag" +0xcf72: "kwagg" +0xcf73: "kwags" +0xcf74: "kwan" +0xcf75: "kwanj" +0xcf76: "kwanh" +0xcf77: "kwad" +0xcf78: "kwal" +0xcf79: "kwalg" +0xcf7a: "kwalm" +0xcf7b: "kwalb" +0xcf7c: "kwals" +0xcf7d: "kwalt" +0xcf7e: "kwalp" +0xcf7f: "kwalh" +0xcf80: "kwam" +0xcf81: "kwab" +0xcf82: "kwabs" +0xcf83: "kwas" +0xcf84: "kwass" +0xcf85: "kwang" +0xcf86: "kwaj" +0xcf87: "kwac" +0xcf88: "kwak" +0xcf89: "kwat" +0xcf8a: "kwap" +0xcf8b: "kwah" +0xcf8c: "kwae" +0xcf8d: "kwaeg" +0xcf8e: "kwaegg" +0xcf8f: "kwaegs" +0xcf90: "kwaen" +0xcf91: "kwaenj" +0xcf92: "kwaenh" +0xcf93: "kwaed" +0xcf94: "kwael" +0xcf95: "kwaelg" +0xcf96: "kwaelm" +0xcf97: "kwaelb" +0xcf98: "kwaels" +0xcf99: "kwaelt" +0xcf9a: "kwaelp" +0xcf9b: "kwaelh" +0xcf9c: "kwaem" +0xcf9d: "kwaeb" +0xcf9e: "kwaebs" +0xcf9f: "kwaes" +0xcfa0: "kwaess" +0xcfa1: "kwaeng" +0xcfa2: "kwaej" +0xcfa3: "kwaec" +0xcfa4: "kwaek" +0xcfa5: "kwaet" +0xcfa6: "kwaep" +0xcfa7: "kwaeh" +0xcfa8: "koe" +0xcfa9: "koeg" +0xcfaa: "koegg" +0xcfab: "koegs" +0xcfac: "koen" +0xcfad: "koenj" +0xcfae: "koenh" +0xcfaf: "koed" +0xcfb0: "koel" +0xcfb1: "koelg" +0xcfb2: "koelm" +0xcfb3: "koelb" +0xcfb4: "koels" +0xcfb5: "koelt" +0xcfb6: "koelp" +0xcfb7: "koelh" +0xcfb8: "koem" +0xcfb9: "koeb" +0xcfba: "koebs" +0xcfbb: "koes" +0xcfbc: "koess" +0xcfbd: "koeng" +0xcfbe: "koej" +0xcfbf: "koec" +0xcfc0: "koek" +0xcfc1: "koet" +0xcfc2: "koep" +0xcfc3: "koeh" +0xcfc4: "kyo" +0xcfc5: "kyog" +0xcfc6: "kyogg" +0xcfc7: "kyogs" +0xcfc8: "kyon" +0xcfc9: "kyonj" +0xcfca: "kyonh" +0xcfcb: "kyod" +0xcfcc: "kyol" +0xcfcd: "kyolg" +0xcfce: "kyolm" +0xcfcf: "kyolb" +0xcfd0: "kyols" +0xcfd1: "kyolt" +0xcfd2: "kyolp" +0xcfd3: "kyolh" +0xcfd4: "kyom" +0xcfd5: "kyob" +0xcfd6: "kyobs" +0xcfd7: "kyos" +0xcfd8: "kyoss" +0xcfd9: "kyong" +0xcfda: "kyoj" +0xcfdb: "kyoc" +0xcfdc: "kyok" +0xcfdd: "kyot" +0xcfde: "kyop" +0xcfdf: "kyoh" +0xcfe0: "ku" +0xcfe1: "kug" +0xcfe2: "kugg" +0xcfe3: "kugs" +0xcfe4: "kun" +0xcfe5: "kunj" +0xcfe6: "kunh" +0xcfe7: "kud" +0xcfe8: "kul" +0xcfe9: "kulg" +0xcfea: "kulm" +0xcfeb: "kulb" +0xcfec: "kuls" +0xcfed: "kult" +0xcfee: "kulp" +0xcfef: "kulh" +0xcff0: "kum" +0xcff1: "kub" +0xcff2: "kubs" +0xcff3: "kus" +0xcff4: "kuss" +0xcff5: "kung" +0xcff6: "kuj" +0xcff7: "kuc" +0xcff8: "kuk" +0xcff9: "kut" +0xcffa: "kup" +0xcffb: "kuh" +0xcffc: "kweo" +0xcffd: "kweog" +0xcffe: "kweogg" +0xcfff: "kweogs" +/* x0d0 */ +0xd000: "kweon" +0xd001: "kweonj" +0xd002: "kweonh" +0xd003: "kweod" +0xd004: "kweol" +0xd005: "kweolg" +0xd006: "kweolm" +0xd007: "kweolb" +0xd008: "kweols" +0xd009: "kweolt" +0xd00a: "kweolp" +0xd00b: "kweolh" +0xd00c: "kweom" +0xd00d: "kweob" +0xd00e: "kweobs" +0xd00f: "kweos" +0xd010: "kweoss" +0xd011: "kweong" +0xd012: "kweoj" +0xd013: "kweoc" +0xd014: "kweok" +0xd015: "kweot" +0xd016: "kweop" +0xd017: "kweoh" +0xd018: "kwe" +0xd019: "kweg" +0xd01a: "kwegg" +0xd01b: "kwegs" +0xd01c: "kwen" +0xd01d: "kwenj" +0xd01e: "kwenh" +0xd01f: "kwed" +0xd020: "kwel" +0xd021: "kwelg" +0xd022: "kwelm" +0xd023: "kwelb" +0xd024: "kwels" +0xd025: "kwelt" +0xd026: "kwelp" +0xd027: "kwelh" +0xd028: "kwem" +0xd029: "kweb" +0xd02a: "kwebs" +0xd02b: "kwes" +0xd02c: "kwess" +0xd02d: "kweng" +0xd02e: "kwej" +0xd02f: "kwec" +0xd030: "kwek" +0xd031: "kwet" +0xd032: "kwep" +0xd033: "kweh" +0xd034: "kwi" +0xd035: "kwig" +0xd036: "kwigg" +0xd037: "kwigs" +0xd038: "kwin" +0xd039: "kwinj" +0xd03a: "kwinh" +0xd03b: "kwid" +0xd03c: "kwil" +0xd03d: "kwilg" +0xd03e: "kwilm" +0xd03f: "kwilb" +0xd040: "kwils" +0xd041: "kwilt" +0xd042: "kwilp" +0xd043: "kwilh" +0xd044: "kwim" +0xd045: "kwib" +0xd046: "kwibs" +0xd047: "kwis" +0xd048: "kwiss" +0xd049: "kwing" +0xd04a: "kwij" +0xd04b: "kwic" +0xd04c: "kwik" +0xd04d: "kwit" +0xd04e: "kwip" +0xd04f: "kwih" +0xd050: "kyu" +0xd051: "kyug" +0xd052: "kyugg" +0xd053: "kyugs" +0xd054: "kyun" +0xd055: "kyunj" +0xd056: "kyunh" +0xd057: "kyud" +0xd058: "kyul" +0xd059: "kyulg" +0xd05a: "kyulm" +0xd05b: "kyulb" +0xd05c: "kyuls" +0xd05d: "kyult" +0xd05e: "kyulp" +0xd05f: "kyulh" +0xd060: "kyum" +0xd061: "kyub" +0xd062: "kyubs" +0xd063: "kyus" +0xd064: "kyuss" +0xd065: "kyung" +0xd066: "kyuj" +0xd067: "kyuc" +0xd068: "kyuk" +0xd069: "kyut" +0xd06a: "kyup" +0xd06b: "kyuh" +0xd06c: "keu" +0xd06d: "keug" +0xd06e: "keugg" +0xd06f: "keugs" +0xd070: "keun" +0xd071: "keunj" +0xd072: "keunh" +0xd073: "keud" +0xd074: "keul" +0xd075: "keulg" +0xd076: "keulm" +0xd077: "keulb" +0xd078: "keuls" +0xd079: "keult" +0xd07a: "keulp" +0xd07b: "keulh" +0xd07c: "keum" +0xd07d: "keub" +0xd07e: "keubs" +0xd07f: "keus" +0xd080: "keuss" +0xd081: "keung" +0xd082: "keuj" +0xd083: "keuc" +0xd084: "keuk" +0xd085: "keut" +0xd086: "keup" +0xd087: "keuh" +0xd088: "kyi" +0xd089: "kyig" +0xd08a: "kyigg" +0xd08b: "kyigs" +0xd08c: "kyin" +0xd08d: "kyinj" +0xd08e: "kyinh" +0xd08f: "kyid" +0xd090: "kyil" +0xd091: "kyilg" +0xd092: "kyilm" +0xd093: "kyilb" +0xd094: "kyils" +0xd095: "kyilt" +0xd096: "kyilp" +0xd097: "kyilh" +0xd098: "kyim" +0xd099: "kyib" +0xd09a: "kyibs" +0xd09b: "kyis" +0xd09c: "kyiss" +0xd09d: "kying" +0xd09e: "kyij" +0xd09f: "kyic" +0xd0a0: "kyik" +0xd0a1: "kyit" +0xd0a2: "kyip" +0xd0a3: "kyih" +0xd0a4: "ki" +0xd0a5: "kig" +0xd0a6: "kigg" +0xd0a7: "kigs" +0xd0a8: "kin" +0xd0a9: "kinj" +0xd0aa: "kinh" +0xd0ab: "kid" +0xd0ac: "kil" +0xd0ad: "kilg" +0xd0ae: "kilm" +0xd0af: "kilb" +0xd0b0: "kils" +0xd0b1: "kilt" +0xd0b2: "kilp" +0xd0b3: "kilh" +0xd0b4: "kim" +0xd0b5: "kib" +0xd0b6: "kibs" +0xd0b7: "kis" +0xd0b8: "kiss" +0xd0b9: "king" +0xd0ba: "kij" +0xd0bb: "kic" +0xd0bc: "kik" +0xd0bd: "kit" +0xd0be: "kip" +0xd0bf: "kih" +0xd0c0: "ta" +0xd0c1: "tag" +0xd0c2: "tagg" +0xd0c3: "tags" +0xd0c4: "tan" +0xd0c5: "tanj" +0xd0c6: "tanh" +0xd0c7: "tad" +0xd0c8: "tal" +0xd0c9: "talg" +0xd0ca: "talm" +0xd0cb: "talb" +0xd0cc: "tals" +0xd0cd: "talt" +0xd0ce: "talp" +0xd0cf: "talh" +0xd0d0: "tam" +0xd0d1: "tab" +0xd0d2: "tabs" +0xd0d3: "tas" +0xd0d4: "tass" +0xd0d5: "tang" +0xd0d6: "taj" +0xd0d7: "tac" +0xd0d8: "tak" +0xd0d9: "tat" +0xd0da: "tap" +0xd0db: "tah" +0xd0dc: "tae" +0xd0dd: "taeg" +0xd0de: "taegg" +0xd0df: "taegs" +0xd0e0: "taen" +0xd0e1: "taenj" +0xd0e2: "taenh" +0xd0e3: "taed" +0xd0e4: "tael" +0xd0e5: "taelg" +0xd0e6: "taelm" +0xd0e7: "taelb" +0xd0e8: "taels" +0xd0e9: "taelt" +0xd0ea: "taelp" +0xd0eb: "taelh" +0xd0ec: "taem" +0xd0ed: "taeb" +0xd0ee: "taebs" +0xd0ef: "taes" +0xd0f0: "taess" +0xd0f1: "taeng" +0xd0f2: "taej" +0xd0f3: "taec" +0xd0f4: "taek" +0xd0f5: "taet" +0xd0f6: "taep" +0xd0f7: "taeh" +0xd0f8: "tya" +0xd0f9: "tyag" +0xd0fa: "tyagg" +0xd0fb: "tyags" +0xd0fc: "tyan" +0xd0fd: "tyanj" +0xd0fe: "tyanh" +0xd0ff: "tyad" +/* x0d1 */ +0xd100: "tyal" +0xd101: "tyalg" +0xd102: "tyalm" +0xd103: "tyalb" +0xd104: "tyals" +0xd105: "tyalt" +0xd106: "tyalp" +0xd107: "tyalh" +0xd108: "tyam" +0xd109: "tyab" +0xd10a: "tyabs" +0xd10b: "tyas" +0xd10c: "tyass" +0xd10d: "tyang" +0xd10e: "tyaj" +0xd10f: "tyac" +0xd110: "tyak" +0xd111: "tyat" +0xd112: "tyap" +0xd113: "tyah" +0xd114: "tyae" +0xd115: "tyaeg" +0xd116: "tyaegg" +0xd117: "tyaegs" +0xd118: "tyaen" +0xd119: "tyaenj" +0xd11a: "tyaenh" +0xd11b: "tyaed" +0xd11c: "tyael" +0xd11d: "tyaelg" +0xd11e: "tyaelm" +0xd11f: "tyaelb" +0xd120: "tyaels" +0xd121: "tyaelt" +0xd122: "tyaelp" +0xd123: "tyaelh" +0xd124: "tyaem" +0xd125: "tyaeb" +0xd126: "tyaebs" +0xd127: "tyaes" +0xd128: "tyaess" +0xd129: "tyaeng" +0xd12a: "tyaej" +0xd12b: "tyaec" +0xd12c: "tyaek" +0xd12d: "tyaet" +0xd12e: "tyaep" +0xd12f: "tyaeh" +0xd130: "teo" +0xd131: "teog" +0xd132: "teogg" +0xd133: "teogs" +0xd134: "teon" +0xd135: "teonj" +0xd136: "teonh" +0xd137: "teod" +0xd138: "teol" +0xd139: "teolg" +0xd13a: "teolm" +0xd13b: "teolb" +0xd13c: "teols" +0xd13d: "teolt" +0xd13e: "teolp" +0xd13f: "teolh" +0xd140: "teom" +0xd141: "teob" +0xd142: "teobs" +0xd143: "teos" +0xd144: "teoss" +0xd145: "teong" +0xd146: "teoj" +0xd147: "teoc" +0xd148: "teok" +0xd149: "teot" +0xd14a: "teop" +0xd14b: "teoh" +0xd14c: "te" +0xd14d: "teg" +0xd14e: "tegg" +0xd14f: "tegs" +0xd150: "ten" +0xd151: "tenj" +0xd152: "tenh" +0xd153: "ted" +0xd154: "tel" +0xd155: "telg" +0xd156: "telm" +0xd157: "telb" +0xd158: "tels" +0xd159: "telt" +0xd15a: "telp" +0xd15b: "telh" +0xd15c: "tem" +0xd15d: "teb" +0xd15e: "tebs" +0xd15f: "tes" +0xd160: "tess" +0xd161: "teng" +0xd162: "tej" +0xd163: "tec" +0xd164: "tek" +0xd165: "tet" +0xd166: "tep" +0xd167: "teh" +0xd168: "tyeo" +0xd169: "tyeog" +0xd16a: "tyeogg" +0xd16b: "tyeogs" +0xd16c: "tyeon" +0xd16d: "tyeonj" +0xd16e: "tyeonh" +0xd16f: "tyeod" +0xd170: "tyeol" +0xd171: "tyeolg" +0xd172: "tyeolm" +0xd173: "tyeolb" +0xd174: "tyeols" +0xd175: "tyeolt" +0xd176: "tyeolp" +0xd177: "tyeolh" +0xd178: "tyeom" +0xd179: "tyeob" +0xd17a: "tyeobs" +0xd17b: "tyeos" +0xd17c: "tyeoss" +0xd17d: "tyeong" +0xd17e: "tyeoj" +0xd17f: "tyeoc" +0xd180: "tyeok" +0xd181: "tyeot" +0xd182: "tyeop" +0xd183: "tyeoh" +0xd184: "tye" +0xd185: "tyeg" +0xd186: "tyegg" +0xd187: "tyegs" +0xd188: "tyen" +0xd189: "tyenj" +0xd18a: "tyenh" +0xd18b: "tyed" +0xd18c: "tyel" +0xd18d: "tyelg" +0xd18e: "tyelm" +0xd18f: "tyelb" +0xd190: "tyels" +0xd191: "tyelt" +0xd192: "tyelp" +0xd193: "tyelh" +0xd194: "tyem" +0xd195: "tyeb" +0xd196: "tyebs" +0xd197: "tyes" +0xd198: "tyess" +0xd199: "tyeng" +0xd19a: "tyej" +0xd19b: "tyec" +0xd19c: "tyek" +0xd19d: "tyet" +0xd19e: "tyep" +0xd19f: "tyeh" +0xd1a0: "to" +0xd1a1: "tog" +0xd1a2: "togg" +0xd1a3: "togs" +0xd1a4: "ton" +0xd1a5: "tonj" +0xd1a6: "tonh" +0xd1a7: "tod" +0xd1a8: "tol" +0xd1a9: "tolg" +0xd1aa: "tolm" +0xd1ab: "tolb" +0xd1ac: "tols" +0xd1ad: "tolt" +0xd1ae: "tolp" +0xd1af: "tolh" +0xd1b0: "tom" +0xd1b1: "tob" +0xd1b2: "tobs" +0xd1b3: "tos" +0xd1b4: "toss" +0xd1b5: "tong" +0xd1b6: "toj" +0xd1b7: "toc" +0xd1b8: "tok" +0xd1b9: "tot" +0xd1ba: "top" +0xd1bb: "toh" +0xd1bc: "twa" +0xd1bd: "twag" +0xd1be: "twagg" +0xd1bf: "twags" +0xd1c0: "twan" +0xd1c1: "twanj" +0xd1c2: "twanh" +0xd1c3: "twad" +0xd1c4: "twal" +0xd1c5: "twalg" +0xd1c6: "twalm" +0xd1c7: "twalb" +0xd1c8: "twals" +0xd1c9: "twalt" +0xd1ca: "twalp" +0xd1cb: "twalh" +0xd1cc: "twam" +0xd1cd: "twab" +0xd1ce: "twabs" +0xd1cf: "twas" +0xd1d0: "twass" +0xd1d1: "twang" +0xd1d2: "twaj" +0xd1d3: "twac" +0xd1d4: "twak" +0xd1d5: "twat" +0xd1d6: "twap" +0xd1d7: "twah" +0xd1d8: "twae" +0xd1d9: "twaeg" +0xd1da: "twaegg" +0xd1db: "twaegs" +0xd1dc: "twaen" +0xd1dd: "twaenj" +0xd1de: "twaenh" +0xd1df: "twaed" +0xd1e0: "twael" +0xd1e1: "twaelg" +0xd1e2: "twaelm" +0xd1e3: "twaelb" +0xd1e4: "twaels" +0xd1e5: "twaelt" +0xd1e6: "twaelp" +0xd1e7: "twaelh" +0xd1e8: "twaem" +0xd1e9: "twaeb" +0xd1ea: "twaebs" +0xd1eb: "twaes" +0xd1ec: "twaess" +0xd1ed: "twaeng" +0xd1ee: "twaej" +0xd1ef: "twaec" +0xd1f0: "twaek" +0xd1f1: "twaet" +0xd1f2: "twaep" +0xd1f3: "twaeh" +0xd1f4: "toe" +0xd1f5: "toeg" +0xd1f6: "toegg" +0xd1f7: "toegs" +0xd1f8: "toen" +0xd1f9: "toenj" +0xd1fa: "toenh" +0xd1fb: "toed" +0xd1fc: "toel" +0xd1fd: "toelg" +0xd1fe: "toelm" +0xd1ff: "toelb" +/* x0d2 */ +0xd200: "toels" +0xd201: "toelt" +0xd202: "toelp" +0xd203: "toelh" +0xd204: "toem" +0xd205: "toeb" +0xd206: "toebs" +0xd207: "toes" +0xd208: "toess" +0xd209: "toeng" +0xd20a: "toej" +0xd20b: "toec" +0xd20c: "toek" +0xd20d: "toet" +0xd20e: "toep" +0xd20f: "toeh" +0xd210: "tyo" +0xd211: "tyog" +0xd212: "tyogg" +0xd213: "tyogs" +0xd214: "tyon" +0xd215: "tyonj" +0xd216: "tyonh" +0xd217: "tyod" +0xd218: "tyol" +0xd219: "tyolg" +0xd21a: "tyolm" +0xd21b: "tyolb" +0xd21c: "tyols" +0xd21d: "tyolt" +0xd21e: "tyolp" +0xd21f: "tyolh" +0xd220: "tyom" +0xd221: "tyob" +0xd222: "tyobs" +0xd223: "tyos" +0xd224: "tyoss" +0xd225: "tyong" +0xd226: "tyoj" +0xd227: "tyoc" +0xd228: "tyok" +0xd229: "tyot" +0xd22a: "tyop" +0xd22b: "tyoh" +0xd22c: "tu" +0xd22d: "tug" +0xd22e: "tugg" +0xd22f: "tugs" +0xd230: "tun" +0xd231: "tunj" +0xd232: "tunh" +0xd233: "tud" +0xd234: "tul" +0xd235: "tulg" +0xd236: "tulm" +0xd237: "tulb" +0xd238: "tuls" +0xd239: "tult" +0xd23a: "tulp" +0xd23b: "tulh" +0xd23c: "tum" +0xd23d: "tub" +0xd23e: "tubs" +0xd23f: "tus" +0xd240: "tuss" +0xd241: "tung" +0xd242: "tuj" +0xd243: "tuc" +0xd244: "tuk" +0xd245: "tut" +0xd246: "tup" +0xd247: "tuh" +0xd248: "tweo" +0xd249: "tweog" +0xd24a: "tweogg" +0xd24b: "tweogs" +0xd24c: "tweon" +0xd24d: "tweonj" +0xd24e: "tweonh" +0xd24f: "tweod" +0xd250: "tweol" +0xd251: "tweolg" +0xd252: "tweolm" +0xd253: "tweolb" +0xd254: "tweols" +0xd255: "tweolt" +0xd256: "tweolp" +0xd257: "tweolh" +0xd258: "tweom" +0xd259: "tweob" +0xd25a: "tweobs" +0xd25b: "tweos" +0xd25c: "tweoss" +0xd25d: "tweong" +0xd25e: "tweoj" +0xd25f: "tweoc" +0xd260: "tweok" +0xd261: "tweot" +0xd262: "tweop" +0xd263: "tweoh" +0xd264: "twe" +0xd265: "tweg" +0xd266: "twegg" +0xd267: "twegs" +0xd268: "twen" +0xd269: "twenj" +0xd26a: "twenh" +0xd26b: "twed" +0xd26c: "twel" +0xd26d: "twelg" +0xd26e: "twelm" +0xd26f: "twelb" +0xd270: "twels" +0xd271: "twelt" +0xd272: "twelp" +0xd273: "twelh" +0xd274: "twem" +0xd275: "tweb" +0xd276: "twebs" +0xd277: "twes" +0xd278: "twess" +0xd279: "tweng" +0xd27a: "twej" +0xd27b: "twec" +0xd27c: "twek" +0xd27d: "twet" +0xd27e: "twep" +0xd27f: "tweh" +0xd280: "twi" +0xd281: "twig" +0xd282: "twigg" +0xd283: "twigs" +0xd284: "twin" +0xd285: "twinj" +0xd286: "twinh" +0xd287: "twid" +0xd288: "twil" +0xd289: "twilg" +0xd28a: "twilm" +0xd28b: "twilb" +0xd28c: "twils" +0xd28d: "twilt" +0xd28e: "twilp" +0xd28f: "twilh" +0xd290: "twim" +0xd291: "twib" +0xd292: "twibs" +0xd293: "twis" +0xd294: "twiss" +0xd295: "twing" +0xd296: "twij" +0xd297: "twic" +0xd298: "twik" +0xd299: "twit" +0xd29a: "twip" +0xd29b: "twih" +0xd29c: "tyu" +0xd29d: "tyug" +0xd29e: "tyugg" +0xd29f: "tyugs" +0xd2a0: "tyun" +0xd2a1: "tyunj" +0xd2a2: "tyunh" +0xd2a3: "tyud" +0xd2a4: "tyul" +0xd2a5: "tyulg" +0xd2a6: "tyulm" +0xd2a7: "tyulb" +0xd2a8: "tyuls" +0xd2a9: "tyult" +0xd2aa: "tyulp" +0xd2ab: "tyulh" +0xd2ac: "tyum" +0xd2ad: "tyub" +0xd2ae: "tyubs" +0xd2af: "tyus" +0xd2b0: "tyuss" +0xd2b1: "tyung" +0xd2b2: "tyuj" +0xd2b3: "tyuc" +0xd2b4: "tyuk" +0xd2b5: "tyut" +0xd2b6: "tyup" +0xd2b7: "tyuh" +0xd2b8: "teu" +0xd2b9: "teug" +0xd2ba: "teugg" +0xd2bb: "teugs" +0xd2bc: "teun" +0xd2bd: "teunj" +0xd2be: "teunh" +0xd2bf: "teud" +0xd2c0: "teul" +0xd2c1: "teulg" +0xd2c2: "teulm" +0xd2c3: "teulb" +0xd2c4: "teuls" +0xd2c5: "teult" +0xd2c6: "teulp" +0xd2c7: "teulh" +0xd2c8: "teum" +0xd2c9: "teub" +0xd2ca: "teubs" +0xd2cb: "teus" +0xd2cc: "teuss" +0xd2cd: "teung" +0xd2ce: "teuj" +0xd2cf: "teuc" +0xd2d0: "teuk" +0xd2d1: "teut" +0xd2d2: "teup" +0xd2d3: "teuh" +0xd2d4: "tyi" +0xd2d5: "tyig" +0xd2d6: "tyigg" +0xd2d7: "tyigs" +0xd2d8: "tyin" +0xd2d9: "tyinj" +0xd2da: "tyinh" +0xd2db: "tyid" +0xd2dc: "tyil" +0xd2dd: "tyilg" +0xd2de: "tyilm" +0xd2df: "tyilb" +0xd2e0: "tyils" +0xd2e1: "tyilt" +0xd2e2: "tyilp" +0xd2e3: "tyilh" +0xd2e4: "tyim" +0xd2e5: "tyib" +0xd2e6: "tyibs" +0xd2e7: "tyis" +0xd2e8: "tyiss" +0xd2e9: "tying" +0xd2ea: "tyij" +0xd2eb: "tyic" +0xd2ec: "tyik" +0xd2ed: "tyit" +0xd2ee: "tyip" +0xd2ef: "tyih" +0xd2f0: "ti" +0xd2f1: "tig" +0xd2f2: "tigg" +0xd2f3: "tigs" +0xd2f4: "tin" +0xd2f5: "tinj" +0xd2f6: "tinh" +0xd2f7: "tid" +0xd2f8: "til" +0xd2f9: "tilg" +0xd2fa: "tilm" +0xd2fb: "tilb" +0xd2fc: "tils" +0xd2fd: "tilt" +0xd2fe: "tilp" +0xd2ff: "tilh" +/* x0d3 */ +0xd300: "tim" +0xd301: "tib" +0xd302: "tibs" +0xd303: "tis" +0xd304: "tiss" +0xd305: "ting" +0xd306: "tij" +0xd307: "tic" +0xd308: "tik" +0xd309: "tit" +0xd30a: "tip" +0xd30b: "tih" +0xd30c: "pa" +0xd30d: "pag" +0xd30e: "pagg" +0xd30f: "pags" +0xd310: "pan" +0xd311: "panj" +0xd312: "panh" +0xd313: "pad" +0xd314: "pal" +0xd315: "palg" +0xd316: "palm" +0xd317: "palb" +0xd318: "pals" +0xd319: "palt" +0xd31a: "palp" +0xd31b: "palh" +0xd31c: "pam" +0xd31d: "pab" +0xd31e: "pabs" +0xd31f: "pas" +0xd320: "pass" +0xd321: "pang" +0xd322: "paj" +0xd323: "pac" +0xd324: "pak" +0xd325: "pat" +0xd326: "pap" +0xd327: "pah" +0xd328: "pae" +0xd329: "paeg" +0xd32a: "paegg" +0xd32b: "paegs" +0xd32c: "paen" +0xd32d: "paenj" +0xd32e: "paenh" +0xd32f: "paed" +0xd330: "pael" +0xd331: "paelg" +0xd332: "paelm" +0xd333: "paelb" +0xd334: "paels" +0xd335: "paelt" +0xd336: "paelp" +0xd337: "paelh" +0xd338: "paem" +0xd339: "paeb" +0xd33a: "paebs" +0xd33b: "paes" +0xd33c: "paess" +0xd33d: "paeng" +0xd33e: "paej" +0xd33f: "paec" +0xd340: "paek" +0xd341: "paet" +0xd342: "paep" +0xd343: "paeh" +0xd344: "pya" +0xd345: "pyag" +0xd346: "pyagg" +0xd347: "pyags" +0xd348: "pyan" +0xd349: "pyanj" +0xd34a: "pyanh" +0xd34b: "pyad" +0xd34c: "pyal" +0xd34d: "pyalg" +0xd34e: "pyalm" +0xd34f: "pyalb" +0xd350: "pyals" +0xd351: "pyalt" +0xd352: "pyalp" +0xd353: "pyalh" +0xd354: "pyam" +0xd355: "pyab" +0xd356: "pyabs" +0xd357: "pyas" +0xd358: "pyass" +0xd359: "pyang" +0xd35a: "pyaj" +0xd35b: "pyac" +0xd35c: "pyak" +0xd35d: "pyat" +0xd35e: "pyap" +0xd35f: "pyah" +0xd360: "pyae" +0xd361: "pyaeg" +0xd362: "pyaegg" +0xd363: "pyaegs" +0xd364: "pyaen" +0xd365: "pyaenj" +0xd366: "pyaenh" +0xd367: "pyaed" +0xd368: "pyael" +0xd369: "pyaelg" +0xd36a: "pyaelm" +0xd36b: "pyaelb" +0xd36c: "pyaels" +0xd36d: "pyaelt" +0xd36e: "pyaelp" +0xd36f: "pyaelh" +0xd370: "pyaem" +0xd371: "pyaeb" +0xd372: "pyaebs" +0xd373: "pyaes" +0xd374: "pyaess" +0xd375: "pyaeng" +0xd376: "pyaej" +0xd377: "pyaec" +0xd378: "pyaek" +0xd379: "pyaet" +0xd37a: "pyaep" +0xd37b: "pyaeh" +0xd37c: "peo" +0xd37d: "peog" +0xd37e: "peogg" +0xd37f: "peogs" +0xd380: "peon" +0xd381: "peonj" +0xd382: "peonh" +0xd383: "peod" +0xd384: "peol" +0xd385: "peolg" +0xd386: "peolm" +0xd387: "peolb" +0xd388: "peols" +0xd389: "peolt" +0xd38a: "peolp" +0xd38b: "peolh" +0xd38c: "peom" +0xd38d: "peob" +0xd38e: "peobs" +0xd38f: "peos" +0xd390: "peoss" +0xd391: "peong" +0xd392: "peoj" +0xd393: "peoc" +0xd394: "peok" +0xd395: "peot" +0xd396: "peop" +0xd397: "peoh" +0xd398: "pe" +0xd399: "peg" +0xd39a: "pegg" +0xd39b: "pegs" +0xd39c: "pen" +0xd39d: "penj" +0xd39e: "penh" +0xd39f: "ped" +0xd3a0: "pel" +0xd3a1: "pelg" +0xd3a2: "pelm" +0xd3a3: "pelb" +0xd3a4: "pels" +0xd3a5: "pelt" +0xd3a6: "pelp" +0xd3a7: "pelh" +0xd3a8: "pem" +0xd3a9: "peb" +0xd3aa: "pebs" +0xd3ab: "pes" +0xd3ac: "pess" +0xd3ad: "peng" +0xd3ae: "pej" +0xd3af: "pec" +0xd3b0: "pek" +0xd3b1: "pet" +0xd3b2: "pep" +0xd3b3: "peh" +0xd3b4: "pyeo" +0xd3b5: "pyeog" +0xd3b6: "pyeogg" +0xd3b7: "pyeogs" +0xd3b8: "pyeon" +0xd3b9: "pyeonj" +0xd3ba: "pyeonh" +0xd3bb: "pyeod" +0xd3bc: "pyeol" +0xd3bd: "pyeolg" +0xd3be: "pyeolm" +0xd3bf: "pyeolb" +0xd3c0: "pyeols" +0xd3c1: "pyeolt" +0xd3c2: "pyeolp" +0xd3c3: "pyeolh" +0xd3c4: "pyeom" +0xd3c5: "pyeob" +0xd3c6: "pyeobs" +0xd3c7: "pyeos" +0xd3c8: "pyeoss" +0xd3c9: "pyeong" +0xd3ca: "pyeoj" +0xd3cb: "pyeoc" +0xd3cc: "pyeok" +0xd3cd: "pyeot" +0xd3ce: "pyeop" +0xd3cf: "pyeoh" +0xd3d0: "pye" +0xd3d1: "pyeg" +0xd3d2: "pyegg" +0xd3d3: "pyegs" +0xd3d4: "pyen" +0xd3d5: "pyenj" +0xd3d6: "pyenh" +0xd3d7: "pyed" +0xd3d8: "pyel" +0xd3d9: "pyelg" +0xd3da: "pyelm" +0xd3db: "pyelb" +0xd3dc: "pyels" +0xd3dd: "pyelt" +0xd3de: "pyelp" +0xd3df: "pyelh" +0xd3e0: "pyem" +0xd3e1: "pyeb" +0xd3e2: "pyebs" +0xd3e3: "pyes" +0xd3e4: "pyess" +0xd3e5: "pyeng" +0xd3e6: "pyej" +0xd3e7: "pyec" +0xd3e8: "pyek" +0xd3e9: "pyet" +0xd3ea: "pyep" +0xd3eb: "pyeh" +0xd3ec: "po" +0xd3ed: "pog" +0xd3ee: "pogg" +0xd3ef: "pogs" +0xd3f0: "pon" +0xd3f1: "ponj" +0xd3f2: "ponh" +0xd3f3: "pod" +0xd3f4: "pol" +0xd3f5: "polg" +0xd3f6: "polm" +0xd3f7: "polb" +0xd3f8: "pols" +0xd3f9: "polt" +0xd3fa: "polp" +0xd3fb: "polh" +0xd3fc: "pom" +0xd3fd: "pob" +0xd3fe: "pobs" +0xd3ff: "pos" +/* x0d4 */ +0xd400: "poss" +0xd401: "pong" +0xd402: "poj" +0xd403: "poc" +0xd404: "pok" +0xd405: "pot" +0xd406: "pop" +0xd407: "poh" +0xd408: "pwa" +0xd409: "pwag" +0xd40a: "pwagg" +0xd40b: "pwags" +0xd40c: "pwan" +0xd40d: "pwanj" +0xd40e: "pwanh" +0xd40f: "pwad" +0xd410: "pwal" +0xd411: "pwalg" +0xd412: "pwalm" +0xd413: "pwalb" +0xd414: "pwals" +0xd415: "pwalt" +0xd416: "pwalp" +0xd417: "pwalh" +0xd418: "pwam" +0xd419: "pwab" +0xd41a: "pwabs" +0xd41b: "pwas" +0xd41c: "pwass" +0xd41d: "pwang" +0xd41e: "pwaj" +0xd41f: "pwac" +0xd420: "pwak" +0xd421: "pwat" +0xd422: "pwap" +0xd423: "pwah" +0xd424: "pwae" +0xd425: "pwaeg" +0xd426: "pwaegg" +0xd427: "pwaegs" +0xd428: "pwaen" +0xd429: "pwaenj" +0xd42a: "pwaenh" +0xd42b: "pwaed" +0xd42c: "pwael" +0xd42d: "pwaelg" +0xd42e: "pwaelm" +0xd42f: "pwaelb" +0xd430: "pwaels" +0xd431: "pwaelt" +0xd432: "pwaelp" +0xd433: "pwaelh" +0xd434: "pwaem" +0xd435: "pwaeb" +0xd436: "pwaebs" +0xd437: "pwaes" +0xd438: "pwaess" +0xd439: "pwaeng" +0xd43a: "pwaej" +0xd43b: "pwaec" +0xd43c: "pwaek" +0xd43d: "pwaet" +0xd43e: "pwaep" +0xd43f: "pwaeh" +0xd440: "poe" +0xd441: "poeg" +0xd442: "poegg" +0xd443: "poegs" +0xd444: "poen" +0xd445: "poenj" +0xd446: "poenh" +0xd447: "poed" +0xd448: "poel" +0xd449: "poelg" +0xd44a: "poelm" +0xd44b: "poelb" +0xd44c: "poels" +0xd44d: "poelt" +0xd44e: "poelp" +0xd44f: "poelh" +0xd450: "poem" +0xd451: "poeb" +0xd452: "poebs" +0xd453: "poes" +0xd454: "poess" +0xd455: "poeng" +0xd456: "poej" +0xd457: "poec" +0xd458: "poek" +0xd459: "poet" +0xd45a: "poep" +0xd45b: "poeh" +0xd45c: "pyo" +0xd45d: "pyog" +0xd45e: "pyogg" +0xd45f: "pyogs" +0xd460: "pyon" +0xd461: "pyonj" +0xd462: "pyonh" +0xd463: "pyod" +0xd464: "pyol" +0xd465: "pyolg" +0xd466: "pyolm" +0xd467: "pyolb" +0xd468: "pyols" +0xd469: "pyolt" +0xd46a: "pyolp" +0xd46b: "pyolh" +0xd46c: "pyom" +0xd46d: "pyob" +0xd46e: "pyobs" +0xd46f: "pyos" +0xd470: "pyoss" +0xd471: "pyong" +0xd472: "pyoj" +0xd473: "pyoc" +0xd474: "pyok" +0xd475: "pyot" +0xd476: "pyop" +0xd477: "pyoh" +0xd478: "pu" +0xd479: "pug" +0xd47a: "pugg" +0xd47b: "pugs" +0xd47c: "pun" +0xd47d: "punj" +0xd47e: "punh" +0xd47f: "pud" +0xd480: "pul" +0xd481: "pulg" +0xd482: "pulm" +0xd483: "pulb" +0xd484: "puls" +0xd485: "pult" +0xd486: "pulp" +0xd487: "pulh" +0xd488: "pum" +0xd489: "pub" +0xd48a: "pubs" +0xd48b: "pus" +0xd48c: "puss" +0xd48d: "pung" +0xd48e: "puj" +0xd48f: "puc" +0xd490: "puk" +0xd491: "put" +0xd492: "pup" +0xd493: "puh" +0xd494: "pweo" +0xd495: "pweog" +0xd496: "pweogg" +0xd497: "pweogs" +0xd498: "pweon" +0xd499: "pweonj" +0xd49a: "pweonh" +0xd49b: "pweod" +0xd49c: "pweol" +0xd49d: "pweolg" +0xd49e: "pweolm" +0xd49f: "pweolb" +0xd4a0: "pweols" +0xd4a1: "pweolt" +0xd4a2: "pweolp" +0xd4a3: "pweolh" +0xd4a4: "pweom" +0xd4a5: "pweob" +0xd4a6: "pweobs" +0xd4a7: "pweos" +0xd4a8: "pweoss" +0xd4a9: "pweong" +0xd4aa: "pweoj" +0xd4ab: "pweoc" +0xd4ac: "pweok" +0xd4ad: "pweot" +0xd4ae: "pweop" +0xd4af: "pweoh" +0xd4b0: "pwe" +0xd4b1: "pweg" +0xd4b2: "pwegg" +0xd4b3: "pwegs" +0xd4b4: "pwen" +0xd4b5: "pwenj" +0xd4b6: "pwenh" +0xd4b7: "pwed" +0xd4b8: "pwel" +0xd4b9: "pwelg" +0xd4ba: "pwelm" +0xd4bb: "pwelb" +0xd4bc: "pwels" +0xd4bd: "pwelt" +0xd4be: "pwelp" +0xd4bf: "pwelh" +0xd4c0: "pwem" +0xd4c1: "pweb" +0xd4c2: "pwebs" +0xd4c3: "pwes" +0xd4c4: "pwess" +0xd4c5: "pweng" +0xd4c6: "pwej" +0xd4c7: "pwec" +0xd4c8: "pwek" +0xd4c9: "pwet" +0xd4ca: "pwep" +0xd4cb: "pweh" +0xd4cc: "pwi" +0xd4cd: "pwig" +0xd4ce: "pwigg" +0xd4cf: "pwigs" +0xd4d0: "pwin" +0xd4d1: "pwinj" +0xd4d2: "pwinh" +0xd4d3: "pwid" +0xd4d4: "pwil" +0xd4d5: "pwilg" +0xd4d6: "pwilm" +0xd4d7: "pwilb" +0xd4d8: "pwils" +0xd4d9: "pwilt" +0xd4da: "pwilp" +0xd4db: "pwilh" +0xd4dc: "pwim" +0xd4dd: "pwib" +0xd4de: "pwibs" +0xd4df: "pwis" +0xd4e0: "pwiss" +0xd4e1: "pwing" +0xd4e2: "pwij" +0xd4e3: "pwic" +0xd4e4: "pwik" +0xd4e5: "pwit" +0xd4e6: "pwip" +0xd4e7: "pwih" +0xd4e8: "pyu" +0xd4e9: "pyug" +0xd4ea: "pyugg" +0xd4eb: "pyugs" +0xd4ec: "pyun" +0xd4ed: "pyunj" +0xd4ee: "pyunh" +0xd4ef: "pyud" +0xd4f0: "pyul" +0xd4f1: "pyulg" +0xd4f2: "pyulm" +0xd4f3: "pyulb" +0xd4f4: "pyuls" +0xd4f5: "pyult" +0xd4f6: "pyulp" +0xd4f7: "pyulh" +0xd4f8: "pyum" +0xd4f9: "pyub" +0xd4fa: "pyubs" +0xd4fb: "pyus" +0xd4fc: "pyuss" +0xd4fd: "pyung" +0xd4fe: "pyuj" +0xd4ff: "pyuc" +/* x0d5 */ +0xd500: "pyuk" +0xd501: "pyut" +0xd502: "pyup" +0xd503: "pyuh" +0xd504: "peu" +0xd505: "peug" +0xd506: "peugg" +0xd507: "peugs" +0xd508: "peun" +0xd509: "peunj" +0xd50a: "peunh" +0xd50b: "peud" +0xd50c: "peul" +0xd50d: "peulg" +0xd50e: "peulm" +0xd50f: "peulb" +0xd510: "peuls" +0xd511: "peult" +0xd512: "peulp" +0xd513: "peulh" +0xd514: "peum" +0xd515: "peub" +0xd516: "peubs" +0xd517: "peus" +0xd518: "peuss" +0xd519: "peung" +0xd51a: "peuj" +0xd51b: "peuc" +0xd51c: "peuk" +0xd51d: "peut" +0xd51e: "peup" +0xd51f: "peuh" +0xd520: "pyi" +0xd521: "pyig" +0xd522: "pyigg" +0xd523: "pyigs" +0xd524: "pyin" +0xd525: "pyinj" +0xd526: "pyinh" +0xd527: "pyid" +0xd528: "pyil" +0xd529: "pyilg" +0xd52a: "pyilm" +0xd52b: "pyilb" +0xd52c: "pyils" +0xd52d: "pyilt" +0xd52e: "pyilp" +0xd52f: "pyilh" +0xd530: "pyim" +0xd531: "pyib" +0xd532: "pyibs" +0xd533: "pyis" +0xd534: "pyiss" +0xd535: "pying" +0xd536: "pyij" +0xd537: "pyic" +0xd538: "pyik" +0xd539: "pyit" +0xd53a: "pyip" +0xd53b: "pyih" +0xd53c: "pi" +0xd53d: "pig" +0xd53e: "pigg" +0xd53f: "pigs" +0xd540: "pin" +0xd541: "pinj" +0xd542: "pinh" +0xd543: "pid" +0xd544: "pil" +0xd545: "pilg" +0xd546: "pilm" +0xd547: "pilb" +0xd548: "pils" +0xd549: "pilt" +0xd54a: "pilp" +0xd54b: "pilh" +0xd54c: "pim" +0xd54d: "pib" +0xd54e: "pibs" +0xd54f: "pis" +0xd550: "piss" +0xd551: "ping" +0xd552: "pij" +0xd553: "pic" +0xd554: "pik" +0xd555: "pit" +0xd556: "pip" +0xd557: "pih" +0xd558: "ha" +0xd559: "hag" +0xd55a: "hagg" +0xd55b: "hags" +0xd55c: "han" +0xd55d: "hanj" +0xd55e: "hanh" +0xd55f: "had" +0xd560: "hal" +0xd561: "halg" +0xd562: "halm" +0xd563: "halb" +0xd564: "hals" +0xd565: "halt" +0xd566: "halp" +0xd567: "halh" +0xd568: "ham" +0xd569: "hab" +0xd56a: "habs" +0xd56b: "has" +0xd56c: "hass" +0xd56d: "hang" +0xd56e: "haj" +0xd56f: "hac" +0xd570: "hak" +0xd571: "hat" +0xd572: "hap" +0xd573: "hah" +0xd574: "hae" +0xd575: "haeg" +0xd576: "haegg" +0xd577: "haegs" +0xd578: "haen" +0xd579: "haenj" +0xd57a: "haenh" +0xd57b: "haed" +0xd57c: "hael" +0xd57d: "haelg" +0xd57e: "haelm" +0xd57f: "haelb" +0xd580: "haels" +0xd581: "haelt" +0xd582: "haelp" +0xd583: "haelh" +0xd584: "haem" +0xd585: "haeb" +0xd586: "haebs" +0xd587: "haes" +0xd588: "haess" +0xd589: "haeng" +0xd58a: "haej" +0xd58b: "haec" +0xd58c: "haek" +0xd58d: "haet" +0xd58e: "haep" +0xd58f: "haeh" +0xd590: "hya" +0xd591: "hyag" +0xd592: "hyagg" +0xd593: "hyags" +0xd594: "hyan" +0xd595: "hyanj" +0xd596: "hyanh" +0xd597: "hyad" +0xd598: "hyal" +0xd599: "hyalg" +0xd59a: "hyalm" +0xd59b: "hyalb" +0xd59c: "hyals" +0xd59d: "hyalt" +0xd59e: "hyalp" +0xd59f: "hyalh" +0xd5a0: "hyam" +0xd5a1: "hyab" +0xd5a2: "hyabs" +0xd5a3: "hyas" +0xd5a4: "hyass" +0xd5a5: "hyang" +0xd5a6: "hyaj" +0xd5a7: "hyac" +0xd5a8: "hyak" +0xd5a9: "hyat" +0xd5aa: "hyap" +0xd5ab: "hyah" +0xd5ac: "hyae" +0xd5ad: "hyaeg" +0xd5ae: "hyaegg" +0xd5af: "hyaegs" +0xd5b0: "hyaen" +0xd5b1: "hyaenj" +0xd5b2: "hyaenh" +0xd5b3: "hyaed" +0xd5b4: "hyael" +0xd5b5: "hyaelg" +0xd5b6: "hyaelm" +0xd5b7: "hyaelb" +0xd5b8: "hyaels" +0xd5b9: "hyaelt" +0xd5ba: "hyaelp" +0xd5bb: "hyaelh" +0xd5bc: "hyaem" +0xd5bd: "hyaeb" +0xd5be: "hyaebs" +0xd5bf: "hyaes" +0xd5c0: "hyaess" +0xd5c1: "hyaeng" +0xd5c2: "hyaej" +0xd5c3: "hyaec" +0xd5c4: "hyaek" +0xd5c5: "hyaet" +0xd5c6: "hyaep" +0xd5c7: "hyaeh" +0xd5c8: "heo" +0xd5c9: "heog" +0xd5ca: "heogg" +0xd5cb: "heogs" +0xd5cc: "heon" +0xd5cd: "heonj" +0xd5ce: "heonh" +0xd5cf: "heod" +0xd5d0: "heol" +0xd5d1: "heolg" +0xd5d2: "heolm" +0xd5d3: "heolb" +0xd5d4: "heols" +0xd5d5: "heolt" +0xd5d6: "heolp" +0xd5d7: "heolh" +0xd5d8: "heom" +0xd5d9: "heob" +0xd5da: "heobs" +0xd5db: "heos" +0xd5dc: "heoss" +0xd5dd: "heong" +0xd5de: "heoj" +0xd5df: "heoc" +0xd5e0: "heok" +0xd5e1: "heot" +0xd5e2: "heop" +0xd5e3: "heoh" +0xd5e4: "he" +0xd5e5: "heg" +0xd5e6: "hegg" +0xd5e7: "hegs" +0xd5e8: "hen" +0xd5e9: "henj" +0xd5ea: "henh" +0xd5eb: "hed" +0xd5ec: "hel" +0xd5ed: "helg" +0xd5ee: "helm" +0xd5ef: "helb" +0xd5f0: "hels" +0xd5f1: "helt" +0xd5f2: "help" +0xd5f3: "helh" +0xd5f4: "hem" +0xd5f5: "heb" +0xd5f6: "hebs" +0xd5f7: "hes" +0xd5f8: "hess" +0xd5f9: "heng" +0xd5fa: "hej" +0xd5fb: "hec" +0xd5fc: "hek" +0xd5fd: "het" +0xd5fe: "hep" +0xd5ff: "heh" +/* x0d6 */ +0xd600: "hyeo" +0xd601: "hyeog" +0xd602: "hyeogg" +0xd603: "hyeogs" +0xd604: "hyeon" +0xd605: "hyeonj" +0xd606: "hyeonh" +0xd607: "hyeod" +0xd608: "hyeol" +0xd609: "hyeolg" +0xd60a: "hyeolm" +0xd60b: "hyeolb" +0xd60c: "hyeols" +0xd60d: "hyeolt" +0xd60e: "hyeolp" +0xd60f: "hyeolh" +0xd610: "hyeom" +0xd611: "hyeob" +0xd612: "hyeobs" +0xd613: "hyeos" +0xd614: "hyeoss" +0xd615: "hyeong" +0xd616: "hyeoj" +0xd617: "hyeoc" +0xd618: "hyeok" +0xd619: "hyeot" +0xd61a: "hyeop" +0xd61b: "hyeoh" +0xd61c: "hye" +0xd61d: "hyeg" +0xd61e: "hyegg" +0xd61f: "hyegs" +0xd620: "hyen" +0xd621: "hyenj" +0xd622: "hyenh" +0xd623: "hyed" +0xd624: "hyel" +0xd625: "hyelg" +0xd626: "hyelm" +0xd627: "hyelb" +0xd628: "hyels" +0xd629: "hyelt" +0xd62a: "hyelp" +0xd62b: "hyelh" +0xd62c: "hyem" +0xd62d: "hyeb" +0xd62e: "hyebs" +0xd62f: "hyes" +0xd630: "hyess" +0xd631: "hyeng" +0xd632: "hyej" +0xd633: "hyec" +0xd634: "hyek" +0xd635: "hyet" +0xd636: "hyep" +0xd637: "hyeh" +0xd638: "ho" +0xd639: "hog" +0xd63a: "hogg" +0xd63b: "hogs" +0xd63c: "hon" +0xd63d: "honj" +0xd63e: "honh" +0xd63f: "hod" +0xd640: "hol" +0xd641: "holg" +0xd642: "holm" +0xd643: "holb" +0xd644: "hols" +0xd645: "holt" +0xd646: "holp" +0xd647: "holh" +0xd648: "hom" +0xd649: "hob" +0xd64a: "hobs" +0xd64b: "hos" +0xd64c: "hoss" +0xd64d: "hong" +0xd64e: "hoj" +0xd64f: "hoc" +0xd650: "hok" +0xd651: "hot" +0xd652: "hop" +0xd653: "hoh" +0xd654: "hwa" +0xd655: "hwag" +0xd656: "hwagg" +0xd657: "hwags" +0xd658: "hwan" +0xd659: "hwanj" +0xd65a: "hwanh" +0xd65b: "hwad" +0xd65c: "hwal" +0xd65d: "hwalg" +0xd65e: "hwalm" +0xd65f: "hwalb" +0xd660: "hwals" +0xd661: "hwalt" +0xd662: "hwalp" +0xd663: "hwalh" +0xd664: "hwam" +0xd665: "hwab" +0xd666: "hwabs" +0xd667: "hwas" +0xd668: "hwass" +0xd669: "hwang" +0xd66a: "hwaj" +0xd66b: "hwac" +0xd66c: "hwak" +0xd66d: "hwat" +0xd66e: "hwap" +0xd66f: "hwah" +0xd670: "hwae" +0xd671: "hwaeg" +0xd672: "hwaegg" +0xd673: "hwaegs" +0xd674: "hwaen" +0xd675: "hwaenj" +0xd676: "hwaenh" +0xd677: "hwaed" +0xd678: "hwael" +0xd679: "hwaelg" +0xd67a: "hwaelm" +0xd67b: "hwaelb" +0xd67c: "hwaels" +0xd67d: "hwaelt" +0xd67e: "hwaelp" +0xd67f: "hwaelh" +0xd680: "hwaem" +0xd681: "hwaeb" +0xd682: "hwaebs" +0xd683: "hwaes" +0xd684: "hwaess" +0xd685: "hwaeng" +0xd686: "hwaej" +0xd687: "hwaec" +0xd688: "hwaek" +0xd689: "hwaet" +0xd68a: "hwaep" +0xd68b: "hwaeh" +0xd68c: "hoe" +0xd68d: "hoeg" +0xd68e: "hoegg" +0xd68f: "hoegs" +0xd690: "hoen" +0xd691: "hoenj" +0xd692: "hoenh" +0xd693: "hoed" +0xd694: "hoel" +0xd695: "hoelg" +0xd696: "hoelm" +0xd697: "hoelb" +0xd698: "hoels" +0xd699: "hoelt" +0xd69a: "hoelp" +0xd69b: "hoelh" +0xd69c: "hoem" +0xd69d: "hoeb" +0xd69e: "hoebs" +0xd69f: "hoes" +0xd6a0: "hoess" +0xd6a1: "hoeng" +0xd6a2: "hoej" +0xd6a3: "hoec" +0xd6a4: "hoek" +0xd6a5: "hoet" +0xd6a6: "hoep" +0xd6a7: "hoeh" +0xd6a8: "hyo" +0xd6a9: "hyog" +0xd6aa: "hyogg" +0xd6ab: "hyogs" +0xd6ac: "hyon" +0xd6ad: "hyonj" +0xd6ae: "hyonh" +0xd6af: "hyod" +0xd6b0: "hyol" +0xd6b1: "hyolg" +0xd6b2: "hyolm" +0xd6b3: "hyolb" +0xd6b4: "hyols" +0xd6b5: "hyolt" +0xd6b6: "hyolp" +0xd6b7: "hyolh" +0xd6b8: "hyom" +0xd6b9: "hyob" +0xd6ba: "hyobs" +0xd6bb: "hyos" +0xd6bc: "hyoss" +0xd6bd: "hyong" +0xd6be: "hyoj" +0xd6bf: "hyoc" +0xd6c0: "hyok" +0xd6c1: "hyot" +0xd6c2: "hyop" +0xd6c3: "hyoh" +0xd6c4: "hu" +0xd6c5: "hug" +0xd6c6: "hugg" +0xd6c7: "hugs" +0xd6c8: "hun" +0xd6c9: "hunj" +0xd6ca: "hunh" +0xd6cb: "hud" +0xd6cc: "hul" +0xd6cd: "hulg" +0xd6ce: "hulm" +0xd6cf: "hulb" +0xd6d0: "huls" +0xd6d1: "hult" +0xd6d2: "hulp" +0xd6d3: "hulh" +0xd6d4: "hum" +0xd6d5: "hub" +0xd6d6: "hubs" +0xd6d7: "hus" +0xd6d8: "huss" +0xd6d9: "hung" +0xd6da: "huj" +0xd6db: "huc" +0xd6dc: "huk" +0xd6dd: "hut" +0xd6de: "hup" +0xd6df: "huh" +0xd6e0: "hweo" +0xd6e1: "hweog" +0xd6e2: "hweogg" +0xd6e3: "hweogs" +0xd6e4: "hweon" +0xd6e5: "hweonj" +0xd6e6: "hweonh" +0xd6e7: "hweod" +0xd6e8: "hweol" +0xd6e9: "hweolg" +0xd6ea: "hweolm" +0xd6eb: "hweolb" +0xd6ec: "hweols" +0xd6ed: "hweolt" +0xd6ee: "hweolp" +0xd6ef: "hweolh" +0xd6f0: "hweom" +0xd6f1: "hweob" +0xd6f2: "hweobs" +0xd6f3: "hweos" +0xd6f4: "hweoss" +0xd6f5: "hweong" +0xd6f6: "hweoj" +0xd6f7: "hweoc" +0xd6f8: "hweok" +0xd6f9: "hweot" +0xd6fa: "hweop" +0xd6fb: "hweoh" +0xd6fc: "hwe" +0xd6fd: "hweg" +0xd6fe: "hwegg" +0xd6ff: "hwegs" +/* x0d7 */ +0xd700: "hwen" +0xd701: "hwenj" +0xd702: "hwenh" +0xd703: "hwed" +0xd704: "hwel" +0xd705: "hwelg" +0xd706: "hwelm" +0xd707: "hwelb" +0xd708: "hwels" +0xd709: "hwelt" +0xd70a: "hwelp" +0xd70b: "hwelh" +0xd70c: "hwem" +0xd70d: "hweb" +0xd70e: "hwebs" +0xd70f: "hwes" +0xd710: "hwess" +0xd711: "hweng" +0xd712: "hwej" +0xd713: "hwec" +0xd714: "hwek" +0xd715: "hwet" +0xd716: "hwep" +0xd717: "hweh" +0xd718: "hwi" +0xd719: "hwig" +0xd71a: "hwigg" +0xd71b: "hwigs" +0xd71c: "hwin" +0xd71d: "hwinj" +0xd71e: "hwinh" +0xd71f: "hwid" +0xd720: "hwil" +0xd721: "hwilg" +0xd722: "hwilm" +0xd723: "hwilb" +0xd724: "hwils" +0xd725: "hwilt" +0xd726: "hwilp" +0xd727: "hwilh" +0xd728: "hwim" +0xd729: "hwib" +0xd72a: "hwibs" +0xd72b: "hwis" +0xd72c: "hwiss" +0xd72d: "hwing" +0xd72e: "hwij" +0xd72f: "hwic" +0xd730: "hwik" +0xd731: "hwit" +0xd732: "hwip" +0xd733: "hwih" +0xd734: "hyu" +0xd735: "hyug" +0xd736: "hyugg" +0xd737: "hyugs" +0xd738: "hyun" +0xd739: "hyunj" +0xd73a: "hyunh" +0xd73b: "hyud" +0xd73c: "hyul" +0xd73d: "hyulg" +0xd73e: "hyulm" +0xd73f: "hyulb" +0xd740: "hyuls" +0xd741: "hyult" +0xd742: "hyulp" +0xd743: "hyulh" +0xd744: "hyum" +0xd745: "hyub" +0xd746: "hyubs" +0xd747: "hyus" +0xd748: "hyuss" +0xd749: "hyung" +0xd74a: "hyuj" +0xd74b: "hyuc" +0xd74c: "hyuk" +0xd74d: "hyut" +0xd74e: "hyup" +0xd74f: "hyuh" +0xd750: "heu" +0xd751: "heug" +0xd752: "heugg" +0xd753: "heugs" +0xd754: "heun" +0xd755: "heunj" +0xd756: "heunh" +0xd757: "heud" +0xd758: "heul" +0xd759: "heulg" +0xd75a: "heulm" +0xd75b: "heulb" +0xd75c: "heuls" +0xd75d: "heult" +0xd75e: "heulp" +0xd75f: "heulh" +0xd760: "heum" +0xd761: "heub" +0xd762: "heubs" +0xd763: "heus" +0xd764: "heuss" +0xd765: "heung" +0xd766: "heuj" +0xd767: "heuc" +0xd768: "heuk" +0xd769: "heut" +0xd76a: "heup" +0xd76b: "heuh" +0xd76c: "hyi" +0xd76d: "hyig" +0xd76e: "hyigg" +0xd76f: "hyigs" +0xd770: "hyin" +0xd771: "hyinj" +0xd772: "hyinh" +0xd773: "hyid" +0xd774: "hyil" +0xd775: "hyilg" +0xd776: "hyilm" +0xd777: "hyilb" +0xd778: "hyils" +0xd779: "hyilt" +0xd77a: "hyilp" +0xd77b: "hyilh" +0xd77c: "hyim" +0xd77d: "hyib" +0xd77e: "hyibs" +0xd77f: "hyis" +0xd780: "hyiss" +0xd781: "hying" +0xd782: "hyij" +0xd783: "hyic" +0xd784: "hyik" +0xd785: "hyit" +0xd786: "hyip" +0xd787: "hyih" +0xd788: "hi" +0xd789: "hig" +0xd78a: "higg" +0xd78b: "higs" +0xd78c: "hin" +0xd78d: "hinj" +0xd78e: "hinh" +0xd78f: "hid" +0xd790: "hil" +0xd791: "hilg" +0xd792: "hilm" +0xd793: "hilb" +0xd794: "hils" +0xd795: "hilt" +0xd796: "hilp" +0xd797: "hilh" +0xd798: "him" +0xd799: "hib" +0xd79a: "hibs" +0xd79b: "his" +0xd79c: "hiss" +0xd79d: "hing" +0xd79e: "hij" +0xd79f: "hic" +0xd7a0: "hik" +0xd7a1: "hit" +0xd7a2: "hip" +0xd7a3: "hih" +0xd7a4: "[?]" +0xd7a5: "[?]" +0xd7a6: "[?]" +0xd7a7: "[?]" +0xd7a8: "[?]" +0xd7a9: "[?]" +0xd7aa: "[?]" +0xd7ab: "[?]" +0xd7ac: "[?]" +0xd7ad: "[?]" +0xd7ae: "[?]" +0xd7af: "[?]" +0xd7b0: "[?]" +0xd7b1: "[?]" +0xd7b2: "[?]" +0xd7b3: "[?]" +0xd7b4: "[?]" +0xd7b5: "[?]" +0xd7b6: "[?]" +0xd7b7: "[?]" +0xd7b8: "[?]" +0xd7b9: "[?]" +0xd7ba: "[?]" +0xd7bb: "[?]" +0xd7bc: "[?]" +0xd7bd: "[?]" +0xd7be: "[?]" +0xd7bf: "[?]" +0xd7c0: "[?]" +0xd7c1: "[?]" +0xd7c2: "[?]" +0xd7c3: "[?]" +0xd7c4: "[?]" +0xd7c5: "[?]" +0xd7c6: "[?]" +0xd7c7: "[?]" +0xd7c8: "[?]" +0xd7c9: "[?]" +0xd7ca: "[?]" +0xd7cb: "[?]" +0xd7cc: "[?]" +0xd7cd: "[?]" +0xd7ce: "[?]" +0xd7cf: "[?]" +0xd7d0: "[?]" +0xd7d1: "[?]" +0xd7d2: "[?]" +0xd7d3: "[?]" +0xd7d4: "[?]" +0xd7d5: "[?]" +0xd7d6: "[?]" +0xd7d7: "[?]" +0xd7d8: "[?]" +0xd7d9: "[?]" +0xd7da: "[?]" +0xd7db: "[?]" +0xd7dc: "[?]" +0xd7dd: "[?]" +0xd7de: "[?]" +0xd7df: "[?]" +0xd7e0: "[?]" +0xd7e1: "[?]" +0xd7e2: "[?]" +0xd7e3: "[?]" +0xd7e4: "[?]" +0xd7e5: "[?]" +0xd7e6: "[?]" +0xd7e7: "[?]" +0xd7e8: "[?]" +0xd7e9: "[?]" +0xd7ea: "[?]" +0xd7eb: "[?]" +0xd7ec: "[?]" +0xd7ed: "[?]" +0xd7ee: "[?]" +0xd7ef: "[?]" +0xd7f0: "[?]" +0xd7f1: "[?]" +0xd7f2: "[?]" +0xd7f3: "[?]" +0xd7f4: "[?]" +0xd7f5: "[?]" +0xd7f6: "[?]" +0xd7f7: "[?]" +0xd7f8: "[?]" +0xd7f9: "[?]" +0xd7fa: "[?]" +0xd7fb: "[?]" +0xd7fc: "[?]" +0xd7fd: "[?]" +0xd7fe: "[?]" +/* x0f9 */ +0xf900: "Kay " +0xf901: "Kayng " +0xf902: "Ke " +0xf903: "Ko " +0xf904: "Kol " +0xf905: "Koc " +0xf906: "Kwi " +0xf907: "Kwi " +0xf908: "Kyun " +0xf909: "Kul " +0xf90a: "Kum " +0xf90b: "Na " +0xf90c: "Na " +0xf90d: "Na " +0xf90e: "La " +0xf90f: "Na " +0xf910: "Na " +0xf911: "Na " +0xf912: "Na " +0xf913: "Na " +0xf914: "Nak " +0xf915: "Nak " +0xf916: "Nak " +0xf917: "Nak " +0xf918: "Nak " +0xf919: "Nak " +0xf91a: "Nak " +0xf91b: "Nan " +0xf91c: "Nan " +0xf91d: "Nan " +0xf91e: "Nan " +0xf91f: "Nan " +0xf920: "Nan " +0xf921: "Nam " +0xf922: "Nam " +0xf923: "Nam " +0xf924: "Nam " +0xf925: "Nap " +0xf926: "Nap " +0xf927: "Nap " +0xf928: "Nang " +0xf929: "Nang " +0xf92a: "Nang " +0xf92b: "Nang " +0xf92c: "Nang " +0xf92d: "Nay " +0xf92e: "Nayng " +0xf92f: "No " +0xf930: "No " +0xf931: "No " +0xf932: "No " +0xf933: "No " +0xf934: "No " +0xf935: "No " +0xf936: "No " +0xf937: "No " +0xf938: "No " +0xf939: "No " +0xf93a: "No " +0xf93b: "Nok " +0xf93c: "Nok " +0xf93d: "Nok " +0xf93e: "Nok " +0xf93f: "Nok " +0xf940: "Nok " +0xf941: "Non " +0xf942: "Nong " +0xf943: "Nong " +0xf944: "Nong " +0xf945: "Nong " +0xf946: "Noy " +0xf947: "Noy " +0xf948: "Noy " +0xf949: "Noy " +0xf94a: "Nwu " +0xf94b: "Nwu " +0xf94c: "Nwu " +0xf94d: "Nwu " +0xf94e: "Nwu " +0xf94f: "Nwu " +0xf950: "Nwu " +0xf951: "Nwu " +0xf952: "Nuk " +0xf953: "Nuk " +0xf954: "Num " +0xf955: "Nung " +0xf956: "Nung " +0xf957: "Nung " +0xf958: "Nung " +0xf959: "Nung " +0xf95a: "Twu " +0xf95b: "La " +0xf95c: "Lak " +0xf95d: "Lak " +0xf95e: "Lan " +0xf95f: "Lyeng " +0xf960: "Lo " +0xf961: "Lyul " +0xf962: "Li " +0xf963: "Pey " +0xf964: "Pen " +0xf965: "Pyen " +0xf966: "Pwu " +0xf967: "Pwul " +0xf968: "Pi " +0xf969: "Sak " +0xf96a: "Sak " +0xf96b: "Sam " +0xf96c: "Sayk " +0xf96d: "Sayng " +0xf96e: "Sep " +0xf96f: "Sey " +0xf970: "Sway " +0xf971: "Sin " +0xf972: "Sim " +0xf973: "Sip " +0xf974: "Ya " +0xf975: "Yak " +0xf976: "Yak " +0xf977: "Yang " +0xf978: "Yang " +0xf979: "Yang " +0xf97a: "Yang " +0xf97b: "Yang " +0xf97c: "Yang " +0xf97d: "Yang " +0xf97e: "Yang " +0xf97f: "Ye " +0xf980: "Ye " +0xf981: "Ye " +0xf982: "Ye " +0xf983: "Ye " +0xf984: "Ye " +0xf985: "Ye " +0xf986: "Ye " +0xf987: "Ye " +0xf988: "Ye " +0xf989: "Ye " +0xf98a: "Yek " +0xf98b: "Yek " +0xf98c: "Yek " +0xf98d: "Yek " +0xf98e: "Yen " +0xf98f: "Yen " +0xf990: "Yen " +0xf991: "Yen " +0xf992: "Yen " +0xf993: "Yen " +0xf994: "Yen " +0xf995: "Yen " +0xf996: "Yen " +0xf997: "Yen " +0xf998: "Yen " +0xf999: "Yen " +0xf99a: "Yen " +0xf99b: "Yen " +0xf99c: "Yel " +0xf99d: "Yel " +0xf99e: "Yel " +0xf99f: "Yel " +0xf9a0: "Yel " +0xf9a1: "Yel " +0xf9a2: "Yem " +0xf9a3: "Yem " +0xf9a4: "Yem " +0xf9a5: "Yem " +0xf9a6: "Yem " +0xf9a7: "Yep " +0xf9a8: "Yeng " +0xf9a9: "Yeng " +0xf9aa: "Yeng " +0xf9ab: "Yeng " +0xf9ac: "Yeng " +0xf9ad: "Yeng " +0xf9ae: "Yeng " +0xf9af: "Yeng " +0xf9b0: "Yeng " +0xf9b1: "Yeng " +0xf9b2: "Yeng " +0xf9b3: "Yeng " +0xf9b4: "Yeng " +0xf9b5: "Yey " +0xf9b6: "Yey " +0xf9b7: "Yey " +0xf9b8: "Yey " +0xf9b9: "O " +0xf9ba: "Yo " +0xf9bb: "Yo " +0xf9bc: "Yo " +0xf9bd: "Yo " +0xf9be: "Yo " +0xf9bf: "Yo " +0xf9c0: "Yo " +0xf9c1: "Yo " +0xf9c2: "Yo " +0xf9c3: "Yo " +0xf9c4: "Yong " +0xf9c5: "Wun " +0xf9c6: "Wen " +0xf9c7: "Yu " +0xf9c8: "Yu " +0xf9c9: "Yu " +0xf9ca: "Yu " +0xf9cb: "Yu " +0xf9cc: "Yu " +0xf9cd: "Yu " +0xf9ce: "Yu " +0xf9cf: "Yu " +0xf9d0: "Yu " +0xf9d1: "Yuk " +0xf9d2: "Yuk " +0xf9d3: "Yuk " +0xf9d4: "Yun " +0xf9d5: "Yun " +0xf9d6: "Yun " +0xf9d7: "Yun " +0xf9d8: "Yul " +0xf9d9: "Yul " +0xf9da: "Yul " +0xf9db: "Yul " +0xf9dc: "Yung " +0xf9dd: "I " +0xf9de: "I " +0xf9df: "I " +0xf9e0: "I " +0xf9e1: "I " +0xf9e2: "I " +0xf9e3: "I " +0xf9e4: "I " +0xf9e5: "I " +0xf9e6: "I " +0xf9e7: "I " +0xf9e8: "I " +0xf9e9: "I " +0xf9ea: "I " +0xf9eb: "Ik " +0xf9ec: "Ik " +0xf9ed: "In " +0xf9ee: "In " +0xf9ef: "In " +0xf9f0: "In " +0xf9f1: "In " +0xf9f2: "In " +0xf9f3: "In " +0xf9f4: "Im " +0xf9f5: "Im " +0xf9f6: "Im " +0xf9f7: "Ip " +0xf9f8: "Ip " +0xf9f9: "Ip " +0xf9fa: "Cang " +0xf9fb: "Cek " +0xf9fc: "Ci " +0xf9fd: "Cip " +0xf9fe: "Cha " +0xf9ff: "Chek " +/* x0fa */ +0xfa00: "Chey " +0xfa01: "Thak " +0xfa02: "Thak " +0xfa03: "Thang " +0xfa04: "Thayk " +0xfa05: "Thong " +0xfa06: "Pho " +0xfa07: "Phok " +0xfa08: "Hang " +0xfa09: "Hang " +0xfa0a: "Hyen " +0xfa0b: "Hwak " +0xfa0c: "Wu " +0xfa0d: "Huo " +0xfa0e: "[?] " +0xfa0f: "[?] " +0xfa10: "Zhong " +0xfa11: "[?] " +0xfa12: "Qing " +0xfa13: "[?] " +0xfa14: "[?] " +0xfa15: "Xi " +0xfa16: "Zhu " +0xfa17: "Yi " +0xfa18: "Li " +0xfa19: "Shen " +0xfa1a: "Xiang " +0xfa1b: "Fu " +0xfa1c: "Jing " +0xfa1d: "Jing " +0xfa1e: "Yu " +0xfa1f: "[?] " +0xfa20: "Hagi " +0xfa21: "[?] " +0xfa22: "Zhu " +0xfa23: "[?] " +0xfa24: "[?] " +0xfa25: "Yi " +0xfa26: "Du " +0xfa27: "[?] " +0xfa28: "[?] " +0xfa29: "[?] " +0xfa2a: "Fan " +0xfa2b: "Si " +0xfa2c: "Guan " +0xfa2d: "[?]" +0xfa2e: "[?]" +0xfa2f: "[?]" +0xfa30: "[?]" +0xfa31: "[?]" +0xfa32: "[?]" +0xfa33: "[?]" +0xfa34: "[?]" +0xfa35: "[?]" +0xfa36: "[?]" +0xfa37: "[?]" +0xfa38: "[?]" +0xfa39: "[?]" +0xfa3a: "[?]" +0xfa3b: "[?]" +0xfa3c: "[?]" +0xfa3d: "[?]" +0xfa3e: "[?]" +0xfa3f: "[?]" +0xfa40: "[?]" +0xfa41: "[?]" +0xfa42: "[?]" +0xfa43: "[?]" +0xfa44: "[?]" +0xfa45: "[?]" +0xfa46: "[?]" +0xfa47: "[?]" +0xfa48: "[?]" +0xfa49: "[?]" +0xfa4a: "[?]" +0xfa4b: "[?]" +0xfa4c: "[?]" +0xfa4d: "[?]" +0xfa4e: "[?]" +0xfa4f: "[?]" +0xfa50: "[?]" +0xfa51: "[?]" +0xfa52: "[?]" +0xfa53: "[?]" +0xfa54: "[?]" +0xfa55: "[?]" +0xfa56: "[?]" +0xfa57: "[?]" +0xfa58: "[?]" +0xfa59: "[?]" +0xfa5a: "[?]" +0xfa5b: "[?]" +0xfa5c: "[?]" +0xfa5d: "[?]" +0xfa5e: "[?]" +0xfa5f: "[?]" +0xfa60: "[?]" +0xfa61: "[?]" +0xfa62: "[?]" +0xfa63: "[?]" +0xfa64: "[?]" +0xfa65: "[?]" +0xfa66: "[?]" +0xfa67: "[?]" +0xfa68: "[?]" +0xfa69: "[?]" +0xfa6a: "[?]" +0xfa6b: "[?]" +0xfa6c: "[?]" +0xfa6d: "[?]" +0xfa6e: "[?]" +0xfa6f: "[?]" +0xfa70: "[?]" +0xfa71: "[?]" +0xfa72: "[?]" +0xfa73: "[?]" +0xfa74: "[?]" +0xfa75: "[?]" +0xfa76: "[?]" +0xfa77: "[?]" +0xfa78: "[?]" +0xfa79: "[?]" +0xfa7a: "[?]" +0xfa7b: "[?]" +0xfa7c: "[?]" +0xfa7d: "[?]" +0xfa7e: "[?]" +0xfa7f: "[?]" +0xfa80: "[?]" +0xfa81: "[?]" +0xfa82: "[?]" +0xfa83: "[?]" +0xfa84: "[?]" +0xfa85: "[?]" +0xfa86: "[?]" +0xfa87: "[?]" +0xfa88: "[?]" +0xfa89: "[?]" +0xfa8a: "[?]" +0xfa8b: "[?]" +0xfa8c: "[?]" +0xfa8d: "[?]" +0xfa8e: "[?]" +0xfa8f: "[?]" +0xfa90: "[?]" +0xfa91: "[?]" +0xfa92: "[?]" +0xfa93: "[?]" +0xfa94: "[?]" +0xfa95: "[?]" +0xfa96: "[?]" +0xfa97: "[?]" +0xfa98: "[?]" +0xfa99: "[?]" +0xfa9a: "[?]" +0xfa9b: "[?]" +0xfa9c: "[?]" +0xfa9d: "[?]" +0xfa9e: "[?]" +0xfa9f: "[?]" +0xfaa0: "[?]" +0xfaa1: "[?]" +0xfaa2: "[?]" +0xfaa3: "[?]" +0xfaa4: "[?]" +0xfaa5: "[?]" +0xfaa6: "[?]" +0xfaa7: "[?]" +0xfaa8: "[?]" +0xfaa9: "[?]" +0xfaaa: "[?]" +0xfaab: "[?]" +0xfaac: "[?]" +0xfaad: "[?]" +0xfaae: "[?]" +0xfaaf: "[?]" +0xfab0: "[?]" +0xfab1: "[?]" +0xfab2: "[?]" +0xfab3: "[?]" +0xfab4: "[?]" +0xfab5: "[?]" +0xfab6: "[?]" +0xfab7: "[?]" +0xfab8: "[?]" +0xfab9: "[?]" +0xfaba: "[?]" +0xfabb: "[?]" +0xfabc: "[?]" +0xfabd: "[?]" +0xfabe: "[?]" +0xfabf: "[?]" +0xfac0: "[?]" +0xfac1: "[?]" +0xfac2: "[?]" +0xfac3: "[?]" +0xfac4: "[?]" +0xfac5: "[?]" +0xfac6: "[?]" +0xfac7: "[?]" +0xfac8: "[?]" +0xfac9: "[?]" +0xfaca: "[?]" +0xfacb: "[?]" +0xfacc: "[?]" +0xfacd: "[?]" +0xface: "[?]" +0xfacf: "[?]" +0xfad0: "[?]" +0xfad1: "[?]" +0xfad2: "[?]" +0xfad3: "[?]" +0xfad4: "[?]" +0xfad5: "[?]" +0xfad6: "[?]" +0xfad7: "[?]" +0xfad8: "[?]" +0xfad9: "[?]" +0xfada: "[?]" +0xfadb: "[?]" +0xfadc: "[?]" +0xfadd: "[?]" +0xfade: "[?]" +0xfadf: "[?]" +0xfae0: "[?]" +0xfae1: "[?]" +0xfae2: "[?]" +0xfae3: "[?]" +0xfae4: "[?]" +0xfae5: "[?]" +0xfae6: "[?]" +0xfae7: "[?]" +0xfae8: "[?]" +0xfae9: "[?]" +0xfaea: "[?]" +0xfaeb: "[?]" +0xfaec: "[?]" +0xfaed: "[?]" +0xfaee: "[?]" +0xfaef: "[?]" +0xfaf0: "[?]" +0xfaf1: "[?]" +0xfaf2: "[?]" +0xfaf3: "[?]" +0xfaf4: "[?]" +0xfaf5: "[?]" +0xfaf6: "[?]" +0xfaf7: "[?]" +0xfaf8: "[?]" +0xfaf9: "[?]" +0xfafa: "[?]" +0xfafb: "[?]" +0xfafc: "[?]" +0xfafd: "[?]" +0xfafe: "[?]" +/* x0fb */ +0xfb00: "ff" +0xfb01: "fi" +0xfb02: "fl" +0xfb03: "ffi" +0xfb04: "ffl" +0xfb05: "st" +0xfb06: "st" +0xfb07: "[?]" +0xfb08: "[?]" +0xfb09: "[?]" +0xfb0a: "[?]" +0xfb0b: "[?]" +0xfb0c: "[?]" +0xfb0d: "[?]" +0xfb0e: "[?]" +0xfb0f: "[?]" +0xfb10: "[?]" +0xfb11: "[?]" +0xfb12: "[?]" +0xfb13: "mn" +0xfb14: "me" +0xfb15: "mi" +0xfb16: "vn" +0xfb17: "mkh" +0xfb18: "[?]" +0xfb19: "[?]" +0xfb1a: "[?]" +0xfb1b: "[?]" +0xfb1c: "[?]" +0xfb1d: "yi" +0xfb1e: "" +0xfb1f: "ay" +0xfb20: "`" +0xfb21: "" +0xfb22: "d" +0xfb23: "h" +0xfb24: "k" +0xfb25: "l" +0xfb26: "m" +0xfb27: "m" +0xfb28: "t" +0xfb29: "+" +0xfb2a: "sh" +0xfb2b: "s" +0xfb2c: "sh" +0xfb2d: "s" +0xfb2e: "a" +0xfb2f: "a" +0xfb30: "" +0xfb31: "b" +0xfb32: "g" +0xfb33: "d" +0xfb34: "h" +0xfb35: "v" +0xfb36: "z" +0xfb37: "[?]" +0xfb38: "t" +0xfb39: "y" +0xfb3a: "k" +0xfb3b: "k" +0xfb3c: "l" +0xfb3d: "[?]" +0xfb3e: "l" +0xfb3f: "[?]" +0xfb40: "n" +0xfb41: "n" +0xfb42: "[?]" +0xfb43: "p" +0xfb44: "p" +0xfb45: "[?]" +0xfb46: "ts" +0xfb47: "ts" +0xfb48: "r" +0xfb49: "sh" +0xfb4a: "t" +0xfb4b: "vo" +0xfb4c: "b" +0xfb4d: "k" +0xfb4e: "p" +0xfb4f: "l" +0xfb50: "" +0xfb51: "" +0xfb52: "" +0xfb53: "" +0xfb54: "" +0xfb55: "" +0xfb56: "" +0xfb57: "" +0xfb58: "" +0xfb59: "" +0xfb5a: "" +0xfb5b: "" +0xfb5c: "" +0xfb5d: "" +0xfb5e: "" +0xfb5f: "" +0xfb60: "" +0xfb61: "" +0xfb62: "" +0xfb63: "" +0xfb64: "" +0xfb65: "" +0xfb66: "" +0xfb67: "" +0xfb68: "" +0xfb69: "" +0xfb6a: "" +0xfb6b: "" +0xfb6c: "" +0xfb6d: "" +0xfb6e: "" +0xfb6f: "" +0xfb70: "" +0xfb71: "" +0xfb72: "" +0xfb73: "" +0xfb74: "" +0xfb75: "" +0xfb76: "" +0xfb77: "" +0xfb78: "" +0xfb79: "" +0xfb7a: "" +0xfb7b: "" +0xfb7c: "" +0xfb7d: "" +0xfb7e: "" +0xfb7f: "" +0xfb80: "" +0xfb81: "" +0xfb82: "" +0xfb83: "" +0xfb84: "" +0xfb85: "" +0xfb86: "" +0xfb87: "" +0xfb88: "" +0xfb89: "" +0xfb8a: "" +0xfb8b: "" +0xfb8c: "" +0xfb8d: "" +0xfb8e: "" +0xfb8f: "" +0xfb90: "" +0xfb91: "" +0xfb92: "" +0xfb93: "" +0xfb94: "" +0xfb95: "" +0xfb96: "" +0xfb97: "" +0xfb98: "" +0xfb99: "" +0xfb9a: "" +0xfb9b: "" +0xfb9c: "" +0xfb9d: "" +0xfb9e: "" +0xfb9f: "" +0xfba0: "" +0xfba1: "" +0xfba2: "" +0xfba3: "" +0xfba4: "" +0xfba5: "" +0xfba6: "" +0xfba7: "" +0xfba8: "" +0xfba9: "" +0xfbaa: "" +0xfbab: "" +0xfbac: "" +0xfbad: "" +0xfbae: "" +0xfbaf: "" +0xfbb0: "" +0xfbb1: "" +0xfbb2: "[?]" +0xfbb3: "[?]" +0xfbb4: "[?]" +0xfbb5: "[?]" +0xfbb6: "[?]" +0xfbb7: "[?]" +0xfbb8: "[?]" +0xfbb9: "[?]" +0xfbba: "[?]" +0xfbbb: "[?]" +0xfbbc: "[?]" +0xfbbd: "[?]" +0xfbbe: "[?]" +0xfbbf: "[?]" +0xfbc0: "[?]" +0xfbc1: "[?]" +0xfbc2: "[?]" +0xfbc3: "[?]" +0xfbc4: "[?]" +0xfbc5: "[?]" +0xfbc6: "[?]" +0xfbc7: "[?]" +0xfbc8: "[?]" +0xfbc9: "[?]" +0xfbca: "[?]" +0xfbcb: "[?]" +0xfbcc: "[?]" +0xfbcd: "[?]" +0xfbce: "[?]" +0xfbcf: "[?]" +0xfbd0: "[?]" +0xfbd1: "[?]" +0xfbd2: "[?]" +0xfbd3: "" +0xfbd4: "" +0xfbd5: "" +0xfbd6: "" +0xfbd7: "" +0xfbd8: "" +0xfbd9: "" +0xfbda: "" +0xfbdb: "" +0xfbdc: "" +0xfbdd: "" +0xfbde: "" +0xfbdf: "" +0xfbe0: "" +0xfbe1: "" +0xfbe2: "" +0xfbe3: "" +0xfbe4: "" +0xfbe5: "" +0xfbe6: "" +0xfbe7: "" +0xfbe8: "" +0xfbe9: "" +0xfbea: "" +0xfbeb: "" +0xfbec: "" +0xfbed: "" +0xfbee: "" +0xfbef: "" +0xfbf0: "" +0xfbf1: "" +0xfbf2: "" +0xfbf3: "" +0xfbf4: "" +0xfbf5: "" +0xfbf6: "" +0xfbf7: "" +0xfbf8: "" +0xfbf9: "" +0xfbfa: "" +0xfbfb: "" +0xfbfc: "" +0xfbfd: "" +0xfbfe: "" +0xfbff: "" +/* x0fc */ +0xfc00: "" +0xfc01: "" +0xfc02: "" +0xfc03: "" +0xfc04: "" +0xfc05: "" +0xfc06: "" +0xfc07: "" +0xfc08: "" +0xfc09: "" +0xfc0a: "" +0xfc0b: "" +0xfc0c: "" +0xfc0d: "" +0xfc0e: "" +0xfc0f: "" +0xfc10: "" +0xfc11: "" +0xfc12: "" +0xfc13: "" +0xfc14: "" +0xfc15: "" +0xfc16: "" +0xfc17: "" +0xfc18: "" +0xfc19: "" +0xfc1a: "" +0xfc1b: "" +0xfc1c: "" +0xfc1d: "" +0xfc1e: "" +0xfc1f: "" +0xfc20: "" +0xfc21: "" +0xfc22: "" +0xfc23: "" +0xfc24: "" +0xfc25: "" +0xfc26: "" +0xfc27: "" +0xfc28: "" +0xfc29: "" +0xfc2a: "" +0xfc2b: "" +0xfc2c: "" +0xfc2d: "" +0xfc2e: "" +0xfc2f: "" +0xfc30: "" +0xfc31: "" +0xfc32: "" +0xfc33: "" +0xfc34: "" +0xfc35: "" +0xfc36: "" +0xfc37: "" +0xfc38: "" +0xfc39: "" +0xfc3a: "" +0xfc3b: "" +0xfc3c: "" +0xfc3d: "" +0xfc3e: "" +0xfc3f: "" +0xfc40: "" +0xfc41: "" +0xfc42: "" +0xfc43: "" +0xfc44: "" +0xfc45: "" +0xfc46: "" +0xfc47: "" +0xfc48: "" +0xfc49: "" +0xfc4a: "" +0xfc4b: "" +0xfc4c: "" +0xfc4d: "" +0xfc4e: "" +0xfc4f: "" +0xfc50: "" +0xfc51: "" +0xfc52: "" +0xfc53: "" +0xfc54: "" +0xfc55: "" +0xfc56: "" +0xfc57: "" +0xfc58: "" +0xfc59: "" +0xfc5a: "" +0xfc5b: "" +0xfc5c: "" +0xfc5d: "" +0xfc5e: "" +0xfc5f: "" +0xfc60: "" +0xfc61: "" +0xfc62: "" +0xfc63: "" +0xfc64: "" +0xfc65: "" +0xfc66: "" +0xfc67: "" +0xfc68: "" +0xfc69: "" +0xfc6a: "" +0xfc6b: "" +0xfc6c: "" +0xfc6d: "" +0xfc6e: "" +0xfc6f: "" +0xfc70: "" +0xfc71: "" +0xfc72: "" +0xfc73: "" +0xfc74: "" +0xfc75: "" +0xfc76: "" +0xfc77: "" +0xfc78: "" +0xfc79: "" +0xfc7a: "" +0xfc7b: "" +0xfc7c: "" +0xfc7d: "" +0xfc7e: "" +0xfc7f: "" +0xfc80: "" +0xfc81: "" +0xfc82: "" +0xfc83: "" +0xfc84: "" +0xfc85: "" +0xfc86: "" +0xfc87: "" +0xfc88: "" +0xfc89: "" +0xfc8a: "" +0xfc8b: "" +0xfc8c: "" +0xfc8d: "" +0xfc8e: "" +0xfc8f: "" +0xfc90: "" +0xfc91: "" +0xfc92: "" +0xfc93: "" +0xfc94: "" +0xfc95: "" +0xfc96: "" +0xfc97: "" +0xfc98: "" +0xfc99: "" +0xfc9a: "" +0xfc9b: "" +0xfc9c: "" +0xfc9d: "" +0xfc9e: "" +0xfc9f: "" +0xfca0: "" +0xfca1: "" +0xfca2: "" +0xfca3: "" +0xfca4: "" +0xfca5: "" +0xfca6: "" +0xfca7: "" +0xfca8: "" +0xfca9: "" +0xfcaa: "" +0xfcab: "" +0xfcac: "" +0xfcad: "" +0xfcae: "" +0xfcaf: "" +0xfcb0: "" +0xfcb1: "" +0xfcb2: "" +0xfcb3: "" +0xfcb4: "" +0xfcb5: "" +0xfcb6: "" +0xfcb7: "" +0xfcb8: "" +0xfcb9: "" +0xfcba: "" +0xfcbb: "" +0xfcbc: "" +0xfcbd: "" +0xfcbe: "" +0xfcbf: "" +0xfcc0: "" +0xfcc1: "" +0xfcc2: "" +0xfcc3: "" +0xfcc4: "" +0xfcc5: "" +0xfcc6: "" +0xfcc7: "" +0xfcc8: "" +0xfcc9: "" +0xfcca: "" +0xfccb: "" +0xfccc: "" +0xfccd: "" +0xfcce: "" +0xfccf: "" +0xfcd0: "" +0xfcd1: "" +0xfcd2: "" +0xfcd3: "" +0xfcd4: "" +0xfcd5: "" +0xfcd6: "" +0xfcd7: "" +0xfcd8: "" +0xfcd9: "" +0xfcda: "" +0xfcdb: "" +0xfcdc: "" +0xfcdd: "" +0xfcde: "" +0xfcdf: "" +0xfce0: "" +0xfce1: "" +0xfce2: "" +0xfce3: "" +0xfce4: "" +0xfce5: "" +0xfce6: "" +0xfce7: "" +0xfce8: "" +0xfce9: "" +0xfcea: "" +0xfceb: "" +0xfcec: "" +0xfced: "" +0xfcee: "" +0xfcef: "" +0xfcf0: "" +0xfcf1: "" +0xfcf2: "" +0xfcf3: "" +0xfcf4: "" +0xfcf5: "" +0xfcf6: "" +0xfcf7: "" +0xfcf8: "" +0xfcf9: "" +0xfcfa: "" +0xfcfb: "" +0xfcfc: "" +0xfcfd: "" +0xfcfe: "" +0xfcff: "" +/* x0fd */ +0xfd00: "" +0xfd01: "" +0xfd02: "" +0xfd03: "" +0xfd04: "" +0xfd05: "" +0xfd06: "" +0xfd07: "" +0xfd08: "" +0xfd09: "" +0xfd0a: "" +0xfd0b: "" +0xfd0c: "" +0xfd0d: "" +0xfd0e: "" +0xfd0f: "" +0xfd10: "" +0xfd11: "" +0xfd12: "" +0xfd13: "" +0xfd14: "" +0xfd15: "" +0xfd16: "" +0xfd17: "" +0xfd18: "" +0xfd19: "" +0xfd1a: "" +0xfd1b: "" +0xfd1c: "" +0xfd1d: "" +0xfd1e: "" +0xfd1f: "" +0xfd20: "" +0xfd21: "" +0xfd22: "" +0xfd23: "" +0xfd24: "" +0xfd25: "" +0xfd26: "" +0xfd27: "" +0xfd28: "" +0xfd29: "" +0xfd2a: "" +0xfd2b: "" +0xfd2c: "" +0xfd2d: "" +0xfd2e: "" +0xfd2f: "" +0xfd30: "" +0xfd31: "" +0xfd32: "" +0xfd33: "" +0xfd34: "" +0xfd35: "" +0xfd36: "" +0xfd37: "" +0xfd38: "" +0xfd39: "" +0xfd3a: "" +0xfd3b: "" +0xfd3c: "" +0xfd3d: "" +0xfd3e: "" +0xfd3f: "" +0xfd40: "[?]" +0xfd41: "[?]" +0xfd42: "[?]" +0xfd43: "[?]" +0xfd44: "[?]" +0xfd45: "[?]" +0xfd46: "[?]" +0xfd47: "[?]" +0xfd48: "[?]" +0xfd49: "[?]" +0xfd4a: "[?]" +0xfd4b: "[?]" +0xfd4c: "[?]" +0xfd4d: "[?]" +0xfd4e: "[?]" +0xfd4f: "[?]" +0xfd50: "" +0xfd51: "" +0xfd52: "" +0xfd53: "" +0xfd54: "" +0xfd55: "" +0xfd56: "" +0xfd57: "" +0xfd58: "" +0xfd59: "" +0xfd5a: "" +0xfd5b: "" +0xfd5c: "" +0xfd5d: "" +0xfd5e: "" +0xfd5f: "" +0xfd60: "" +0xfd61: "" +0xfd62: "" +0xfd63: "" +0xfd64: "" +0xfd65: "" +0xfd66: "" +0xfd67: "" +0xfd68: "" +0xfd69: "" +0xfd6a: "" +0xfd6b: "" +0xfd6c: "" +0xfd6d: "" +0xfd6e: "" +0xfd6f: "" +0xfd70: "" +0xfd71: "" +0xfd72: "" +0xfd73: "" +0xfd74: "" +0xfd75: "" +0xfd76: "" +0xfd77: "" +0xfd78: "" +0xfd79: "" +0xfd7a: "" +0xfd7b: "" +0xfd7c: "" +0xfd7d: "" +0xfd7e: "" +0xfd7f: "" +0xfd80: "" +0xfd81: "" +0xfd82: "" +0xfd83: "" +0xfd84: "" +0xfd85: "" +0xfd86: "" +0xfd87: "" +0xfd88: "" +0xfd89: "" +0xfd8a: "" +0xfd8b: "" +0xfd8c: "" +0xfd8d: "" +0xfd8e: "" +0xfd8f: "" +0xfd90: "[?]" +0xfd91: "[?]" +0xfd92: "" +0xfd93: "" +0xfd94: "" +0xfd95: "" +0xfd96: "" +0xfd97: "" +0xfd98: "" +0xfd99: "" +0xfd9a: "" +0xfd9b: "" +0xfd9c: "" +0xfd9d: "" +0xfd9e: "" +0xfd9f: "" +0xfda0: "" +0xfda1: "" +0xfda2: "" +0xfda3: "" +0xfda4: "" +0xfda5: "" +0xfda6: "" +0xfda7: "" +0xfda8: "" +0xfda9: "" +0xfdaa: "" +0xfdab: "" +0xfdac: "" +0xfdad: "" +0xfdae: "" +0xfdaf: "" +0xfdb0: "" +0xfdb1: "" +0xfdb2: "" +0xfdb3: "" +0xfdb4: "" +0xfdb5: "" +0xfdb6: "" +0xfdb7: "" +0xfdb8: "" +0xfdb9: "" +0xfdba: "" +0xfdbb: "" +0xfdbc: "" +0xfdbd: "" +0xfdbe: "" +0xfdbf: "" +0xfdc0: "" +0xfdc1: "" +0xfdc2: "" +0xfdc3: "" +0xfdc4: "" +0xfdc5: "" +0xfdc6: "" +0xfdc7: "" +0xfdc8: "[?]" +0xfdc9: "[?]" +0xfdca: "[?]" +0xfdcb: "[?]" +0xfdcc: "[?]" +0xfdcd: "[?]" +0xfdce: "[?]" +0xfdcf: "[?]" +0xfdd0: "[?]" +0xfdd1: "[?]" +0xfdd2: "[?]" +0xfdd3: "[?]" +0xfdd4: "[?]" +0xfdd5: "[?]" +0xfdd6: "[?]" +0xfdd7: "[?]" +0xfdd8: "[?]" +0xfdd9: "[?]" +0xfdda: "[?]" +0xfddb: "[?]" +0xfddc: "[?]" +0xfddd: "[?]" +0xfdde: "[?]" +0xfddf: "[?]" +0xfde0: "[?]" +0xfde1: "[?]" +0xfde2: "[?]" +0xfde3: "[?]" +0xfde4: "[?]" +0xfde5: "[?]" +0xfde6: "[?]" +0xfde7: "[?]" +0xfde8: "[?]" +0xfde9: "[?]" +0xfdea: "[?]" +0xfdeb: "[?]" +0xfdec: "[?]" +0xfded: "[?]" +0xfdee: "[?]" +0xfdef: "[?]" +0xfdf0: "" +0xfdf1: "" +0xfdf2: "" +0xfdf3: "" +0xfdf4: "" +0xfdf5: "" +0xfdf6: "" +0xfdf7: "" +0xfdf8: "" +0xfdf9: "" +0xfdfa: "" +0xfdfb: "" +0xfdfc: "[?]" +0xfdfd: "[?]" +0xfdfe: "[?]" +/* x0fe */ +0xfe00: "[?]" +0xfe01: "[?]" +0xfe02: "[?]" +0xfe03: "[?]" +0xfe04: "[?]" +0xfe05: "[?]" +0xfe06: "[?]" +0xfe07: "[?]" +0xfe08: "[?]" +0xfe09: "[?]" +0xfe0a: "[?]" +0xfe0b: "[?]" +0xfe0c: "[?]" +0xfe0d: "[?]" +0xfe0e: "[?]" +0xfe0f: "[?]" +0xfe10: "[?]" +0xfe11: "[?]" +0xfe12: "[?]" +0xfe13: "[?]" +0xfe14: "[?]" +0xfe15: "[?]" +0xfe16: "[?]" +0xfe17: "[?]" +0xfe18: "[?]" +0xfe19: "[?]" +0xfe1a: "[?]" +0xfe1b: "[?]" +0xfe1c: "[?]" +0xfe1d: "[?]" +0xfe1e: "[?]" +0xfe1f: "[?]" +0xfe20: "" +0xfe21: "" +0xfe22: "" +0xfe23: "~" +0xfe24: "[?]" +0xfe25: "[?]" +0xfe26: "[?]" +0xfe27: "[?]" +0xfe28: "[?]" +0xfe29: "[?]" +0xfe2a: "[?]" +0xfe2b: "[?]" +0xfe2c: "[?]" +0xfe2d: "[?]" +0xfe2e: "[?]" +0xfe2f: "[?]" +0xfe30: ".." +0xfe31: "--" +0xfe32: "-" +0xfe33: "_" +0xfe34: "_" +0xfe35: "(" +0xfe36: ") " +0xfe37: "{" +0xfe38: "} " +0xfe39: "[" +0xfe3a: "] " +0xfe3b: "[(" +0xfe3c: ")] " +0xfe3d: "<<" +0xfe3e: ">> " +0xfe3f: "<" +0xfe40: "> " +0xfe41: "[" +0xfe42: "] " +0xfe43: "{" +0xfe44: "}" +0xfe45: "[?]" +0xfe46: "[?]" +0xfe47: "[?]" +0xfe48: "[?]" +0xfe49: "" +0xfe4a: "" +0xfe4b: "" +0xfe4c: "" +0xfe4d: "" +0xfe4e: "" +0xfe4f: "" +0xfe50: "," +0xfe51: "," +0xfe52: "." +0xfe53: "" +0xfe54: ";" +0xfe55: ":" +0xfe56: "?" +0xfe57: "!" +0xfe58: "-" +0xfe59: "(" +0xfe5a: ")" +0xfe5b: "{" +0xfe5c: "}" +0xfe5d: "{" +0xfe5e: "}" +0xfe5f: "#" +0xfe60: "&" +0xfe61: "*" +0xfe62: "+" +0xfe63: "-" +0xfe64: "<" +0xfe65: ">" +0xfe66: "=" +0xfe67: "" +0xfe68: "\\" +0xfe69: "$" +0xfe6a: "%" +0xfe6b: "@" +0xfe6c: "[?]" +0xfe6d: "[?]" +0xfe6e: "[?]" +0xfe6f: "[?]" +0xfe70: "" +0xfe71: "" +0xfe72: "" +0xfe73: "[?]" +0xfe74: "" +0xfe75: "[?]" +0xfe76: "" +0xfe77: "" +0xfe78: "" +0xfe79: "" +0xfe7a: "" +0xfe7b: "" +0xfe7c: "" +0xfe7d: "" +0xfe7e: "" +0xfe7f: "" +0xfe80: "" +0xfe81: "" +0xfe82: "" +0xfe83: "" +0xfe84: "" +0xfe85: "" +0xfe86: "" +0xfe87: "" +0xfe88: "" +0xfe89: "" +0xfe8a: "" +0xfe8b: "" +0xfe8c: "" +0xfe8d: "" +0xfe8e: "" +0xfe8f: "" +0xfe90: "" +0xfe91: "" +0xfe92: "" +0xfe93: "" +0xfe94: "" +0xfe95: "" +0xfe96: "" +0xfe97: "" +0xfe98: "" +0xfe99: "" +0xfe9a: "" +0xfe9b: "" +0xfe9c: "" +0xfe9d: "" +0xfe9e: "" +0xfe9f: "" +0xfea0: "" +0xfea1: "" +0xfea2: "" +0xfea3: "" +0xfea4: "" +0xfea5: "" +0xfea6: "" +0xfea7: "" +0xfea8: "" +0xfea9: "" +0xfeaa: "" +0xfeab: "" +0xfeac: "" +0xfead: "" +0xfeae: "" +0xfeaf: "" +0xfeb0: "" +0xfeb1: "" +0xfeb2: "" +0xfeb3: "" +0xfeb4: "" +0xfeb5: "" +0xfeb6: "" +0xfeb7: "" +0xfeb8: "" +0xfeb9: "" +0xfeba: "" +0xfebb: "" +0xfebc: "" +0xfebd: "" +0xfebe: "" +0xfebf: "" +0xfec0: "" +0xfec1: "" +0xfec2: "" +0xfec3: "" +0xfec4: "" +0xfec5: "" +0xfec6: "" +0xfec7: "" +0xfec8: "" +0xfec9: "" +0xfeca: "" +0xfecb: "" +0xfecc: "" +0xfecd: "" +0xfece: "" +0xfecf: "" +0xfed0: "" +0xfed1: "" +0xfed2: "" +0xfed3: "" +0xfed4: "" +0xfed5: "" +0xfed6: "" +0xfed7: "" +0xfed8: "" +0xfed9: "" +0xfeda: "" +0xfedb: "" +0xfedc: "" +0xfedd: "" +0xfede: "" +0xfedf: "" +0xfee0: "" +0xfee1: "" +0xfee2: "" +0xfee3: "" +0xfee4: "" +0xfee5: "" +0xfee6: "" +0xfee7: "" +0xfee8: "" +0xfee9: "" +0xfeea: "" +0xfeeb: "" +0xfeec: "" +0xfeed: "" +0xfeee: "" +0xfeef: "" +0xfef0: "" +0xfef1: "" +0xfef2: "" +0xfef3: "" +0xfef4: "" +0xfef5: "" +0xfef6: "" +0xfef7: "" +0xfef8: "" +0xfef9: "" +0xfefa: "" +0xfefb: "" +0xfefc: "" +0xfefd: "[?]" +0xfefe: "[?]" +0xfeff: "" +/* x0ff */ +0xff00: "[?]" +0xff01: "!" +0xff02: "\"" +0xff03: "#" +0xff04: "$" +0xff05: "%" +0xff06: "&" +0xff07: "'" +0xff08: "(" +0xff09: ")" +0xff0a: "*" +0xff0b: "+" +0xff0c: "," +0xff0d: "-" +0xff0e: "." +0xff0f: "/" +0xff10: "0" +0xff11: "1" +0xff12: "2" +0xff13: "3" +0xff14: "4" +0xff15: "5" +0xff16: "6" +0xff17: "7" +0xff18: "8" +0xff19: "9" +0xff1a: ":" +0xff1b: ";" +0xff1c: "<" +0xff1d: "=" +0xff1e: ">" +0xff1f: "?" +0xff20: "@" +0xff21: "A" +0xff22: "B" +0xff23: "C" +0xff24: "D" +0xff25: "E" +0xff26: "F" +0xff27: "G" +0xff28: "H" +0xff29: "I" +0xff2a: "J" +0xff2b: "K" +0xff2c: "L" +0xff2d: "M" +0xff2e: "N" +0xff2f: "O" +0xff30: "P" +0xff31: "Q" +0xff32: "R" +0xff33: "S" +0xff34: "T" +0xff35: "U" +0xff36: "V" +0xff37: "W" +0xff38: "X" +0xff39: "Y" +0xff3a: "Z" +0xff3b: "[" +0xff3c: "\\" +0xff3d: "]" +0xff3e: "^" +0xff3f: "_" +0xff40: "`" +0xff41: "a" +0xff42: "b" +0xff43: "c" +0xff44: "d" +0xff45: "e" +0xff46: "f" +0xff47: "g" +0xff48: "h" +0xff49: "i" +0xff4a: "j" +0xff4b: "k" +0xff4c: "l" +0xff4d: "m" +0xff4e: "n" +0xff4f: "o" +0xff50: "p" +0xff51: "q" +0xff52: "r" +0xff53: "s" +0xff54: "t" +0xff55: "u" +0xff56: "v" +0xff57: "w" +0xff58: "x" +0xff59: "y" +0xff5a: "z" +0xff5b: "{" +0xff5c: "|" +0xff5d: "}" +0xff5e: "~" +0xff5f: "[?]" +0xff60: "[?]" +0xff61: "." +0xff62: "[" +0xff63: "]" +0xff64: "," +0xff65: "*" +0xff66: "wo" +0xff67: "a" +0xff68: "i" +0xff69: "u" +0xff6a: "e" +0xff6b: "o" +0xff6c: "ya" +0xff6d: "yu" +0xff6e: "yo" +0xff6f: "tu" +0xff70: "+" +0xff71: "a" +0xff72: "i" +0xff73: "u" +0xff74: "e" +0xff75: "o" +0xff76: "ka" +0xff77: "ki" +0xff78: "ku" +0xff79: "ke" +0xff7a: "ko" +0xff7b: "sa" +0xff7c: "si" +0xff7d: "su" +0xff7e: "se" +0xff7f: "so" +0xff80: "ta" +0xff81: "ti" +0xff82: "tu" +0xff83: "te" +0xff84: "to" +0xff85: "na" +0xff86: "ni" +0xff87: "nu" +0xff88: "ne" +0xff89: "no" +0xff8a: "ha" +0xff8b: "hi" +0xff8c: "hu" +0xff8d: "he" +0xff8e: "ho" +0xff8f: "ma" +0xff90: "mi" +0xff91: "mu" +0xff92: "me" +0xff93: "mo" +0xff94: "ya" +0xff95: "yu" +0xff96: "yo" +0xff97: "ra" +0xff98: "ri" +0xff99: "ru" +0xff9a: "re" +0xff9b: "ro" +0xff9c: "wa" +0xff9d: "n" +0xff9e: ":" +0xff9f: ";" +0xffa0: "" +0xffa1: "g" +0xffa2: "gg" +0xffa3: "gs" +0xffa4: "n" +0xffa5: "nj" +0xffa6: "nh" +0xffa7: "d" +0xffa8: "dd" +0xffa9: "r" +0xffaa: "lg" +0xffab: "lm" +0xffac: "lb" +0xffad: "ls" +0xffae: "lt" +0xffaf: "lp" +0xffb0: "rh" +0xffb1: "m" +0xffb2: "b" +0xffb3: "bb" +0xffb4: "bs" +0xffb5: "s" +0xffb6: "ss" +0xffb7: "" +0xffb8: "j" +0xffb9: "jj" +0xffba: "c" +0xffbb: "k" +0xffbc: "t" +0xffbd: "p" +0xffbe: "h" +0xffbf: "[?]" +0xffc0: "[?]" +0xffc1: "[?]" +0xffc2: "a" +0xffc3: "ae" +0xffc4: "ya" +0xffc5: "yae" +0xffc6: "eo" +0xffc7: "e" +0xffc8: "[?]" +0xffc9: "[?]" +0xffca: "yeo" +0xffcb: "ye" +0xffcc: "o" +0xffcd: "wa" +0xffce: "wae" +0xffcf: "oe" +0xffd0: "[?]" +0xffd1: "[?]" +0xffd2: "yo" +0xffd3: "u" +0xffd4: "weo" +0xffd5: "we" +0xffd6: "wi" +0xffd7: "yu" +0xffd8: "[?]" +0xffd9: "[?]" +0xffda: "eu" +0xffdb: "yi" +0xffdc: "i" +0xffdd: "[?]" +0xffde: "[?]" +0xffdf: "[?]" +0xffe0: "/C" +0xffe1: "PS" +0xffe2: "!" +0xffe3: "-" +0xffe4: "|" +0xffe5: "Y=" +0xffe6: "W=" +0xffe7: "[?]" +0xffe8: "|" +0xffe9: "-" +0xffea: "|" +0xffeb: "-" +0xffec: "|" +0xffed: "#" +0xffee: "O" +0xffef: "[?]" +0xfff0: "[?]" +0xfff1: "[?]" +0xfff2: "[?]" +0xfff3: "[?]" +0xfff4: "[?]" +0xfff5: "[?]" +0xfff6: "[?]" +0xfff7: "[?]" +0xfff8: "[?]" +0xfff9: "{" +0xfffa: "|" +0xfffb: "}" +0xfffc: "" +0xfffd: "" +0xfffe: "" +0xffff: "" diff --git a/vendor/github.com/ryanuber/go-glob/.travis.yml b/vendor/github.com/ryanuber/go-glob/.travis.yml new file mode 100644 index 00000000..9d1ca3c3 --- /dev/null +++ b/vendor/github.com/ryanuber/go-glob/.travis.yml @@ -0,0 +1,5 @@ +language: go +go: + - tip +script: + - go test -v ./... diff --git a/vendor/github.com/ryanuber/go-glob/README.md b/vendor/github.com/ryanuber/go-glob/README.md new file mode 100644 index 00000000..48f7fcb0 --- /dev/null +++ b/vendor/github.com/ryanuber/go-glob/README.md @@ -0,0 +1,29 @@ +# String globbing in golang [![Build Status](https://travis-ci.org/ryanuber/go-glob.svg)](https://travis-ci.org/ryanuber/go-glob) + +`go-glob` is a single-function library implementing basic string glob support. + +Globs are an extremely user-friendly way of supporting string matching without +requiring knowledge of regular expressions or Go's particular regex engine. Most +people understand that if you put a `*` character somewhere in a string, it is +treated as a wildcard. Surprisingly, this functionality isn't found in Go's +standard library, except for `path.Match`, which is intended to be used while +comparing paths (not arbitrary strings), and contains specialized logic for this +use case. A better solution might be a POSIX basic (non-ERE) regular expression +engine for Go, which doesn't exist currently. + +Example +======= + +``` +package main + +import "github.com/ryanuber/go-glob" + +func main() { + glob.Glob("*World!", "Hello, World!") // true + glob.Glob("Hello,*", "Hello, World!") // true + glob.Glob("*ello,*", "Hello, World!") // true + glob.Glob("World!", "Hello, World!") // false + glob.Glob("/home/*", "/home/ryanuber/.bashrc") // true +} +``` diff --git a/vendor/github.com/ryanuber/go-glob/go.mod b/vendor/github.com/ryanuber/go-glob/go.mod new file mode 100644 index 00000000..f3820359 --- /dev/null +++ b/vendor/github.com/ryanuber/go-glob/go.mod @@ -0,0 +1 @@ +module github.com/ryanuber/go-glob diff --git a/vendor/github.com/spf13/afero/.travis.yml b/vendor/github.com/spf13/afero/.travis.yml new file mode 100644 index 00000000..0637db72 --- /dev/null +++ b/vendor/github.com/spf13/afero/.travis.yml @@ -0,0 +1,21 @@ +sudo: false +language: go + +go: + - 1.9 + - "1.10" + - tip + +os: + - linux + - osx + +matrix: + allow_failures: + - go: tip + fast_finish: true + +script: + - go build + - go test -race -v ./... + diff --git a/vendor/github.com/spf13/afero/README.md b/vendor/github.com/spf13/afero/README.md new file mode 100644 index 00000000..0c9b04b5 --- /dev/null +++ b/vendor/github.com/spf13/afero/README.md @@ -0,0 +1,452 @@ +![afero logo-sm](https://cloud.githubusercontent.com/assets/173412/11490338/d50e16dc-97a5-11e5-8b12-019a300d0fcb.png) + +A FileSystem Abstraction System for Go + +[![Build Status](https://travis-ci.org/spf13/afero.svg)](https://travis-ci.org/spf13/afero) [![Build status](https://ci.appveyor.com/api/projects/status/github/spf13/afero?branch=master&svg=true)](https://ci.appveyor.com/project/spf13/afero) [![GoDoc](https://godoc.org/github.com/spf13/afero?status.svg)](https://godoc.org/github.com/spf13/afero) [![Join the chat at https://gitter.im/spf13/afero](https://badges.gitter.im/Dev%20Chat.svg)](https://gitter.im/spf13/afero?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +# Overview + +Afero is an filesystem framework providing a simple, uniform and universal API +interacting with any filesystem, as an abstraction layer providing interfaces, +types and methods. Afero has an exceptionally clean interface and simple design +without needless constructors or initialization methods. + +Afero is also a library providing a base set of interoperable backend +filesystems that make it easy to work with afero while retaining all the power +and benefit of the os and ioutil packages. + +Afero provides significant improvements over using the os package alone, most +notably the ability to create mock and testing filesystems without relying on the disk. + +It is suitable for use in a any situation where you would consider using the OS +package as it provides an additional abstraction that makes it easy to use a +memory backed file system during testing. It also adds support for the http +filesystem for full interoperability. + + +## Afero Features + +* A single consistent API for accessing a variety of filesystems +* Interoperation between a variety of file system types +* A set of interfaces to encourage and enforce interoperability between backends +* An atomic cross platform memory backed file system +* Support for compositional (union) file systems by combining multiple file systems acting as one +* Specialized backends which modify existing filesystems (Read Only, Regexp filtered) +* A set of utility functions ported from io, ioutil & hugo to be afero aware + + +# Using Afero + +Afero is easy to use and easier to adopt. + +A few different ways you could use Afero: + +* Use the interfaces alone to define you own file system. +* Wrap for the OS packages. +* Define different filesystems for different parts of your application. +* Use Afero for mock filesystems while testing + +## Step 1: Install Afero + +First use go get to install the latest version of the library. + + $ go get github.com/spf13/afero + +Next include Afero in your application. +```go +import "github.com/spf13/afero" +``` + +## Step 2: Declare a backend + +First define a package variable and set it to a pointer to a filesystem. +```go +var AppFs = afero.NewMemMapFs() + +or + +var AppFs = afero.NewOsFs() +``` +It is important to note that if you repeat the composite literal you +will be using a completely new and isolated filesystem. In the case of +OsFs it will still use the same underlying filesystem but will reduce +the ability to drop in other filesystems as desired. + +## Step 3: Use it like you would the OS package + +Throughout your application use any function and method like you normally +would. + +So if my application before had: +```go +os.Open('/tmp/foo') +``` +We would replace it with: +```go +AppFs.Open('/tmp/foo') +``` + +`AppFs` being the variable we defined above. + + +## List of all available functions + +File System Methods Available: +```go +Chmod(name string, mode os.FileMode) : error +Chtimes(name string, atime time.Time, mtime time.Time) : error +Create(name string) : File, error +Mkdir(name string, perm os.FileMode) : error +MkdirAll(path string, perm os.FileMode) : error +Name() : string +Open(name string) : File, error +OpenFile(name string, flag int, perm os.FileMode) : File, error +Remove(name string) : error +RemoveAll(path string) : error +Rename(oldname, newname string) : error +Stat(name string) : os.FileInfo, error +``` +File Interfaces and Methods Available: +```go +io.Closer +io.Reader +io.ReaderAt +io.Seeker +io.Writer +io.WriterAt + +Name() : string +Readdir(count int) : []os.FileInfo, error +Readdirnames(n int) : []string, error +Stat() : os.FileInfo, error +Sync() : error +Truncate(size int64) : error +WriteString(s string) : ret int, err error +``` +In some applications it may make sense to define a new package that +simply exports the file system variable for easy access from anywhere. + +## Using Afero's utility functions + +Afero provides a set of functions to make it easier to use the underlying file systems. +These functions have been primarily ported from io & ioutil with some developed for Hugo. + +The afero utilities support all afero compatible backends. + +The list of utilities includes: + +```go +DirExists(path string) (bool, error) +Exists(path string) (bool, error) +FileContainsBytes(filename string, subslice []byte) (bool, error) +GetTempDir(subPath string) string +IsDir(path string) (bool, error) +IsEmpty(path string) (bool, error) +ReadDir(dirname string) ([]os.FileInfo, error) +ReadFile(filename string) ([]byte, error) +SafeWriteReader(path string, r io.Reader) (err error) +TempDir(dir, prefix string) (name string, err error) +TempFile(dir, prefix string) (f File, err error) +Walk(root string, walkFn filepath.WalkFunc) error +WriteFile(filename string, data []byte, perm os.FileMode) error +WriteReader(path string, r io.Reader) (err error) +``` +For a complete list see [Afero's GoDoc](https://godoc.org/github.com/spf13/afero) + +They are available under two different approaches to use. You can either call +them directly where the first parameter of each function will be the file +system, or you can declare a new `Afero`, a custom type used to bind these +functions as methods to a given filesystem. + +### Calling utilities directly + +```go +fs := new(afero.MemMapFs) +f, err := afero.TempFile(fs,"", "ioutil-test") + +``` + +### Calling via Afero + +```go +fs := afero.NewMemMapFs() +afs := &afero.Afero{Fs: fs} +f, err := afs.TempFile("", "ioutil-test") +``` + +## Using Afero for Testing + +There is a large benefit to using a mock filesystem for testing. It has a +completely blank state every time it is initialized and can be easily +reproducible regardless of OS. You could create files to your heart’s content +and the file access would be fast while also saving you from all the annoying +issues with deleting temporary files, Windows file locking, etc. The MemMapFs +backend is perfect for testing. + +* Much faster than performing I/O operations on disk +* Avoid security issues and permissions +* Far more control. 'rm -rf /' with confidence +* Test setup is far more easier to do +* No test cleanup needed + +One way to accomplish this is to define a variable as mentioned above. +In your application this will be set to afero.NewOsFs() during testing you +can set it to afero.NewMemMapFs(). + +It wouldn't be uncommon to have each test initialize a blank slate memory +backend. To do this I would define my `appFS = afero.NewOsFs()` somewhere +appropriate in my application code. This approach ensures that Tests are order +independent, with no test relying on the state left by an earlier test. + +Then in my tests I would initialize a new MemMapFs for each test: +```go +func TestExist(t *testing.T) { + appFS := afero.NewMemMapFs() + // create test files and directories + appFS.MkdirAll("src/a", 0755) + afero.WriteFile(appFS, "src/a/b", []byte("file b"), 0644) + afero.WriteFile(appFS, "src/c", []byte("file c"), 0644) + name := "src/c" + _, err := appFS.Stat(name) + if os.IsNotExist(err) { + t.Errorf("file \"%s\" does not exist.\n", name) + } +} +``` + +# Available Backends + +## Operating System Native + +### OsFs + +The first is simply a wrapper around the native OS calls. This makes it +very easy to use as all of the calls are the same as the existing OS +calls. It also makes it trivial to have your code use the OS during +operation and a mock filesystem during testing or as needed. + +```go +appfs := afero.NewOsFs() +appfs.MkdirAll("src/a", 0755)) +``` + +## Memory Backed Storage + +### MemMapFs + +Afero also provides a fully atomic memory backed filesystem perfect for use in +mocking and to speed up unnecessary disk io when persistence isn’t +necessary. It is fully concurrent and will work within go routines +safely. + +```go +mm := afero.NewMemMapFs() +mm.MkdirAll("src/a", 0755)) +``` + +#### InMemoryFile + +As part of MemMapFs, Afero also provides an atomic, fully concurrent memory +backed file implementation. This can be used in other memory backed file +systems with ease. Plans are to add a radix tree memory stored file +system using InMemoryFile. + +## Network Interfaces + +### SftpFs + +Afero has experimental support for secure file transfer protocol (sftp). Which can +be used to perform file operations over a encrypted channel. + +## Filtering Backends + +### BasePathFs + +The BasePathFs restricts all operations to a given path within an Fs. +The given file name to the operations on this Fs will be prepended with +the base path before calling the source Fs. + +```go +bp := afero.NewBasePathFs(afero.NewOsFs(), "/base/path") +``` + +### ReadOnlyFs + +A thin wrapper around the source Fs providing a read only view. + +```go +fs := afero.NewReadOnlyFs(afero.NewOsFs()) +_, err := fs.Create("/file.txt") +// err = syscall.EPERM +``` + +# RegexpFs + +A filtered view on file names, any file NOT matching +the passed regexp will be treated as non-existing. +Files not matching the regexp provided will not be created. +Directories are not filtered. + +```go +fs := afero.NewRegexpFs(afero.NewMemMapFs(), regexp.MustCompile(`\.txt$`)) +_, err := fs.Create("/file.html") +// err = syscall.ENOENT +``` + +### HttpFs + +Afero provides an http compatible backend which can wrap any of the existing +backends. + +The Http package requires a slightly specific version of Open which +returns an http.File type. + +Afero provides an httpFs file system which satisfies this requirement. +Any Afero FileSystem can be used as an httpFs. + +```go +httpFs := afero.NewHttpFs() +fileserver := http.FileServer(httpFs.Dir())) +http.Handle("/", fileserver) +``` + +## Composite Backends + +Afero provides the ability have two filesystems (or more) act as a single +file system. + +### CacheOnReadFs + +The CacheOnReadFs will lazily make copies of any accessed files from the base +layer into the overlay. Subsequent reads will be pulled from the overlay +directly permitting the request is within the cache duration of when it was +created in the overlay. + +If the base filesystem is writeable, any changes to files will be +done first to the base, then to the overlay layer. Write calls to open file +handles like `Write()` or `Truncate()` to the overlay first. + +To writing files to the overlay only, you can use the overlay Fs directly (not +via the union Fs). + +Cache files in the layer for the given time.Duration, a cache duration of 0 +means "forever" meaning the file will not be re-requested from the base ever. + +A read-only base will make the overlay also read-only but still copy files +from the base to the overlay when they're not present (or outdated) in the +caching layer. + +```go +base := afero.NewOsFs() +layer := afero.NewMemMapFs() +ufs := afero.NewCacheOnReadFs(base, layer, 100 * time.Second) +``` + +### CopyOnWriteFs() + +The CopyOnWriteFs is a read only base file system with a potentially +writeable layer on top. + +Read operations will first look in the overlay and if not found there, will +serve the file from the base. + +Changes to the file system will only be made in the overlay. + +Any attempt to modify a file found only in the base will copy the file to the +overlay layer before modification (including opening a file with a writable +handle). + +Removing and Renaming files present only in the base layer is not currently +permitted. If a file is present in the base layer and the overlay, only the +overlay will be removed/renamed. + +```go + base := afero.NewOsFs() + roBase := afero.NewReadOnlyFs(base) + ufs := afero.NewCopyOnWriteFs(roBase, afero.NewMemMapFs()) + + fh, _ = ufs.Create("/home/test/file2.txt") + fh.WriteString("This is a test") + fh.Close() +``` + +In this example all write operations will only occur in memory (MemMapFs) +leaving the base filesystem (OsFs) untouched. + + +## Desired/possible backends + +The following is a short list of possible backends we hope someone will +implement: + +* SSH +* ZIP +* TAR +* S3 + +# About the project + +## What's in the name + +Afero comes from the latin roots Ad-Facere. + +**"Ad"** is a prefix meaning "to". + +**"Facere"** is a form of the root "faciō" making "make or do". + +The literal meaning of afero is "to make" or "to do" which seems very fitting +for a library that allows one to make files and directories and do things with them. + +The English word that shares the same roots as Afero is "affair". Affair shares +the same concept but as a noun it means "something that is made or done" or "an +object of a particular type". + +It's also nice that unlike some of my other libraries (hugo, cobra, viper) it +Googles very well. + +## Release Notes + +* **0.10.0** 2015.12.10 + * Full compatibility with Windows + * Introduction of afero utilities + * Test suite rewritten to work cross platform + * Normalize paths for MemMapFs + * Adding Sync to the file interface + * **Breaking Change** Walk and ReadDir have changed parameter order + * Moving types used by MemMapFs to a subpackage + * General bugfixes and improvements +* **0.9.0** 2015.11.05 + * New Walk function similar to filepath.Walk + * MemMapFs.OpenFile handles O_CREATE, O_APPEND, O_TRUNC + * MemMapFs.Remove now really deletes the file + * InMemoryFile.Readdir and Readdirnames work correctly + * InMemoryFile functions lock it for concurrent access + * Test suite improvements +* **0.8.0** 2014.10.28 + * First public version + * Interfaces feel ready for people to build using + * Interfaces satisfy all known uses + * MemMapFs passes the majority of the OS test suite + * OsFs passes the majority of the OS test suite + +## Contributing + +1. Fork it +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request + +## Contributors + +Names in no particular order: + +* [spf13](https://github.com/spf13) +* [jaqx0r](https://github.com/jaqx0r) +* [mbertschler](https://github.com/mbertschler) +* [xor-gate](https://github.com/xor-gate) + +## License + +Afero is released under the Apache 2.0 license. See +[LICENSE.txt](https://github.com/spf13/afero/blob/master/LICENSE.txt) diff --git a/vendor/github.com/spf13/afero/appveyor.yml b/vendor/github.com/spf13/afero/appveyor.yml new file mode 100644 index 00000000..a633ad50 --- /dev/null +++ b/vendor/github.com/spf13/afero/appveyor.yml @@ -0,0 +1,15 @@ +version: '{build}' +clone_folder: C:\gopath\src\github.com\spf13\afero +environment: + GOPATH: C:\gopath +build_script: +- cmd: >- + go version + + go env + + go get -v github.com/spf13/afero/... + + go build github.com/spf13/afero +test_script: +- cmd: go test -race -v github.com/spf13/afero/... diff --git a/vendor/github.com/spf13/afero/go.mod b/vendor/github.com/spf13/afero/go.mod new file mode 100644 index 00000000..08685509 --- /dev/null +++ b/vendor/github.com/spf13/afero/go.mod @@ -0,0 +1,3 @@ +module github.com/spf13/afero + +require golang.org/x/text v0.3.0 diff --git a/vendor/github.com/spf13/afero/go.sum b/vendor/github.com/spf13/afero/go.sum new file mode 100644 index 00000000..6bad37b2 --- /dev/null +++ b/vendor/github.com/spf13/afero/go.sum @@ -0,0 +1,2 @@ +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/vendor/github.com/spf13/cobra/.gitignore b/vendor/github.com/spf13/cobra/.gitignore new file mode 100644 index 00000000..3b053c59 --- /dev/null +++ b/vendor/github.com/spf13/cobra/.gitignore @@ -0,0 +1,38 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +# Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore +# swap +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +# session +Session.vim +# temporary +.netrwhist +*~ +# auto-generated tag files +tags + +*.exe + +cobra.test + +.idea/* diff --git a/vendor/github.com/spf13/cobra/.mailmap b/vendor/github.com/spf13/cobra/.mailmap new file mode 100644 index 00000000..94ec5306 --- /dev/null +++ b/vendor/github.com/spf13/cobra/.mailmap @@ -0,0 +1,3 @@ +Steve Francia +Bjørn Erik Pedersen +Fabiano Franz diff --git a/vendor/github.com/spf13/cobra/.travis.yml b/vendor/github.com/spf13/cobra/.travis.yml new file mode 100644 index 00000000..38b85f49 --- /dev/null +++ b/vendor/github.com/spf13/cobra/.travis.yml @@ -0,0 +1,31 @@ +language: go + +stages: + - diff + - test + +go: + - 1.10.x + - 1.11.x + - 1.12.x + - tip + +matrix: + allow_failures: + - go: tip + include: + - stage: diff + go: 1.12.x + script: diff -u <(echo -n) <(gofmt -d -s .) + +before_install: + - mkdir -p bin + - curl -Lso bin/shellcheck https://github.com/caarlos0/shellcheck-docker/releases/download/v0.6.0/shellcheck + - chmod +x bin/shellcheck + - go get -u github.com/kyoh86/richgo +script: + - PATH=$PATH:$PWD/bin richgo test -v ./... + - go build + - if [ -z $NOVET ]; then + diff -u <(echo -n) <(go vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint'); + fi diff --git a/vendor/github.com/spf13/cobra/README.md b/vendor/github.com/spf13/cobra/README.md new file mode 100644 index 00000000..60c5a425 --- /dev/null +++ b/vendor/github.com/spf13/cobra/README.md @@ -0,0 +1,741 @@ +![cobra logo](https://cloud.githubusercontent.com/assets/173412/10886352/ad566232-814f-11e5-9cd0-aa101788c117.png) + +Cobra is both a library for creating powerful modern CLI applications as well as a program to generate applications and command files. + +Many of the most widely used Go projects are built using Cobra, such as: +[Kubernetes](http://kubernetes.io/), +[Hugo](http://gohugo.io), +[rkt](https://github.com/coreos/rkt), +[etcd](https://github.com/coreos/etcd), +[Moby (former Docker)](https://github.com/moby/moby), +[Docker (distribution)](https://github.com/docker/distribution), +[OpenShift](https://www.openshift.com/), +[Delve](https://github.com/derekparker/delve), +[GopherJS](http://www.gopherjs.org/), +[CockroachDB](http://www.cockroachlabs.com/), +[Bleve](http://www.blevesearch.com/), +[ProjectAtomic (enterprise)](http://www.projectatomic.io/), +[Giant Swarm's gsctl](https://github.com/giantswarm/gsctl), +[Nanobox](https://github.com/nanobox-io/nanobox)/[Nanopack](https://github.com/nanopack), +[rclone](http://rclone.org/), +[nehm](https://github.com/bogem/nehm), +[Pouch](https://github.com/alibaba/pouch), +[Istio](https://istio.io), +[Prototool](https://github.com/uber/prototool), +[mattermost-server](https://github.com/mattermost/mattermost-server), +[Gardener](https://github.com/gardener/gardenctl), +etc. + +[![Build Status](https://travis-ci.org/spf13/cobra.svg "Travis CI status")](https://travis-ci.org/spf13/cobra) +[![CircleCI status](https://circleci.com/gh/spf13/cobra.png?circle-token=:circle-token "CircleCI status")](https://circleci.com/gh/spf13/cobra) +[![GoDoc](https://godoc.org/github.com/spf13/cobra?status.svg)](https://godoc.org/github.com/spf13/cobra) + +# Table of Contents + +- [Overview](#overview) +- [Concepts](#concepts) + * [Commands](#commands) + * [Flags](#flags) +- [Installing](#installing) +- [Getting Started](#getting-started) + * [Using the Cobra Generator](#using-the-cobra-generator) + * [Using the Cobra Library](#using-the-cobra-library) + * [Working with Flags](#working-with-flags) + * [Positional and Custom Arguments](#positional-and-custom-arguments) + * [Example](#example) + * [Help Command](#help-command) + * [Usage Message](#usage-message) + * [PreRun and PostRun Hooks](#prerun-and-postrun-hooks) + * [Suggestions when "unknown command" happens](#suggestions-when-unknown-command-happens) + * [Generating documentation for your command](#generating-documentation-for-your-command) + * [Generating bash completions](#generating-bash-completions) + * [Generating zsh completions](#generating-zsh-completions) +- [Contributing](#contributing) +- [License](#license) + +# Overview + +Cobra is a library providing a simple interface to create powerful modern CLI +interfaces similar to git & go tools. + +Cobra is also an application that will generate your application scaffolding to rapidly +develop a Cobra-based application. + +Cobra provides: +* Easy subcommand-based CLIs: `app server`, `app fetch`, etc. +* Fully POSIX-compliant flags (including short & long versions) +* Nested subcommands +* Global, local and cascading flags +* Easy generation of applications & commands with `cobra init appname` & `cobra add cmdname` +* Intelligent suggestions (`app srver`... did you mean `app server`?) +* Automatic help generation for commands and flags +* Automatic help flag recognition of `-h`, `--help`, etc. +* Automatically generated bash autocomplete for your application +* Automatically generated man pages for your application +* Command aliases so you can change things without breaking them +* The flexibility to define your own help, usage, etc. +* Optional tight integration with [viper](http://github.com/spf13/viper) for 12-factor apps + +# Concepts + +Cobra is built on a structure of commands, arguments & flags. + +**Commands** represent actions, **Args** are things and **Flags** are modifiers for those actions. + +The best applications will read like sentences when used. Users will know how +to use the application because they will natively understand how to use it. + +The pattern to follow is +`APPNAME VERB NOUN --ADJECTIVE.` + or +`APPNAME COMMAND ARG --FLAG` + +A few good real world examples may better illustrate this point. + +In the following example, 'server' is a command, and 'port' is a flag: + + hugo server --port=1313 + +In this command we are telling Git to clone the url bare. + + git clone URL --bare + +## Commands + +Command is the central point of the application. Each interaction that +the application supports will be contained in a Command. A command can +have children commands and optionally run an action. + +In the example above, 'server' is the command. + +[More about cobra.Command](https://godoc.org/github.com/spf13/cobra#Command) + +## Flags + +A flag is a way to modify the behavior of a command. Cobra supports +fully POSIX-compliant flags as well as the Go [flag package](https://golang.org/pkg/flag/). +A Cobra command can define flags that persist through to children commands +and flags that are only available to that command. + +In the example above, 'port' is the flag. + +Flag functionality is provided by the [pflag +library](https://github.com/spf13/pflag), a fork of the flag standard library +which maintains the same interface while adding POSIX compliance. + +# Installing +Using Cobra is easy. First, use `go get` to install the latest version +of the library. This command will install the `cobra` generator executable +along with the library and its dependencies: + + go get -u github.com/spf13/cobra/cobra + +Next, include Cobra in your application: + +```go +import "github.com/spf13/cobra" +``` + +# Getting Started + +While you are welcome to provide your own organization, typically a Cobra-based +application will follow the following organizational structure: + +``` + ▾ appName/ + ▾ cmd/ + add.go + your.go + commands.go + here.go + main.go +``` + +In a Cobra app, typically the main.go file is very bare. It serves one purpose: initializing Cobra. + +```go +package main + +import ( + "{pathToYourApp}/cmd" +) + +func main() { + cmd.Execute() +} +``` + +## Using the Cobra Generator + +Cobra provides its own program that will create your application and add any +commands you want. It's the easiest way to incorporate Cobra into your application. + +[Here](https://github.com/spf13/cobra/blob/master/cobra/README.md) you can find more information about it. + +## Using the Cobra Library + +To manually implement Cobra you need to create a bare main.go file and a rootCmd file. +You will optionally provide additional commands as you see fit. + +### Create rootCmd + +Cobra doesn't require any special constructors. Simply create your commands. + +Ideally you place this in app/cmd/root.go: + +```go +var rootCmd = &cobra.Command{ + Use: "hugo", + Short: "Hugo is a very fast static site generator", + Long: `A Fast and Flexible Static Site Generator built with + love by spf13 and friends in Go. + Complete documentation is available at http://hugo.spf13.com`, + Run: func(cmd *cobra.Command, args []string) { + // Do Stuff Here + }, +} + +func Execute() { + if err := rootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } +} +``` + +You will additionally define flags and handle configuration in your init() function. + +For example cmd/root.go: + +```go +import ( + "fmt" + "os" + + homedir "github.com/mitchellh/go-homedir" + "github.com/spf13/cobra" + "github.com/spf13/viper" +) + +func init() { + cobra.OnInitialize(initConfig) + rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)") + rootCmd.PersistentFlags().StringVarP(&projectBase, "projectbase", "b", "", "base project directory eg. github.com/spf13/") + rootCmd.PersistentFlags().StringP("author", "a", "YOUR NAME", "Author name for copyright attribution") + rootCmd.PersistentFlags().StringVarP(&userLicense, "license", "l", "", "Name of license for the project (can provide `licensetext` in config)") + rootCmd.PersistentFlags().Bool("viper", true, "Use Viper for configuration") + viper.BindPFlag("author", rootCmd.PersistentFlags().Lookup("author")) + viper.BindPFlag("projectbase", rootCmd.PersistentFlags().Lookup("projectbase")) + viper.BindPFlag("useViper", rootCmd.PersistentFlags().Lookup("viper")) + viper.SetDefault("author", "NAME HERE ") + viper.SetDefault("license", "apache") +} + +func initConfig() { + // Don't forget to read config either from cfgFile or from home directory! + if cfgFile != "" { + // Use config file from the flag. + viper.SetConfigFile(cfgFile) + } else { + // Find home directory. + home, err := homedir.Dir() + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + // Search config in home directory with name ".cobra" (without extension). + viper.AddConfigPath(home) + viper.SetConfigName(".cobra") + } + + if err := viper.ReadInConfig(); err != nil { + fmt.Println("Can't read config:", err) + os.Exit(1) + } +} +``` + +### Create your main.go + +With the root command you need to have your main function execute it. +Execute should be run on the root for clarity, though it can be called on any command. + +In a Cobra app, typically the main.go file is very bare. It serves, one purpose, to initialize Cobra. + +```go +package main + +import ( + "{pathToYourApp}/cmd" +) + +func main() { + cmd.Execute() +} +``` + +### Create additional commands + +Additional commands can be defined and typically are each given their own file +inside of the cmd/ directory. + +If you wanted to create a version command you would create cmd/version.go and +populate it with the following: + +```go +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +func init() { + rootCmd.AddCommand(versionCmd) +} + +var versionCmd = &cobra.Command{ + Use: "version", + Short: "Print the version number of Hugo", + Long: `All software has versions. This is Hugo's`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("Hugo Static Site Generator v0.9 -- HEAD") + }, +} +``` + +## Working with Flags + +Flags provide modifiers to control how the action command operates. + +### Assign flags to a command + +Since the flags are defined and used in different locations, we need to +define a variable outside with the correct scope to assign the flag to +work with. + +```go +var Verbose bool +var Source string +``` + +There are two different approaches to assign a flag. + +### Persistent Flags + +A flag can be 'persistent' meaning that this flag will be available to the +command it's assigned to as well as every command under that command. For +global flags, assign a flag as a persistent flag on the root. + +```go +rootCmd.PersistentFlags().BoolVarP(&Verbose, "verbose", "v", false, "verbose output") +``` + +### Local Flags + +A flag can also be assigned locally which will only apply to that specific command. + +```go +localCmd.Flags().StringVarP(&Source, "source", "s", "", "Source directory to read from") +``` + +### Local Flag on Parent Commands + +By default Cobra only parses local flags on the target command, any local flags on +parent commands are ignored. By enabling `Command.TraverseChildren` Cobra will +parse local flags on each command before executing the target command. + +```go +command := cobra.Command{ + Use: "print [OPTIONS] [COMMANDS]", + TraverseChildren: true, +} +``` + +### Bind Flags with Config + +You can also bind your flags with [viper](https://github.com/spf13/viper): +```go +var author string + +func init() { + rootCmd.PersistentFlags().StringVar(&author, "author", "YOUR NAME", "Author name for copyright attribution") + viper.BindPFlag("author", rootCmd.PersistentFlags().Lookup("author")) +} +``` + +In this example the persistent flag `author` is bound with `viper`. +**Note**, that the variable `author` will not be set to the value from config, +when the `--author` flag is not provided by user. + +More in [viper documentation](https://github.com/spf13/viper#working-with-flags). + +### Required flags + +Flags are optional by default. If instead you wish your command to report an error +when a flag has not been set, mark it as required: +```go +rootCmd.Flags().StringVarP(&Region, "region", "r", "", "AWS region (required)") +rootCmd.MarkFlagRequired("region") +``` + +## Positional and Custom Arguments + +Validation of positional arguments can be specified using the `Args` field +of `Command`. + +The following validators are built in: + +- `NoArgs` - the command will report an error if there are any positional args. +- `ArbitraryArgs` - the command will accept any args. +- `OnlyValidArgs` - the command will report an error if there are any positional args that are not in the `ValidArgs` field of `Command`. +- `MinimumNArgs(int)` - the command will report an error if there are not at least N positional args. +- `MaximumNArgs(int)` - the command will report an error if there are more than N positional args. +- `ExactArgs(int)` - the command will report an error if there are not exactly N positional args. +- `ExactValidArgs(int)` - the command will report an error if there are not exactly N positional args OR if there are any positional args that are not in the `ValidArgs` field of `Command` +- `RangeArgs(min, max)` - the command will report an error if the number of args is not between the minimum and maximum number of expected args. + +An example of setting the custom validator: + +```go +var cmd = &cobra.Command{ + Short: "hello", + Args: func(cmd *cobra.Command, args []string) error { + if len(args) < 1 { + return errors.New("requires a color argument") + } + if myapp.IsValidColor(args[0]) { + return nil + } + return fmt.Errorf("invalid color specified: %s", args[0]) + }, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("Hello, World!") + }, +} +``` + +## Example + +In the example below, we have defined three commands. Two are at the top level +and one (cmdTimes) is a child of one of the top commands. In this case the root +is not executable meaning that a subcommand is required. This is accomplished +by not providing a 'Run' for the 'rootCmd'. + +We have only defined one flag for a single command. + +More documentation about flags is available at https://github.com/spf13/pflag + +```go +package main + +import ( + "fmt" + "strings" + + "github.com/spf13/cobra" +) + +func main() { + var echoTimes int + + var cmdPrint = &cobra.Command{ + Use: "print [string to print]", + Short: "Print anything to the screen", + Long: `print is for printing anything back to the screen. +For many years people have printed back to the screen.`, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("Print: " + strings.Join(args, " ")) + }, + } + + var cmdEcho = &cobra.Command{ + Use: "echo [string to echo]", + Short: "Echo anything to the screen", + Long: `echo is for echoing anything back. +Echo works a lot like print, except it has a child command.`, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("Print: " + strings.Join(args, " ")) + }, + } + + var cmdTimes = &cobra.Command{ + Use: "times [string to echo]", + Short: "Echo anything to the screen more times", + Long: `echo things multiple times back to the user by providing +a count and a string.`, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + for i := 0; i < echoTimes; i++ { + fmt.Println("Echo: " + strings.Join(args, " ")) + } + }, + } + + cmdTimes.Flags().IntVarP(&echoTimes, "times", "t", 1, "times to echo the input") + + var rootCmd = &cobra.Command{Use: "app"} + rootCmd.AddCommand(cmdPrint, cmdEcho) + cmdEcho.AddCommand(cmdTimes) + rootCmd.Execute() +} +``` + +For a more complete example of a larger application, please checkout [Hugo](http://gohugo.io/). + +## Help Command + +Cobra automatically adds a help command to your application when you have subcommands. +This will be called when a user runs 'app help'. Additionally, help will also +support all other commands as input. Say, for instance, you have a command called +'create' without any additional configuration; Cobra will work when 'app help +create' is called. Every command will automatically have the '--help' flag added. + +### Example + +The following output is automatically generated by Cobra. Nothing beyond the +command and flag definitions are needed. + + $ cobra help + + Cobra is a CLI library for Go that empowers applications. + This application is a tool to generate the needed files + to quickly create a Cobra application. + + Usage: + cobra [command] + + Available Commands: + add Add a command to a Cobra Application + help Help about any command + init Initialize a Cobra Application + + Flags: + -a, --author string author name for copyright attribution (default "YOUR NAME") + --config string config file (default is $HOME/.cobra.yaml) + -h, --help help for cobra + -l, --license string name of license for the project + --viper use Viper for configuration (default true) + + Use "cobra [command] --help" for more information about a command. + + +Help is just a command like any other. There is no special logic or behavior +around it. In fact, you can provide your own if you want. + +### Defining your own help + +You can provide your own Help command or your own template for the default command to use +with following functions: + +```go +cmd.SetHelpCommand(cmd *Command) +cmd.SetHelpFunc(f func(*Command, []string)) +cmd.SetHelpTemplate(s string) +``` + +The latter two will also apply to any children commands. + +## Usage Message + +When the user provides an invalid flag or invalid command, Cobra responds by +showing the user the 'usage'. + +### Example +You may recognize this from the help above. That's because the default help +embeds the usage as part of its output. + + $ cobra --invalid + Error: unknown flag: --invalid + Usage: + cobra [command] + + Available Commands: + add Add a command to a Cobra Application + help Help about any command + init Initialize a Cobra Application + + Flags: + -a, --author string author name for copyright attribution (default "YOUR NAME") + --config string config file (default is $HOME/.cobra.yaml) + -h, --help help for cobra + -l, --license string name of license for the project + --viper use Viper for configuration (default true) + + Use "cobra [command] --help" for more information about a command. + +### Defining your own usage +You can provide your own usage function or template for Cobra to use. +Like help, the function and template are overridable through public methods: + +```go +cmd.SetUsageFunc(f func(*Command) error) +cmd.SetUsageTemplate(s string) +``` + +## Version Flag + +Cobra adds a top-level '--version' flag if the Version field is set on the root command. +Running an application with the '--version' flag will print the version to stdout using +the version template. The template can be customized using the +`cmd.SetVersionTemplate(s string)` function. + +## PreRun and PostRun Hooks + +It is possible to run functions before or after the main `Run` function of your command. The `PersistentPreRun` and `PreRun` functions will be executed before `Run`. `PersistentPostRun` and `PostRun` will be executed after `Run`. The `Persistent*Run` functions will be inherited by children if they do not declare their own. These functions are run in the following order: + +- `PersistentPreRun` +- `PreRun` +- `Run` +- `PostRun` +- `PersistentPostRun` + +An example of two commands which use all of these features is below. When the subcommand is executed, it will run the root command's `PersistentPreRun` but not the root command's `PersistentPostRun`: + +```go +package main + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +func main() { + + var rootCmd = &cobra.Command{ + Use: "root [sub]", + Short: "My root command", + PersistentPreRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside rootCmd PersistentPreRun with args: %v\n", args) + }, + PreRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside rootCmd PreRun with args: %v\n", args) + }, + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside rootCmd Run with args: %v\n", args) + }, + PostRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside rootCmd PostRun with args: %v\n", args) + }, + PersistentPostRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside rootCmd PersistentPostRun with args: %v\n", args) + }, + } + + var subCmd = &cobra.Command{ + Use: "sub [no options!]", + Short: "My subcommand", + PreRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside subCmd PreRun with args: %v\n", args) + }, + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside subCmd Run with args: %v\n", args) + }, + PostRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside subCmd PostRun with args: %v\n", args) + }, + PersistentPostRun: func(cmd *cobra.Command, args []string) { + fmt.Printf("Inside subCmd PersistentPostRun with args: %v\n", args) + }, + } + + rootCmd.AddCommand(subCmd) + + rootCmd.SetArgs([]string{""}) + rootCmd.Execute() + fmt.Println() + rootCmd.SetArgs([]string{"sub", "arg1", "arg2"}) + rootCmd.Execute() +} +``` + +Output: +``` +Inside rootCmd PersistentPreRun with args: [] +Inside rootCmd PreRun with args: [] +Inside rootCmd Run with args: [] +Inside rootCmd PostRun with args: [] +Inside rootCmd PersistentPostRun with args: [] + +Inside rootCmd PersistentPreRun with args: [arg1 arg2] +Inside subCmd PreRun with args: [arg1 arg2] +Inside subCmd Run with args: [arg1 arg2] +Inside subCmd PostRun with args: [arg1 arg2] +Inside subCmd PersistentPostRun with args: [arg1 arg2] +``` + +## Suggestions when "unknown command" happens + +Cobra will print automatic suggestions when "unknown command" errors happen. This allows Cobra to behave similarly to the `git` command when a typo happens. For example: + +``` +$ hugo srever +Error: unknown command "srever" for "hugo" + +Did you mean this? + server + +Run 'hugo --help' for usage. +``` + +Suggestions are automatic based on every subcommand registered and use an implementation of [Levenshtein distance](http://en.wikipedia.org/wiki/Levenshtein_distance). Every registered command that matches a minimum distance of 2 (ignoring case) will be displayed as a suggestion. + +If you need to disable suggestions or tweak the string distance in your command, use: + +```go +command.DisableSuggestions = true +``` + +or + +```go +command.SuggestionsMinimumDistance = 1 +``` + +You can also explicitly set names for which a given command will be suggested using the `SuggestFor` attribute. This allows suggestions for strings that are not close in terms of string distance, but makes sense in your set of commands and for some which you don't want aliases. Example: + +``` +$ kubectl remove +Error: unknown command "remove" for "kubectl" + +Did you mean this? + delete + +Run 'kubectl help' for usage. +``` + +## Generating documentation for your command + +Cobra can generate documentation based on subcommands, flags, etc. in the following formats: + +- [Markdown](doc/md_docs.md) +- [ReStructured Text](doc/rest_docs.md) +- [Man Page](doc/man_docs.md) + +## Generating bash completions + +Cobra can generate a bash-completion file. If you add more information to your command, these completions can be amazingly powerful and flexible. Read more about it in [Bash Completions](bash_completions.md). + +## Generating zsh completions + +Cobra can generate zsh-completion file. Read more about it in +[Zsh Completions](zsh_completions.md). + +# Contributing + +1. Fork it +2. Download your fork to your PC (`git clone https://github.com/your_username/cobra && cd cobra`) +3. Create your feature branch (`git checkout -b my-new-feature`) +4. Make changes and add them (`git add .`) +5. Commit your changes (`git commit -m 'Add some feature'`) +6. Push to the branch (`git push origin my-new-feature`) +7. Create new pull request + +# License + +Cobra is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/spf13/cobra/blob/master/LICENSE.txt) diff --git a/vendor/github.com/spf13/cobra/bash_completions.go b/vendor/github.com/spf13/cobra/bash_completions.go index c3c1e501..57bb8e1b 100644 --- a/vendor/github.com/spf13/cobra/bash_completions.go +++ b/vendor/github.com/spf13/cobra/bash_completions.go @@ -545,51 +545,3 @@ func (c *Command) GenBashCompletionFile(filename string) error { return c.GenBashCompletion(outFile) } - -// MarkFlagRequired adds the BashCompOneRequiredFlag annotation to the named flag if it exists, -// and causes your command to report an error if invoked without the flag. -func (c *Command) MarkFlagRequired(name string) error { - return MarkFlagRequired(c.Flags(), name) -} - -// MarkPersistentFlagRequired adds the BashCompOneRequiredFlag annotation to the named persistent flag if it exists, -// and causes your command to report an error if invoked without the flag. -func (c *Command) MarkPersistentFlagRequired(name string) error { - return MarkFlagRequired(c.PersistentFlags(), name) -} - -// MarkFlagRequired adds the BashCompOneRequiredFlag annotation to the named flag if it exists, -// and causes your command to report an error if invoked without the flag. -func MarkFlagRequired(flags *pflag.FlagSet, name string) error { - return flags.SetAnnotation(name, BashCompOneRequiredFlag, []string{"true"}) -} - -// MarkFlagFilename adds the BashCompFilenameExt annotation to the named flag, if it exists. -// Generated bash autocompletion will select filenames for the flag, limiting to named extensions if provided. -func (c *Command) MarkFlagFilename(name string, extensions ...string) error { - return MarkFlagFilename(c.Flags(), name, extensions...) -} - -// MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. -// Generated bash autocompletion will call the bash function f for the flag. -func (c *Command) MarkFlagCustom(name string, f string) error { - return MarkFlagCustom(c.Flags(), name, f) -} - -// MarkPersistentFlagFilename adds the BashCompFilenameExt annotation to the named persistent flag, if it exists. -// Generated bash autocompletion will select filenames for the flag, limiting to named extensions if provided. -func (c *Command) MarkPersistentFlagFilename(name string, extensions ...string) error { - return MarkFlagFilename(c.PersistentFlags(), name, extensions...) -} - -// MarkFlagFilename adds the BashCompFilenameExt annotation to the named flag in the flag set, if it exists. -// Generated bash autocompletion will select filenames for the flag, limiting to named extensions if provided. -func MarkFlagFilename(flags *pflag.FlagSet, name string, extensions ...string) error { - return flags.SetAnnotation(name, BashCompFilenameExt, extensions) -} - -// MarkFlagCustom adds the BashCompCustom annotation to the named flag in the flag set, if it exists. -// Generated bash autocompletion will call the bash function f for the flag. -func MarkFlagCustom(flags *pflag.FlagSet, name string, f string) error { - return flags.SetAnnotation(name, BashCompCustom, []string{f}) -} diff --git a/vendor/github.com/spf13/cobra/bash_completions.md b/vendor/github.com/spf13/cobra/bash_completions.md new file mode 100644 index 00000000..4ac61ee1 --- /dev/null +++ b/vendor/github.com/spf13/cobra/bash_completions.md @@ -0,0 +1,256 @@ +# Generating Bash Completions For Your Own cobra.Command + +If you are using the generator you can create a completion command by running + +```bash +cobra add completion +``` + +Update the help text show how to install the bash_completion Linux show here [Kubectl docs show mac options](https://kubernetes.io/docs/tasks/tools/install-kubectl/#enabling-shell-autocompletion) + +Writing the shell script to stdout allows the most flexible use. + +```go +// completionCmd represents the completion command +var completionCmd = &cobra.Command{ + Use: "completion", + Short: "Generates bash completion scripts", + Long: `To load completion run + +. <(bitbucket completion) + +To configure your bash shell to load completions for each session add to your bashrc + +# ~/.bashrc or ~/.profile +. <(bitbucket completion) +`, + Run: func(cmd *cobra.Command, args []string) { + rootCmd.GenBashCompletion(os.Stdout); + }, +} +``` + +**Note:** The cobra generator may include messages printed to stdout for example if the config file is loaded, this will break the auto complete script + + +## Example from kubectl + +Generating bash completions from a cobra command is incredibly easy. An actual program which does so for the kubernetes kubectl binary is as follows: + +```go +package main + +import ( + "io/ioutil" + "os" + + "k8s.io/kubernetes/pkg/kubectl/cmd" + "k8s.io/kubernetes/pkg/kubectl/cmd/util" +) + +func main() { + kubectl := cmd.NewKubectlCommand(util.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard) + kubectl.GenBashCompletionFile("out.sh") +} +``` + +`out.sh` will get you completions of subcommands and flags. Copy it to `/etc/bash_completion.d/` as described [here](https://debian-administration.org/article/316/An_introduction_to_bash_completion_part_1) and reset your terminal to use autocompletion. If you make additional annotations to your code, you can get even more intelligent and flexible behavior. + +## Creating your own custom functions + +Some more actual code that works in kubernetes: + +```bash +const ( + bash_completion_func = `__kubectl_parse_get() +{ + local kubectl_output out + if kubectl_output=$(kubectl get --no-headers "$1" 2>/dev/null); then + out=($(echo "${kubectl_output}" | awk '{print $1}')) + COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) ) + fi +} + +__kubectl_get_resource() +{ + if [[ ${#nouns[@]} -eq 0 ]]; then + return 1 + fi + __kubectl_parse_get ${nouns[${#nouns[@]} -1]} + if [[ $? -eq 0 ]]; then + return 0 + fi +} + +__kubectl_custom_func() { + case ${last_command} in + kubectl_get | kubectl_describe | kubectl_delete | kubectl_stop) + __kubectl_get_resource + return + ;; + *) + ;; + esac +} +`) +``` + +And then I set that in my command definition: + +```go +cmds := &cobra.Command{ + Use: "kubectl", + Short: "kubectl controls the Kubernetes cluster manager", + Long: `kubectl controls the Kubernetes cluster manager. + +Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`, + Run: runHelp, + BashCompletionFunction: bash_completion_func, +} +``` + +The `BashCompletionFunction` option is really only valid/useful on the root command. Doing the above will cause `__kubectl_custom_func()` (`___custom_func()`) to be called when the built in processor was unable to find a solution. In the case of kubernetes a valid command might look something like `kubectl get pod [mypod]`. If you type `kubectl get pod [tab][tab]` the `__kubectl_customc_func()` will run because the cobra.Command only understood "kubectl" and "get." `__kubectl_custom_func()` will see that the cobra.Command is "kubectl_get" and will thus call another helper `__kubectl_get_resource()`. `__kubectl_get_resource` will look at the 'nouns' collected. In our example the only noun will be `pod`. So it will call `__kubectl_parse_get pod`. `__kubectl_parse_get` will actually call out to kubernetes and get any pods. It will then set `COMPREPLY` to valid pods! + +## Have the completions code complete your 'nouns' + +In the above example "pod" was assumed to already be typed. But if you want `kubectl get [tab][tab]` to show a list of valid "nouns" you have to set them. Simplified code from `kubectl get` looks like: + +```go +validArgs []string = { "pod", "node", "service", "replicationcontroller" } + +cmd := &cobra.Command{ + Use: "get [(-o|--output=)json|yaml|template|...] (RESOURCE [NAME] | RESOURCE/NAME ...)", + Short: "Display one or many resources", + Long: get_long, + Example: get_example, + Run: func(cmd *cobra.Command, args []string) { + err := RunGet(f, out, cmd, args) + util.CheckErr(err) + }, + ValidArgs: validArgs, +} +``` + +Notice we put the "ValidArgs" on the "get" subcommand. Doing so will give results like + +```bash +# kubectl get [tab][tab] +node pod replicationcontroller service +``` + +## Plural form and shortcuts for nouns + +If your nouns have a number of aliases, you can define them alongside `ValidArgs` using `ArgAliases`: + +```go +argAliases []string = { "pods", "nodes", "services", "svc", "replicationcontrollers", "rc" } + +cmd := &cobra.Command{ + ... + ValidArgs: validArgs, + ArgAliases: argAliases +} +``` + +The aliases are not shown to the user on tab completion, but they are accepted as valid nouns by +the completion algorithm if entered manually, e.g. in: + +```bash +# kubectl get rc [tab][tab] +backend frontend database +``` + +Note that without declaring `rc` as an alias, the completion algorithm would show the list of nouns +in this example again instead of the replication controllers. + +## Mark flags as required + +Most of the time completions will only show subcommands. But if a flag is required to make a subcommand work, you probably want it to show up when the user types [tab][tab]. Marking a flag as 'Required' is incredibly easy. + +```go +cmd.MarkFlagRequired("pod") +cmd.MarkFlagRequired("container") +``` + +and you'll get something like + +```bash +# kubectl exec [tab][tab][tab] +-c --container= -p --pod= +``` + +# Specify valid filename extensions for flags that take a filename + +In this example we use --filename= and expect to get a json or yaml file as the argument. To make this easier we annotate the --filename flag with valid filename extensions. + +```go + annotations := []string{"json", "yaml", "yml"} + annotation := make(map[string][]string) + annotation[cobra.BashCompFilenameExt] = annotations + + flag := &pflag.Flag{ + Name: "filename", + Shorthand: "f", + Usage: usage, + Value: value, + DefValue: value.String(), + Annotations: annotation, + } + cmd.Flags().AddFlag(flag) +``` + +Now when you run a command with this filename flag you'll get something like + +```bash +# kubectl create -f +test/ example/ rpmbuild/ +hello.yml test.json +``` + +So while there are many other files in the CWD it only shows me subdirs and those with valid extensions. + +# Specify custom flag completion + +Similar to the filename completion and filtering using cobra.BashCompFilenameExt, you can specify +a custom flag completion function with cobra.BashCompCustom: + +```go + annotation := make(map[string][]string) + annotation[cobra.BashCompCustom] = []string{"__kubectl_get_namespaces"} + + flag := &pflag.Flag{ + Name: "namespace", + Usage: usage, + Annotations: annotation, + } + cmd.Flags().AddFlag(flag) +``` + +In addition add the `__handle_namespace_flag` implementation in the `BashCompletionFunction` +value, e.g.: + +```bash +__kubectl_get_namespaces() +{ + local template + template="{{ range .items }}{{ .metadata.name }} {{ end }}" + local kubectl_out + if kubectl_out=$(kubectl get -o template --template="${template}" namespace 2>/dev/null); then + COMPREPLY=( $( compgen -W "${kubectl_out}[*]" -- "$cur" ) ) + fi +} +``` +# Using bash aliases for commands + +You can also configure the `bash aliases` for the commands and they will also support completions. + +```bash +alias aliasname=origcommand +complete -o default -F __start_origcommand aliasname + +# and now when you run `aliasname` completion will make +# suggestions as it did for `origcommand`. + +$) aliasname +completion firstcommand secondcommand +``` diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/LICENSE.golden b/vendor/github.com/spf13/cobra/cobra/cmd/testdata/LICENSE.golden deleted file mode 100644 index d6456956..00000000 --- a/vendor/github.com/spf13/cobra/cobra/cmd/testdata/LICENSE.golden +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go index b257f91b..c7e89830 100644 --- a/vendor/github.com/spf13/cobra/command.go +++ b/vendor/github.com/spf13/cobra/command.go @@ -177,8 +177,6 @@ type Command struct { // that we can use on every pflag set and children commands globNormFunc func(f *flag.FlagSet, name string) flag.NormalizedName - // output is an output writer defined by user. - output io.Writer // usageFunc is usage func defined by user. usageFunc func(*Command) error // usageTemplate is usage template defined by user. @@ -195,6 +193,13 @@ type Command struct { helpCommand *Command // versionTemplate is the version template defined by user. versionTemplate string + + // inReader is a reader defined by the user that replaces stdin + inReader io.Reader + // outWriter is a writer defined by the user that replaces stdout + outWriter io.Writer + // errWriter is a writer defined by the user that replaces stderr + errWriter io.Writer } // SetArgs sets arguments for the command. It is set to os.Args[1:] by default, if desired, can be overridden @@ -205,8 +210,28 @@ func (c *Command) SetArgs(a []string) { // SetOutput sets the destination for usage and error messages. // If output is nil, os.Stderr is used. +// Deprecated: Use SetOut and/or SetErr instead func (c *Command) SetOutput(output io.Writer) { - c.output = output + c.outWriter = output + c.errWriter = output +} + +// SetOut sets the destination for usage messages. +// If newOut is nil, os.Stdout is used. +func (c *Command) SetOut(newOut io.Writer) { + c.outWriter = newOut +} + +// SetErr sets the destination for error messages. +// If newErr is nil, os.Stderr is used. +func (c *Command) SetErr(newErr io.Writer) { + c.errWriter = newErr +} + +// SetOut sets the source for input data +// If newIn is nil, os.Stdin is used. +func (c *Command) SetIn(newIn io.Reader) { + c.inReader = newIn } // SetUsageFunc sets usage function. Usage can be defined by application. @@ -267,9 +292,19 @@ func (c *Command) OutOrStderr() io.Writer { return c.getOut(os.Stderr) } +// ErrOrStderr returns output to stderr +func (c *Command) ErrOrStderr() io.Writer { + return c.getErr(os.Stderr) +} + +// ErrOrStderr returns output to stderr +func (c *Command) InOrStdin() io.Reader { + return c.getIn(os.Stdin) +} + func (c *Command) getOut(def io.Writer) io.Writer { - if c.output != nil { - return c.output + if c.outWriter != nil { + return c.outWriter } if c.HasParent() { return c.parent.getOut(def) @@ -277,6 +312,26 @@ func (c *Command) getOut(def io.Writer) io.Writer { return def } +func (c *Command) getErr(def io.Writer) io.Writer { + if c.errWriter != nil { + return c.errWriter + } + if c.HasParent() { + return c.parent.getErr(def) + } + return def +} + +func (c *Command) getIn(def io.Reader) io.Reader { + if c.inReader != nil { + return c.inReader + } + if c.HasParent() { + return c.parent.getIn(def) + } + return def +} + // UsageFunc returns either the function set by SetUsageFunc for this command // or a parent, or it returns a default usage function. func (c *Command) UsageFunc() (f func(*Command) error) { @@ -329,13 +384,22 @@ func (c *Command) Help() error { return nil } -// UsageString return usage string. +// UsageString returns usage string. func (c *Command) UsageString() string { - tmpOutput := c.output + // Storing normal writers + tmpOutput := c.outWriter + tmpErr := c.errWriter + bb := new(bytes.Buffer) - c.SetOutput(bb) + c.outWriter = bb + c.errWriter = bb + c.Usage() - c.output = tmpOutput + + // Setting things back to normal + c.outWriter = tmpOutput + c.errWriter = tmpErr + return bb.String() } @@ -1068,6 +1132,21 @@ func (c *Command) Printf(format string, i ...interface{}) { c.Print(fmt.Sprintf(format, i...)) } +// PrintErr is a convenience method to Print to the defined Err output, fallback to Stderr if not set. +func (c *Command) PrintErr(i ...interface{}) { + fmt.Fprint(c.ErrOrStderr(), i...) +} + +// PrintErrln is a convenience method to Println to the defined Err output, fallback to Stderr if not set. +func (c *Command) PrintErrln(i ...interface{}) { + c.Print(fmt.Sprintln(i...)) +} + +// PrintErrf is a convenience method to Printf to the defined Err output, fallback to Stderr if not set. +func (c *Command) PrintErrf(format string, i ...interface{}) { + c.Print(fmt.Sprintf(format, i...)) +} + // CommandPath returns the full path to this command. func (c *Command) CommandPath() string { if c.HasParent() { diff --git a/vendor/github.com/spf13/cobra/go.mod b/vendor/github.com/spf13/cobra/go.mod new file mode 100644 index 00000000..9a9eb65a --- /dev/null +++ b/vendor/github.com/spf13/cobra/go.mod @@ -0,0 +1,13 @@ +module github.com/spf13/cobra + +go 1.12 + +require ( + github.com/BurntSushi/toml v0.3.1 // indirect + github.com/cpuguy83/go-md2man v1.0.10 + github.com/inconshreveable/mousetrap v1.0.0 + github.com/mitchellh/go-homedir v1.1.0 + github.com/spf13/pflag v1.0.3 + github.com/spf13/viper v1.3.2 + gopkg.in/yaml.v2 v2.2.2 +) diff --git a/vendor/github.com/spf13/cobra/go.sum b/vendor/github.com/spf13/cobra/go.sum new file mode 100644 index 00000000..9761f4d0 --- /dev/null +++ b/vendor/github.com/spf13/cobra/go.sum @@ -0,0 +1,51 @@ +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a h1:1n5lsVfiQW3yfsRGu98756EH1YthsFqr/5mxHduZW2A= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/spf13/cobra/powershell_completions.go b/vendor/github.com/spf13/cobra/powershell_completions.go new file mode 100644 index 00000000..756c61b9 --- /dev/null +++ b/vendor/github.com/spf13/cobra/powershell_completions.go @@ -0,0 +1,100 @@ +// PowerShell completions are based on the amazing work from clap: +// https://github.com/clap-rs/clap/blob/3294d18efe5f264d12c9035f404c7d189d4824e1/src/completions/powershell.rs +// +// The generated scripts require PowerShell v5.0+ (which comes Windows 10, but +// can be downloaded separately for windows 7 or 8.1). + +package cobra + +import ( + "bytes" + "fmt" + "io" + "os" + "strings" + + "github.com/spf13/pflag" +) + +var powerShellCompletionTemplate = `using namespace System.Management.Automation +using namespace System.Management.Automation.Language +Register-ArgumentCompleter -Native -CommandName '%s' -ScriptBlock { + param($wordToComplete, $commandAst, $cursorPosition) + $commandElements = $commandAst.CommandElements + $command = @( + '%s' + for ($i = 1; $i -lt $commandElements.Count; $i++) { + $element = $commandElements[$i] + if ($element -isnot [StringConstantExpressionAst] -or + $element.StringConstantType -ne [StringConstantType]::BareWord -or + $element.Value.StartsWith('-')) { + break + } + $element.Value + } + ) -join ';' + $completions = @(switch ($command) {%s + }) + $completions.Where{ $_.CompletionText -like "$wordToComplete*" } | + Sort-Object -Property ListItemText +}` + +func generatePowerShellSubcommandCases(out io.Writer, cmd *Command, previousCommandName string) { + var cmdName string + if previousCommandName == "" { + cmdName = cmd.Name() + } else { + cmdName = fmt.Sprintf("%s;%s", previousCommandName, cmd.Name()) + } + + fmt.Fprintf(out, "\n '%s' {", cmdName) + + cmd.Flags().VisitAll(func(flag *pflag.Flag) { + if nonCompletableFlag(flag) { + return + } + usage := escapeStringForPowerShell(flag.Usage) + if len(flag.Shorthand) > 0 { + fmt.Fprintf(out, "\n [CompletionResult]::new('-%s', '%s', [CompletionResultType]::ParameterName, '%s')", flag.Shorthand, flag.Shorthand, usage) + } + fmt.Fprintf(out, "\n [CompletionResult]::new('--%s', '%s', [CompletionResultType]::ParameterName, '%s')", flag.Name, flag.Name, usage) + }) + + for _, subCmd := range cmd.Commands() { + usage := escapeStringForPowerShell(subCmd.Short) + fmt.Fprintf(out, "\n [CompletionResult]::new('%s', '%s', [CompletionResultType]::ParameterValue, '%s')", subCmd.Name(), subCmd.Name(), usage) + } + + fmt.Fprint(out, "\n break\n }") + + for _, subCmd := range cmd.Commands() { + generatePowerShellSubcommandCases(out, subCmd, cmdName) + } +} + +func escapeStringForPowerShell(s string) string { + return strings.Replace(s, "'", "''", -1) +} + +// GenPowerShellCompletion generates PowerShell completion file and writes to the passed writer. +func (c *Command) GenPowerShellCompletion(w io.Writer) error { + buf := new(bytes.Buffer) + + var subCommandCases bytes.Buffer + generatePowerShellSubcommandCases(&subCommandCases, c, "") + fmt.Fprintf(buf, powerShellCompletionTemplate, c.Name(), c.Name(), subCommandCases.String()) + + _, err := buf.WriteTo(w) + return err +} + +// GenPowerShellCompletionFile generates PowerShell completion file. +func (c *Command) GenPowerShellCompletionFile(filename string) error { + outFile, err := os.Create(filename) + if err != nil { + return err + } + defer outFile.Close() + + return c.GenPowerShellCompletion(outFile) +} diff --git a/vendor/github.com/spf13/cobra/powershell_completions.md b/vendor/github.com/spf13/cobra/powershell_completions.md new file mode 100644 index 00000000..afed8024 --- /dev/null +++ b/vendor/github.com/spf13/cobra/powershell_completions.md @@ -0,0 +1,14 @@ +# Generating PowerShell Completions For Your Own cobra.Command + +Cobra can generate PowerShell completion scripts. Users need PowerShell version 5.0 or above, which comes with Windows 10 and can be downloaded separately for Windows 7 or 8.1. They can then write the completions to a file and source this file from their PowerShell profile, which is referenced by the `$Profile` environment variable. See `Get-Help about_Profiles` for more info about PowerShell profiles. + +# What's supported + +- Completion for subcommands using their `.Short` description +- Completion for non-hidden flags using their `.Name` and `.Shorthand` + +# What's not yet supported + +- Command aliases +- Required, filename or custom flags (they will work like normal flags) +- Custom completion scripts diff --git a/vendor/github.com/spf13/cobra/shell_completions.go b/vendor/github.com/spf13/cobra/shell_completions.go new file mode 100644 index 00000000..ba0af9cb --- /dev/null +++ b/vendor/github.com/spf13/cobra/shell_completions.go @@ -0,0 +1,85 @@ +package cobra + +import ( + "github.com/spf13/pflag" +) + +// MarkFlagRequired adds the BashCompOneRequiredFlag annotation to the named flag if it exists, +// and causes your command to report an error if invoked without the flag. +func (c *Command) MarkFlagRequired(name string) error { + return MarkFlagRequired(c.Flags(), name) +} + +// MarkPersistentFlagRequired adds the BashCompOneRequiredFlag annotation to the named persistent flag if it exists, +// and causes your command to report an error if invoked without the flag. +func (c *Command) MarkPersistentFlagRequired(name string) error { + return MarkFlagRequired(c.PersistentFlags(), name) +} + +// MarkFlagRequired adds the BashCompOneRequiredFlag annotation to the named flag if it exists, +// and causes your command to report an error if invoked without the flag. +func MarkFlagRequired(flags *pflag.FlagSet, name string) error { + return flags.SetAnnotation(name, BashCompOneRequiredFlag, []string{"true"}) +} + +// MarkFlagFilename adds the BashCompFilenameExt annotation to the named flag, if it exists. +// Generated bash autocompletion will select filenames for the flag, limiting to named extensions if provided. +func (c *Command) MarkFlagFilename(name string, extensions ...string) error { + return MarkFlagFilename(c.Flags(), name, extensions...) +} + +// MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. +// Generated bash autocompletion will call the bash function f for the flag. +func (c *Command) MarkFlagCustom(name string, f string) error { + return MarkFlagCustom(c.Flags(), name, f) +} + +// MarkPersistentFlagFilename instructs the various shell completion +// implementations to limit completions for this persistent flag to the +// specified extensions (patterns). +// +// Shell Completion compatibility matrix: bash, zsh +func (c *Command) MarkPersistentFlagFilename(name string, extensions ...string) error { + return MarkFlagFilename(c.PersistentFlags(), name, extensions...) +} + +// MarkFlagFilename instructs the various shell completion implementations to +// limit completions for this flag to the specified extensions (patterns). +// +// Shell Completion compatibility matrix: bash, zsh +func MarkFlagFilename(flags *pflag.FlagSet, name string, extensions ...string) error { + return flags.SetAnnotation(name, BashCompFilenameExt, extensions) +} + +// MarkFlagCustom instructs the various shell completion implementations to +// limit completions for this flag to the specified extensions (patterns). +// +// Shell Completion compatibility matrix: bash, zsh +func MarkFlagCustom(flags *pflag.FlagSet, name string, f string) error { + return flags.SetAnnotation(name, BashCompCustom, []string{f}) +} + +// MarkFlagDirname instructs the various shell completion implementations to +// complete only directories with this named flag. +// +// Shell Completion compatibility matrix: zsh +func (c *Command) MarkFlagDirname(name string) error { + return MarkFlagDirname(c.Flags(), name) +} + +// MarkPersistentFlagDirname instructs the various shell completion +// implementations to complete only directories with this persistent named flag. +// +// Shell Completion compatibility matrix: zsh +func (c *Command) MarkPersistentFlagDirname(name string) error { + return MarkFlagDirname(c.PersistentFlags(), name) +} + +// MarkFlagDirname instructs the various shell completion implementations to +// complete only directories with this specified flag. +// +// Shell Completion compatibility matrix: zsh +func MarkFlagDirname(flags *pflag.FlagSet, name string) error { + zshPattern := "-(/)" + return flags.SetAnnotation(name, zshCompDirname, []string{zshPattern}) +} diff --git a/vendor/github.com/spf13/cobra/zsh_completions.go b/vendor/github.com/spf13/cobra/zsh_completions.go index 889c22e2..12755482 100644 --- a/vendor/github.com/spf13/cobra/zsh_completions.go +++ b/vendor/github.com/spf13/cobra/zsh_completions.go @@ -1,13 +1,102 @@ package cobra import ( - "bytes" + "encoding/json" "fmt" "io" "os" + "sort" "strings" + "text/template" + + "github.com/spf13/pflag" +) + +const ( + zshCompArgumentAnnotation = "cobra_annotations_zsh_completion_argument_annotation" + zshCompArgumentFilenameComp = "cobra_annotations_zsh_completion_argument_file_completion" + zshCompArgumentWordComp = "cobra_annotations_zsh_completion_argument_word_completion" + zshCompDirname = "cobra_annotations_zsh_dirname" +) + +var ( + zshCompFuncMap = template.FuncMap{ + "genZshFuncName": zshCompGenFuncName, + "extractFlags": zshCompExtractFlag, + "genFlagEntryForZshArguments": zshCompGenFlagEntryForArguments, + "extractArgsCompletions": zshCompExtractArgumentCompletionHintsForRendering, + } + zshCompletionText = ` +{{/* should accept Command (that contains subcommands) as parameter */}} +{{define "argumentsC" -}} +{{ $cmdPath := genZshFuncName .}} +function {{$cmdPath}} { + local -a commands + + _arguments -C \{{- range extractFlags .}} + {{genFlagEntryForZshArguments .}} \{{- end}} + "1: :->cmnds" \ + "*::arg:->args" + + case $state in + cmnds) + commands=({{range .Commands}}{{if not .Hidden}} + "{{.Name}}:{{.Short}}"{{end}}{{end}} + ) + _describe "command" commands + ;; + esac + + case "$words[1]" in {{- range .Commands}}{{if not .Hidden}} + {{.Name}}) + {{$cmdPath}}_{{.Name}} + ;;{{end}}{{end}} + esac +} +{{range .Commands}}{{if not .Hidden}} +{{template "selectCmdTemplate" .}} +{{- end}}{{end}} +{{- end}} + +{{/* should accept Command without subcommands as parameter */}} +{{define "arguments" -}} +function {{genZshFuncName .}} { +{{" _arguments"}}{{range extractFlags .}} \ + {{genFlagEntryForZshArguments . -}} +{{end}}{{range extractArgsCompletions .}} \ + {{.}}{{end}} +} +{{end}} + +{{/* dispatcher for commands with or without subcommands */}} +{{define "selectCmdTemplate" -}} +{{if .Hidden}}{{/* ignore hidden*/}}{{else -}} +{{if .Commands}}{{template "argumentsC" .}}{{else}}{{template "arguments" .}}{{end}} +{{- end}} +{{- end}} + +{{/* template entry point */}} +{{define "Main" -}} +#compdef _{{.Name}} {{.Name}} + +{{template "selectCmdTemplate" .}} +{{end}} +` ) +// zshCompArgsAnnotation is used to encode/decode zsh completion for +// arguments to/from Command.Annotations. +type zshCompArgsAnnotation map[int]zshCompArgHint + +type zshCompArgHint struct { + // Indicates the type of the completion to use. One of: + // zshCompArgumentFilenameComp or zshCompArgumentWordComp + Tipe string `json:"type"` + + // A value for the type above (globs for file completion or words) + Options []string `json:"options"` +} + // GenZshCompletionFile generates zsh completion file. func (c *Command) GenZshCompletionFile(filename string) error { outFile, err := os.Create(filename) @@ -19,108 +108,229 @@ func (c *Command) GenZshCompletionFile(filename string) error { return c.GenZshCompletion(outFile) } -// GenZshCompletion generates a zsh completion file and writes to the passed writer. +// GenZshCompletion generates a zsh completion file and writes to the passed +// writer. The completion always run on the root command regardless of the +// command it was called from. func (c *Command) GenZshCompletion(w io.Writer) error { - buf := new(bytes.Buffer) - - writeHeader(buf, c) - maxDepth := maxDepth(c) - writeLevelMapping(buf, maxDepth) - writeLevelCases(buf, maxDepth, c) + tmpl, err := template.New("Main").Funcs(zshCompFuncMap).Parse(zshCompletionText) + if err != nil { + return fmt.Errorf("error creating zsh completion template: %v", err) + } + return tmpl.Execute(w, c.Root()) +} - _, err := buf.WriteTo(w) - return err +// MarkZshCompPositionalArgumentFile marks the specified argument (first +// argument is 1) as completed by file selection. patterns (e.g. "*.txt") are +// optional - if not provided the completion will search for all files. +func (c *Command) MarkZshCompPositionalArgumentFile(argPosition int, patterns ...string) error { + if argPosition < 1 { + return fmt.Errorf("Invalid argument position (%d)", argPosition) + } + annotation, err := c.zshCompGetArgsAnnotations() + if err != nil { + return err + } + if c.zshcompArgsAnnotationnIsDuplicatePosition(annotation, argPosition) { + return fmt.Errorf("Duplicate annotation for positional argument at index %d", argPosition) + } + annotation[argPosition] = zshCompArgHint{ + Tipe: zshCompArgumentFilenameComp, + Options: patterns, + } + return c.zshCompSetArgsAnnotations(annotation) } -func writeHeader(w io.Writer, cmd *Command) { - fmt.Fprintf(w, "#compdef %s\n\n", cmd.Name()) +// MarkZshCompPositionalArgumentWords marks the specified positional argument +// (first argument is 1) as completed by the provided words. At east one word +// must be provided, spaces within words will be offered completion with +// "word\ word". +func (c *Command) MarkZshCompPositionalArgumentWords(argPosition int, words ...string) error { + if argPosition < 1 { + return fmt.Errorf("Invalid argument position (%d)", argPosition) + } + if len(words) == 0 { + return fmt.Errorf("Trying to set empty word list for positional argument %d", argPosition) + } + annotation, err := c.zshCompGetArgsAnnotations() + if err != nil { + return err + } + if c.zshcompArgsAnnotationnIsDuplicatePosition(annotation, argPosition) { + return fmt.Errorf("Duplicate annotation for positional argument at index %d", argPosition) + } + annotation[argPosition] = zshCompArgHint{ + Tipe: zshCompArgumentWordComp, + Options: words, + } + return c.zshCompSetArgsAnnotations(annotation) } -func maxDepth(c *Command) int { - if len(c.Commands()) == 0 { - return 0 +func zshCompExtractArgumentCompletionHintsForRendering(c *Command) ([]string, error) { + var result []string + annotation, err := c.zshCompGetArgsAnnotations() + if err != nil { + return nil, err } - maxDepthSub := 0 - for _, s := range c.Commands() { - subDepth := maxDepth(s) - if subDepth > maxDepthSub { - maxDepthSub = subDepth + for k, v := range annotation { + s, err := zshCompRenderZshCompArgHint(k, v) + if err != nil { + return nil, err } + result = append(result, s) } - return 1 + maxDepthSub + if len(c.ValidArgs) > 0 { + if _, positionOneExists := annotation[1]; !positionOneExists { + s, err := zshCompRenderZshCompArgHint(1, zshCompArgHint{ + Tipe: zshCompArgumentWordComp, + Options: c.ValidArgs, + }) + if err != nil { + return nil, err + } + result = append(result, s) + } + } + sort.Strings(result) + return result, nil } -func writeLevelMapping(w io.Writer, numLevels int) { - fmt.Fprintln(w, `_arguments \`) - for i := 1; i <= numLevels; i++ { - fmt.Fprintf(w, ` '%d: :->level%d' \`, i, i) - fmt.Fprintln(w) +func zshCompRenderZshCompArgHint(i int, z zshCompArgHint) (string, error) { + switch t := z.Tipe; t { + case zshCompArgumentFilenameComp: + var globs []string + for _, g := range z.Options { + globs = append(globs, fmt.Sprintf(`-g "%s"`, g)) + } + return fmt.Sprintf(`'%d: :_files %s'`, i, strings.Join(globs, " ")), nil + case zshCompArgumentWordComp: + var words []string + for _, w := range z.Options { + words = append(words, fmt.Sprintf("%q", w)) + } + return fmt.Sprintf(`'%d: :(%s)'`, i, strings.Join(words, " ")), nil + default: + return "", fmt.Errorf("Invalid zsh argument completion annotation: %s", t) } - fmt.Fprintf(w, ` '%d: :%s'`, numLevels+1, "_files") - fmt.Fprintln(w) } -func writeLevelCases(w io.Writer, maxDepth int, root *Command) { - fmt.Fprintln(w, "case $state in") - defer fmt.Fprintln(w, "esac") +func (c *Command) zshcompArgsAnnotationnIsDuplicatePosition(annotation zshCompArgsAnnotation, position int) bool { + _, dup := annotation[position] + return dup +} - for i := 1; i <= maxDepth; i++ { - fmt.Fprintf(w, " level%d)\n", i) - writeLevel(w, root, i) - fmt.Fprintln(w, " ;;") +func (c *Command) zshCompGetArgsAnnotations() (zshCompArgsAnnotation, error) { + annotation := make(zshCompArgsAnnotation) + annotationString, ok := c.Annotations[zshCompArgumentAnnotation] + if !ok { + return annotation, nil + } + err := json.Unmarshal([]byte(annotationString), &annotation) + if err != nil { + return annotation, fmt.Errorf("Error unmarshaling zsh argument annotation: %v", err) } - fmt.Fprintln(w, " *)") - fmt.Fprintln(w, " _arguments '*: :_files'") - fmt.Fprintln(w, " ;;") + return annotation, nil } -func writeLevel(w io.Writer, root *Command, i int) { - fmt.Fprintf(w, " case $words[%d] in\n", i) - defer fmt.Fprintln(w, " esac") - - commands := filterByLevel(root, i) - byParent := groupByParent(commands) +func (c *Command) zshCompSetArgsAnnotations(annotation zshCompArgsAnnotation) error { + jsn, err := json.Marshal(annotation) + if err != nil { + return fmt.Errorf("Error marshaling zsh argument annotation: %v", err) + } + if c.Annotations == nil { + c.Annotations = make(map[string]string) + } + c.Annotations[zshCompArgumentAnnotation] = string(jsn) + return nil +} - for p, c := range byParent { - names := names(c) - fmt.Fprintf(w, " %s)\n", p) - fmt.Fprintf(w, " _arguments '%d: :(%s)'\n", i, strings.Join(names, " ")) - fmt.Fprintln(w, " ;;") +func zshCompGenFuncName(c *Command) string { + if c.HasParent() { + return zshCompGenFuncName(c.Parent()) + "_" + c.Name() } - fmt.Fprintln(w, " *)") - fmt.Fprintln(w, " _arguments '*: :_files'") - fmt.Fprintln(w, " ;;") + return "_" + c.Name() +} +func zshCompExtractFlag(c *Command) []*pflag.Flag { + var flags []*pflag.Flag + c.LocalFlags().VisitAll(func(f *pflag.Flag) { + if !f.Hidden { + flags = append(flags, f) + } + }) + c.InheritedFlags().VisitAll(func(f *pflag.Flag) { + if !f.Hidden { + flags = append(flags, f) + } + }) + return flags } -func filterByLevel(c *Command, l int) []*Command { - cs := make([]*Command, 0) - if l == 0 { - cs = append(cs, c) - return cs +// zshCompGenFlagEntryForArguments returns an entry that matches _arguments +// zsh-completion parameters. It's too complicated to generate in a template. +func zshCompGenFlagEntryForArguments(f *pflag.Flag) string { + if f.Name == "" || f.Shorthand == "" { + return zshCompGenFlagEntryForSingleOptionFlag(f) } - for _, s := range c.Commands() { - cs = append(cs, filterByLevel(s, l-1)...) + return zshCompGenFlagEntryForMultiOptionFlag(f) +} + +func zshCompGenFlagEntryForSingleOptionFlag(f *pflag.Flag) string { + var option, multiMark, extras string + + if zshCompFlagCouldBeSpecifiedMoreThenOnce(f) { + multiMark = "*" } - return cs + + option = "--" + f.Name + if option == "--" { + option = "-" + f.Shorthand + } + extras = zshCompGenFlagEntryExtras(f) + + return fmt.Sprintf(`'%s%s[%s]%s'`, multiMark, option, zshCompQuoteFlagDescription(f.Usage), extras) } -func groupByParent(commands []*Command) map[string][]*Command { - m := make(map[string][]*Command) - for _, c := range commands { - parent := c.Parent() - if parent == nil { - continue - } - m[parent.Name()] = append(m[parent.Name()], c) +func zshCompGenFlagEntryForMultiOptionFlag(f *pflag.Flag) string { + var options, parenMultiMark, curlyMultiMark, extras string + + if zshCompFlagCouldBeSpecifiedMoreThenOnce(f) { + parenMultiMark = "*" + curlyMultiMark = "\\*" } - return m + + options = fmt.Sprintf(`'(%s-%s %s--%s)'{%s-%s,%s--%s}`, + parenMultiMark, f.Shorthand, parenMultiMark, f.Name, curlyMultiMark, f.Shorthand, curlyMultiMark, f.Name) + extras = zshCompGenFlagEntryExtras(f) + + return fmt.Sprintf(`%s'[%s]%s'`, options, zshCompQuoteFlagDescription(f.Usage), extras) } -func names(commands []*Command) []string { - ns := make([]string, len(commands)) - for i, c := range commands { - ns[i] = c.Name() +func zshCompGenFlagEntryExtras(f *pflag.Flag) string { + if f.NoOptDefVal != "" { + return "" } - return ns + + extras := ":" // allow options for flag (even without assistance) + for key, values := range f.Annotations { + switch key { + case zshCompDirname: + extras = fmt.Sprintf(":filename:_files -g %q", values[0]) + case BashCompFilenameExt: + extras = ":filename:_files" + for _, pattern := range values { + extras = extras + fmt.Sprintf(` -g "%s"`, pattern) + } + } + } + + return extras +} + +func zshCompFlagCouldBeSpecifiedMoreThenOnce(f *pflag.Flag) bool { + return strings.Contains(f.Value.Type(), "Slice") || + strings.Contains(f.Value.Type(), "Array") +} + +func zshCompQuoteFlagDescription(s string) string { + return strings.Replace(s, "'", `'\''`, -1) } diff --git a/vendor/github.com/spf13/cobra/zsh_completions.md b/vendor/github.com/spf13/cobra/zsh_completions.md new file mode 100644 index 00000000..df9c2eac --- /dev/null +++ b/vendor/github.com/spf13/cobra/zsh_completions.md @@ -0,0 +1,39 @@ +## Generating Zsh Completion for your cobra.Command + +Cobra supports native Zsh completion generated from the root `cobra.Command`. +The generated completion script should be put somewhere in your `$fpath` named +`_`. + +### What's Supported + +* Completion for all non-hidden subcommands using their `.Short` description. +* Completion for all non-hidden flags using the following rules: + * Filename completion works by marking the flag with `cmd.MarkFlagFilename...` + family of commands. + * The requirement for argument to the flag is decided by the `.NoOptDefVal` + flag value - if it's empty then completion will expect an argument. + * Flags of one of the various `*Array` and `*Slice` types supports multiple + specifications (with or without argument depending on the specific type). +* Completion of positional arguments using the following rules: + * Argument position for all options below starts at `1`. If argument position + `0` is requested it will raise an error. + * Use `command.MarkZshCompPositionalArgumentFile` to complete filenames. Glob + patterns (e.g. `"*.log"`) are optional - if not specified it will offer to + complete all file types. + * Use `command.MarkZshCompPositionalArgumentWords` to offer specific words for + completion. At least one word is required. + * It's possible to specify completion for some arguments and leave some + unspecified (e.g. offer words for second argument but nothing for first + argument). This will cause no completion for first argument but words + completion for second argument. + * If no argument completion was specified for 1st argument (but optionally was + specified for 2nd) and the command has `ValidArgs` it will be used as + completion options for 1st argument. + * Argument completions only offered for commands with no subcommands. + +### What's not yet Supported + +* Custom completion scripts are not supported yet (We should probably create zsh + specific one, doesn't make sense to re-use the bash one as the functions will + be different). +* Whatever other feature you're looking for and doesn't exist :) diff --git a/vendor/github.com/spf13/pflag/.gitignore b/vendor/github.com/spf13/pflag/.gitignore new file mode 100644 index 00000000..c3da2901 --- /dev/null +++ b/vendor/github.com/spf13/pflag/.gitignore @@ -0,0 +1,2 @@ +.idea/* + diff --git a/vendor/github.com/spf13/pflag/.travis.yml b/vendor/github.com/spf13/pflag/.travis.yml new file mode 100644 index 00000000..00d04cb9 --- /dev/null +++ b/vendor/github.com/spf13/pflag/.travis.yml @@ -0,0 +1,22 @@ +sudo: false + +language: go + +go: + - 1.9.x + - 1.10.x + - 1.11.x + - tip + +matrix: + allow_failures: + - go: tip + +install: + - go get golang.org/x/lint/golint + - export PATH=$GOPATH/bin:$PATH + - go install ./... + +script: + - verify/all.sh -v + - go test ./... diff --git a/vendor/github.com/spf13/pflag/README.md b/vendor/github.com/spf13/pflag/README.md new file mode 100644 index 00000000..7eacc5bd --- /dev/null +++ b/vendor/github.com/spf13/pflag/README.md @@ -0,0 +1,296 @@ +[![Build Status](https://travis-ci.org/spf13/pflag.svg?branch=master)](https://travis-ci.org/spf13/pflag) +[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/pflag)](https://goreportcard.com/report/github.com/spf13/pflag) +[![GoDoc](https://godoc.org/github.com/spf13/pflag?status.svg)](https://godoc.org/github.com/spf13/pflag) + +## Description + +pflag is a drop-in replacement for Go's flag package, implementing +POSIX/GNU-style --flags. + +pflag is compatible with the [GNU extensions to the POSIX recommendations +for command-line options][1]. For a more precise description, see the +"Command-line flag syntax" section below. + +[1]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html + +pflag is available under the same style of BSD license as the Go language, +which can be found in the LICENSE file. + +## Installation + +pflag is available using the standard `go get` command. + +Install by running: + + go get github.com/spf13/pflag + +Run tests by running: + + go test github.com/spf13/pflag + +## Usage + +pflag is a drop-in replacement of Go's native flag package. If you import +pflag under the name "flag" then all code should continue to function +with no changes. + +``` go +import flag "github.com/spf13/pflag" +``` + +There is one exception to this: if you directly instantiate the Flag struct +there is one more field "Shorthand" that you will need to set. +Most code never instantiates this struct directly, and instead uses +functions such as String(), BoolVar(), and Var(), and is therefore +unaffected. + +Define flags using flag.String(), Bool(), Int(), etc. + +This declares an integer flag, -flagname, stored in the pointer ip, with type *int. + +``` go +var ip *int = flag.Int("flagname", 1234, "help message for flagname") +``` + +If you like, you can bind the flag to a variable using the Var() functions. + +``` go +var flagvar int +func init() { + flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") +} +``` + +Or you can create custom flags that satisfy the Value interface (with +pointer receivers) and couple them to flag parsing by + +``` go +flag.Var(&flagVal, "name", "help message for flagname") +``` + +For such flags, the default value is just the initial value of the variable. + +After all flags are defined, call + +``` go +flag.Parse() +``` + +to parse the command line into the defined flags. + +Flags may then be used directly. If you're using the flags themselves, +they are all pointers; if you bind to variables, they're values. + +``` go +fmt.Println("ip has value ", *ip) +fmt.Println("flagvar has value ", flagvar) +``` + +There are helper functions available to get the value stored in a Flag if you have a FlagSet but find +it difficult to keep up with all of the pointers in your code. +If you have a pflag.FlagSet with a flag called 'flagname' of type int you +can use GetInt() to get the int value. But notice that 'flagname' must exist +and it must be an int. GetString("flagname") will fail. + +``` go +i, err := flagset.GetInt("flagname") +``` + +After parsing, the arguments after the flag are available as the +slice flag.Args() or individually as flag.Arg(i). +The arguments are indexed from 0 through flag.NArg()-1. + +The pflag package also defines some new functions that are not in flag, +that give one-letter shorthands for flags. You can use these by appending +'P' to the name of any function that defines a flag. + +``` go +var ip = flag.IntP("flagname", "f", 1234, "help message") +var flagvar bool +func init() { + flag.BoolVarP(&flagvar, "boolname", "b", true, "help message") +} +flag.VarP(&flagVal, "varname", "v", "help message") +``` + +Shorthand letters can be used with single dashes on the command line. +Boolean shorthand flags can be combined with other shorthand flags. + +The default set of command-line flags is controlled by +top-level functions. The FlagSet type allows one to define +independent sets of flags, such as to implement subcommands +in a command-line interface. The methods of FlagSet are +analogous to the top-level functions for the command-line +flag set. + +## Setting no option default values for flags + +After you create a flag it is possible to set the pflag.NoOptDefVal for +the given flag. Doing this changes the meaning of the flag slightly. If +a flag has a NoOptDefVal and the flag is set on the command line without +an option the flag will be set to the NoOptDefVal. For example given: + +``` go +var ip = flag.IntP("flagname", "f", 1234, "help message") +flag.Lookup("flagname").NoOptDefVal = "4321" +``` + +Would result in something like + +| Parsed Arguments | Resulting Value | +| ------------- | ------------- | +| --flagname=1357 | ip=1357 | +| --flagname | ip=4321 | +| [nothing] | ip=1234 | + +## Command line flag syntax + +``` +--flag // boolean flags, or flags with no option default values +--flag x // only on flags without a default value +--flag=x +``` + +Unlike the flag package, a single dash before an option means something +different than a double dash. Single dashes signify a series of shorthand +letters for flags. All but the last shorthand letter must be boolean flags +or a flag with a default value + +``` +// boolean or flags where the 'no option default value' is set +-f +-f=true +-abc +but +-b true is INVALID + +// non-boolean and flags without a 'no option default value' +-n 1234 +-n=1234 +-n1234 + +// mixed +-abcs "hello" +-absd="hello" +-abcs1234 +``` + +Flag parsing stops after the terminator "--". Unlike the flag package, +flags can be interspersed with arguments anywhere on the command line +before this terminator. + +Integer flags accept 1234, 0664, 0x1234 and may be negative. +Boolean flags (in their long form) accept 1, 0, t, f, true, false, +TRUE, FALSE, True, False. +Duration flags accept any input valid for time.ParseDuration. + +## Mutating or "Normalizing" Flag names + +It is possible to set a custom flag name 'normalization function.' It allows flag names to be mutated both when created in the code and when used on the command line to some 'normalized' form. The 'normalized' form is used for comparison. Two examples of using the custom normalization func follow. + +**Example #1**: You want -, _, and . in flags to compare the same. aka --my-flag == --my_flag == --my.flag + +``` go +func wordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName { + from := []string{"-", "_"} + to := "." + for _, sep := range from { + name = strings.Replace(name, sep, to, -1) + } + return pflag.NormalizedName(name) +} + +myFlagSet.SetNormalizeFunc(wordSepNormalizeFunc) +``` + +**Example #2**: You want to alias two flags. aka --old-flag-name == --new-flag-name + +``` go +func aliasNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName { + switch name { + case "old-flag-name": + name = "new-flag-name" + break + } + return pflag.NormalizedName(name) +} + +myFlagSet.SetNormalizeFunc(aliasNormalizeFunc) +``` + +## Deprecating a flag or its shorthand +It is possible to deprecate a flag, or just its shorthand. Deprecating a flag/shorthand hides it from help text and prints a usage message when the deprecated flag/shorthand is used. + +**Example #1**: You want to deprecate a flag named "badflag" as well as inform the users what flag they should use instead. +```go +// deprecate a flag by specifying its name and a usage message +flags.MarkDeprecated("badflag", "please use --good-flag instead") +``` +This hides "badflag" from help text, and prints `Flag --badflag has been deprecated, please use --good-flag instead` when "badflag" is used. + +**Example #2**: You want to keep a flag name "noshorthandflag" but deprecate its shortname "n". +```go +// deprecate a flag shorthand by specifying its flag name and a usage message +flags.MarkShorthandDeprecated("noshorthandflag", "please use --noshorthandflag only") +``` +This hides the shortname "n" from help text, and prints `Flag shorthand -n has been deprecated, please use --noshorthandflag only` when the shorthand "n" is used. + +Note that usage message is essential here, and it should not be empty. + +## Hidden flags +It is possible to mark a flag as hidden, meaning it will still function as normal, however will not show up in usage/help text. + +**Example**: You have a flag named "secretFlag" that you need for internal use only and don't want it showing up in help text, or for its usage text to be available. +```go +// hide a flag by specifying its name +flags.MarkHidden("secretFlag") +``` + +## Disable sorting of flags +`pflag` allows you to disable sorting of flags for help and usage message. + +**Example**: +```go +flags.BoolP("verbose", "v", false, "verbose output") +flags.String("coolflag", "yeaah", "it's really cool flag") +flags.Int("usefulflag", 777, "sometimes it's very useful") +flags.SortFlags = false +flags.PrintDefaults() +``` +**Output**: +``` + -v, --verbose verbose output + --coolflag string it's really cool flag (default "yeaah") + --usefulflag int sometimes it's very useful (default 777) +``` + + +## Supporting Go flags when using pflag +In order to support flags defined using Go's `flag` package, they must be added to the `pflag` flagset. This is usually necessary +to support flags defined by third-party dependencies (e.g. `golang/glog`). + +**Example**: You want to add the Go flags to the `CommandLine` flagset +```go +import ( + goflag "flag" + flag "github.com/spf13/pflag" +) + +var ip *int = flag.Int("flagname", 1234, "help message for flagname") + +func main() { + flag.CommandLine.AddGoFlagSet(goflag.CommandLine) + flag.Parse() +} +``` + +## More info + +You can see the full reference documentation of the pflag package +[at godoc.org][3], or through go's standard documentation system by +running `godoc -http=:6060` and browsing to +[http://localhost:6060/pkg/github.com/spf13/pflag][2] after +installation. + +[2]: http://localhost:6060/pkg/github.com/spf13/pflag +[3]: http://godoc.org/github.com/spf13/pflag diff --git a/vendor/github.com/spf13/pflag/bool_slice.go b/vendor/github.com/spf13/pflag/bool_slice.go index 5af02f1a..3731370d 100644 --- a/vendor/github.com/spf13/pflag/bool_slice.go +++ b/vendor/github.com/spf13/pflag/bool_slice.go @@ -71,6 +71,44 @@ func (s *boolSliceValue) String() string { return "[" + out + "]" } +func (s *boolSliceValue) fromString(val string) (bool, error) { + return strconv.ParseBool(val) +} + +func (s *boolSliceValue) toString(val bool) string { + return strconv.FormatBool(val) +} + +func (s *boolSliceValue) Append(val string) error { + i, err := s.fromString(val) + if err != nil { + return err + } + *s.value = append(*s.value, i) + return nil +} + +func (s *boolSliceValue) Replace(val []string) error { + out := make([]bool, len(val)) + for i, d := range val { + var err error + out[i], err = s.fromString(d) + if err != nil { + return err + } + } + *s.value = out + return nil +} + +func (s *boolSliceValue) GetSlice() []string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = s.toString(d) + } + return out +} + func boolSliceConv(val string) (interface{}, error) { val = strings.Trim(val, "[]") // Empty string would cause a slice with one (empty) entry diff --git a/vendor/github.com/spf13/pflag/count.go b/vendor/github.com/spf13/pflag/count.go index aa126e44..a0b2679f 100644 --- a/vendor/github.com/spf13/pflag/count.go +++ b/vendor/github.com/spf13/pflag/count.go @@ -46,7 +46,7 @@ func (f *FlagSet) GetCount(name string) (int, error) { // CountVar defines a count flag with specified name, default value, and usage string. // The argument p points to an int variable in which to store the value of the flag. -// A count flag will add 1 to its value evey time it is found on the command line +// A count flag will add 1 to its value every time it is found on the command line func (f *FlagSet) CountVar(p *int, name string, usage string) { f.CountVarP(p, name, "", usage) } @@ -69,7 +69,7 @@ func CountVarP(p *int, name, shorthand string, usage string) { // Count defines a count flag with specified name, default value, and usage string. // The return value is the address of an int variable that stores the value of the flag. -// A count flag will add 1 to its value evey time it is found on the command line +// A count flag will add 1 to its value every time it is found on the command line func (f *FlagSet) Count(name string, usage string) *int { p := new(int) f.CountVarP(p, name, "", usage) diff --git a/vendor/github.com/spf13/pflag/duration_slice.go b/vendor/github.com/spf13/pflag/duration_slice.go index 52c6b6dc..badadda5 100644 --- a/vendor/github.com/spf13/pflag/duration_slice.go +++ b/vendor/github.com/spf13/pflag/duration_slice.go @@ -51,6 +51,44 @@ func (s *durationSliceValue) String() string { return "[" + strings.Join(out, ",") + "]" } +func (s *durationSliceValue) fromString(val string) (time.Duration, error) { + return time.ParseDuration(val) +} + +func (s *durationSliceValue) toString(val time.Duration) string { + return fmt.Sprintf("%s", val) +} + +func (s *durationSliceValue) Append(val string) error { + i, err := s.fromString(val) + if err != nil { + return err + } + *s.value = append(*s.value, i) + return nil +} + +func (s *durationSliceValue) Replace(val []string) error { + out := make([]time.Duration, len(val)) + for i, d := range val { + var err error + out[i], err = s.fromString(d) + if err != nil { + return err + } + } + *s.value = out + return nil +} + +func (s *durationSliceValue) GetSlice() []string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = s.toString(d) + } + return out +} + func durationSliceConv(val string) (interface{}, error) { val = strings.Trim(val, "[]") // Empty string would cause a slice with one (empty) entry diff --git a/vendor/github.com/spf13/pflag/flag.go b/vendor/github.com/spf13/pflag/flag.go index 9beeda8e..24a5036e 100644 --- a/vendor/github.com/spf13/pflag/flag.go +++ b/vendor/github.com/spf13/pflag/flag.go @@ -57,9 +57,9 @@ that give one-letter shorthands for flags. You can use these by appending var ip = flag.IntP("flagname", "f", 1234, "help message") var flagvar bool func init() { - flag.BoolVarP("boolname", "b", true, "help message") + flag.BoolVarP(&flagvar, "boolname", "b", true, "help message") } - flag.VarP(&flagVar, "varname", "v", 1234, "help message") + flag.VarP(&flagval, "varname", "v", "help message") Shorthand letters can be used with single dashes on the command line. Boolean shorthand flags can be combined with other shorthand flags. @@ -190,6 +190,18 @@ type Value interface { Type() string } +// SliceValue is a secondary interface to all flags which hold a list +// of values. This allows full control over the value of list flags, +// and avoids complicated marshalling and unmarshalling to csv. +type SliceValue interface { + // Append adds the specified value to the end of the flag value list. + Append(string) error + // Replace will fully overwrite any data currently in the flag value list. + Replace([]string) error + // GetSlice returns the flag value list as an array of strings. + GetSlice() []string +} + // sortFlags returns the flags as a slice in lexicographical sorted order. func sortFlags(flags map[NormalizedName]*Flag) []*Flag { list := make(sort.StringSlice, len(flags)) diff --git a/vendor/github.com/spf13/pflag/float32_slice.go b/vendor/github.com/spf13/pflag/float32_slice.go new file mode 100644 index 00000000..caa35274 --- /dev/null +++ b/vendor/github.com/spf13/pflag/float32_slice.go @@ -0,0 +1,174 @@ +package pflag + +import ( + "fmt" + "strconv" + "strings" +) + +// -- float32Slice Value +type float32SliceValue struct { + value *[]float32 + changed bool +} + +func newFloat32SliceValue(val []float32, p *[]float32) *float32SliceValue { + isv := new(float32SliceValue) + isv.value = p + *isv.value = val + return isv +} + +func (s *float32SliceValue) Set(val string) error { + ss := strings.Split(val, ",") + out := make([]float32, len(ss)) + for i, d := range ss { + var err error + var temp64 float64 + temp64, err = strconv.ParseFloat(d, 32) + if err != nil { + return err + } + out[i] = float32(temp64) + + } + if !s.changed { + *s.value = out + } else { + *s.value = append(*s.value, out...) + } + s.changed = true + return nil +} + +func (s *float32SliceValue) Type() string { + return "float32Slice" +} + +func (s *float32SliceValue) String() string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = fmt.Sprintf("%f", d) + } + return "[" + strings.Join(out, ",") + "]" +} + +func (s *float32SliceValue) fromString(val string) (float32, error) { + t64, err := strconv.ParseFloat(val, 32) + if err != nil { + return 0, err + } + return float32(t64), nil +} + +func (s *float32SliceValue) toString(val float32) string { + return fmt.Sprintf("%f", val) +} + +func (s *float32SliceValue) Append(val string) error { + i, err := s.fromString(val) + if err != nil { + return err + } + *s.value = append(*s.value, i) + return nil +} + +func (s *float32SliceValue) Replace(val []string) error { + out := make([]float32, len(val)) + for i, d := range val { + var err error + out[i], err = s.fromString(d) + if err != nil { + return err + } + } + *s.value = out + return nil +} + +func (s *float32SliceValue) GetSlice() []string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = s.toString(d) + } + return out +} + +func float32SliceConv(val string) (interface{}, error) { + val = strings.Trim(val, "[]") + // Empty string would cause a slice with one (empty) entry + if len(val) == 0 { + return []float32{}, nil + } + ss := strings.Split(val, ",") + out := make([]float32, len(ss)) + for i, d := range ss { + var err error + var temp64 float64 + temp64, err = strconv.ParseFloat(d, 32) + if err != nil { + return nil, err + } + out[i] = float32(temp64) + + } + return out, nil +} + +// GetFloat32Slice return the []float32 value of a flag with the given name +func (f *FlagSet) GetFloat32Slice(name string) ([]float32, error) { + val, err := f.getFlagType(name, "float32Slice", float32SliceConv) + if err != nil { + return []float32{}, err + } + return val.([]float32), nil +} + +// Float32SliceVar defines a float32Slice flag with specified name, default value, and usage string. +// The argument p points to a []float32 variable in which to store the value of the flag. +func (f *FlagSet) Float32SliceVar(p *[]float32, name string, value []float32, usage string) { + f.VarP(newFloat32SliceValue(value, p), name, "", usage) +} + +// Float32SliceVarP is like Float32SliceVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Float32SliceVarP(p *[]float32, name, shorthand string, value []float32, usage string) { + f.VarP(newFloat32SliceValue(value, p), name, shorthand, usage) +} + +// Float32SliceVar defines a float32[] flag with specified name, default value, and usage string. +// The argument p points to a float32[] variable in which to store the value of the flag. +func Float32SliceVar(p *[]float32, name string, value []float32, usage string) { + CommandLine.VarP(newFloat32SliceValue(value, p), name, "", usage) +} + +// Float32SliceVarP is like Float32SliceVar, but accepts a shorthand letter that can be used after a single dash. +func Float32SliceVarP(p *[]float32, name, shorthand string, value []float32, usage string) { + CommandLine.VarP(newFloat32SliceValue(value, p), name, shorthand, usage) +} + +// Float32Slice defines a []float32 flag with specified name, default value, and usage string. +// The return value is the address of a []float32 variable that stores the value of the flag. +func (f *FlagSet) Float32Slice(name string, value []float32, usage string) *[]float32 { + p := []float32{} + f.Float32SliceVarP(&p, name, "", value, usage) + return &p +} + +// Float32SliceP is like Float32Slice, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Float32SliceP(name, shorthand string, value []float32, usage string) *[]float32 { + p := []float32{} + f.Float32SliceVarP(&p, name, shorthand, value, usage) + return &p +} + +// Float32Slice defines a []float32 flag with specified name, default value, and usage string. +// The return value is the address of a []float32 variable that stores the value of the flag. +func Float32Slice(name string, value []float32, usage string) *[]float32 { + return CommandLine.Float32SliceP(name, "", value, usage) +} + +// Float32SliceP is like Float32Slice, but accepts a shorthand letter that can be used after a single dash. +func Float32SliceP(name, shorthand string, value []float32, usage string) *[]float32 { + return CommandLine.Float32SliceP(name, shorthand, value, usage) +} diff --git a/vendor/github.com/spf13/pflag/float64_slice.go b/vendor/github.com/spf13/pflag/float64_slice.go new file mode 100644 index 00000000..85bf3073 --- /dev/null +++ b/vendor/github.com/spf13/pflag/float64_slice.go @@ -0,0 +1,166 @@ +package pflag + +import ( + "fmt" + "strconv" + "strings" +) + +// -- float64Slice Value +type float64SliceValue struct { + value *[]float64 + changed bool +} + +func newFloat64SliceValue(val []float64, p *[]float64) *float64SliceValue { + isv := new(float64SliceValue) + isv.value = p + *isv.value = val + return isv +} + +func (s *float64SliceValue) Set(val string) error { + ss := strings.Split(val, ",") + out := make([]float64, len(ss)) + for i, d := range ss { + var err error + out[i], err = strconv.ParseFloat(d, 64) + if err != nil { + return err + } + + } + if !s.changed { + *s.value = out + } else { + *s.value = append(*s.value, out...) + } + s.changed = true + return nil +} + +func (s *float64SliceValue) Type() string { + return "float64Slice" +} + +func (s *float64SliceValue) String() string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = fmt.Sprintf("%f", d) + } + return "[" + strings.Join(out, ",") + "]" +} + +func (s *float64SliceValue) fromString(val string) (float64, error) { + return strconv.ParseFloat(val, 64) +} + +func (s *float64SliceValue) toString(val float64) string { + return fmt.Sprintf("%f", val) +} + +func (s *float64SliceValue) Append(val string) error { + i, err := s.fromString(val) + if err != nil { + return err + } + *s.value = append(*s.value, i) + return nil +} + +func (s *float64SliceValue) Replace(val []string) error { + out := make([]float64, len(val)) + for i, d := range val { + var err error + out[i], err = s.fromString(d) + if err != nil { + return err + } + } + *s.value = out + return nil +} + +func (s *float64SliceValue) GetSlice() []string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = s.toString(d) + } + return out +} + +func float64SliceConv(val string) (interface{}, error) { + val = strings.Trim(val, "[]") + // Empty string would cause a slice with one (empty) entry + if len(val) == 0 { + return []float64{}, nil + } + ss := strings.Split(val, ",") + out := make([]float64, len(ss)) + for i, d := range ss { + var err error + out[i], err = strconv.ParseFloat(d, 64) + if err != nil { + return nil, err + } + + } + return out, nil +} + +// GetFloat64Slice return the []float64 value of a flag with the given name +func (f *FlagSet) GetFloat64Slice(name string) ([]float64, error) { + val, err := f.getFlagType(name, "float64Slice", float64SliceConv) + if err != nil { + return []float64{}, err + } + return val.([]float64), nil +} + +// Float64SliceVar defines a float64Slice flag with specified name, default value, and usage string. +// The argument p points to a []float64 variable in which to store the value of the flag. +func (f *FlagSet) Float64SliceVar(p *[]float64, name string, value []float64, usage string) { + f.VarP(newFloat64SliceValue(value, p), name, "", usage) +} + +// Float64SliceVarP is like Float64SliceVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Float64SliceVarP(p *[]float64, name, shorthand string, value []float64, usage string) { + f.VarP(newFloat64SliceValue(value, p), name, shorthand, usage) +} + +// Float64SliceVar defines a float64[] flag with specified name, default value, and usage string. +// The argument p points to a float64[] variable in which to store the value of the flag. +func Float64SliceVar(p *[]float64, name string, value []float64, usage string) { + CommandLine.VarP(newFloat64SliceValue(value, p), name, "", usage) +} + +// Float64SliceVarP is like Float64SliceVar, but accepts a shorthand letter that can be used after a single dash. +func Float64SliceVarP(p *[]float64, name, shorthand string, value []float64, usage string) { + CommandLine.VarP(newFloat64SliceValue(value, p), name, shorthand, usage) +} + +// Float64Slice defines a []float64 flag with specified name, default value, and usage string. +// The return value is the address of a []float64 variable that stores the value of the flag. +func (f *FlagSet) Float64Slice(name string, value []float64, usage string) *[]float64 { + p := []float64{} + f.Float64SliceVarP(&p, name, "", value, usage) + return &p +} + +// Float64SliceP is like Float64Slice, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Float64SliceP(name, shorthand string, value []float64, usage string) *[]float64 { + p := []float64{} + f.Float64SliceVarP(&p, name, shorthand, value, usage) + return &p +} + +// Float64Slice defines a []float64 flag with specified name, default value, and usage string. +// The return value is the address of a []float64 variable that stores the value of the flag. +func Float64Slice(name string, value []float64, usage string) *[]float64 { + return CommandLine.Float64SliceP(name, "", value, usage) +} + +// Float64SliceP is like Float64Slice, but accepts a shorthand letter that can be used after a single dash. +func Float64SliceP(name, shorthand string, value []float64, usage string) *[]float64 { + return CommandLine.Float64SliceP(name, shorthand, value, usage) +} diff --git a/vendor/github.com/spf13/pflag/go.mod b/vendor/github.com/spf13/pflag/go.mod new file mode 100644 index 00000000..b2287eec --- /dev/null +++ b/vendor/github.com/spf13/pflag/go.mod @@ -0,0 +1,3 @@ +module github.com/spf13/pflag + +go 1.12 diff --git a/vendor/github.com/spf13/pflag/go.sum b/vendor/github.com/spf13/pflag/go.sum new file mode 100644 index 00000000..e69de29b diff --git a/vendor/github.com/spf13/pflag/int32_slice.go b/vendor/github.com/spf13/pflag/int32_slice.go new file mode 100644 index 00000000..ff128ff0 --- /dev/null +++ b/vendor/github.com/spf13/pflag/int32_slice.go @@ -0,0 +1,174 @@ +package pflag + +import ( + "fmt" + "strconv" + "strings" +) + +// -- int32Slice Value +type int32SliceValue struct { + value *[]int32 + changed bool +} + +func newInt32SliceValue(val []int32, p *[]int32) *int32SliceValue { + isv := new(int32SliceValue) + isv.value = p + *isv.value = val + return isv +} + +func (s *int32SliceValue) Set(val string) error { + ss := strings.Split(val, ",") + out := make([]int32, len(ss)) + for i, d := range ss { + var err error + var temp64 int64 + temp64, err = strconv.ParseInt(d, 0, 32) + if err != nil { + return err + } + out[i] = int32(temp64) + + } + if !s.changed { + *s.value = out + } else { + *s.value = append(*s.value, out...) + } + s.changed = true + return nil +} + +func (s *int32SliceValue) Type() string { + return "int32Slice" +} + +func (s *int32SliceValue) String() string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = fmt.Sprintf("%d", d) + } + return "[" + strings.Join(out, ",") + "]" +} + +func (s *int32SliceValue) fromString(val string) (int32, error) { + t64, err := strconv.ParseInt(val, 0, 32) + if err != nil { + return 0, err + } + return int32(t64), nil +} + +func (s *int32SliceValue) toString(val int32) string { + return fmt.Sprintf("%d", val) +} + +func (s *int32SliceValue) Append(val string) error { + i, err := s.fromString(val) + if err != nil { + return err + } + *s.value = append(*s.value, i) + return nil +} + +func (s *int32SliceValue) Replace(val []string) error { + out := make([]int32, len(val)) + for i, d := range val { + var err error + out[i], err = s.fromString(d) + if err != nil { + return err + } + } + *s.value = out + return nil +} + +func (s *int32SliceValue) GetSlice() []string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = s.toString(d) + } + return out +} + +func int32SliceConv(val string) (interface{}, error) { + val = strings.Trim(val, "[]") + // Empty string would cause a slice with one (empty) entry + if len(val) == 0 { + return []int32{}, nil + } + ss := strings.Split(val, ",") + out := make([]int32, len(ss)) + for i, d := range ss { + var err error + var temp64 int64 + temp64, err = strconv.ParseInt(d, 0, 32) + if err != nil { + return nil, err + } + out[i] = int32(temp64) + + } + return out, nil +} + +// GetInt32Slice return the []int32 value of a flag with the given name +func (f *FlagSet) GetInt32Slice(name string) ([]int32, error) { + val, err := f.getFlagType(name, "int32Slice", int32SliceConv) + if err != nil { + return []int32{}, err + } + return val.([]int32), nil +} + +// Int32SliceVar defines a int32Slice flag with specified name, default value, and usage string. +// The argument p points to a []int32 variable in which to store the value of the flag. +func (f *FlagSet) Int32SliceVar(p *[]int32, name string, value []int32, usage string) { + f.VarP(newInt32SliceValue(value, p), name, "", usage) +} + +// Int32SliceVarP is like Int32SliceVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Int32SliceVarP(p *[]int32, name, shorthand string, value []int32, usage string) { + f.VarP(newInt32SliceValue(value, p), name, shorthand, usage) +} + +// Int32SliceVar defines a int32[] flag with specified name, default value, and usage string. +// The argument p points to a int32[] variable in which to store the value of the flag. +func Int32SliceVar(p *[]int32, name string, value []int32, usage string) { + CommandLine.VarP(newInt32SliceValue(value, p), name, "", usage) +} + +// Int32SliceVarP is like Int32SliceVar, but accepts a shorthand letter that can be used after a single dash. +func Int32SliceVarP(p *[]int32, name, shorthand string, value []int32, usage string) { + CommandLine.VarP(newInt32SliceValue(value, p), name, shorthand, usage) +} + +// Int32Slice defines a []int32 flag with specified name, default value, and usage string. +// The return value is the address of a []int32 variable that stores the value of the flag. +func (f *FlagSet) Int32Slice(name string, value []int32, usage string) *[]int32 { + p := []int32{} + f.Int32SliceVarP(&p, name, "", value, usage) + return &p +} + +// Int32SliceP is like Int32Slice, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Int32SliceP(name, shorthand string, value []int32, usage string) *[]int32 { + p := []int32{} + f.Int32SliceVarP(&p, name, shorthand, value, usage) + return &p +} + +// Int32Slice defines a []int32 flag with specified name, default value, and usage string. +// The return value is the address of a []int32 variable that stores the value of the flag. +func Int32Slice(name string, value []int32, usage string) *[]int32 { + return CommandLine.Int32SliceP(name, "", value, usage) +} + +// Int32SliceP is like Int32Slice, but accepts a shorthand letter that can be used after a single dash. +func Int32SliceP(name, shorthand string, value []int32, usage string) *[]int32 { + return CommandLine.Int32SliceP(name, shorthand, value, usage) +} diff --git a/vendor/github.com/spf13/pflag/int64_slice.go b/vendor/github.com/spf13/pflag/int64_slice.go new file mode 100644 index 00000000..25464638 --- /dev/null +++ b/vendor/github.com/spf13/pflag/int64_slice.go @@ -0,0 +1,166 @@ +package pflag + +import ( + "fmt" + "strconv" + "strings" +) + +// -- int64Slice Value +type int64SliceValue struct { + value *[]int64 + changed bool +} + +func newInt64SliceValue(val []int64, p *[]int64) *int64SliceValue { + isv := new(int64SliceValue) + isv.value = p + *isv.value = val + return isv +} + +func (s *int64SliceValue) Set(val string) error { + ss := strings.Split(val, ",") + out := make([]int64, len(ss)) + for i, d := range ss { + var err error + out[i], err = strconv.ParseInt(d, 0, 64) + if err != nil { + return err + } + + } + if !s.changed { + *s.value = out + } else { + *s.value = append(*s.value, out...) + } + s.changed = true + return nil +} + +func (s *int64SliceValue) Type() string { + return "int64Slice" +} + +func (s *int64SliceValue) String() string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = fmt.Sprintf("%d", d) + } + return "[" + strings.Join(out, ",") + "]" +} + +func (s *int64SliceValue) fromString(val string) (int64, error) { + return strconv.ParseInt(val, 0, 64) +} + +func (s *int64SliceValue) toString(val int64) string { + return fmt.Sprintf("%d", val) +} + +func (s *int64SliceValue) Append(val string) error { + i, err := s.fromString(val) + if err != nil { + return err + } + *s.value = append(*s.value, i) + return nil +} + +func (s *int64SliceValue) Replace(val []string) error { + out := make([]int64, len(val)) + for i, d := range val { + var err error + out[i], err = s.fromString(d) + if err != nil { + return err + } + } + *s.value = out + return nil +} + +func (s *int64SliceValue) GetSlice() []string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = s.toString(d) + } + return out +} + +func int64SliceConv(val string) (interface{}, error) { + val = strings.Trim(val, "[]") + // Empty string would cause a slice with one (empty) entry + if len(val) == 0 { + return []int64{}, nil + } + ss := strings.Split(val, ",") + out := make([]int64, len(ss)) + for i, d := range ss { + var err error + out[i], err = strconv.ParseInt(d, 0, 64) + if err != nil { + return nil, err + } + + } + return out, nil +} + +// GetInt64Slice return the []int64 value of a flag with the given name +func (f *FlagSet) GetInt64Slice(name string) ([]int64, error) { + val, err := f.getFlagType(name, "int64Slice", int64SliceConv) + if err != nil { + return []int64{}, err + } + return val.([]int64), nil +} + +// Int64SliceVar defines a int64Slice flag with specified name, default value, and usage string. +// The argument p points to a []int64 variable in which to store the value of the flag. +func (f *FlagSet) Int64SliceVar(p *[]int64, name string, value []int64, usage string) { + f.VarP(newInt64SliceValue(value, p), name, "", usage) +} + +// Int64SliceVarP is like Int64SliceVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Int64SliceVarP(p *[]int64, name, shorthand string, value []int64, usage string) { + f.VarP(newInt64SliceValue(value, p), name, shorthand, usage) +} + +// Int64SliceVar defines a int64[] flag with specified name, default value, and usage string. +// The argument p points to a int64[] variable in which to store the value of the flag. +func Int64SliceVar(p *[]int64, name string, value []int64, usage string) { + CommandLine.VarP(newInt64SliceValue(value, p), name, "", usage) +} + +// Int64SliceVarP is like Int64SliceVar, but accepts a shorthand letter that can be used after a single dash. +func Int64SliceVarP(p *[]int64, name, shorthand string, value []int64, usage string) { + CommandLine.VarP(newInt64SliceValue(value, p), name, shorthand, usage) +} + +// Int64Slice defines a []int64 flag with specified name, default value, and usage string. +// The return value is the address of a []int64 variable that stores the value of the flag. +func (f *FlagSet) Int64Slice(name string, value []int64, usage string) *[]int64 { + p := []int64{} + f.Int64SliceVarP(&p, name, "", value, usage) + return &p +} + +// Int64SliceP is like Int64Slice, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Int64SliceP(name, shorthand string, value []int64, usage string) *[]int64 { + p := []int64{} + f.Int64SliceVarP(&p, name, shorthand, value, usage) + return &p +} + +// Int64Slice defines a []int64 flag with specified name, default value, and usage string. +// The return value is the address of a []int64 variable that stores the value of the flag. +func Int64Slice(name string, value []int64, usage string) *[]int64 { + return CommandLine.Int64SliceP(name, "", value, usage) +} + +// Int64SliceP is like Int64Slice, but accepts a shorthand letter that can be used after a single dash. +func Int64SliceP(name, shorthand string, value []int64, usage string) *[]int64 { + return CommandLine.Int64SliceP(name, shorthand, value, usage) +} diff --git a/vendor/github.com/spf13/pflag/int_slice.go b/vendor/github.com/spf13/pflag/int_slice.go index 1e7c9edd..e71c39d9 100644 --- a/vendor/github.com/spf13/pflag/int_slice.go +++ b/vendor/github.com/spf13/pflag/int_slice.go @@ -51,6 +51,36 @@ func (s *intSliceValue) String() string { return "[" + strings.Join(out, ",") + "]" } +func (s *intSliceValue) Append(val string) error { + i, err := strconv.Atoi(val) + if err != nil { + return err + } + *s.value = append(*s.value, i) + return nil +} + +func (s *intSliceValue) Replace(val []string) error { + out := make([]int, len(val)) + for i, d := range val { + var err error + out[i], err = strconv.Atoi(d) + if err != nil { + return err + } + } + *s.value = out + return nil +} + +func (s *intSliceValue) GetSlice() []string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = strconv.Itoa(d) + } + return out +} + func intSliceConv(val string) (interface{}, error) { val = strings.Trim(val, "[]") // Empty string would cause a slice with one (empty) entry diff --git a/vendor/github.com/spf13/pflag/ip_slice.go b/vendor/github.com/spf13/pflag/ip_slice.go index 7dd196fe..775faae4 100644 --- a/vendor/github.com/spf13/pflag/ip_slice.go +++ b/vendor/github.com/spf13/pflag/ip_slice.go @@ -72,9 +72,47 @@ func (s *ipSliceValue) String() string { return "[" + out + "]" } +func (s *ipSliceValue) fromString(val string) (net.IP, error) { + return net.ParseIP(strings.TrimSpace(val)), nil +} + +func (s *ipSliceValue) toString(val net.IP) string { + return val.String() +} + +func (s *ipSliceValue) Append(val string) error { + i, err := s.fromString(val) + if err != nil { + return err + } + *s.value = append(*s.value, i) + return nil +} + +func (s *ipSliceValue) Replace(val []string) error { + out := make([]net.IP, len(val)) + for i, d := range val { + var err error + out[i], err = s.fromString(d) + if err != nil { + return err + } + } + *s.value = out + return nil +} + +func (s *ipSliceValue) GetSlice() []string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = s.toString(d) + } + return out +} + func ipSliceConv(val string) (interface{}, error) { val = strings.Trim(val, "[]") - // Emtpy string would cause a slice with one (empty) entry + // Empty string would cause a slice with one (empty) entry if len(val) == 0 { return []net.IP{}, nil } diff --git a/vendor/github.com/spf13/pflag/string_array.go b/vendor/github.com/spf13/pflag/string_array.go index fa7bc601..4894af81 100644 --- a/vendor/github.com/spf13/pflag/string_array.go +++ b/vendor/github.com/spf13/pflag/string_array.go @@ -23,6 +23,32 @@ func (s *stringArrayValue) Set(val string) error { return nil } +func (s *stringArrayValue) Append(val string) error { + *s.value = append(*s.value, val) + return nil +} + +func (s *stringArrayValue) Replace(val []string) error { + out := make([]string, len(val)) + for i, d := range val { + var err error + out[i] = d + if err != nil { + return err + } + } + *s.value = out + return nil +} + +func (s *stringArrayValue) GetSlice() []string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = d + } + return out +} + func (s *stringArrayValue) Type() string { return "stringArray" } diff --git a/vendor/github.com/spf13/pflag/string_slice.go b/vendor/github.com/spf13/pflag/string_slice.go index 0cd3ccc0..3cb2e69d 100644 --- a/vendor/github.com/spf13/pflag/string_slice.go +++ b/vendor/github.com/spf13/pflag/string_slice.go @@ -62,6 +62,20 @@ func (s *stringSliceValue) String() string { return "[" + str + "]" } +func (s *stringSliceValue) Append(val string) error { + *s.value = append(*s.value, val) + return nil +} + +func (s *stringSliceValue) Replace(val []string) error { + *s.value = val + return nil +} + +func (s *stringSliceValue) GetSlice() []string { + return *s.value +} + func stringSliceConv(sval string) (interface{}, error) { sval = sval[1 : len(sval)-1] // An empty string would cause a slice with one (empty) string @@ -84,7 +98,7 @@ func (f *FlagSet) GetStringSlice(name string) ([]string, error) { // The argument p points to a []string variable in which to store the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" -ss="v3" +// --ss="v1,v2" --ss="v3" // will result in // []string{"v1", "v2", "v3"} func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string) { @@ -100,7 +114,7 @@ func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []s // The argument p points to a []string variable in which to store the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" -ss="v3" +// --ss="v1,v2" --ss="v3" // will result in // []string{"v1", "v2", "v3"} func StringSliceVar(p *[]string, name string, value []string, usage string) { @@ -116,7 +130,7 @@ func StringSliceVarP(p *[]string, name, shorthand string, value []string, usage // The return value is the address of a []string variable that stores the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" -ss="v3" +// --ss="v1,v2" --ss="v3" // will result in // []string{"v1", "v2", "v3"} func (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string { @@ -136,7 +150,7 @@ func (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage str // The return value is the address of a []string variable that stores the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" -ss="v3" +// --ss="v1,v2" --ss="v3" // will result in // []string{"v1", "v2", "v3"} func StringSlice(name string, value []string, usage string) *[]string { diff --git a/vendor/github.com/spf13/pflag/string_to_int64.go b/vendor/github.com/spf13/pflag/string_to_int64.go new file mode 100644 index 00000000..a807a04a --- /dev/null +++ b/vendor/github.com/spf13/pflag/string_to_int64.go @@ -0,0 +1,149 @@ +package pflag + +import ( + "bytes" + "fmt" + "strconv" + "strings" +) + +// -- stringToInt64 Value +type stringToInt64Value struct { + value *map[string]int64 + changed bool +} + +func newStringToInt64Value(val map[string]int64, p *map[string]int64) *stringToInt64Value { + ssv := new(stringToInt64Value) + ssv.value = p + *ssv.value = val + return ssv +} + +// Format: a=1,b=2 +func (s *stringToInt64Value) Set(val string) error { + ss := strings.Split(val, ",") + out := make(map[string]int64, len(ss)) + for _, pair := range ss { + kv := strings.SplitN(pair, "=", 2) + if len(kv) != 2 { + return fmt.Errorf("%s must be formatted as key=value", pair) + } + var err error + out[kv[0]], err = strconv.ParseInt(kv[1], 10, 64) + if err != nil { + return err + } + } + if !s.changed { + *s.value = out + } else { + for k, v := range out { + (*s.value)[k] = v + } + } + s.changed = true + return nil +} + +func (s *stringToInt64Value) Type() string { + return "stringToInt64" +} + +func (s *stringToInt64Value) String() string { + var buf bytes.Buffer + i := 0 + for k, v := range *s.value { + if i > 0 { + buf.WriteRune(',') + } + buf.WriteString(k) + buf.WriteRune('=') + buf.WriteString(strconv.FormatInt(v, 10)) + i++ + } + return "[" + buf.String() + "]" +} + +func stringToInt64Conv(val string) (interface{}, error) { + val = strings.Trim(val, "[]") + // An empty string would cause an empty map + if len(val) == 0 { + return map[string]int64{}, nil + } + ss := strings.Split(val, ",") + out := make(map[string]int64, len(ss)) + for _, pair := range ss { + kv := strings.SplitN(pair, "=", 2) + if len(kv) != 2 { + return nil, fmt.Errorf("%s must be formatted as key=value", pair) + } + var err error + out[kv[0]], err = strconv.ParseInt(kv[1], 10, 64) + if err != nil { + return nil, err + } + } + return out, nil +} + +// GetStringToInt64 return the map[string]int64 value of a flag with the given name +func (f *FlagSet) GetStringToInt64(name string) (map[string]int64, error) { + val, err := f.getFlagType(name, "stringToInt64", stringToInt64Conv) + if err != nil { + return map[string]int64{}, err + } + return val.(map[string]int64), nil +} + +// StringToInt64Var defines a string flag with specified name, default value, and usage string. +// The argument p point64s to a map[string]int64 variable in which to store the values of the multiple flags. +// The value of each argument will not try to be separated by comma +func (f *FlagSet) StringToInt64Var(p *map[string]int64, name string, value map[string]int64, usage string) { + f.VarP(newStringToInt64Value(value, p), name, "", usage) +} + +// StringToInt64VarP is like StringToInt64Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) StringToInt64VarP(p *map[string]int64, name, shorthand string, value map[string]int64, usage string) { + f.VarP(newStringToInt64Value(value, p), name, shorthand, usage) +} + +// StringToInt64Var defines a string flag with specified name, default value, and usage string. +// The argument p point64s to a map[string]int64 variable in which to store the value of the flag. +// The value of each argument will not try to be separated by comma +func StringToInt64Var(p *map[string]int64, name string, value map[string]int64, usage string) { + CommandLine.VarP(newStringToInt64Value(value, p), name, "", usage) +} + +// StringToInt64VarP is like StringToInt64Var, but accepts a shorthand letter that can be used after a single dash. +func StringToInt64VarP(p *map[string]int64, name, shorthand string, value map[string]int64, usage string) { + CommandLine.VarP(newStringToInt64Value(value, p), name, shorthand, usage) +} + +// StringToInt64 defines a string flag with specified name, default value, and usage string. +// The return value is the address of a map[string]int64 variable that stores the value of the flag. +// The value of each argument will not try to be separated by comma +func (f *FlagSet) StringToInt64(name string, value map[string]int64, usage string) *map[string]int64 { + p := map[string]int64{} + f.StringToInt64VarP(&p, name, "", value, usage) + return &p +} + +// StringToInt64P is like StringToInt64, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) StringToInt64P(name, shorthand string, value map[string]int64, usage string) *map[string]int64 { + p := map[string]int64{} + f.StringToInt64VarP(&p, name, shorthand, value, usage) + return &p +} + +// StringToInt64 defines a string flag with specified name, default value, and usage string. +// The return value is the address of a map[string]int64 variable that stores the value of the flag. +// The value of each argument will not try to be separated by comma +func StringToInt64(name string, value map[string]int64, usage string) *map[string]int64 { + return CommandLine.StringToInt64P(name, "", value, usage) +} + +// StringToInt64P is like StringToInt64, but accepts a shorthand letter that can be used after a single dash. +func StringToInt64P(name, shorthand string, value map[string]int64, usage string) *map[string]int64 { + return CommandLine.StringToInt64P(name, shorthand, value, usage) +} diff --git a/vendor/github.com/spf13/pflag/uint_slice.go b/vendor/github.com/spf13/pflag/uint_slice.go index edd94c60..5fa92483 100644 --- a/vendor/github.com/spf13/pflag/uint_slice.go +++ b/vendor/github.com/spf13/pflag/uint_slice.go @@ -50,6 +50,48 @@ func (s *uintSliceValue) String() string { return "[" + strings.Join(out, ",") + "]" } +func (s *uintSliceValue) fromString(val string) (uint, error) { + t, err := strconv.ParseUint(val, 10, 0) + if err != nil { + return 0, err + } + return uint(t), nil +} + +func (s *uintSliceValue) toString(val uint) string { + return fmt.Sprintf("%d", val) +} + +func (s *uintSliceValue) Append(val string) error { + i, err := s.fromString(val) + if err != nil { + return err + } + *s.value = append(*s.value, i) + return nil +} + +func (s *uintSliceValue) Replace(val []string) error { + out := make([]uint, len(val)) + for i, d := range val { + var err error + out[i], err = s.fromString(d) + if err != nil { + return err + } + } + *s.value = out + return nil +} + +func (s *uintSliceValue) GetSlice() []string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = s.toString(d) + } + return out +} + func uintSliceConv(val string) (interface{}, error) { val = strings.Trim(val, "[]") // Empty string would cause a slice with one (empty) entry diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl b/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl new file mode 100644 index 00000000..d2bb0b81 --- /dev/null +++ b/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl @@ -0,0 +1,5 @@ +{{.CommentFormat}} +func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { + if h, ok := t.(tHelper); ok { h.Helper() } + return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) +} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl b/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl new file mode 100644 index 00000000..188bb9e1 --- /dev/null +++ b/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl @@ -0,0 +1,5 @@ +{{.CommentWithoutT "a"}} +func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { + if h, ok := a.t.(tHelper); ok { h.Helper() } + return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) +} diff --git a/vendor/github.com/ugorji/go/LICENSE b/vendor/github.com/ugorji/go/LICENSE deleted file mode 100644 index 95a0f054..00000000 --- a/vendor/github.com/ugorji/go/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2012-2015 Ugorji Nwoke. -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/ugorji/go/codec/0doc.go b/vendor/github.com/ugorji/go/codec/0doc.go deleted file mode 100644 index 295ee346..00000000 --- a/vendor/github.com/ugorji/go/codec/0doc.go +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. -// Use of this source code is governed by a MIT license found in the LICENSE file. - -/* -Package codec provides a -High Performance, Feature-Rich Idiomatic Go 1.4+ codec/encoding library -for binc, msgpack, cbor, json. - -Supported Serialization formats are: - - - msgpack: https://github.com/msgpack/msgpack - - binc: http://github.com/ugorji/binc - - cbor: http://cbor.io http://tools.ietf.org/html/rfc7049 - - json: http://json.org http://tools.ietf.org/html/rfc7159 - - simple: - -To install: - - go get github.com/ugorji/go/codec - -This package will carefully use 'unsafe' for performance reasons in specific places. -You can build without unsafe use by passing the safe or appengine tag -i.e. 'go install -tags=safe ...'. Note that unsafe is only supported for the last 3 -go sdk versions e.g. current go release is go 1.9, so we support unsafe use only from -go 1.7+ . This is because supporting unsafe requires knowledge of implementation details. - -For detailed usage information, read the primer at http://ugorji.net/blog/go-codec-primer . - -The idiomatic Go support is as seen in other encoding packages in -the standard library (ie json, xml, gob, etc). - -Rich Feature Set includes: - - - Simple but extremely powerful and feature-rich API - - Support for go1.4 and above, while selectively using newer APIs for later releases - - Excellent code coverage ( > 90% ) - - Very High Performance. - Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X. - - Careful selected use of 'unsafe' for targeted performance gains. - 100% mode exists where 'unsafe' is not used at all. - - Lock-free (sans mutex) concurrency for scaling to 100's of cores - - In-place updates during decode, with option to zero value in maps and slices prior to decode - - Coerce types where appropriate - e.g. decode an int in the stream into a float, decode numbers from formatted strings, etc - - Corner Cases: - Overflows, nil maps/slices, nil values in streams are handled correctly - - Standard field renaming via tags - - Support for omitting empty fields during an encoding - - Encoding from any value and decoding into pointer to any value - (struct, slice, map, primitives, pointers, interface{}, etc) - - Extensions to support efficient encoding/decoding of any named types - - Support encoding.(Binary|Text)(M|Unm)arshaler interfaces - - Support IsZero() bool to determine if a value is a zero value. - Analogous to time.Time.IsZero() bool. - - Decoding without a schema (into a interface{}). - Includes Options to configure what specific map or slice type to use - when decoding an encoded list or map into a nil interface{} - - Mapping a non-interface type to an interface, so we can decode appropriately - into any interface type with a correctly configured non-interface value. - - Encode a struct as an array, and decode struct from an array in the data stream - - Option to encode struct keys as numbers (instead of strings) - (to support structured streams with fields encoded as numeric codes) - - Comprehensive support for anonymous fields - - Fast (no-reflection) encoding/decoding of common maps and slices - - Code-generation for faster performance. - - Support binary (e.g. messagepack, cbor) and text (e.g. json) formats - - Support indefinite-length formats to enable true streaming - (for formats which support it e.g. json, cbor) - - Support canonical encoding, where a value is ALWAYS encoded as same sequence of bytes. - This mostly applies to maps, where iteration order is non-deterministic. - - NIL in data stream decoded as zero value - - Never silently skip data when decoding. - User decides whether to return an error or silently skip data when keys or indexes - in the data stream do not map to fields in the struct. - - Detect and error when encoding a cyclic reference (instead of stack overflow shutdown) - - Encode/Decode from/to chan types (for iterative streaming support) - - Drop-in replacement for encoding/json. `json:` key in struct tag supported. - - Provides a RPC Server and Client Codec for net/rpc communication protocol. - - Handle unique idiosyncrasies of codecs e.g. - - For messagepack, configure how ambiguities in handling raw bytes are resolved - - For messagepack, provide rpc server/client codec to support - msgpack-rpc protocol defined at: - https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md - -Extension Support - -Users can register a function to handle the encoding or decoding of -their custom types. - -There are no restrictions on what the custom type can be. Some examples: - - type BisSet []int - type BitSet64 uint64 - type UUID string - type MyStructWithUnexportedFields struct { a int; b bool; c []int; } - type GifImage struct { ... } - -As an illustration, MyStructWithUnexportedFields would normally be -encoded as an empty map because it has no exported fields, while UUID -would be encoded as a string. However, with extension support, you can -encode any of these however you like. - -Custom Encoding and Decoding - -This package maintains symmetry in the encoding and decoding halfs. -We determine how to encode or decode by walking this decision tree - - - is type a codec.Selfer? - - is there an extension registered for the type? - - is format binary, and is type a encoding.BinaryMarshaler and BinaryUnmarshaler? - - is format specifically json, and is type a encoding/json.Marshaler and Unmarshaler? - - is format text-based, and type an encoding.TextMarshaler and TextUnmarshaler? - - else we use a pair of functions based on the "kind" of the type e.g. map, slice, int64, etc - -This symmetry is important to reduce chances of issues happening because the -encoding and decoding sides are out of sync e.g. decoded via very specific -encoding.TextUnmarshaler but encoded via kind-specific generalized mode. - -Consequently, if a type only defines one-half of the symmetry -(e.g. it implements UnmarshalJSON() but not MarshalJSON() ), -then that type doesn't satisfy the check and we will continue walking down the -decision tree. - -RPC - -RPC Client and Server Codecs are implemented, so the codecs can be used -with the standard net/rpc package. - -Usage - -The Handle is SAFE for concurrent READ, but NOT SAFE for concurrent modification. - -The Encoder and Decoder are NOT safe for concurrent use. - -Consequently, the usage model is basically: - - - Create and initialize the Handle before any use. - Once created, DO NOT modify it. - - Multiple Encoders or Decoders can now use the Handle concurrently. - They only read information off the Handle (never write). - - However, each Encoder or Decoder MUST not be used concurrently - - To re-use an Encoder/Decoder, call Reset(...) on it first. - This allows you use state maintained on the Encoder/Decoder. - -Sample usage model: - - // create and configure Handle - var ( - bh codec.BincHandle - mh codec.MsgpackHandle - ch codec.CborHandle - ) - - mh.MapType = reflect.TypeOf(map[string]interface{}(nil)) - - // configure extensions - // e.g. for msgpack, define functions and enable Time support for tag 1 - // mh.SetExt(reflect.TypeOf(time.Time{}), 1, myExt) - - // create and use decoder/encoder - var ( - r io.Reader - w io.Writer - b []byte - h = &bh // or mh to use msgpack - ) - - dec = codec.NewDecoder(r, h) - dec = codec.NewDecoderBytes(b, h) - err = dec.Decode(&v) - - enc = codec.NewEncoder(w, h) - enc = codec.NewEncoderBytes(&b, h) - err = enc.Encode(v) - - //RPC Server - go func() { - for { - conn, err := listener.Accept() - rpcCodec := codec.GoRpc.ServerCodec(conn, h) - //OR rpcCodec := codec.MsgpackSpecRpc.ServerCodec(conn, h) - rpc.ServeCodec(rpcCodec) - } - }() - - //RPC Communication (client side) - conn, err = net.Dial("tcp", "localhost:5555") - rpcCodec := codec.GoRpc.ClientCodec(conn, h) - //OR rpcCodec := codec.MsgpackSpecRpc.ClientCodec(conn, h) - client := rpc.NewClientWithCodec(rpcCodec) - -Running Tests - -To run tests, use the following: - - go test - -To run the full suite of tests, use the following: - - go test -tags alltests -run Suite - -You can run the tag 'safe' to run tests or build in safe mode. e.g. - - go test -tags safe -run Json - go test -tags "alltests safe" -run Suite - -Running Benchmarks - -Please see http://github.com/ugorji/go-codec-bench . - -Caveats - -Struct fields matching the following are ignored during encoding and decoding - - struct tag value set to - - - func, complex numbers, unsafe pointers - - unexported and not embedded - - unexported and embedded and not struct kind - - unexported and embedded pointers (from go1.10) - -Every other field in a struct will be encoded/decoded. - -Embedded fields are encoded as if they exist in the top-level struct, -with some caveats. See Encode documentation. - -*/ -package codec - diff --git a/vendor/github.com/ugorji/go/codec/LICENSE b/vendor/github.com/ugorji/go/codec/LICENSE new file mode 100644 index 00000000..95a0f054 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2012-2015 Ugorji Nwoke. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/ugorji/go/codec/binc.go b/vendor/github.com/ugorji/go/codec/binc.go index c9877ac7..802b32cf 100644 --- a/vendor/github.com/ugorji/go/codec/binc.go +++ b/vendor/github.com/ugorji/go/codec/binc.go @@ -5,7 +5,6 @@ package codec import ( "math" - "reflect" "time" ) @@ -100,21 +99,22 @@ func bincdesc(vd, vs byte) string { } type bincEncDriver struct { - e *Encoder + noBuiltInTypes + encDriverNoopContainerWriter h *BincHandle - w *encWriterSwitch m map[string]uint16 // symbols - b [16]byte // scratch, used for encoding numbers - bigendian style + b [8]byte // scratch, used for encoding numbers - bigendian style s uint16 // symbols sequencer - // c containerState - encDriverTrackContainerWriter - noBuiltInTypes - // encNoSeparator - _ [1]uint64 // padding + _ [4]uint64 // padding + e Encoder +} + +func (e *bincEncDriver) encoder() *Encoder { + return &e.e } func (e *bincEncDriver) EncodeNil() { - e.w.writen1(bincVdSpecial<<4 | bincSpNil) + e.e.encWr.writen1(bincVdSpecial<<4 | bincSpNil) } func (e *bincEncDriver) EncodeTime(t time.Time) { @@ -122,31 +122,31 @@ func (e *bincEncDriver) EncodeTime(t time.Time) { e.EncodeNil() } else { bs := bincEncodeTime(t) - e.w.writen1(bincVdTimestamp<<4 | uint8(len(bs))) - e.w.writeb(bs) + e.e.encWr.writen1(bincVdTimestamp<<4 | uint8(len(bs))) + e.e.encWr.writeb(bs) } } func (e *bincEncDriver) EncodeBool(b bool) { if b { - e.w.writen1(bincVdSpecial<<4 | bincSpTrue) + e.e.encWr.writen1(bincVdSpecial<<4 | bincSpTrue) } else { - e.w.writen1(bincVdSpecial<<4 | bincSpFalse) + e.e.encWr.writen1(bincVdSpecial<<4 | bincSpFalse) } } func (e *bincEncDriver) EncodeFloat32(f float32) { if f == 0 { - e.w.writen1(bincVdSpecial<<4 | bincSpZeroFloat) + e.e.encWr.writen1(bincVdSpecial<<4 | bincSpZeroFloat) return } - e.w.writen1(bincVdFloat<<4 | bincFlBin32) - bigenHelper{e.b[:4], e.w}.writeUint32(math.Float32bits(f)) + e.e.encWr.writen1(bincVdFloat<<4 | bincFlBin32) + bigenHelper{e.b[:4], e.e.w()}.writeUint32(math.Float32bits(f)) } func (e *bincEncDriver) EncodeFloat64(f float64) { if f == 0 { - e.w.writen1(bincVdSpecial<<4 | bincSpZeroFloat) + e.e.encWr.writen1(bincVdSpecial<<4 | bincSpZeroFloat) return } bigen.PutUint64(e.b[:8], math.Float64bits(f)) @@ -156,14 +156,14 @@ func (e *bincEncDriver) EncodeFloat64(f float64) { } i++ if i <= 6 { - e.w.writen1(bincVdFloat<<4 | 0x8 | bincFlBin64) - e.w.writen1(byte(i)) - e.w.writeb(e.b[:i]) + e.e.encWr.writen1(bincVdFloat<<4 | 0x8 | bincFlBin64) + e.e.encWr.writen1(byte(i)) + e.e.encWr.writeb(e.b[:i]) return } } - e.w.writen1(bincVdFloat<<4 | bincFlBin64) - e.w.writeb(e.b[:8]) + e.e.encWr.writen1(bincVdFloat<<4 | bincFlBin64) + e.e.encWr.writeb(e.b[:8]) } func (e *bincEncDriver) encIntegerPrune(bd byte, pos bool, v uint64, lim uint8) { @@ -174,11 +174,11 @@ func (e *bincEncDriver) encIntegerPrune(bd byte, pos bool, v uint64, lim uint8) } if bincDoPrune { i := pruneSignExt(e.b[:lim], pos) - e.w.writen1(bd | lim - 1 - byte(i)) - e.w.writeb(e.b[i:lim]) + e.e.encWr.writen1(bd | lim - 1 - byte(i)) + e.e.encWr.writeb(e.b[i:lim]) } else { - e.w.writen1(bd | lim - 1) - e.w.writeb(e.b[:lim]) + e.e.encWr.writen1(bd | lim - 1) + e.e.encWr.writeb(e.b[:lim]) } } @@ -187,7 +187,7 @@ func (e *bincEncDriver) EncodeInt(v int64) { if v >= 0 { e.encUint(bincVdPosInt<<4, true, uint64(v)) } else if v == -1 { - e.w.writen1(bincVdSpecial<<4 | bincSpNegOne) + e.e.encWr.writen1(bincVdSpecial<<4 | bincSpNegOne) } else { e.encUint(bincVdNegInt<<4, false, uint64(-v)) } @@ -199,14 +199,14 @@ func (e *bincEncDriver) EncodeUint(v uint64) { func (e *bincEncDriver) encUint(bd byte, pos bool, v uint64) { if v == 0 { - e.w.writen1(bincVdSpecial<<4 | bincSpZero) + e.e.encWr.writen1(bincVdSpecial<<4 | bincSpZero) } else if pos && v >= 1 && v <= 16 { - e.w.writen1(bincVdSmallInt<<4 | byte(v-1)) + e.e.encWr.writen1(bincVdSmallInt<<4 | byte(v-1)) } else if v <= math.MaxUint8 { - e.w.writen2(bd|0x0, byte(v)) + e.e.encWr.writen2(bd|0x0, byte(v)) } else if v <= math.MaxUint16 { - e.w.writen1(bd | 0x01) - bigenHelper{e.b[:2], e.w}.writeUint16(uint16(v)) + e.e.encWr.writen1(bd | 0x01) + bigenHelper{e.b[:2], e.e.w()}.writeUint16(uint16(v)) } else if v <= math.MaxUint32 { e.encIntegerPrune(bd, pos, v, 4) } else { @@ -214,34 +214,41 @@ func (e *bincEncDriver) encUint(bd byte, pos bool, v uint64) { } } -func (e *bincEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, _ *Encoder) { - bs := ext.WriteExt(rv) +func (e *bincEncDriver) EncodeExt(v interface{}, xtag uint64, ext Ext) { + var bs []byte + if ext == SelfExt { + bs = e.e.blist.get(1024)[:0] + e.e.sideEncode(v, &bs) + } else { + bs = ext.WriteExt(v) + } if bs == nil { e.EncodeNil() return } e.encodeExtPreamble(uint8(xtag), len(bs)) - e.w.writeb(bs) + e.e.encWr.writeb(bs) + if ext == SelfExt { + e.e.blist.put(bs) + } } -func (e *bincEncDriver) EncodeRawExt(re *RawExt, _ *Encoder) { +func (e *bincEncDriver) EncodeRawExt(re *RawExt) { e.encodeExtPreamble(uint8(re.Tag), len(re.Data)) - e.w.writeb(re.Data) + e.e.encWr.writeb(re.Data) } func (e *bincEncDriver) encodeExtPreamble(xtag byte, length int) { e.encLen(bincVdCustomExt<<4, uint64(length)) - e.w.writen1(xtag) + e.e.encWr.writen1(xtag) } func (e *bincEncDriver) WriteArrayStart(length int) { e.encLen(bincVdArray<<4, uint64(length)) - e.c = containerArrayStart } func (e *bincEncDriver) WriteMapStart(length int) { e.encLen(bincVdMap<<4, uint64(length)) - e.c = containerMapStart } func (e *bincEncDriver) EncodeSymbol(v string) { @@ -260,7 +267,7 @@ func (e *bincEncDriver) EncodeSymbol(v string) { return } else if l == 1 { e.encBytesLen(cUTF8, 1) - e.w.writen1(v[0]) + e.e.encWr.writen1(v[0]) return } if e.m == nil { @@ -269,10 +276,10 @@ func (e *bincEncDriver) EncodeSymbol(v string) { ui, ok := e.m[v] if ok { if ui <= math.MaxUint8 { - e.w.writen2(bincVdSymbol<<4, byte(ui)) + e.e.encWr.writen2(bincVdSymbol<<4, byte(ui)) } else { - e.w.writen1(bincVdSymbol<<4 | 0x8) - bigenHelper{e.b[:2], e.w}.writeUint16(ui) + e.e.encWr.writen1(bincVdSymbol<<4 | 0x8) + bigenHelper{e.b[:2], e.e.w()}.writeUint16(ui) } } else { e.s++ @@ -290,58 +297,43 @@ func (e *bincEncDriver) EncodeSymbol(v string) { lenprec = 3 } if ui <= math.MaxUint8 { - e.w.writen2(bincVdSymbol<<4|0x0|0x4|lenprec, byte(ui)) + e.e.encWr.writen2(bincVdSymbol<<4|0x0|0x4|lenprec, byte(ui)) } else { - e.w.writen1(bincVdSymbol<<4 | 0x8 | 0x4 | lenprec) - bigenHelper{e.b[:2], e.w}.writeUint16(ui) + e.e.encWr.writen1(bincVdSymbol<<4 | 0x8 | 0x4 | lenprec) + bigenHelper{e.b[:2], e.e.w()}.writeUint16(ui) } if lenprec == 0 { - e.w.writen1(byte(l)) + e.e.encWr.writen1(byte(l)) } else if lenprec == 1 { - bigenHelper{e.b[:2], e.w}.writeUint16(uint16(l)) + bigenHelper{e.b[:2], e.e.w()}.writeUint16(uint16(l)) } else if lenprec == 2 { - bigenHelper{e.b[:4], e.w}.writeUint32(uint32(l)) + bigenHelper{e.b[:4], e.e.w()}.writeUint32(uint32(l)) } else { - bigenHelper{e.b[:8], e.w}.writeUint64(uint64(l)) + bigenHelper{e.b[:8], e.e.w()}.writeUint64(uint64(l)) } - e.w.writestr(v) + e.e.encWr.writestr(v) } } -func (e *bincEncDriver) EncodeString(c charEncoding, v string) { - if e.c == containerMapKey && c == cUTF8 && (e.h.AsSymbols == 0 || e.h.AsSymbols == 1) { - e.EncodeSymbol(v) +func (e *bincEncDriver) EncodeString(v string) { + if e.h.StringToRaw { + e.encLen(bincVdByteArray<<4, uint64(len(v))) // e.encBytesLen(c, l) + if len(v) > 0 { + e.e.encWr.writestr(v) + } return } - l := uint64(len(v)) - e.encBytesLen(c, l) - if l > 0 { - e.w.writestr(v) - } + e.EncodeStringEnc(cUTF8, v) } func (e *bincEncDriver) EncodeStringEnc(c charEncoding, v string) { - if e.c == containerMapKey && c == cUTF8 && (e.h.AsSymbols == 0 || e.h.AsSymbols == 1) { + if e.e.c == containerMapKey && c == cUTF8 && (e.h.AsSymbols == 1) { e.EncodeSymbol(v) return } - l := uint64(len(v)) - e.encLen(bincVdString<<4, l) // e.encBytesLen(c, l) - if l > 0 { - e.w.writestr(v) - } - -} - -func (e *bincEncDriver) EncodeStringBytes(c charEncoding, v []byte) { - if v == nil { - e.EncodeNil() - return - } - l := uint64(len(v)) - e.encBytesLen(c, l) - if l > 0 { - e.w.writeb(v) + e.encLen(bincVdString<<4, uint64(len(v))) // e.encBytesLen(c, l) + if len(v) > 0 { + e.e.encWr.writestr(v) } } @@ -350,15 +342,16 @@ func (e *bincEncDriver) EncodeStringBytesRaw(v []byte) { e.EncodeNil() return } - l := uint64(len(v)) - e.encLen(bincVdByteArray<<4, l) // e.encBytesLen(c, l) - if l > 0 { - e.w.writeb(v) + e.encLen(bincVdByteArray<<4, uint64(len(v))) // e.encBytesLen(c, l) + if len(v) > 0 { + e.e.encWr.writeb(v) } } func (e *bincEncDriver) encBytesLen(c charEncoding, length uint64) { - //TODO: support bincUnicodeOther (for now, just use string or bytearray) + // NOTE: we currently only support UTF-8 (string) and RAW (bytearray). + // We should consider supporting bincUnicodeOther. + if c == cRAW { e.encLen(bincVdByteArray<<4, length) } else { @@ -368,7 +361,7 @@ func (e *bincEncDriver) encBytesLen(c charEncoding, length uint64) { func (e *bincEncDriver) encLen(bd byte, l uint64) { if l < 12 { - e.w.writen1(bd | uint8(l+4)) + e.e.encWr.writen1(bd | uint8(l+4)) } else { e.encLenNumber(bd, l) } @@ -376,52 +369,49 @@ func (e *bincEncDriver) encLen(bd byte, l uint64) { func (e *bincEncDriver) encLenNumber(bd byte, v uint64) { if v <= math.MaxUint8 { - e.w.writen2(bd, byte(v)) + e.e.encWr.writen2(bd, byte(v)) } else if v <= math.MaxUint16 { - e.w.writen1(bd | 0x01) - bigenHelper{e.b[:2], e.w}.writeUint16(uint16(v)) + e.e.encWr.writen1(bd | 0x01) + bigenHelper{e.b[:2], e.e.w()}.writeUint16(uint16(v)) } else if v <= math.MaxUint32 { - e.w.writen1(bd | 0x02) - bigenHelper{e.b[:4], e.w}.writeUint32(uint32(v)) + e.e.encWr.writen1(bd | 0x02) + bigenHelper{e.b[:4], e.e.w()}.writeUint32(uint32(v)) } else { - e.w.writen1(bd | 0x03) - bigenHelper{e.b[:8], e.w}.writeUint64(uint64(v)) + e.e.encWr.writen1(bd | 0x03) + bigenHelper{e.b[:8], e.e.w()}.writeUint64(uint64(v)) } } //------------------------------------ -type bincDecSymbol struct { - s string - b []byte - i uint16 -} - type bincDecDriver struct { decDriverNoopContainerReader noBuiltInTypes - d *Decoder h *BincHandle - r *decReaderSwitch - br bool // bytes reader bdRead bool bd byte vd byte vs byte - _ [3]byte // padding + + fnil bool + // _ [3]byte // padding // linear searching on this slice is ok, // because we typically expect < 32 symbols in each stream. - s []bincDecSymbol + s map[uint16][]byte // []bincDecSymbol + + b [8]byte // scratch for decoding numbers - big endian style + _ [4]uint64 // padding cache-aligned - // noStreamingCodec - // decNoSeparator + d Decoder +} - b [(8 + 1) * 8]byte // scratch +func (d *bincDecDriver) decoder() *Decoder { + return &d.d } func (d *bincDecDriver) readNextBd() { - d.bd = d.r.readn1() + d.bd = d.d.decRd.readn1() d.vd = d.bd >> 4 d.vs = d.bd & 0x0f d.bdRead = true @@ -429,16 +419,41 @@ func (d *bincDecDriver) readNextBd() { func (d *bincDecDriver) uncacheRead() { if d.bdRead { - d.r.unreadn1() + d.d.decRd.unreadn1() + d.bdRead = false + } +} + +func (d *bincDecDriver) advanceNil() (null bool) { + d.fnil = false + if !d.bdRead { + d.readNextBd() + } + if d.bd == bincVdSpecial<<4|bincSpNil { d.bdRead = false + d.fnil = true + null = true } + return +} + +func (d *bincDecDriver) Nil() bool { + return d.fnil +} + +func (d *bincDecDriver) TryNil() bool { + return d.advanceNil() } func (d *bincDecDriver) ContainerType() (vt valueType) { if !d.bdRead { d.readNextBd() } - if d.vd == bincVdSpecial && d.vs == bincSpNil { + d.fnil = false + // if d.vd == bincVdSpecial && d.vs == bincSpNil { + if d.bd == bincVdSpecial<<4|bincSpNil { + d.bdRead = false + d.fnil = true return valueTypeNil } else if d.vd == bincVdByteArray { return valueTypeBytes @@ -449,36 +464,18 @@ func (d *bincDecDriver) ContainerType() (vt valueType) { } else if d.vd == bincVdMap { return valueTypeMap } - // else { - // d.d.errorf("isContainerType: unsupported parameter: %v", vt) - // } return valueTypeUnset } -func (d *bincDecDriver) TryDecodeAsNil() bool { - if !d.bdRead { - d.readNextBd() - } - if d.bd == bincVdSpecial<<4|bincSpNil { - d.bdRead = false - return true - } - return false -} - func (d *bincDecDriver) DecodeTime() (t time.Time) { - if !d.bdRead { - d.readNextBd() - } - if d.bd == bincVdSpecial<<4|bincSpNil { - d.bdRead = false + if d.advanceNil() { return } if d.vd != bincVdTimestamp { d.d.errorf("cannot decode time - %s %x-%x/%s", msgBadDesc, d.vd, d.vs, bincdesc(d.vd, d.vs)) return } - t, err := bincDecodeTime(d.r.readx(uint(d.vs))) + t, err := bincDecodeTime(d.d.decRd.readx(uint(d.vs))) if err != nil { panic(err) } @@ -488,9 +485,9 @@ func (d *bincDecDriver) DecodeTime() (t time.Time) { func (d *bincDecDriver) decFloatPre(vs, defaultLen byte) { if vs&0x8 == 0 { - d.r.readb(d.b[0:defaultLen]) + d.d.decRd.readb(d.b[0:defaultLen]) } else { - l := d.r.readn1() + l := d.d.decRd.readn1() if l > 8 { d.d.errorf("cannot read float - at most 8 bytes used to represent float - received %v bytes", l) return @@ -498,12 +495,12 @@ func (d *bincDecDriver) decFloatPre(vs, defaultLen byte) { for i := l; i < 8; i++ { d.b[i] = 0 } - d.r.readb(d.b[0:l]) + d.d.decRd.readb(d.b[0:l]) } } func (d *bincDecDriver) decFloat() (f float64) { - //if true { f = math.Float64frombits(bigen.Uint64(d.r.readx(8))); break; } + //if true { f = math.Float64frombits(bigen.Uint64(d.d.decRd.readx(8))); break; } if x := d.vs & 0x7; x == bincFlBin32 { d.decFloatPre(d.vs, 4) f = float64(math.Float32frombits(bigen.Uint32(d.b[0:4]))) @@ -522,26 +519,26 @@ func (d *bincDecDriver) decUint() (v uint64) { // need to inline the code (interface conversion and type assertion expensive) switch d.vs { case 0: - v = uint64(d.r.readn1()) + v = uint64(d.d.decRd.readn1()) case 1: - d.r.readb(d.b[6:8]) + d.d.decRd.readb(d.b[6:8]) v = uint64(bigen.Uint16(d.b[6:8])) case 2: d.b[4] = 0 - d.r.readb(d.b[5:8]) + d.d.decRd.readb(d.b[5:8]) v = uint64(bigen.Uint32(d.b[4:8])) case 3: - d.r.readb(d.b[4:8]) + d.d.decRd.readb(d.b[4:8]) v = uint64(bigen.Uint32(d.b[4:8])) case 4, 5, 6: lim := 7 - d.vs - d.r.readb(d.b[lim:8]) + d.d.decRd.readb(d.b[lim:8]) for i := uint8(0); i < lim; i++ { d.b[i] = 0 } v = uint64(bigen.Uint64(d.b[:8])) case 7: - d.r.readb(d.b[:8]) + d.d.decRd.readb(d.b[:8]) v = uint64(bigen.Uint64(d.b[:8])) default: d.d.errorf("unsigned integers with greater than 64 bits of precision not supported") @@ -551,9 +548,6 @@ func (d *bincDecDriver) decUint() (v uint64) { } func (d *bincDecDriver) decCheckInteger() (ui uint64, neg bool) { - if !d.bdRead { - d.readNextBd() - } vd, vs := d.vd, d.vs if vd == bincVdPosInt { ui = d.decUint() @@ -581,6 +575,9 @@ func (d *bincDecDriver) decCheckInteger() (ui uint64, neg bool) { } func (d *bincDecDriver) DecodeInt64() (i int64) { + if d.advanceNil() { + return + } ui, neg := d.decCheckInteger() i = chkOvf.SignedIntV(ui) if neg { @@ -591,6 +588,9 @@ func (d *bincDecDriver) DecodeInt64() (i int64) { } func (d *bincDecDriver) DecodeUint64() (ui uint64) { + if d.advanceNil() { + return + } ui, neg := d.decCheckInteger() if neg { d.d.errorf("assigning negative signed value to unsigned integer type") @@ -601,8 +601,8 @@ func (d *bincDecDriver) DecodeUint64() (ui uint64) { } func (d *bincDecDriver) DecodeFloat64() (f float64) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return } vd, vs := d.vd, d.vs if vd == bincVdSpecial { @@ -631,12 +631,12 @@ func (d *bincDecDriver) DecodeFloat64() (f float64) { // bool can be decoded from bool only (single byte). func (d *bincDecDriver) DecodeBool() (b bool) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return } - if bd := d.bd; bd == (bincVdSpecial | bincSpFalse) { + if d.bd == (bincVdSpecial | bincSpFalse) { // b = false - } else if bd == (bincVdSpecial | bincSpTrue) { + } else if d.bd == (bincVdSpecial | bincSpTrue) { b = true } else { d.d.errorf("bool - %s %x-%x/%s", msgBadDesc, d.vd, d.vs, bincdesc(d.vd, d.vs)) @@ -647,8 +647,8 @@ func (d *bincDecDriver) DecodeBool() (b bool) { } func (d *bincDecDriver) ReadMapStart() (length int) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return decContainerLenNil } if d.vd != bincVdMap { d.d.errorf("map - %s %x-%x/%s", msgBadDesc, d.vd, d.vs, bincdesc(d.vd, d.vs)) @@ -660,8 +660,8 @@ func (d *bincDecDriver) ReadMapStart() (length int) { } func (d *bincDecDriver) ReadArrayStart() (length int) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return decContainerLenNil } if d.vd != bincVdArray { d.d.errorf("array - %s %x-%x/%s", msgBadDesc, d.vd, d.vs, bincdesc(d.vd, d.vs)) @@ -681,27 +681,22 @@ func (d *bincDecDriver) decLen() int { func (d *bincDecDriver) decLenNumber() (v uint64) { if x := d.vs; x == 0 { - v = uint64(d.r.readn1()) + v = uint64(d.d.decRd.readn1()) } else if x == 1 { - d.r.readb(d.b[6:8]) + d.d.decRd.readb(d.b[6:8]) v = uint64(bigen.Uint16(d.b[6:8])) } else if x == 2 { - d.r.readb(d.b[4:8]) + d.d.decRd.readb(d.b[4:8]) v = uint64(bigen.Uint32(d.b[4:8])) } else { - d.r.readb(d.b[:8]) + d.d.decRd.readb(d.b[:8]) v = bigen.Uint64(d.b[:8]) } return } -func (d *bincDecDriver) decStringAndBytes(bs []byte, withString, zerocopy bool) ( - bs2 []byte, s string) { - if !d.bdRead { - d.readNextBd() - } - if d.bd == bincVdSpecial<<4|bincSpNil { - d.bdRead = false +func (d *bincDecDriver) decStringBytes(bs []byte, zerocopy bool) (bs2 []byte) { + if d.advanceNil() { return } var slen = -1 @@ -710,18 +705,15 @@ func (d *bincDecDriver) decStringAndBytes(bs []byte, withString, zerocopy bool) case bincVdString, bincVdByteArray: slen = d.decLen() if zerocopy { - if d.br { - bs2 = d.r.readx(uint(slen)) + if d.d.bytes { + bs2 = d.d.decRd.readx(uint(slen)) } else if len(bs) == 0 { - bs2 = decByteSlice(d.r, slen, d.d.h.MaxInitLen, d.b[:]) + bs2 = decByteSlice(d.d.r(), slen, d.d.h.MaxInitLen, d.d.b[:]) } else { - bs2 = decByteSlice(d.r, slen, d.d.h.MaxInitLen, bs) + bs2 = decByteSlice(d.d.r(), slen, d.d.h.MaxInitLen, bs) } } else { - bs2 = decByteSlice(d.r, slen, d.d.h.MaxInitLen, bs) - } - if withString { - s = string(bs2) + bs2 = decByteSlice(d.d.r(), slen, d.d.h.MaxInitLen, bs) } case bincVdSymbol: // zerocopy doesn't apply for symbols, @@ -734,47 +726,34 @@ func (d *bincDecDriver) decStringAndBytes(bs []byte, withString, zerocopy bool) var symbol uint16 vs := d.vs if vs&0x8 == 0 { - symbol = uint16(d.r.readn1()) + symbol = uint16(d.d.decRd.readn1()) } else { - symbol = uint16(bigen.Uint16(d.r.readx(2))) + symbol = uint16(bigen.Uint16(d.d.decRd.readx(2))) } if d.s == nil { - d.s = make([]bincDecSymbol, 0, 16) + // d.s = pool4mapU16Bytes.Get().(map[uint16][]byte) // make([]bincDecSymbol, 0, 16) + d.s = make(map[uint16][]byte, 16) } if vs&0x4 == 0 { - for i := range d.s { - j := &d.s[i] - if j.i == symbol { - bs2 = j.b - if withString { - if j.s == "" && bs2 != nil { - j.s = string(bs2) - } - s = j.s - } - break - } - } + bs2 = d.s[symbol] } else { switch vs & 0x3 { case 0: - slen = int(d.r.readn1()) + slen = int(d.d.decRd.readn1()) case 1: - slen = int(bigen.Uint16(d.r.readx(2))) + slen = int(bigen.Uint16(d.d.decRd.readx(2))) case 2: - slen = int(bigen.Uint32(d.r.readx(4))) + slen = int(bigen.Uint32(d.d.decRd.readx(4))) case 3: - slen = int(bigen.Uint64(d.r.readx(8))) + slen = int(bigen.Uint64(d.d.decRd.readx(8))) } // since using symbols, do not store any part of // the parameter bs in the map, as it might be a shared buffer. - // bs2 = decByteSlice(d.r, slen, bs) - bs2 = decByteSlice(d.r, slen, d.d.h.MaxInitLen, nil) - if withString { - s = string(bs2) - } - d.s = append(d.s, bincDecSymbol{i: symbol, s: s, b: bs2}) + // bs2 = decByteSlice(d.d.r(), slen, bs) + bs2 = decByteSlice(d.d.r(), slen, d.d.h.MaxInitLen, nil) + d.s[symbol] = bs2 + // d.s = append(d.s, bincDecSymbol{i: symbol, s: s, b: bs2}) } default: d.d.errorf("string/bytes - %s %x-%x/%s", msgBadDesc, d.vd, d.vs, bincdesc(d.vd, d.vs)) @@ -784,31 +763,26 @@ func (d *bincDecDriver) decStringAndBytes(bs []byte, withString, zerocopy bool) return } -func (d *bincDecDriver) DecodeString() (s string) { - // DecodeBytes does not accommodate symbols, whose impl stores string version in map. - // Use decStringAndBytes directly. - // return string(d.DecodeBytes(d.b[:], true, true)) - _, s = d.decStringAndBytes(d.b[:], true, true) - return -} - func (d *bincDecDriver) DecodeStringAsBytes() (s []byte) { - s, _ = d.decStringAndBytes(d.b[:], false, true) - return + return d.decStringBytes(d.d.b[:], true) } func (d *bincDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { - if !d.bdRead { - d.readNextBd() - } - if d.bd == bincVdSpecial<<4|bincSpNil { - d.bdRead = false - return nil + if d.advanceNil() { + return } // check if an "array" of uint8's (see ContainerType for how to infer if an array) if d.vd == bincVdArray { - bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) - return + if zerocopy && len(bs) == 0 { + bs = d.d.b[:] + } + // bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) + slen := d.ReadArrayStart() + bs = usableByteSlice(bs, slen) + for i := 0; i < slen; i++ { + bs[i] = uint8(chkOvf.UintV(d.DecodeUint64(), 8)) + } + return bs } var clen int if d.vd == bincVdString || d.vd == bincVdByteArray { @@ -819,47 +793,48 @@ func (d *bincDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { } d.bdRead = false if zerocopy { - if d.br { - return d.r.readx(uint(clen)) + if d.d.bytes { + return d.d.decRd.readx(uint(clen)) } else if len(bs) == 0 { - bs = d.b[:] + bs = d.d.b[:] } } - return decByteSlice(d.r, clen, d.d.h.MaxInitLen, bs) + return decByteSlice(d.d.r(), clen, d.d.h.MaxInitLen, bs) } -func (d *bincDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { +func (d *bincDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) { if xtag > 0xff { d.d.errorf("ext: tag must be <= 0xff; got: %v", xtag) return } + if d.advanceNil() { + return + } realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag)) - realxtag = uint64(realxtag1) + realxtag := uint64(realxtag1) if ext == nil { re := rv.(*RawExt) re.Tag = realxtag - re.Data = detachZeroCopyBytes(d.br, re.Data, xbs) + re.Data = detachZeroCopyBytes(d.d.bytes, re.Data, xbs) + } else if ext == SelfExt { + d.d.sideDecode(rv, xbs) } else { ext.ReadExt(rv, xbs) } - return } func (d *bincDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) { - if !d.bdRead { - d.readNextBd() - } if d.vd == bincVdCustomExt { l := d.decLen() - xtag = d.r.readn1() + xtag = d.d.decRd.readn1() if verifyTag && xtag != tag { d.d.errorf("wrong extension tag - got %b, expecting: %v", xtag, tag) return } - if d.br { - xbs = d.r.readx(uint(l)) + if d.d.bytes { + xbs = d.d.decRd.readx(uint(l)) } else { - xbs = decByteSlice(d.r, l, d.d.h.MaxInitLen, d.d.b[:]) + xbs = decByteSlice(d.d.r(), l, d.d.h.MaxInitLen, d.d.b[:]) } } else if d.vd == bincVdByteArray { xbs = d.DecodeBytes(nil, true) @@ -877,6 +852,7 @@ func (d *bincDecDriver) DecodeNaked() { d.readNextBd() } + d.fnil = false n := d.d.naked() var decodeFurther bool @@ -885,6 +861,7 @@ func (d *bincDecDriver) DecodeNaked() { switch d.vs { case bincSpNil: n.v = valueTypeNil + d.fnil = true case bincSpFalse: n.v = valueTypeBool n.b = false @@ -927,15 +904,15 @@ func (d *bincDecDriver) DecodeNaked() { n.f = d.decFloat() case bincVdSymbol: n.v = valueTypeSymbol - n.s = d.DecodeString() + n.s = string(d.DecodeStringAsBytes()) case bincVdString: n.v = valueTypeString - n.s = d.DecodeString() + n.s = string(d.DecodeStringAsBytes()) case bincVdByteArray: - decNakedReadRawBytes(d, d.d, n, d.h.RawToString) + decNakedReadRawBytes(d, &d.d, n, d.h.RawToString) case bincVdTimestamp: n.v = valueTypeTime - tt, err := bincDecodeTime(d.r.readx(uint(d.vs))) + tt, err := bincDecodeTime(d.d.decRd.readx(uint(d.vs))) if err != nil { panic(err) } @@ -943,11 +920,11 @@ func (d *bincDecDriver) DecodeNaked() { case bincVdCustomExt: n.v = valueTypeExt l := d.decLen() - n.u = uint64(d.r.readn1()) - if d.br { - n.l = d.r.readx(uint(l)) + n.u = uint64(d.d.decRd.readn1()) + if d.d.bytes { + n.l = d.d.decRd.readx(uint(l)) } else { - n.l = decByteSlice(d.r, l, d.d.h.MaxInitLen, d.d.b[:]) + n.l = decByteSlice(d.d.r(), l, d.d.h.MaxInitLen, d.d.b[:]) } case bincVdArray: n.v = valueTypeArray @@ -985,7 +962,7 @@ func (d *bincDecDriver) DecodeNaked() { type BincHandle struct { BasicHandle binaryEncodingType - noElemSeparators + // noElemSeparators // AsSymbols defines what should be encoded as symbols. // @@ -1007,36 +984,53 @@ type BincHandle struct { // - n: none // - a: all: same as m, s, ... - // _ [1]uint64 // padding + _ [7]uint64 // padding (cache-aligned) } // Name returns the name of the handle: binc func (h *BincHandle) Name() string { return "binc" } -// SetBytesExt sets an extension -func (h *BincHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { - return h.SetExt(rt, tag, &extWrapper{ext, interfaceExtFailer{}}) -} - -func (h *BincHandle) newEncDriver(e *Encoder) encDriver { - return &bincEncDriver{e: e, h: h, w: e.w} +func (h *BincHandle) newEncDriver() encDriver { + var e = &bincEncDriver{h: h} + e.e.e = e + e.e.init(h) + e.reset() + return e } -func (h *BincHandle) newDecDriver(d *Decoder) decDriver { - return &bincDecDriver{d: d, h: h, r: d.r, br: d.bytes} +func (h *BincHandle) newDecDriver() decDriver { + d := &bincDecDriver{h: h} + d.d.d = d + d.d.init(h) + d.reset() + return d } func (e *bincEncDriver) reset() { - e.w = e.e.w e.s = 0 - e.c = 0 e.m = nil } +func (e *bincEncDriver) atEndOfEncode() { + if e.m != nil { + for k := range e.m { + delete(e.m, k) + } + } +} + func (d *bincDecDriver) reset() { - d.r, d.br = d.d.r, d.d.bytes d.s = nil d.bd, d.bdRead, d.vd, d.vs = 0, false, 0, 0 + d.fnil = false +} + +func (d *bincDecDriver) atEndOfDecode() { + if d.s != nil { + for k := range d.s { + delete(d.s, k) + } + } } // var timeDigits = [...]byte{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} @@ -1091,7 +1085,7 @@ func (d *bincDecDriver) reset() { // Bits 13..0 = timezone offset in minutes. It is a signed integer in Big Endian format. // func bincEncodeTime(t time.Time) []byte { - //t := rv.Interface().(time.Time) + // t := rv2i(rv).(time.Time) tsecs, tnsecs := t.Unix(), t.Nanosecond() var ( bd byte @@ -1123,7 +1117,7 @@ func bincEncodeTime(t time.Time) []byte { bd = bd | 0x20 // Note that Go Libs do not give access to dst flag. _, zoneOffset := t.Zone() - //zoneName, zoneOffset := t.Zone() + // zoneName, zoneOffset := t.Zone() zoneOffset /= 60 z := uint16(zoneOffset) bigen.PutUint16(btmp[:2], z) @@ -1152,10 +1146,10 @@ func bincDecodeTime(bs []byte) (tt time.Time, err error) { n = ((bd >> 2) & 0x7) + 1 i2 = i + n copy(btmp[8-n:], bs[i:i2]) - //if first bit of bs[i] is set, then fill btmp[0..8-n] with 0xff (ie sign extend it) + // if first bit of bs[i] is set, then fill btmp[0..8-n] with 0xff (ie sign extend it) if bs[i]&(1<<7) != 0 { copy(btmp[0:8-n], bsAll0xff) - //for j,k := byte(0), 8-n; j < k; j++ { btmp[j] = 0xff } + // for j,k := byte(0), 8-n; j < k; j++ { btmp[j] = 0xff } } i = i2 tsec = int64(bigen.Uint64(btmp[:])) @@ -1173,7 +1167,7 @@ func bincDecodeTime(bs []byte) (tt time.Time, err error) { return } // In stdlib time.Parse, when a date is parsed without a zone name, it uses "" as zone name. - // However, we need name here, so it can be shown when time is printed. + // However, we need name here, so it can be shown when time is printf.d. // Zone name is in form: UTC-08:00. // Note that Go Libs do not give access to dst flag, so we ignore dst bits @@ -1199,5 +1193,27 @@ func bincDecodeTime(bs []byte) (tt time.Time, err error) { return } +// func timeLocUTCName(tzint int16) string { +// if tzint == 0 { +// return "UTC" +// } +// var tzname = []byte("UTC+00:00") +// //tzname := fmt.Sprintf("UTC%s%02d:%02d", tzsign, tz/60, tz%60) //perf issue using Sprintf.. inline below. +// //tzhr, tzmin := tz/60, tz%60 //faster if u convert to int first +// var tzhr, tzmin int16 +// if tzint < 0 { +// tzname[3] = '-' +// tzhr, tzmin = -tzint/60, (-tzint)%60 +// } else { +// tzhr, tzmin = tzint/60, tzint%60 +// } +// tzname[4] = timeDigits[tzhr/10] +// tzname[5] = timeDigits[tzhr%10] +// tzname[7] = timeDigits[tzmin/10] +// tzname[8] = timeDigits[tzmin%10] +// return string(tzname) +// //return time.FixedZone(string(tzname), int(tzint)*60) +// } + var _ decDriver = (*bincDecDriver)(nil) var _ encDriver = (*bincEncDriver)(nil) diff --git a/vendor/github.com/ugorji/go/codec/build.sh b/vendor/github.com/ugorji/go/codec/build.sh new file mode 100644 index 00000000..a71227fb --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/build.sh @@ -0,0 +1,272 @@ +#!/bin/bash + +# Run all the different permutations of all the tests and other things +# This helps ensure that nothing gets broken. + +_tests() { + local vet="" # TODO: make it off + local gover=$( go version | cut -f 3 -d ' ' ) + # note that codecgen requires fastpath, so you cannot do "codecgen notfastpath" + local a=( "" "safe" "notfastpath" "notfastpath safe" "codecgen" "codecgen safe" ) + for i in "${a[@]}" + do + echo ">>>> TAGS: $i" + local i2=${i:-default} + case $gover in + go1.[0-6]*) go test ${zargs[*]} -tags "$i" "$@" ;; + *) go vet -printfuncs "errorf" "$@" && + go test ${zargs[*]} -vet "$vet" -tags "alltests $i" -run "Suite" -coverprofile "${i2// /-}.cov.out" "$@" ;; + esac + if [[ "$?" != 0 ]]; then return 1; fi + done + echo "++++++++ TEST SUITES ALL PASSED ++++++++" +} + + +# is a generation needed? +_ng() { + local a="$1" + if [[ ! -e "$a" ]]; then echo 1; return; fi + for i in `ls -1 *.go.tmpl gen.go values_test.go` + do + if [[ "$a" -ot "$i" ]]; then echo 1; return; fi + done +} + +_prependbt() { + cat > ${2} <> ${2} + rm -f ${1} +} + +# _build generates fast-path.go and gen-helper.go. +_build() { + if ! [[ "${zforce}" || $(_ng "fast-path.generated.go") || $(_ng "gen-helper.generated.go") || $(_ng "gen.generated.go") ]]; then return 0; fi + + if [ "${zbak}" ]; then + _zts=`date '+%m%d%Y_%H%M%S'` + _gg=".generated.go" + [ -e "gen-helper${_gg}" ] && mv gen-helper${_gg} gen-helper${_gg}__${_zts}.bak + [ -e "fast-path${_gg}" ] && mv fast-path${_gg} fast-path${_gg}__${_zts}.bak + [ -e "gen${_gg}" ] && mv gen${_gg} gen${_gg}__${_zts}.bak + fi + rm -f gen-helper.generated.go fast-path.generated.go gen.generated.go \ + *safe.generated.go *_generated_test.go *.generated_ffjson_expose.go + + cat > gen.generated.go <> gen.generated.go < gen-dec-map.go.tmpl + cat >> gen.generated.go <> gen.generated.go < gen-dec-array.go.tmpl + cat >> gen.generated.go <> gen.generated.go < gen-enc-chan.go.tmpl + cat >> gen.generated.go < gen-from-tmpl.codec.generated.go < gen-from-tmpl.generated.go < " + fnameOut + " ______") +fin, err := os.Open(fnameIn) +if err != nil { panic(err) } +defer fin.Close() +fout, err := os.Create(fnameOut) +if err != nil { panic(err) } +defer fout.Close() +err = codec.GenInternalGoFile(fin, fout) +if err != nil { panic(err) } +} + +func main() { +run("fast-path.go.tmpl", "fast-path.generated.go") +run("gen-helper.go.tmpl", "gen-helper.generated.go") +run("mammoth-test.go.tmpl", "mammoth_generated_test.go") +run("mammoth2-test.go.tmpl", "mammoth2_generated_test.go") +// run("sort-slice.go.tmpl", "sort-slice.generated.go") +} +EOF + + sed -e 's+// __DO_NOT_REMOVE__NEEDED_FOR_REPLACING__IMPORT_PATH__FOR_CODEC_BENCH__+import . "github.com/ugorji/go/codec"+' \ + shared_test.go > bench/shared_test.go + + # explicitly return 0 if this passes, else return 1 + go run -tags "prebuild" prebuild.go || return 1 + go run -tags "notfastpath safe codecgen.exec" gen-from-tmpl.generated.go || return 1 + rm -f gen-from-tmpl.*generated.go + return 0 +} + +_codegenerators() { + local c5="_generated_test.go" + local c7="$PWD/codecgen" + local c8="$c7/__codecgen" + local c9="codecgen-scratch.go" + + if ! [[ $zforce || $(_ng "values_codecgen${c5}") ]]; then return 0; fi + + # Note: ensure you run the codecgen for this codebase/directory i.e. ./codecgen/codecgen + true && + echo "codecgen ... " && + if [[ $zforce || ! -f "$c8" || "$c7/gen.go" -nt "$c8" ]]; then + echo "rebuilding codecgen ... " && ( cd codecgen && go build -o $c8 ${zargs[*]} . ) + fi && + $c8 -rt codecgen -t 'codecgen generated' -o values_codecgen${c5} -d 19780 $zfin $zfin2 && + cp mammoth2_generated_test.go $c9 && + $c8 -t 'codecgen,!notfastpath generated,!notfastpath' -o mammoth2_codecgen${c5} -d 19781 mammoth2_generated_test.go && + rm -f $c9 && + echo "generators done!" +} + +_prebuild() { + echo "prebuild: zforce: $zforce" + local d="$PWD" + local zfin="test_values.generated.go" + local zfin2="test_values_flex.generated.go" + local zpkg="github.com/ugorji/go/codec" + # zpkg=${d##*/src/} + # zgobase=${d%%/src/*} + # rm -f *_generated_test.go + rm -f codecgen-*.go && + _build && + cp $d/values_test.go $d/$zfin && + cp $d/values_flex_test.go $d/$zfin2 && + _codegenerators && + if [[ "$(type -t _codegenerators_external )" = "function" ]]; then _codegenerators_external ; fi && + if [[ $zforce ]]; then go install ${zargs[*]} .; fi && + echo "prebuild done successfully" + rm -f $d/$zfin $d/$zfin2 + # unset zfin zfin2 zpkg +} + +_make() { + local makeforce=${zforce} + zforce=1 + (cd codecgen && go install ${zargs[*]} .) && _prebuild && go install ${zargs[*]} . + zforce=${makeforce} +} + +_clean() { + rm -f gen-from-tmpl.*generated.go \ + codecgen-*.go \ + test_values.generated.go test_values_flex.generated.go +} + +_release() { + local reply + read -p "Pre-release validation takes a few minutes and MUST be run from within GOPATH/src. Confirm y/n? " -n 1 -r reply + echo + if [[ ! $reply =~ ^[Yy]$ ]]; then return 1; fi + + # expects GOROOT, GOROOT_BOOTSTRAP to have been set. + if [[ -z "${GOROOT// }" || -z "${GOROOT_BOOTSTRAP// }" ]]; then return 1; fi + # (cd $GOROOT && git checkout -f master && git pull && git reset --hard) + (cd $GOROOT && git pull) + local f=`pwd`/make.release.out + cat > $f <>$f + if [[ "$i" != "master" ]]; then i="release-branch.go$i"; fi + (false || + (echo "===== BUILDING GO SDK for branch: $i ... =====" && + cd $GOROOT && + git checkout -f $i && git reset --hard && git clean -f . && + cd src && ./make.bash >>$f 2>&1 && sleep 1 ) ) && + echo "===== GO SDK BUILD DONE =====" && + _prebuild && + echo "===== PREBUILD DONE with exit: $? =====" && + _tests "$@" + if [[ "$?" != 0 ]]; then return 1; fi + done + zforce=${makeforce} + echo "++++++++ RELEASE TEST SUITES ALL PASSED ++++++++" +} + +_usage() { + cat < [tests, make, prebuild (force) (external), inlining diagnostics, mid-stack inlining, race detector] + -v -> verbose +EOF + if [[ "$(type -t _usage_run)" = "function" ]]; then _usage_run ; fi +} + +_main() { + if [[ -z "$1" ]]; then _usage; return 1; fi + local x + local zforce + local zargs=() + local zverbose=() + local zbenchflags="" + OPTIND=1 + while getopts ":ctmnrgpfvlyzdb:" flag + do + case "x$flag" in + 'xf') zforce=1 ;; + 'xv') zverbose+=(1) ;; + 'xl') zargs+=("-gcflags"); zargs+=("-l=4") ;; + 'xn') zargs+=("-gcflags"); zargs+=("-m=2") ;; + 'xd') zargs+=("-race") ;; + 'xb') x='b'; zbenchflags=${OPTARG} ;; + x\?) _usage; return 1 ;; + *) x=$flag ;; + esac + done + shift $((OPTIND-1)) + # echo ">>>> _main: extra args: $@" + case "x$x" in + 'xt') _tests "$@" ;; + 'xm') _make "$@" ;; + 'xr') _release "$@" ;; + 'xg') _go ;; + 'xp') _prebuild "$@" ;; + 'xc') _clean "$@" ;; + 'xy') _analyze_extra "$@" ;; + 'xz') _analyze "$@" ;; + 'xb') _bench "$@" ;; + esac + # unset zforce zargs zbenchflags +} + +[ "." = `dirname $0` ] && _main "$@" + diff --git a/vendor/github.com/ugorji/go/codec/cbor.go b/vendor/github.com/ugorji/go/codec/cbor.go index 7833f9d6..d84fbb22 100644 --- a/vendor/github.com/ugorji/go/codec/cbor.go +++ b/vendor/github.com/ugorji/go/codec/cbor.go @@ -5,21 +5,22 @@ package codec import ( "math" - "reflect" "time" ) +// major const ( cborMajorUint byte = iota cborMajorNegInt cborMajorBytes - cborMajorText + cborMajorString cborMajorArray cborMajorMap cborMajorTag - cborMajorOther + cborMajorSimpleOrFloat ) +// simple const ( cborBdFalse byte = 0xf4 + iota cborBdTrue @@ -31,6 +32,7 @@ const ( cborBdFloat64 ) +// indefinite const ( cborBdIndefiniteBytes byte = 0x5f cborBdIndefiniteString byte = 0x7f @@ -49,6 +51,7 @@ const ( CborStreamBreak byte = 0xff ) +// base values const ( cborBaseUint byte = 0x00 cborBaseNegInt byte = 0x20 @@ -60,44 +63,51 @@ const ( cborBaseSimple byte = 0xe0 ) +// const ( +// cborSelfDesrTag byte = 0xd9 +// cborSelfDesrTag2 byte = 0xd9 +// cborSelfDesrTag3 byte = 0xf7 +// ) + func cbordesc(bd byte) string { - switch bd { - case cborBdNil: - return "nil" - case cborBdFalse: - return "false" - case cborBdTrue: - return "true" - case cborBdFloat16, cborBdFloat32, cborBdFloat64: - return "float" - case cborBdIndefiniteBytes: - return "bytes*" - case cborBdIndefiniteString: - return "string*" - case cborBdIndefiniteArray: - return "array*" - case cborBdIndefiniteMap: - return "map*" - default: - switch { - case bd >= cborBaseUint && bd < cborBaseNegInt: - return "(u)int" - case bd >= cborBaseNegInt && bd < cborBaseBytes: - return "int" - case bd >= cborBaseBytes && bd < cborBaseString: - return "bytes" - case bd >= cborBaseString && bd < cborBaseArray: - return "string" - case bd >= cborBaseArray && bd < cborBaseMap: - return "array" - case bd >= cborBaseMap && bd < cborBaseTag: - return "map" - case bd >= cborBaseTag && bd < cborBaseSimple: - return "ext" + switch bd >> 5 { + case cborMajorUint: + return "(u)int" + case cborMajorNegInt: + return "int" + case cborMajorBytes: + return "bytes" + case cborMajorString: + return "string" + case cborMajorArray: + return "array" + case cborMajorMap: + return "map" + case cborMajorTag: + return "tag" + case cborMajorSimpleOrFloat: // default + switch bd { + case cborBdNil: + return "nil" + case cborBdFalse: + return "false" + case cborBdTrue: + return "true" + case cborBdFloat16, cborBdFloat32, cborBdFloat64: + return "float" + case cborBdIndefiniteBytes: + return "bytes*" + case cborBdIndefiniteString: + return "string*" + case cborBdIndefiniteArray: + return "array*" + case cborBdIndefiniteMap: + return "map*" default: - return "unknown" + return "unknown(simple)" } } + return "unknown" } // ------------------- @@ -105,49 +115,52 @@ func cbordesc(bd byte) string { type cborEncDriver struct { noBuiltInTypes encDriverNoopContainerWriter - e *Encoder - w *encWriterSwitch h *CborHandle x [8]byte - // _ [3]uint64 // padding + _ [6]uint64 // padding + e Encoder +} + +func (e *cborEncDriver) encoder() *Encoder { + return &e.e } func (e *cborEncDriver) EncodeNil() { - e.w.writen1(cborBdNil) + e.e.encWr.writen1(cborBdNil) } func (e *cborEncDriver) EncodeBool(b bool) { if b { - e.w.writen1(cborBdTrue) + e.e.encWr.writen1(cborBdTrue) } else { - e.w.writen1(cborBdFalse) + e.e.encWr.writen1(cborBdFalse) } } func (e *cborEncDriver) EncodeFloat32(f float32) { - e.w.writen1(cborBdFloat32) - bigenHelper{e.x[:4], e.w}.writeUint32(math.Float32bits(f)) + e.e.encWr.writen1(cborBdFloat32) + bigenHelper{e.x[:4], e.e.w()}.writeUint32(math.Float32bits(f)) } func (e *cborEncDriver) EncodeFloat64(f float64) { - e.w.writen1(cborBdFloat64) - bigenHelper{e.x[:8], e.w}.writeUint64(math.Float64bits(f)) + e.e.encWr.writen1(cborBdFloat64) + bigenHelper{e.x[:8], e.e.w()}.writeUint64(math.Float64bits(f)) } func (e *cborEncDriver) encUint(v uint64, bd byte) { if v <= 0x17 { - e.w.writen1(byte(v) + bd) + e.e.encWr.writen1(byte(v) + bd) } else if v <= math.MaxUint8 { - e.w.writen2(bd+0x18, uint8(v)) + e.e.encWr.writen2(bd+0x18, uint8(v)) } else if v <= math.MaxUint16 { - e.w.writen1(bd + 0x19) - bigenHelper{e.x[:2], e.w}.writeUint16(uint16(v)) + e.e.encWr.writen1(bd + 0x19) + bigenHelper{e.x[:2], e.e.w()}.writeUint16(uint16(v)) } else if v <= math.MaxUint32 { - e.w.writen1(bd + 0x1a) - bigenHelper{e.x[:4], e.w}.writeUint32(uint32(v)) + e.e.encWr.writen1(bd + 0x1a) + bigenHelper{e.x[:4], e.e.w()}.writeUint32(uint32(v)) } else { // if v <= math.MaxUint64 { - e.w.writen1(bd + 0x1b) - bigenHelper{e.x[:8], e.w}.writeUint64(v) + e.e.encWr.writen1(bd + 0x1b) + bigenHelper{e.x[:8], e.e.w()}.writeUint64(v) } } @@ -172,7 +185,7 @@ func (e *cborEncDriver) EncodeTime(t time.Time) { e.EncodeNil() } else if e.h.TimeRFC3339 { e.encUint(0, cborBaseTag) - e.EncodeStringEnc(cUTF8, t.Format(time.RFC3339Nano)) + e.encStringBytesS(cborBaseString, t.Format(time.RFC3339Nano)) } else { e.encUint(1, cborBaseTag) t = t.UTC().Round(time.Microsecond) @@ -185,23 +198,23 @@ func (e *cborEncDriver) EncodeTime(t time.Time) { } } -func (e *cborEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) { +func (e *cborEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext) { e.encUint(uint64(xtag), cborBaseTag) - if v := ext.ConvertExt(rv); v == nil { + if ext == SelfExt { + rv2 := baseRV(rv) + e.e.encodeValue(rv2, e.h.fnNoExt(rv2.Type())) + } else if v := ext.ConvertExt(rv); v == nil { e.EncodeNil() } else { - en.encode(v) + e.e.encode(v) } } -func (e *cborEncDriver) EncodeRawExt(re *RawExt, en *Encoder) { +func (e *cborEncDriver) EncodeRawExt(re *RawExt) { e.encUint(uint64(re.Tag), cborBaseTag) // only encodes re.Value (never re.Data) - // if false && re.Data != nil { - // en.encode(re.Data) - // } else if re.Value != nil { if re.Value != nil { - en.encode(re.Value) + e.e.encode(re.Value) } else { e.EncodeNil() } @@ -209,7 +222,7 @@ func (e *cborEncDriver) EncodeRawExt(re *RawExt, en *Encoder) { func (e *cborEncDriver) WriteArrayStart(length int) { if e.h.IndefiniteLength { - e.w.writen1(cborBdIndefiniteArray) + e.e.encWr.writen1(cborBdIndefiniteArray) } else { e.encLen(cborBaseArray, length) } @@ -217,7 +230,7 @@ func (e *cborEncDriver) WriteArrayStart(length int) { func (e *cborEncDriver) WriteMapStart(length int) { if e.h.IndefiniteLength { - e.w.writen1(cborBdIndefiniteMap) + e.e.encWr.writen1(cborBdIndefiniteMap) } else { e.encLen(cborBaseMap, length) } @@ -225,32 +238,22 @@ func (e *cborEncDriver) WriteMapStart(length int) { func (e *cborEncDriver) WriteMapEnd() { if e.h.IndefiniteLength { - e.w.writen1(cborBdBreak) + e.e.encWr.writen1(cborBdBreak) } } func (e *cborEncDriver) WriteArrayEnd() { if e.h.IndefiniteLength { - e.w.writen1(cborBdBreak) + e.e.encWr.writen1(cborBdBreak) } } -func (e *cborEncDriver) EncodeString(c charEncoding, v string) { - e.encStringBytesS(cborBaseString, v) -} - -func (e *cborEncDriver) EncodeStringEnc(c charEncoding, v string) { - e.encStringBytesS(cborBaseString, v) -} - -func (e *cborEncDriver) EncodeStringBytes(c charEncoding, v []byte) { - if v == nil { - e.EncodeNil() - } else if c == cRAW { - e.encStringBytesS(cborBaseBytes, stringView(v)) - } else { - e.encStringBytesS(cborBaseString, stringView(v)) +func (e *cborEncDriver) EncodeString(v string) { + if e.h.StringToRaw { + e.EncodeStringBytesRaw(bytesView(v)) + return } + e.encStringBytesS(cborBaseString, v) } func (e *cborEncDriver) EncodeStringBytesRaw(v []byte) { @@ -264,9 +267,9 @@ func (e *cborEncDriver) EncodeStringBytesRaw(v []byte) { func (e *cborEncDriver) encStringBytesS(bb byte, v string) { if e.h.IndefiniteLength { if bb == cborBaseBytes { - e.w.writen1(cborBdIndefiniteBytes) + e.e.encWr.writen1(cborBdIndefiniteBytes) } else { - e.w.writen1(cborBdIndefiniteString) + e.e.encWr.writen1(cborBdIndefiniteString) } var vlen uint = uint(len(v)) blen := vlen / 4 @@ -278,91 +281,120 @@ func (e *cborEncDriver) encStringBytesS(bb byte, v string) { for i := uint(0); i < vlen; { var v2 string i2 := i + blen - if i2 < vlen { + if i2 >= i && i2 < vlen { v2 = v[i:i2] } else { v2 = v[i:] } e.encLen(bb, len(v2)) - e.w.writestr(v2) + e.e.encWr.writestr(v2) i = i2 } - e.w.writen1(cborBdBreak) + e.e.encWr.writen1(cborBdBreak) } else { e.encLen(bb, len(v)) - e.w.writestr(v) + e.e.encWr.writestr(v) } } // ---------------------- type cborDecDriver struct { - d *Decoder + decDriverNoopContainerReader h *CborHandle - r *decReaderSwitch - br bool // bytes reader bdRead bool bd byte + st bool // skip tags + fnil bool // found nil noBuiltInTypes - // decNoSeparator - decDriverNoopContainerReader - // _ [3]uint64 // padding + _ [6]uint64 // padding cache-aligned + d Decoder +} + +func (d *cborDecDriver) decoder() *Decoder { + return &d.d } func (d *cborDecDriver) readNextBd() { - d.bd = d.r.readn1() + d.bd = d.d.decRd.readn1() d.bdRead = true } +func (d *cborDecDriver) advanceNil() (null bool) { + d.fnil = false + if !d.bdRead { + d.readNextBd() + } + if d.bd == cborBdNil || d.bd == cborBdUndefined { + d.bdRead = false + d.fnil = true + null = true + } + return +} + +// skipTags is called to skip any tags in the stream. +// +// Since any value can be tagged, then we should call skipTags +// before any value is decoded. +// +// By definition, skipTags should not be called before +// checking for break, or nil or undefined. +func (d *cborDecDriver) skipTags() { + for d.bd>>5 == cborMajorTag { + d.decUint() + d.bd = d.d.decRd.readn1() + } +} + func (d *cborDecDriver) uncacheRead() { if d.bdRead { - d.r.unreadn1() + d.d.decRd.unreadn1() d.bdRead = false } } func (d *cborDecDriver) ContainerType() (vt valueType) { + d.fnil = false if !d.bdRead { d.readNextBd() } + if d.st { + d.skipTags() + } if d.bd == cborBdNil { + d.bdRead = false // always consume nil after seeing it in container type + d.fnil = true return valueTypeNil - } else if d.bd == cborBdIndefiniteBytes || (d.bd >= cborBaseBytes && d.bd < cborBaseString) { + } else if d.bd == cborBdIndefiniteBytes || (d.bd>>5 == cborMajorBytes) { return valueTypeBytes - } else if d.bd == cborBdIndefiniteString || (d.bd >= cborBaseString && d.bd < cborBaseArray) { + } else if d.bd == cborBdIndefiniteString || (d.bd>>5 == cborMajorString) { return valueTypeString - } else if d.bd == cborBdIndefiniteArray || (d.bd >= cborBaseArray && d.bd < cborBaseMap) { + } else if d.bd == cborBdIndefiniteArray || (d.bd>>5 == cborMajorArray) { return valueTypeArray - } else if d.bd == cborBdIndefiniteMap || (d.bd >= cborBaseMap && d.bd < cborBaseTag) { + } else if d.bd == cborBdIndefiniteMap || (d.bd>>5 == cborMajorMap) { return valueTypeMap } - // else { - // d.d.errorf("isContainerType: unsupported parameter: %v", vt) - // } return valueTypeUnset } -func (d *cborDecDriver) TryDecodeAsNil() bool { - if !d.bdRead { - d.readNextBd() - } - // treat Nil and Undefined as nil values - if d.bd == cborBdNil || d.bd == cborBdUndefined { - d.bdRead = false - return true - } - return false +func (d *cborDecDriver) Nil() bool { + return d.fnil +} + +func (d *cborDecDriver) TryNil() bool { + return d.advanceNil() } -func (d *cborDecDriver) CheckBreak() bool { +func (d *cborDecDriver) CheckBreak() (v bool) { if !d.bdRead { d.readNextBd() } if d.bd == cborBdBreak { d.bdRead = false - return true + v = true } - return false + return } func (d *cborDecDriver) decUint() (ui uint64) { @@ -371,13 +403,13 @@ func (d *cborDecDriver) decUint() (ui uint64) { ui = uint64(v) } else { if v == 0x18 { - ui = uint64(d.r.readn1()) + ui = uint64(d.d.decRd.readn1()) } else if v == 0x19 { - ui = uint64(bigen.Uint16(d.r.readx(2))) + ui = uint64(bigen.Uint16(d.d.decRd.readx(2))) } else if v == 0x1a { - ui = uint64(bigen.Uint32(d.r.readx(4))) + ui = uint64(bigen.Uint32(d.d.decRd.readx(4))) } else if v == 0x1b { - ui = uint64(bigen.Uint64(d.r.readx(8))) + ui = uint64(bigen.Uint64(d.d.decRd.readx(8))) } else { d.d.errorf("invalid descriptor decoding uint: %x/%s", d.bd, cbordesc(d.bd)) return @@ -387,72 +419,121 @@ func (d *cborDecDriver) decUint() (ui uint64) { } func (d *cborDecDriver) decCheckInteger() (neg bool) { - if !d.bdRead { - d.readNextBd() + if d.st { + d.skipTags() } major := d.bd >> 5 if major == cborMajorUint { } else if major == cborMajorNegInt { neg = true } else { - d.d.errorf("not an integer - invalid major %v from descriptor %x/%s", - major, d.bd, cbordesc(d.bd)) - return + d.d.errorf("invalid integer; got major %v from descriptor %x/%s, expected %v or %v", + major, d.bd, cbordesc(d.bd), cborMajorUint, cborMajorNegInt) } return } -func (d *cborDecDriver) DecodeInt64() (i int64) { - neg := d.decCheckInteger() - ui := d.decUint() +func cborDecInt64(ui uint64, neg bool) (i int64) { // check if this number can be converted to an int without overflow if neg { i = -(chkOvf.SignedIntV(ui + 1)) } else { i = chkOvf.SignedIntV(ui) } - d.bdRead = false return } +func (d *cborDecDriver) decLen() int { + return int(d.decUint()) +} + +func (d *cborDecDriver) decAppendIndefiniteBytes(bs []byte) []byte { + d.bdRead = false + for !d.CheckBreak() { + if major := d.bd >> 5; major != cborMajorBytes && major != cborMajorString { + d.d.errorf("invalid indefinite string/bytes; got major %v, expected %x/%s", + major, d.bd, cbordesc(d.bd)) + } + n := uint(d.decLen()) + oldLen := uint(len(bs)) + newLen := oldLen + n + if newLen > uint(cap(bs)) { + bs2 := make([]byte, newLen, 2*uint(cap(bs))+n) + copy(bs2, bs) + bs = bs2 + } else { + bs = bs[:newLen] + } + d.d.decRd.readb(bs[oldLen:newLen]) + // bs = append(bs, d.d.decRd.readn()...) + d.bdRead = false + } + d.bdRead = false + return bs +} + +func (d *cborDecDriver) DecodeInt64() (i int64) { + if d.advanceNil() { + return + } + neg := d.decCheckInteger() + ui := d.decUint() + d.bdRead = false + return cborDecInt64(ui, neg) +} + func (d *cborDecDriver) DecodeUint64() (ui uint64) { - if d.decCheckInteger() { - d.d.errorf("assigning negative signed value to unsigned type") + if d.advanceNil() { return } + if d.decCheckInteger() { + d.d.errorf("cannot assign negative signed value to unsigned type") + } ui = d.decUint() d.bdRead = false return } func (d *cborDecDriver) DecodeFloat64() (f float64) { - if !d.bdRead { - d.readNextBd() - } - if bd := d.bd; bd == cborBdFloat16 { - f = float64(math.Float32frombits(halfFloatToFloatBits(bigen.Uint16(d.r.readx(2))))) - } else if bd == cborBdFloat32 { - f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) - } else if bd == cborBdFloat64 { - f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) - } else if bd >= cborBaseUint && bd < cborBaseBytes { - f = float64(d.DecodeInt64()) - } else { - d.d.errorf("float only valid from float16/32/64 - invalid descriptor %x/%s", bd, cbordesc(bd)) + if d.advanceNil() { return } + if d.st { + d.skipTags() + } + switch d.bd { + case cborBdFloat16: + f = float64(math.Float32frombits(halfFloatToFloatBits(bigen.Uint16(d.d.decRd.readx(2))))) + case cborBdFloat32: + f = float64(math.Float32frombits(bigen.Uint32(d.d.decRd.readx(4)))) + case cborBdFloat64: + f = math.Float64frombits(bigen.Uint64(d.d.decRd.readx(8))) + default: + major := d.bd >> 5 + if major == cborMajorUint { + f = float64(cborDecInt64(d.decUint(), false)) + } else if major == cborMajorNegInt { + f = float64(cborDecInt64(d.decUint(), true)) + } else { + d.d.errorf("invalid float descriptor; got %d/%s, expected float16/32/64 or (-)int", + d.bd, cbordesc(d.bd)) + } + } d.bdRead = false return } // bool can be decoded from bool only (single byte). func (d *cborDecDriver) DecodeBool() (b bool) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return + } + if d.st { + d.skipTags() } - if bd := d.bd; bd == cborBdTrue { + if d.bd == cborBdTrue { b = true - } else if bd == cborBdFalse { + } else if d.bd == cborBdFalse { } else { d.d.errorf("not bool - %s %x/%s", msgBadDesc, d.bd, cbordesc(d.bd)) return @@ -462,67 +543,47 @@ func (d *cborDecDriver) DecodeBool() (b bool) { } func (d *cborDecDriver) ReadMapStart() (length int) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return decContainerLenNil + } + if d.st { + d.skipTags() } d.bdRead = false if d.bd == cborBdIndefiniteMap { - return -1 + return decContainerLenUnknown + } + if d.bd>>5 != cborMajorMap { + d.d.errorf("error reading map; got major type: %x, expected %x/%s", + d.bd>>5, cborMajorMap, cbordesc(d.bd)) } return d.decLen() } func (d *cborDecDriver) ReadArrayStart() (length int) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return decContainerLenNil + } + if d.st { + d.skipTags() } d.bdRead = false if d.bd == cborBdIndefiniteArray { - return -1 + return decContainerLenUnknown } - return d.decLen() -} - -func (d *cborDecDriver) decLen() int { - return int(d.decUint()) -} - -func (d *cborDecDriver) decAppendIndefiniteBytes(bs []byte) []byte { - d.bdRead = false - for { - if d.CheckBreak() { - break - } - if major := d.bd >> 5; major != cborMajorBytes && major != cborMajorText { - d.d.errorf("expect bytes/string major type in indefinite string/bytes;"+ - " got major %v from descriptor %x/%x", major, d.bd, cbordesc(d.bd)) - return nil - } - n := d.decLen() - oldLen := len(bs) - newLen := oldLen + n - if newLen > cap(bs) { - bs2 := make([]byte, newLen, 2*cap(bs)+n) - copy(bs2, bs) - bs = bs2 - } else { - bs = bs[:newLen] - } - d.r.readb(bs[oldLen:newLen]) - // bs = append(bs, d.r.readn()...) - d.bdRead = false + if d.bd>>5 != cborMajorArray { + d.d.errorf("invalid array; got major type: %x, expect: %x/%s", + d.bd>>5, cborMajorArray, cbordesc(d.bd)) } - d.bdRead = false - return bs + return d.decLen() } func (d *cborDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return } - if d.bd == cborBdNil || d.bd == cborBdUndefined { - d.bdRead = false - return nil + if d.st { + d.skipTags() } if d.bd == cborBdIndefiniteBytes || d.bd == cborBdIndefiniteString { d.bdRead = false @@ -534,25 +595,43 @@ func (d *cborDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { } return d.decAppendIndefiniteBytes(bs[:0]) } - // check if an "array" of uint8's (see ContainerType for how to infer if an array) - if d.bd == cborBdIndefiniteArray || (d.bd >= cborBaseArray && d.bd < cborBaseMap) { - bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) - return + if d.bd == cborBdIndefiniteArray { + d.bdRead = false + if zerocopy && len(bs) == 0 { + bs = d.d.b[:] + } + if bs == nil { + bs = []byte{} + } else { + bs = bs[:0] + } + for !d.CheckBreak() { + bs = append(bs, uint8(chkOvf.UintV(d.DecodeUint64(), 8))) + } + return bs + } + if d.bd>>5 == cborMajorArray { + d.bdRead = false + if zerocopy && len(bs) == 0 { + bs = d.d.b[:] + } + slen := d.decLen() + bs = usableByteSlice(bs, slen) + for i := 0; i < len(bs); i++ { + bs[i] = uint8(chkOvf.UintV(d.DecodeUint64(), 8)) + } + return bs } clen := d.decLen() d.bdRead = false if zerocopy { - if d.br { - return d.r.readx(uint(clen)) + if d.d.bytes { + return d.d.decRd.readx(uint(clen)) } else if len(bs) == 0 { bs = d.d.b[:] } } - return decByteSlice(d.r, clen, d.h.MaxInitLen, bs) -} - -func (d *cborDecDriver) DecodeString() (s string) { - return string(d.DecodeBytes(d.d.b[:], true)) + return decByteSlice(d.d.r(), clen, d.h.MaxInitLen, bs) } func (d *cborDecDriver) DecodeStringAsBytes() (s []byte) { @@ -560,22 +639,18 @@ func (d *cborDecDriver) DecodeStringAsBytes() (s []byte) { } func (d *cborDecDriver) DecodeTime() (t time.Time) { - if !d.bdRead { - d.readNextBd() - } - if d.bd == cborBdNil || d.bd == cborBdUndefined { - d.bdRead = false + if d.advanceNil() { return } + if d.bd>>5 != cborMajorTag { + d.d.errorf("error reading tag; expected major type: %x, got: %x", cborMajorTag, d.bd>>5) + } xtag := d.decUint() d.bdRead = false return d.decodeTime(xtag) } func (d *cborDecDriver) decodeTime(xtag uint64) (t time.Time) { - if !d.bdRead { - d.readNextBd() - } switch xtag { case 0: var err error @@ -583,21 +658,8 @@ func (d *cborDecDriver) decodeTime(xtag uint64) (t time.Time) { d.d.errorv(err) } case 1: - // decode an int64 or a float, and infer time.Time from there. - // for floats, round to microseconds, as that is what is guaranteed to fit well. - switch { - case d.bd == cborBdFloat16, d.bd == cborBdFloat32: - f1, f2 := math.Modf(d.DecodeFloat64()) - t = time.Unix(int64(f1), int64(f2*1e9)) - case d.bd == cborBdFloat64: - f1, f2 := math.Modf(d.DecodeFloat64()) - t = time.Unix(int64(f1), int64(f2*1e9)) - case d.bd >= cborBaseUint && d.bd < cborBaseNegInt, - d.bd >= cborBaseNegInt && d.bd < cborBaseBytes: - t = time.Unix(d.DecodeInt64(), 0) - default: - d.d.errorf("time.Time can only be decoded from a number (or RFC3339 string)") - } + f1, f2 := math.Modf(d.DecodeFloat64()) + t = time.Unix(int64(f1), int64(f2*1e9)) default: d.d.errorf("invalid tag for time.Time - expecting 0 or 1, got 0x%x", xtag) } @@ -605,13 +667,15 @@ func (d *cborDecDriver) decodeTime(xtag uint64) (t time.Time) { return } -func (d *cborDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { - if !d.bdRead { - d.readNextBd() +func (d *cborDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) { + if d.advanceNil() { + return + } + if d.bd>>5 != cborMajorTag { + d.d.errorf("error reading tag; expected major type: %x, got: %x", cborMajorTag, d.bd>>5) } - u := d.decUint() + realxtag := d.decUint() d.bdRead = false - realxtag = u if ext == nil { re := rv.(*RawExt) re.Tag = realxtag @@ -619,13 +683,13 @@ func (d *cborDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxta } else if xtag != realxtag { d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", realxtag, xtag) return + } else if ext == SelfExt { + rv2 := baseRV(rv) + d.d.decodeValue(rv2, d.h.fnNoExt(rv2.Type())) } else { - var v interface{} - d.d.decode(&v) - ext.UpdateExt(rv, v) + d.d.interfaceExtConvertAndDecode(rv, ext) } d.bdRead = false - return } func (d *cborDecDriver) DecodeNaked() { @@ -633,74 +697,78 @@ func (d *cborDecDriver) DecodeNaked() { d.readNextBd() } + d.fnil = false n := d.d.naked() var decodeFurther bool - switch d.bd { - case cborBdNil: - n.v = valueTypeNil - case cborBdFalse: - n.v = valueTypeBool - n.b = false - case cborBdTrue: - n.v = valueTypeBool - n.b = true - case cborBdFloat16, cborBdFloat32, cborBdFloat64: - n.v = valueTypeFloat - n.f = d.DecodeFloat64() - case cborBdIndefiniteBytes: - decNakedReadRawBytes(d, d.d, n, d.h.RawToString) - case cborBdIndefiniteString: + switch d.bd >> 5 { + case cborMajorUint: + if d.h.SignedInteger { + n.v = valueTypeInt + n.i = d.DecodeInt64() + } else { + n.v = valueTypeUint + n.u = d.DecodeUint64() + } + case cborMajorNegInt: + n.v = valueTypeInt + n.i = d.DecodeInt64() + case cborMajorBytes: + decNakedReadRawBytes(d, &d.d, n, d.h.RawToString) + case cborMajorString: n.v = valueTypeString - n.s = d.DecodeString() - case cborBdIndefiniteArray: + n.s = string(d.DecodeStringAsBytes()) + case cborMajorArray: n.v = valueTypeArray decodeFurther = true - case cborBdIndefiniteMap: + case cborMajorMap: n.v = valueTypeMap decodeFurther = true - default: - switch { - case d.bd >= cborBaseUint && d.bd < cborBaseNegInt: - if d.h.SignedInteger { - n.v = valueTypeInt - n.i = d.DecodeInt64() - } else { - n.v = valueTypeUint - n.u = d.DecodeUint64() - } - case d.bd >= cborBaseNegInt && d.bd < cborBaseBytes: - n.v = valueTypeInt - n.i = d.DecodeInt64() - case d.bd >= cborBaseBytes && d.bd < cborBaseString: - decNakedReadRawBytes(d, d.d, n, d.h.RawToString) - case d.bd >= cborBaseString && d.bd < cborBaseArray: + case cborMajorTag: + n.v = valueTypeExt + n.u = d.decUint() + n.l = nil + if n.u == 0 || n.u == 1 { + d.bdRead = false + n.v = valueTypeTime + n.t = d.decodeTime(n.u) + } else if d.st && d.h.getExtForTag(n.u) == nil { + // d.skipTags() // no need to call this - tags already skipped + d.bdRead = false + d.DecodeNaked() + return // return when done (as true recursive function) + } + case cborMajorSimpleOrFloat: + switch d.bd { + case cborBdNil, cborBdUndefined: + n.v = valueTypeNil + d.fnil = true + case cborBdFalse: + n.v = valueTypeBool + n.b = false + case cborBdTrue: + n.v = valueTypeBool + n.b = true + case cborBdFloat16, cborBdFloat32, cborBdFloat64: + n.v = valueTypeFloat + n.f = d.DecodeFloat64() + case cborBdIndefiniteBytes: + decNakedReadRawBytes(d, &d.d, n, d.h.RawToString) + case cborBdIndefiniteString: n.v = valueTypeString - n.s = d.DecodeString() - case d.bd >= cborBaseArray && d.bd < cborBaseMap: + n.s = string(d.DecodeStringAsBytes()) + case cborBdIndefiniteArray: n.v = valueTypeArray decodeFurther = true - case d.bd >= cborBaseMap && d.bd < cborBaseTag: + case cborBdIndefiniteMap: n.v = valueTypeMap decodeFurther = true - case d.bd >= cborBaseTag && d.bd < cborBaseSimple: - n.v = valueTypeExt - n.u = d.decUint() - n.l = nil - if n.u == 0 || n.u == 1 { - d.bdRead = false - n.v = valueTypeTime - n.t = d.decodeTime(n.u) - } - // d.bdRead = false - // d.d.decode(&re.Value) // handled by decode itself. - // decodeFurther = true default: d.d.errorf("decodeNaked: Unrecognized d.bd: 0x%x", d.bd) - return } + default: // should never happen + d.d.errorf("decodeNaked: Unrecognized d.bd: 0x%x", d.bd) } - if !decodeFurther { d.bdRead = false } @@ -725,7 +793,7 @@ func (d *cborDecDriver) DecodeNaked() { // - Encoded Text (e.g. URL, regexp, base64, MIME Message), etc. type CborHandle struct { binaryEncodingType - noElemSeparators + // noElemSeparators BasicHandle // IndefiniteLength=true, means that we encode using indefinitelength @@ -735,32 +803,43 @@ type CborHandle struct { // If unset, we encode time.Time using seconds past epoch. TimeRFC3339 bool - // _ [1]uint64 // padding + // SkipUnexpectedTags says to skip over any tags for which extensions are + // not defined. This is in keeping with the cbor spec on "Optional Tagging of Items". + // + // Furthermore, this allows the skipping over of the Self Describing Tag 0xd9d9f7. + SkipUnexpectedTags bool + + _ [7]uint64 // padding (cache-aligned) } // Name returns the name of the handle: cbor func (h *CborHandle) Name() string { return "cbor" } -// SetInterfaceExt sets an extension -func (h *CborHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { - return h.SetExt(rt, tag, &extWrapper{bytesExtFailer{}, ext}) +func (h *CborHandle) newEncDriver() encDriver { + var e = &cborEncDriver{h: h} + e.e.e = e + e.e.init(h) + e.reset() + return e } -func (h *CborHandle) newEncDriver(e *Encoder) encDriver { - return &cborEncDriver{e: e, w: e.w, h: h} -} - -func (h *CborHandle) newDecDriver(d *Decoder) decDriver { - return &cborDecDriver{d: d, h: h, r: d.r, br: d.bytes} +func (h *CborHandle) newDecDriver() decDriver { + d := &cborDecDriver{h: h, st: h.SkipUnexpectedTags} + d.d.d = d + d.d.cbor = true + d.d.init(h) + d.reset() + return d } func (e *cborEncDriver) reset() { - e.w = e.e.w } func (d *cborDecDriver) reset() { - d.r, d.br = d.d.r, d.d.bytes - d.bd, d.bdRead = 0, false + d.bd = 0 + d.bdRead = false + d.fnil = false + d.st = d.h.SkipUnexpectedTags } var _ decDriver = (*cborDecDriver)(nil) diff --git a/vendor/github.com/ugorji/go/codec/decode.go b/vendor/github.com/ugorji/go/codec/decode.go index 1f14e7a5..a33252bd 100644 --- a/vendor/github.com/ugorji/go/codec/decode.go +++ b/vendor/github.com/ugorji/go/codec/decode.go @@ -8,8 +8,8 @@ import ( "errors" "fmt" "io" + "math" "reflect" - "runtime" "strconv" "time" ) @@ -23,15 +23,37 @@ const ( const ( decDefMaxDepth = 1024 // maximum depth decDefSliceCap = 8 - decDefChanCap = 64 // should be large, as cap cannot be expanded - decScratchByteArrayLen = cacheLineSize // + (8 * 2) // - (8 * 1) + decDefChanCap = 64 // should be large, as cap cannot be expanded + decScratchByteArrayLen = (6 * 8) // ??? cacheLineSize + + + // decContainerLenUnknown is length returned from Read(Map|Array)Len + // when a format doesn't know apiori. + // For example, json doesn't pre-determine the length of a container (sequence/map). + decContainerLenUnknown = -1 + + // decContainerLenNil is length returned from Read(Map|Array)Len + // when a 'nil' was encountered in the stream. + decContainerLenNil = math.MinInt32 + + // decFailNonEmptyIntf configures whether we error + // when decoding naked into a non-empty interface. + // + // Typically, we cannot decode non-nil stream value into + // nil interface with methods (e.g. io.Reader). + // However, in some scenarios, this should be allowed: + // - MapType + // - SliceType + // - Extensions + // + // Consequently, we should relax this. Put it behind a const flag for now. + decFailNonEmptyIntf = false ) var ( errstrOnlyMapOrArrayCanDecodeIntoStruct = "only encoded map or array can be decoded into a struct" errstrCannotDecodeIntoNil = "cannot decode into nil" - errmsgExpandSliceOverflow = "expand slice: slice overflow" + // errmsgExpandSliceOverflow = "expand slice: slice overflow" errmsgExpandSliceCannotChange = "expand slice: cannot change" errDecoderNotInitialized = errors.New("Decoder not initialized") @@ -40,48 +62,23 @@ var ( errDecUnreadByteLastByteNotRead = errors.New("cannot unread - last byte has not been read") errDecUnreadByteUnknown = errors.New("cannot unread - reason unknown") errMaxDepthExceeded = errors.New("maximum decoding depth exceeded") -) - -/* -// decReader abstracts the reading source, allowing implementations that can -// read from an io.Reader or directly off a byte slice with zero-copying. -// -// Deprecated: Use decReaderSwitch instead. -type decReader interface { - unreadn1() - // readx will use the implementation scratch buffer if possible i.e. n < len(scratchbuf), OR - // just return a view of the []byte being decoded from. - // Ensure you call detachZeroCopyBytes later if this needs to be sent outside codec control. - readx(n int) []byte - readb([]byte) - readn1() uint8 - numread() uint // number of bytes read - track() - stopTrack() []byte - - // skip will skip any byte that matches, and return the first non-matching byte - skip(accept *bitset256) (token byte) - // readTo will read any byte that matches, stopping once no-longer matching. - readTo(in []byte, accept *bitset256) (out []byte) - // readUntil will read, only stopping once it matches the 'stop' byte. - readUntil(in []byte, stop byte) (out []byte) -} - -*/ + errBytesDecReaderCannotUnread = errors.New("cannot unread last byte read") +) type decDriver interface { // this will check if the next token is a break. CheckBreak() bool - // TryDecodeAsNil tries to decode as nil. - // Note: TryDecodeAsNil should be careful not to share any temporary []byte with - // the rest of the decDriver. This is because sometimes, we optimize by holding onto - // a transient []byte, and ensuring the only other call we make to the decDriver - // during that time is maybe a TryDecodeAsNil() call. - TryDecodeAsNil() bool - // ContainerType returns one of: Bytes, String, Nil, Slice or Map. Return unSet if not known. + + // TryNil tries to decode as nil. + TryNil() bool + + // ContainerType returns one of: Bytes, String, Nil, Slice or Map. + // + // Return unSet if not known. + // + // Note: Implementations MUST fully consume sentinel container types, specifically Nil. ContainerType() (vt valueType) - // IsBuiltinType(rt uintptr) bool // DecodeNaked will decode primitives (number, bool, string, []byte) and RawExt. // For maps and arrays, it will not do the decoding in-band, but will signal @@ -96,21 +93,18 @@ type decDriver interface { // kInterface will extract the detached byte slice if it has to pass it outside its realm. DecodeNaked() - // Deprecated: use DecodeInt64 and DecodeUint64 instead - // DecodeInt(bitsize uint8) (i int64) - // DecodeUint(bitsize uint8) (ui uint64) - DecodeInt64() (i int64) DecodeUint64() (ui uint64) DecodeFloat64() (f float64) DecodeBool() (b bool) - // DecodeString can also decode symbols. - // It looks redundant as DecodeBytes is available. - // However, some codecs (e.g. binc) support symbols and can - // return a pre-stored string value, meaning that it can bypass - // the cost of []byte->string conversion. - DecodeString() (s string) + + // DecodeStringAsBytes returns the bytes representing a string. + // By definition, it will return a view into a scratch buffer. + // + // Note: This can also decode symbols, if supported. + // + // Users should consume it right away and not store it for later use. DecodeStringAsBytes() (v []byte) // DecodeBytes may be called directly, without going through reflection. @@ -118,22 +112,35 @@ type decDriver interface { DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) // DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) - // decodeExt will decode into a *RawExt or into an extension. - DecodeExt(v interface{}, xtag uint64, ext Ext) (realxtag uint64) + // DecodeExt will decode into a *RawExt or into an extension. + DecodeExt(v interface{}, xtag uint64, ext Ext) // decodeExt(verifyTag bool, tag byte) (xtag byte, xbs []byte) DecodeTime() (t time.Time) + // ReadArrayStart will return the length of the array. + // If the format doesn't prefix the length, it returns decContainerLenUnknown. + // If the expected array was a nil in the stream, it returns decContainerLenNil. ReadArrayStart() int - ReadArrayElem() ReadArrayEnd() + + // ReadMapStart will return the length of the array. + // If the format doesn't prefix the length, it returns decContainerLenUnknown. + // If the expected array was a nil in the stream, it returns decContainerLenNil. ReadMapStart() int - ReadMapElemKey() - ReadMapElemValue() ReadMapEnd() reset() + atEndOfDecode() uncacheRead() + + decoder() *Decoder +} + +type decDriverContainerTracker interface { + ReadArrayElem() + ReadMapElemKey() + ReadMapElemValue() } type decodeError struct { @@ -148,15 +155,11 @@ func (d decodeError) Error() string { type decDriverNoopContainerReader struct{} func (x decDriverNoopContainerReader) ReadArrayStart() (v int) { return } -func (x decDriverNoopContainerReader) ReadArrayElem() {} func (x decDriverNoopContainerReader) ReadArrayEnd() {} func (x decDriverNoopContainerReader) ReadMapStart() (v int) { return } -func (x decDriverNoopContainerReader) ReadMapElemKey() {} -func (x decDriverNoopContainerReader) ReadMapElemValue() {} func (x decDriverNoopContainerReader) ReadMapEnd() {} func (x decDriverNoopContainerReader) CheckBreak() (v bool) { return } - -// func (x decNoSeparator) uncacheRead() {} +func (x decDriverNoopContainerReader) atEndOfDecode() {} // DecodeOptions captures configuration options during decode. type DecodeOptions struct { @@ -246,6 +249,7 @@ type DecodeOptions struct { // PreferArrayOverSlice controls whether to decode to an array or a slice. // // This only impacts decoding into a nil interface{}. + // // Consequently, it has no effect on codecgen. // // *Note*: This only applies if using go1.5 and above, @@ -256,6 +260,10 @@ type DecodeOptions struct { // // If true, we will delete the mapping of the key. // Else, just set the mapping to the zero value of the type. + // + // Deprecated: This does NOTHING and is left behind for compiling compatibility. + // This change is necessitated because 'nil' in a stream now consistently + // means the zero value (ie reset the value to its zero state). DeleteOnNilMapValue bool // RawToString controls how raw bytes in a stream are decoded into a nil interface{}. @@ -263,986 +271,136 @@ type DecodeOptions struct { RawToString bool } -// ------------------------------------------------ - -type unreadByteStatus uint8 - -// unreadByteStatus goes from -// undefined (when initialized) -- (read) --> canUnread -- (unread) --> canRead ... -const ( - unreadByteUndefined unreadByteStatus = iota - unreadByteCanRead - unreadByteCanUnread -) - -type ioDecReaderCommon struct { - r io.Reader // the reader passed in - - n uint // num read - - l byte // last byte - ls unreadByteStatus // last byte status - trb bool // tracking bytes turned on - _ bool - b [4]byte // tiny buffer for reading single bytes - - tr []byte // tracking bytes read -} - -func (z *ioDecReaderCommon) reset(r io.Reader) { - z.r = r - z.ls = unreadByteUndefined - z.l, z.n = 0, 0 - z.trb = false - if z.tr != nil { - z.tr = z.tr[:0] - } -} - -func (z *ioDecReaderCommon) numread() uint { - return z.n -} - -func (z *ioDecReaderCommon) track() { - if z.tr != nil { - z.tr = z.tr[:0] - } - z.trb = true -} - -func (z *ioDecReaderCommon) stopTrack() (bs []byte) { - z.trb = false - return z.tr -} - -// ------------------------------------------ - -// ioDecReader is a decReader that reads off an io.Reader. -// -// It also has a fallback implementation of ByteScanner if needed. -type ioDecReader struct { - ioDecReaderCommon - - rr io.Reader - br io.ByteScanner - - x [scratchByteArrayLen]byte // for: get struct field name, swallow valueTypeBytes, etc - _ [1]uint64 // padding -} - -func (z *ioDecReader) reset(r io.Reader) { - z.ioDecReaderCommon.reset(r) - - var ok bool - z.rr = r - z.br, ok = r.(io.ByteScanner) - if !ok { - z.br = z - z.rr = z - } -} - -func (z *ioDecReader) Read(p []byte) (n int, err error) { - if len(p) == 0 { - return - } - var firstByte bool - if z.ls == unreadByteCanRead { - z.ls = unreadByteCanUnread - p[0] = z.l - if len(p) == 1 { - n = 1 - return - } - firstByte = true - p = p[1:] - } - n, err = z.r.Read(p) - if n > 0 { - if err == io.EOF && n == len(p) { - err = nil // read was successful, so postpone EOF (till next time) - } - z.l = p[n-1] - z.ls = unreadByteCanUnread - } - if firstByte { - n++ - } - return -} - -func (z *ioDecReader) ReadByte() (c byte, err error) { - n, err := z.Read(z.b[:1]) - if n == 1 { - c = z.b[0] - if err == io.EOF { - err = nil // read was successful, so postpone EOF (till next time) - } - } - return -} - -func (z *ioDecReader) UnreadByte() (err error) { - switch z.ls { - case unreadByteCanUnread: - z.ls = unreadByteCanRead - case unreadByteCanRead: - err = errDecUnreadByteLastByteNotRead - case unreadByteUndefined: - err = errDecUnreadByteNothingToRead - default: - err = errDecUnreadByteUnknown - } - return -} - -func (z *ioDecReader) readx(n uint) (bs []byte) { - if n == 0 { - return - } - if n < uint(len(z.x)) { - bs = z.x[:n] - } else { - bs = make([]byte, n) - } - if _, err := decReadFull(z.rr, bs); err != nil { - panic(err) - } - z.n += uint(len(bs)) - if z.trb { - z.tr = append(z.tr, bs...) - } - return -} - -func (z *ioDecReader) readb(bs []byte) { - if len(bs) == 0 { - return - } - if _, err := decReadFull(z.rr, bs); err != nil { - panic(err) - } - z.n += uint(len(bs)) - if z.trb { - z.tr = append(z.tr, bs...) - } -} - -func (z *ioDecReader) readn1eof() (b uint8, eof bool) { - b, err := z.br.ReadByte() - if err == nil { - z.n++ - if z.trb { - z.tr = append(z.tr, b) - } - } else if err == io.EOF { - eof = true - } else { - panic(err) - } - return -} - -func (z *ioDecReader) readn1() (b uint8) { - b, err := z.br.ReadByte() - if err == nil { - z.n++ - if z.trb { - z.tr = append(z.tr, b) - } - return - } - panic(err) -} - -func (z *ioDecReader) skip(accept *bitset256) (token byte) { - var eof bool - // for { - // token, eof = z.readn1eof() - // if eof { - // return - // } - // if accept.isset(token) { - // continue - // } - // return - // } -LOOP: - token, eof = z.readn1eof() - if eof { - return - } - if accept.isset(token) { - goto LOOP - } - return -} - -func (z *ioDecReader) readTo(in []byte, accept *bitset256) []byte { - // out = in - - // for { - // token, eof := z.readn1eof() - // if eof { - // return - // } - // if accept.isset(token) { - // out = append(out, token) - // } else { - // z.unreadn1() - // return - // } - // } -LOOP: - token, eof := z.readn1eof() - if eof { - return in - } - if accept.isset(token) { - // out = append(out, token) - in = append(in, token) - goto LOOP - } - z.unreadn1() - return in -} - -func (z *ioDecReader) readUntil(in []byte, stop byte) (out []byte) { - out = in - // for { - // token, eof := z.readn1eof() - // if eof { - // panic(io.EOF) - // } - // out = append(out, token) - // if token == stop { - // return - // } - // } -LOOP: - token, eof := z.readn1eof() - if eof { - panic(io.EOF) - } - out = append(out, token) - if token == stop { - return - } - goto LOOP -} - -//go:noinline -func (z *ioDecReader) unreadn1() { - err := z.br.UnreadByte() - if err != nil { - panic(err) - } - z.n-- - if z.trb { - if l := len(z.tr) - 1; l >= 0 { - z.tr = z.tr[:l] - } - } -} - -// ------------------------------------ - -type bufioDecReader struct { - ioDecReaderCommon - - c uint // cursor - buf []byte - - bytesBufPooler - - // err error - - // Extensions can call Decode() within a current Decode() call. - // We need to know when the top level Decode() call returns, - // so we can decide whether to Release() or not. - calls uint16 // what depth in mustDecode are we in now. - - _ [6]uint8 // padding - - _ [1]uint64 // padding -} - -func (z *bufioDecReader) reset(r io.Reader, bufsize int) { - z.ioDecReaderCommon.reset(r) - z.c = 0 - z.calls = 0 - if cap(z.buf) >= bufsize { - z.buf = z.buf[:0] - } else { - z.buf = z.bytesBufPooler.get(bufsize)[:0] - // z.buf = make([]byte, 0, bufsize) - } -} - -func (z *bufioDecReader) release() { - z.buf = nil - z.bytesBufPooler.end() -} - -func (z *bufioDecReader) readb(p []byte) { - var n = uint(copy(p, z.buf[z.c:])) - z.n += n - z.c += n - if len(p) == int(n) { - if z.trb { - z.tr = append(z.tr, p...) // cost=9 - } - } else { - z.readbFill(p, n) - } -} - -//go:noinline - fallback when z.buf is consumed -func (z *bufioDecReader) readbFill(p0 []byte, n uint) { - // at this point, there's nothing in z.buf to read (z.buf is fully consumed) - p := p0[n:] - var n2 uint - var err error - if len(p) > cap(z.buf) { - n2, err = decReadFull(z.r, p) - if err != nil { - panic(err) - } - n += n2 - z.n += n2 - // always keep last byte in z.buf - z.buf = z.buf[:1] - z.buf[0] = p[len(p)-1] - z.c = 1 - if z.trb { - z.tr = append(z.tr, p0[:n]...) - } - return - } - // z.c is now 0, and len(p) <= cap(z.buf) -LOOP: - // for len(p) > 0 && z.err == nil { - if len(p) > 0 { - z.buf = z.buf[0:cap(z.buf)] - var n1 int - n1, err = z.r.Read(z.buf) - n2 = uint(n1) - if n2 == 0 && err != nil { - panic(err) - } - z.buf = z.buf[:n2] - n2 = uint(copy(p, z.buf)) - z.c = n2 - n += n2 - z.n += n2 - p = p[n2:] - goto LOOP - } - if z.c == 0 { - z.buf = z.buf[:1] - z.buf[0] = p[len(p)-1] - z.c = 1 - } - if z.trb { - z.tr = append(z.tr, p0[:n]...) - } -} - -func (z *bufioDecReader) readn1() (b byte) { - // fast-path, so we elide calling into Read() most of the time - if z.c < uint(len(z.buf)) { - b = z.buf[z.c] - z.c++ - z.n++ - if z.trb { - z.tr = append(z.tr, b) - } - } else { // meaning z.c == len(z.buf) or greater ... so need to fill - z.readbFill(z.b[:1], 0) - b = z.b[0] - } - return -} - -func (z *bufioDecReader) unreadn1() { - if z.c == 0 { - panic(errDecUnreadByteNothingToRead) - } - z.c-- - z.n-- - if z.trb { - z.tr = z.tr[:len(z.tr)-1] - } -} - -func (z *bufioDecReader) readx(n uint) (bs []byte) { - if n == 0 { - // return - } else if z.c+n <= uint(len(z.buf)) { - bs = z.buf[z.c : z.c+n] - z.n += n - z.c += n - if z.trb { - z.tr = append(z.tr, bs...) - } - } else { - bs = make([]byte, n) - // n no longer used - can reuse - n = uint(copy(bs, z.buf[z.c:])) - z.n += n - z.c += n - z.readbFill(bs, n) - } - return -} +// ---------------------------------------- -//go:noinline - track called by Decoder.nextValueBytes() (called by jsonUnmarshal,rawBytes) -func (z *bufioDecReader) doTrack(y uint) { - z.tr = append(z.tr, z.buf[z.c:y]...) // cost=14??? +func (d *Decoder) rawExt(f *codecFnInfo, rv reflect.Value) { + d.d.DecodeExt(rv2i(rv), 0, nil) } -func (z *bufioDecReader) skipLoopFn(i uint) { - z.n += (i - z.c) - 1 - i++ - if z.trb { - // z.tr = append(z.tr, z.buf[z.c:i]...) - z.doTrack(i) - } - z.c = i +func (d *Decoder) ext(f *codecFnInfo, rv reflect.Value) { + d.d.DecodeExt(rv2i(rv), f.xfTag, f.xfFn) } -func (z *bufioDecReader) skip(accept *bitset256) (token byte) { - // token, _ = z.search(nil, accept, 0, 1); return - - // for i := z.c; i < len(z.buf); i++ { - // if token = z.buf[i]; !accept.isset(token) { - // z.skipLoopFn(i) - // return - // } - // } - - i := z.c -LOOP: - if i < uint(len(z.buf)) { - // inline z.skipLoopFn(i) and refactor, so cost is within inline budget - token = z.buf[i] - i++ - if accept.isset(token) { - goto LOOP - } - z.n += i - 2 - z.c - if z.trb { - z.doTrack(i) - } - z.c = i - return - } - return z.skipFill(accept) +func (d *Decoder) selferUnmarshal(f *codecFnInfo, rv reflect.Value) { + rv2i(rv).(Selfer).CodecDecodeSelf(d) } -func (z *bufioDecReader) skipFill(accept *bitset256) (token byte) { - z.n += uint(len(z.buf)) - z.c - if z.trb { - z.tr = append(z.tr, z.buf[z.c:]...) - } - var n2 int - var err error - for { - z.c = 0 - z.buf = z.buf[0:cap(z.buf)] - n2, err = z.r.Read(z.buf) - if n2 == 0 && err != nil { - panic(err) - } - z.buf = z.buf[:n2] - var i int - for i, token = range z.buf { - if !accept.isset(token) { - z.skipLoopFn(uint(i)) - return - } - } - // for i := 0; i < n2; i++ { - // if token = z.buf[i]; !accept.isset(token) { - // z.skipLoopFn(i) - // return - // } - // } - z.n += uint(n2) - if z.trb { - z.tr = append(z.tr, z.buf...) - } +func (d *Decoder) binaryUnmarshal(f *codecFnInfo, rv reflect.Value) { + bm := rv2i(rv).(encoding.BinaryUnmarshaler) + xbs := d.d.DecodeBytes(nil, true) + if fnerr := bm.UnmarshalBinary(xbs); fnerr != nil { + panic(fnerr) } } -func (z *bufioDecReader) readToLoopFn(i uint, out0 []byte) (out []byte) { - // out0 is never nil - z.n += (i - z.c) - 1 - out = append(out0, z.buf[z.c:i]...) - if z.trb { - z.doTrack(i) +func (d *Decoder) textUnmarshal(f *codecFnInfo, rv reflect.Value) { + tm := rv2i(rv).(encoding.TextUnmarshaler) + fnerr := tm.UnmarshalText(d.d.DecodeStringAsBytes()) + if fnerr != nil { + panic(fnerr) } - z.c = i - return } -func (z *bufioDecReader) readTo(in []byte, accept *bitset256) (out []byte) { - // _, out = z.search(in, accept, 0, 2); return - - // for i := z.c; i < len(z.buf); i++ { - // if !accept.isset(z.buf[i]) { - // return z.readToLoopFn(i, nil) - // } - // } - - i := z.c -LOOP: - if i < uint(len(z.buf)) { - if !accept.isset(z.buf[i]) { - // return z.readToLoopFn(i, nil) - // inline readToLoopFn here (for performance) - z.n += (i - z.c) - 1 - out = z.buf[z.c:i] - if z.trb { - z.doTrack(i) - } - z.c = i - return - } - i++ - goto LOOP +func (d *Decoder) jsonUnmarshal(f *codecFnInfo, rv reflect.Value) { + tm := rv2i(rv).(jsonUnmarshaler) + // bs := d.d.DecodeBytes(d.b[:], true, true) + // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. + fnerr := tm.UnmarshalJSON(d.nextValueBytes()) + if fnerr != nil { + panic(fnerr) } - return z.readToFill(in, accept) } -func (z *bufioDecReader) readToFill(in []byte, accept *bitset256) (out []byte) { - z.n += uint(len(z.buf)) - z.c - out = append(in, z.buf[z.c:]...) - if z.trb { - z.tr = append(z.tr, z.buf[z.c:]...) - } - var n2 int - var err error - for { - z.c = 0 - z.buf = z.buf[0:cap(z.buf)] - n2, err = z.r.Read(z.buf) - if n2 == 0 && err != nil { - if err == io.EOF { - return // readTo should read until it matches or end is reached - } - panic(err) - } - z.buf = z.buf[:n2] - for i, token := range z.buf { - if !accept.isset(token) { - return z.readToLoopFn(uint(i), out) - } - } - // for i := 0; i < n2; i++ { - // if !accept.isset(z.buf[i]) { - // return z.readToLoopFn(i, out) - // } - // } - out = append(out, z.buf...) - z.n += uint(n2) - if z.trb { - z.tr = append(z.tr, z.buf...) - } - } +func (d *Decoder) kErr(f *codecFnInfo, rv reflect.Value) { + d.errorf("no decoding function defined for kind %v", rv.Kind()) } -func (z *bufioDecReader) readUntilLoopFn(i uint, out0 []byte) (out []byte) { - z.n += (i - z.c) - 1 - i++ - out = append(out0, z.buf[z.c:i]...) - if z.trb { - // z.tr = append(z.tr, z.buf[z.c:i]...) - z.doTrack(i) - } - z.c = i - return +func (d *Decoder) raw(f *codecFnInfo, rv reflect.Value) { + rvSetBytes(rv, d.rawBytes()) } -func (z *bufioDecReader) readUntil(in []byte, stop byte) (out []byte) { - // _, out = z.search(in, nil, stop, 4); return - - // for i := z.c; i < len(z.buf); i++ { - // if z.buf[i] == stop { - // return z.readUntilLoopFn(i, nil) - // } - // } - - i := z.c -LOOP: - if i < uint(len(z.buf)) { - if z.buf[i] == stop { - // inline readUntilLoopFn - // return z.readUntilLoopFn(i, nil) - z.n += (i - z.c) - 1 - i++ - out = z.buf[z.c:i] - if z.trb { - z.doTrack(i) - } - z.c = i - return - } - i++ - goto LOOP - } - return z.readUntilFill(in, stop) -} - -func (z *bufioDecReader) readUntilFill(in []byte, stop byte) (out []byte) { - z.n += uint(len(z.buf)) - z.c - out = append(in, z.buf[z.c:]...) - if z.trb { - z.tr = append(z.tr, z.buf[z.c:]...) - } - var n1 int - var n2 uint - var err error - for { - z.c = 0 - z.buf = z.buf[0:cap(z.buf)] - n1, err = z.r.Read(z.buf) - n2 = uint(n1) - if n2 == 0 && err != nil { - panic(err) - } - z.buf = z.buf[:n2] - for i, token := range z.buf { - if token == stop { - return z.readUntilLoopFn(uint(i), out) - } - } - // for i := 0; i < n2; i++ { - // if z.buf[i] == stop { - // return z.readUntilLoopFn(i, out) - // } - // } - out = append(out, z.buf...) - z.n += n2 - if z.trb { - z.tr = append(z.tr, z.buf...) - } - } +func (d *Decoder) kString(f *codecFnInfo, rv reflect.Value) { + rvSetString(rv, string(d.d.DecodeStringAsBytes())) } -// ------------------------------------ - -var errBytesDecReaderCannotUnread = errors.New("cannot unread last byte read") - -// bytesDecReader is a decReader that reads off a byte slice with zero copying -type bytesDecReader struct { - b []byte // data - c uint // cursor - t uint // track start - // a int // available +func (d *Decoder) kBool(f *codecFnInfo, rv reflect.Value) { + rvSetBool(rv, d.d.DecodeBool()) } -func (z *bytesDecReader) reset(in []byte) { - z.b = in - // z.a = len(in) - z.c = 0 - z.t = 0 +func (d *Decoder) kTime(f *codecFnInfo, rv reflect.Value) { + rvSetTime(rv, d.d.DecodeTime()) } -func (z *bytesDecReader) numread() uint { - return z.c +func (d *Decoder) kFloat32(f *codecFnInfo, rv reflect.Value) { + rvSetFloat32(rv, d.decodeFloat32()) } -func (z *bytesDecReader) unreadn1() { - if z.c == 0 || len(z.b) == 0 { - panic(errBytesDecReaderCannotUnread) - } - z.c-- - // z.a++ +func (d *Decoder) kFloat64(f *codecFnInfo, rv reflect.Value) { + rvSetFloat64(rv, d.d.DecodeFloat64()) } -func (z *bytesDecReader) readx(n uint) (bs []byte) { - // slicing from a non-constant start position is more expensive, - // as more computation is required to decipher the pointer start position. - // However, we do it only once, and it's better than reslicing both z.b and return value. - - // if n <= 0 { - // } else if z.a == 0 { - // panic(io.EOF) - // } else if n > z.a { - // panic(io.ErrUnexpectedEOF) - // } else { - // c0 := z.c - // z.c = c0 + n - // z.a = z.a - n - // bs = z.b[c0:z.c] - // } - // return - - if n != 0 { - z.c += n - if z.c > uint(len(z.b)) { - z.c = uint(len(z.b)) - panic(io.EOF) - } - bs = z.b[z.c-n : z.c] - } - return - - // if n == 0 { - // } else if z.c+n > uint(len(z.b)) { - // z.c = uint(len(z.b)) - // panic(io.EOF) - // } else { - // z.c += n - // bs = z.b[z.c-n : z.c] - // } - // return - - // if n == 0 { - // return - // } - // if z.c == uint(len(z.b)) { - // panic(io.EOF) - // } - // if z.c+n > uint(len(z.b)) { - // panic(io.ErrUnexpectedEOF) - // } - // // z.a -= n - // z.c += n - // return z.b[z.c-n : z.c] -} - -func (z *bytesDecReader) readb(bs []byte) { - copy(bs, z.readx(uint(len(bs)))) -} - -func (z *bytesDecReader) readn1() (v uint8) { - if z.c == uint(len(z.b)) { - panic(io.EOF) - } - v = z.b[z.c] - z.c++ - // z.a-- - return +func (d *Decoder) kInt(f *codecFnInfo, rv reflect.Value) { + rvSetInt(rv, int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize))) } -// func (z *bytesDecReader) readn1eof() (v uint8, eof bool) { -// if z.a == 0 { -// eof = true -// return -// } -// v = z.b[z.c] -// z.c++ -// z.a-- -// return -// } - -func (z *bytesDecReader) skip(accept *bitset256) (token byte) { - i := z.c - // if i == len(z.b) { - // goto END - // // panic(io.EOF) - // } - - // Replace loop with goto construct, so that this can be inlined - // for i := z.c; i < blen; i++ { - // if !accept.isset(z.b[i]) { - // token = z.b[i] - // i++ - // z.a -= (i - z.c) - // z.c = i - // return - // } - // } - - // i := z.c -LOOP: - if i < uint(len(z.b)) { - token = z.b[i] - i++ - if accept.isset(token) { - goto LOOP - } - // z.a -= (i - z.c) - z.c = i - return - } - // END: - panic(io.EOF) - // // z.a = 0 - // z.c = blen - // return -} - -func (z *bytesDecReader) readTo(_ []byte, accept *bitset256) (out []byte) { - return z.readToNoInput(accept) -} - -func (z *bytesDecReader) readToNoInput(accept *bitset256) (out []byte) { - i := z.c - if i == uint(len(z.b)) { - panic(io.EOF) - } - - // Replace loop with goto construct, so that this can be inlined - // for i := z.c; i < blen; i++ { - // if !accept.isset(z.b[i]) { - // out = z.b[z.c:i] - // z.a -= (i - z.c) - // z.c = i - // return - // } - // } - // out = z.b[z.c:] - // z.a, z.c = 0, blen - // return - - // i := z.c - // LOOP: - // if i < blen { - // if accept.isset(z.b[i]) { - // i++ - // goto LOOP - // } - // out = z.b[z.c:i] - // z.a -= (i - z.c) - // z.c = i - // return - // } - // out = z.b[z.c:] - // // z.a, z.c = 0, blen - // z.a = 0 - // z.c = blen - // return - - // c := i -LOOP: - if i < uint(len(z.b)) { - if accept.isset(z.b[i]) { - i++ - goto LOOP - } - } - - out = z.b[z.c:i] - // z.a -= (i - z.c) - z.c = i - return // z.b[c:i] - // z.c, i = i, z.c - // return z.b[i:z.c] -} - -func (z *bytesDecReader) readUntil(_ []byte, stop byte) (out []byte) { - return z.readUntilNoInput(stop) -} - -func (z *bytesDecReader) readUntilNoInput(stop byte) (out []byte) { - i := z.c - // if i == len(z.b) { - // panic(io.EOF) - // } - - // Replace loop with goto construct, so that this can be inlined - // for i := z.c; i < blen; i++ { - // if z.b[i] == stop { - // i++ - // out = z.b[z.c:i] - // z.a -= (i - z.c) - // z.c = i - // return - // } - // } -LOOP: - if i < uint(len(z.b)) { - if z.b[i] == stop { - i++ - out = z.b[z.c:i] - // z.a -= (i - z.c) - z.c = i - return - } - i++ - goto LOOP - } - // z.a = 0 - // z.c = blen - panic(io.EOF) +func (d *Decoder) kInt8(f *codecFnInfo, rv reflect.Value) { + rvSetInt8(rv, int8(chkOvf.IntV(d.d.DecodeInt64(), 8))) } -func (z *bytesDecReader) track() { - z.t = z.c +func (d *Decoder) kInt16(f *codecFnInfo, rv reflect.Value) { + rvSetInt16(rv, int16(chkOvf.IntV(d.d.DecodeInt64(), 16))) } -func (z *bytesDecReader) stopTrack() (bs []byte) { - return z.b[z.t:z.c] +func (d *Decoder) kInt32(f *codecFnInfo, rv reflect.Value) { + rvSetInt32(rv, int32(chkOvf.IntV(d.d.DecodeInt64(), 32))) } -// ---------------------------------------- - -// func (d *Decoder) builtin(f *codecFnInfo, rv reflect.Value) { -// d.d.DecodeBuiltin(f.ti.rtid, rv2i(rv)) -// } - -func (d *Decoder) rawExt(f *codecFnInfo, rv reflect.Value) { - d.d.DecodeExt(rv2i(rv), 0, nil) +func (d *Decoder) kInt64(f *codecFnInfo, rv reflect.Value) { + rvSetInt64(rv, d.d.DecodeInt64()) } -func (d *Decoder) ext(f *codecFnInfo, rv reflect.Value) { - d.d.DecodeExt(rv2i(rv), f.xfTag, f.xfFn) +func (d *Decoder) kUint(f *codecFnInfo, rv reflect.Value) { + rvSetUint(rv, uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize))) } -func (d *Decoder) selferUnmarshal(f *codecFnInfo, rv reflect.Value) { - rv2i(rv).(Selfer).CodecDecodeSelf(d) +func (d *Decoder) kUintptr(f *codecFnInfo, rv reflect.Value) { + rvSetUintptr(rv, uintptr(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize))) } -func (d *Decoder) binaryUnmarshal(f *codecFnInfo, rv reflect.Value) { - bm := rv2i(rv).(encoding.BinaryUnmarshaler) - xbs := d.d.DecodeBytes(nil, true) - if fnerr := bm.UnmarshalBinary(xbs); fnerr != nil { - panic(fnerr) - } +func (d *Decoder) kUint8(f *codecFnInfo, rv reflect.Value) { + rvSetUint8(rv, uint8(chkOvf.UintV(d.d.DecodeUint64(), 8))) } -func (d *Decoder) textUnmarshal(f *codecFnInfo, rv reflect.Value) { - tm := rv2i(rv).(encoding.TextUnmarshaler) - fnerr := tm.UnmarshalText(d.d.DecodeStringAsBytes()) - if fnerr != nil { - panic(fnerr) - } +func (d *Decoder) kUint16(f *codecFnInfo, rv reflect.Value) { + rvSetUint16(rv, uint16(chkOvf.UintV(d.d.DecodeUint64(), 16))) } -func (d *Decoder) jsonUnmarshal(f *codecFnInfo, rv reflect.Value) { - tm := rv2i(rv).(jsonUnmarshaler) - // bs := d.d.DecodeBytes(d.b[:], true, true) - // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. - fnerr := tm.UnmarshalJSON(d.nextValueBytes()) - if fnerr != nil { - panic(fnerr) - } +func (d *Decoder) kUint32(f *codecFnInfo, rv reflect.Value) { + rvSetUint32(rv, uint32(chkOvf.UintV(d.d.DecodeUint64(), 32))) } -func (d *Decoder) kErr(f *codecFnInfo, rv reflect.Value) { - d.errorf("no decoding function defined for kind %v", rv.Kind()) +func (d *Decoder) kUint64(f *codecFnInfo, rv reflect.Value) { + rvSetUint64(rv, d.d.DecodeUint64()) } -// var kIntfCtr uint64 - func (d *Decoder) kInterfaceNaked(f *codecFnInfo) (rvn reflect.Value) { // nil interface: // use some hieristics to decode it appropriately // based on the detected next value in the stream. n := d.naked() d.d.DecodeNaked() - if n.v == valueTypeNil { - return - } + // We cannot decode non-nil stream value into nil interface with methods (e.g. io.Reader). - if f.ti.numMeth > 0 { + // Howver, it is possible that the user has ways to pass in a type for a given interface + // - MapType + // - SliceType + // - Extensions + // + // Consequently, we should relax this. Put it behind a const flag for now. + if decFailNonEmptyIntf && f.ti.numMeth > 0 { d.errorf("cannot decode non-nil codec value into nil %v (%v methods)", f.ti.rt, f.ti.numMeth) return } - // var useRvn bool switch n.v { case valueTypeMap: // if json, default to a map type with string keys @@ -1257,64 +415,76 @@ func (d *Decoder) kInterfaceNaked(f *codecFnInfo) (rvn reflect.Value) { if mtid == mapIntfIntfTypId { var v2 map[interface{}]interface{} d.decode(&v2) - rvn = reflect.ValueOf(&v2).Elem() + rvn = rv4i(&v2).Elem() } else if mtid == mapStrIntfTypId { // for json performance var v2 map[string]interface{} d.decode(&v2) - rvn = reflect.ValueOf(&v2).Elem() + rvn = rv4i(&v2).Elem() } else { if d.mtr { rvn = reflect.New(d.h.MapType) d.decode(rv2i(rvn)) rvn = rvn.Elem() } else { - rvn = reflect.New(d.h.MapType).Elem() - d.decodeValue(rvn, nil, true) + rvn = rvZeroAddrK(d.h.MapType, reflect.Map) + d.decodeValue(rvn, nil) } } case valueTypeArray: if d.stid == 0 || d.stid == intfSliceTypId { var v2 []interface{} d.decode(&v2) - rvn = reflect.ValueOf(&v2).Elem() - if reflectArrayOfSupported && d.stid == 0 && d.h.PreferArrayOverSlice { - rvn2 := reflect.New(reflectArrayOf(rvn.Len(), intfTyp)).Elem() - reflect.Copy(rvn2, rvn) - rvn = rvn2 - } + rvn = rv4i(&v2).Elem() } else { if d.str { rvn = reflect.New(d.h.SliceType) d.decode(rv2i(rvn)) rvn = rvn.Elem() } else { - rvn = reflect.New(d.h.SliceType).Elem() - d.decodeValue(rvn, nil, true) + rvn = rvZeroAddrK(d.h.SliceType, reflect.Slice) + d.decodeValue(rvn, nil) } } + if reflectArrayOfSupported && d.h.PreferArrayOverSlice { + rvn = rvGetArray4Slice(rvn) + } case valueTypeExt: - var v interface{} tag, bytes := n.u, n.l // calling decode below might taint the values - if bytes == nil { - d.decode(&v) - } bfn := d.h.getExtForTag(tag) - if bfn == nil { - var re RawExt - re.Tag = tag - re.Data = detachZeroCopyBytes(d.bytes, nil, bytes) - re.Value = v - rvn = reflect.ValueOf(&re).Elem() + var re = RawExt{Tag: tag} + if bytes == nil { + // it is one of the InterfaceExt ones: json and cbor. + // most likely cbor, as json decoding never reveals valueTypeExt (no tagging support) + if bfn == nil { + d.decode(&re.Value) + rvn = rv4i(&re).Elem() + } else { + if bfn.ext == SelfExt { + rvn = rvZeroAddrK(bfn.rt, bfn.rt.Kind()) + d.decodeValue(rvn, d.h.fnNoExt(bfn.rt)) + } else { + rvn = reflect.New(bfn.rt) + d.interfaceExtConvertAndDecode(rv2i(rvn), bfn.ext) + rvn = rvn.Elem() + } + } } else { - rvnA := reflect.New(bfn.rt) - if bytes != nil { - bfn.ext.ReadExt(rv2i(rvnA), bytes) + // one of the BytesExt ones: binc, msgpack, simple + if bfn == nil { + re.Data = detachZeroCopyBytes(d.bytes, nil, bytes) + rvn = rv4i(&re).Elem() } else { - bfn.ext.UpdateExt(rv2i(rvnA), v) + rvn = reflect.New(bfn.rt) + if bfn.ext == SelfExt { + d.sideDecode(rv2i(rvn), bytes) + } else { + bfn.ext.ReadExt(rv2i(rvn), bytes) + } + rvn = rvn.Elem() } - rvn = rvnA.Elem() } case valueTypeNil: + // rvn = reflect.Zero(f.ti.rt) // no-op case valueTypeInt: rvn = n.ri() @@ -1345,18 +515,21 @@ func (d *Decoder) kInterface(f *codecFnInfo, rv reflect.Value) { // every interface passed here MUST be settable. var rvn reflect.Value - if rv.IsNil() || d.h.InterfaceReset { + if rvIsNil(rv) || d.h.InterfaceReset { // check if mapping to a type: if so, initialize it and move on rvn = d.h.intf2impl(f.ti.rtid) if rvn.IsValid() { rv.Set(rvn) } else { rvn = d.kInterfaceNaked(f) + // xdebugf("kInterface: %v", rvn) if rvn.IsValid() { rv.Set(rvn) } else if d.h.InterfaceReset { // reset to zero value based on current type in there. - rv.Set(reflect.Zero(rv.Elem().Type())) + if rvelem := rv.Elem(); rvelem.IsValid() { + rv.Set(reflect.Zero(rvelem.Type())) + } } return } @@ -1364,25 +537,20 @@ func (d *Decoder) kInterface(f *codecFnInfo, rv reflect.Value) { // now we have a non-nil interface value, meaning it contains a type rvn = rv.Elem() } - if d.d.TryDecodeAsNil() { - rv.Set(reflect.Zero(rvn.Type())) - return - } // Note: interface{} is settable, but underlying type may not be. // Consequently, we MAY have to create a decodable value out of the underlying value, // decode into it, and reset the interface itself. // fmt.Printf(">>>> kInterface: rvn type: %v, rv type: %v\n", rvn.Type(), rv.Type()) - rvn2, canDecode := isDecodeable(rvn) - if canDecode { - d.decodeValue(rvn2, nil, true) + if isDecodeable(rvn) { + d.decodeValue(rvn, nil) return } - rvn2 = reflect.New(rvn.Type()).Elem() - rvn2.Set(rvn) - d.decodeValue(rvn2, nil, true) + rvn2 := rvZeroAddrK(rvn.Type(), rvn.Kind()) + rvSetDirect(rvn2, rvn) + d.decodeValue(rvn2, nil) rv.Set(rvn2) } @@ -1401,47 +569,39 @@ func decStructFieldKey(dd decDriver, keyType valueType, b *[decScratchByteArrayL } else { rvkencname = dd.DecodeStringAsBytes() } - return rvkencname + return } func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { - fti := f.ti - dd := d.d - elemsep := d.esep sfn := structFieldNode{v: rv, update: true} - ctyp := dd.ContainerType() + ctyp := d.d.ContainerType() + if ctyp == valueTypeNil { + rvSetDirect(rv, f.ti.rv0) + return + } var mf MissingFielder - if fti.mf { + if f.ti.isFlag(tiflagMissingFielder) { mf = rv2i(rv).(MissingFielder) - } else if fti.mfp { + } else if f.ti.isFlag(tiflagMissingFielderPtr) { mf = rv2i(rv.Addr()).(MissingFielder) } if ctyp == valueTypeMap { - containerLen := dd.ReadMapStart() + containerLen := d.mapStart() if containerLen == 0 { - dd.ReadMapEnd() + d.mapEnd() return } - d.depthIncr() - tisfi := fti.sfiSort + tisfi := f.ti.sfiSort hasLen := containerLen >= 0 var rvkencname []byte - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if elemsep { - dd.ReadMapElemKey() - } - rvkencname = decStructFieldKey(dd, fti.keyType, &d.b) - if elemsep { - dd.ReadMapElemValue() - } - if k := fti.indexForEncName(rvkencname); k > -1 { + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + rvkencname = decStructFieldKey(d.d, f.ti.keyType, &d.b) + d.mapElemValue() + if k := f.ti.indexForEncName(rvkencname); k > -1 { si := tisfi[k] - if dd.TryDecodeAsNil() { - si.setToZeroValue(rv) - } else { - d.decodeValue(sfn.field(si), nil, true) - } + d.decodeValue(sfn.field(si), nil) } else if mf != nil { // store rvkencname in new []byte, as it previously shares Decoder.b, which is used in decode name2 := rvkencname @@ -1449,9 +609,7 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { copy(rvkencname, name2) var f interface{} - // xdebugf("kStruct: mf != nil: before decode: rvkencname: %s", rvkencname) d.decode(&f) - // xdebugf("kStruct: mf != nil: after decode: rvkencname: %s", rvkencname) if !mf.CodecMissingField(rvkencname, f) && d.h.ErrorIfNoField { d.errorf("no matching struct field found when decoding stream map with key: %s ", stringView(rvkencname)) @@ -1461,50 +619,39 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { } // keepAlive4StringView(rvkencnameB) // not needed, as reference is outside loop } - dd.ReadMapEnd() - d.depthDecr() + d.mapEnd() } else if ctyp == valueTypeArray { - containerLen := dd.ReadArrayStart() + containerLen := d.arrayStart() if containerLen == 0 { - dd.ReadArrayEnd() + d.arrayEnd() return } - d.depthIncr() // Not much gain from doing it two ways for array. // Arrays are not used as much for structs. hasLen := containerLen >= 0 var checkbreak bool - for j, si := range fti.sfiSrc { + for j, si := range f.ti.sfiSrc { if hasLen && j == containerLen { break } - if !hasLen && dd.CheckBreak() { + if !hasLen && d.checkBreak() { checkbreak = true break } - if elemsep { - dd.ReadArrayElem() - } - if dd.TryDecodeAsNil() { - si.setToZeroValue(rv) - } else { - d.decodeValue(sfn.field(si), nil, true) - } + d.arrayElem() + d.decodeValue(sfn.field(si), nil) } - if (hasLen && containerLen > len(fti.sfiSrc)) || (!hasLen && !checkbreak) { + if (hasLen && containerLen > len(f.ti.sfiSrc)) || (!hasLen && !checkbreak) { // read remaining values and throw away - for j := len(fti.sfiSrc); ; j++ { - if (hasLen && j == containerLen) || (!hasLen && dd.CheckBreak()) { + for j := len(f.ti.sfiSrc); ; j++ { + if (hasLen && j == containerLen) || (!hasLen && d.checkBreak()) { break } - if elemsep { - dd.ReadArrayElem() - } + d.arrayElem() d.structFieldNotFound(j, "") } } - dd.ReadArrayEnd() - d.depthDecr() + d.arrayEnd() } else { d.errorstr(errstrOnlyMapOrArrayCanDecodeIntoStruct) return @@ -1514,68 +661,50 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { // A slice can be set from a map or array in stream. // This way, the order can be kept (as order is lost with map). - ti := f.ti - if f.seq == seqTypeChan && ti.chandir&uint8(reflect.SendDir) == 0 { - d.errorf("receive-only channel cannot be decoded") + + // Note: rv is a slice type here - guaranteed + + rtelem0 := f.ti.elem + ctyp := d.d.ContainerType() + if ctyp == valueTypeNil { + if rv.CanSet() { + rvSetDirect(rv, f.ti.rv0) + } + return } - dd := d.d - rtelem0 := ti.elem - ctyp := dd.ContainerType() if ctyp == valueTypeBytes || ctyp == valueTypeString { // you can only decode bytes or string in the stream into a slice or array of bytes - if !(ti.rtid == uint8SliceTypId || rtelem0.Kind() == reflect.Uint8) { - d.errorf("bytes/string in stream must decode into slice/array of bytes, not %v", ti.rt) + if !(f.ti.rtid == uint8SliceTypId || rtelem0.Kind() == reflect.Uint8) { + d.errorf("bytes/string in stream must decode into slice/array of bytes, not %v", f.ti.rt) } - if f.seq == seqTypeChan { - bs2 := dd.DecodeBytes(nil, true) - irv := rv2i(rv) - ch, ok := irv.(chan<- byte) - if !ok { - ch = irv.(chan byte) - } - for _, b := range bs2 { - ch <- b - } - } else { - rvbs := rv.Bytes() - bs2 := dd.DecodeBytes(rvbs, false) - // if rvbs == nil && bs2 != nil || rvbs != nil && bs2 == nil || len(bs2) != len(rvbs) { - if !(len(bs2) > 0 && len(bs2) == len(rvbs) && &bs2[0] == &rvbs[0]) { - if rv.CanSet() { - rv.SetBytes(bs2) - } else if len(rvbs) > 0 && len(bs2) > 0 { - copy(rvbs, bs2) - } + rvbs := rvGetBytes(rv) + bs2 := d.d.DecodeBytes(rvbs, false) + // if rvbs == nil && bs2 != nil || rvbs != nil && bs2 == nil || len(bs2) != len(rvbs) { + if !(len(bs2) > 0 && len(bs2) == len(rvbs) && &bs2[0] == &rvbs[0]) { + if rv.CanSet() { + rvSetBytes(rv, bs2) + } else if len(rvbs) > 0 && len(bs2) > 0 { + copy(rvbs, bs2) } } return } - // array := f.seq == seqTypeChan - - slh, containerLenS := d.decSliceHelperStart() // only expects valueType(Array|Map) + slh, containerLenS := d.decSliceHelperStart() // only expects valueType(Array|Map) - never Nil // an array can never return a nil slice. so no need to check f.array here. if containerLenS == 0 { if rv.CanSet() { - if f.seq == seqTypeSlice { - if rv.IsNil() { - rv.Set(reflect.MakeSlice(ti.rt, 0, 0)) - } else { - rv.SetLen(0) - } - } else if f.seq == seqTypeChan { - if rv.IsNil() { - rv.Set(reflect.MakeChan(ti.rt, 0)) - } + if rvIsNil(rv) { + rvSetDirect(rv, reflect.MakeSlice(f.ti.rt, 0, 0)) + } else { + rvSetSliceLen(rv, 0) } } slh.End() return } - d.depthIncr() - rtelem0Size := int(rtelem0.Size()) rtElem0Kind := rtelem0.Kind() rtelem0Mut := !isImmutableKind(rtElem0Kind) @@ -1588,149 +717,227 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { var fn *codecFn - var rvCanset = rv.CanSet() - var rvChanged bool var rv0 = rv + var rvChanged bool + var rvCanset = rv.CanSet() var rv9 reflect.Value - rvlen := rv.Len() - rvcap := rv.Cap() + rvlen := rvGetSliceLen(rv) + rvcap := rvGetSliceCap(rv) hasLen := containerLenS > 0 - if hasLen && f.seq == seqTypeSlice { + if hasLen { if containerLenS > rvcap { oldRvlenGtZero := rvlen > 0 rvlen = decInferLen(containerLenS, d.h.MaxInitLen, int(rtelem0.Size())) if rvlen <= rvcap { if rvCanset { - rv.SetLen(rvlen) + rvSetSliceLen(rv, rvlen) } } else if rvCanset { - rv = reflect.MakeSlice(ti.rt, rvlen, rvlen) + rv = reflect.MakeSlice(f.ti.rt, rvlen, rvlen) rvcap = rvlen rvChanged = true } else { d.errorf("cannot decode into non-settable slice") } - if rvChanged && oldRvlenGtZero && !isImmutableKind(rtelem0.Kind()) { - reflect.Copy(rv, rv0) // only copy up to length NOT cap i.e. rv0.Slice(0, rvcap) + if rvChanged && oldRvlenGtZero && rtelem0Mut { // !isImmutableKind(rtelem0.Kind()) { + rvCopySlice(rv, rv0) // only copy up to length NOT cap i.e. rv0.Slice(0, rvcap) } } else if containerLenS != rvlen { rvlen = containerLenS if rvCanset { - rv.SetLen(rvlen) + rvSetSliceLen(rv, rvlen) } - // else { - // rv = rv.Slice(0, rvlen) - // rvChanged = true - // d.errorf("cannot decode into non-settable slice") - // } } } // consider creating new element once, and just decoding into it. var rtelem0Zero reflect.Value var rtelem0ZeroValid bool - var decodeAsNil bool var j int - for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && (f.seq == seqTypeSlice || f.seq == seqTypeChan) && rv.IsNil() { + for ; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && f.seq == seqTypeSlice && rvIsNil(rv) { if hasLen { rvlen = decInferLen(containerLenS, d.h.MaxInitLen, rtelem0Size) - } else if f.seq == seqTypeSlice { - rvlen = decDefSliceCap } else { - rvlen = decDefChanCap + rvlen = decDefSliceCap } if rvCanset { - if f.seq == seqTypeSlice { - rv = reflect.MakeSlice(ti.rt, rvlen, rvlen) - rvChanged = true - } else { // chan - rv = reflect.MakeChan(ti.rt, rvlen) - rvChanged = true - } + rv = reflect.MakeSlice(f.ti.rt, rvlen, rvlen) + rvcap = rvlen + rvChanged = true } else { d.errorf("cannot decode into non-settable slice") } } slh.ElemContainerState(j) - decodeAsNil = dd.TryDecodeAsNil() - if f.seq == seqTypeChan { - if decodeAsNil { - rv.Send(reflect.Zero(rtelem0)) - continue - } - if rtelem0Mut || !rv9.IsValid() { // || (rtElem0Kind == reflect.Ptr && rv9.IsNil()) { - rv9 = reflect.New(rtelem0).Elem() - } - if fn == nil { - fn = d.h.fn(rtelem, true, true) - } - d.decodeValue(rv9, fn, true) - rv.Send(rv9) - } else { - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= rvlen { - if f.seq == seqTypeArray { - d.arrayCannotExpand(rvlen, j+1) - decodeIntoBlank = true - } else { // if f.seq == seqTypeSlice - // rv = reflect.Append(rv, reflect.Zero(rtelem0)) // append logic + varargs - var rvcap2 int - var rvErrmsg2 string - rv9, rvcap2, rvChanged, rvErrmsg2 = - expandSliceRV(rv, ti.rt, rvCanset, rtelem0Size, 1, rvlen, rvcap) - if rvErrmsg2 != "" { - d.errorf(rvErrmsg2) - } - rvlen++ - if rvChanged { - rv = rv9 - rvcap = rvcap2 - } + // if indefinite, etc, then expand the slice if necessary + if j >= rvlen { + if f.seq == seqTypeArray { + d.arrayCannotExpand(rvlen, j+1) + // drain completely and return + d.swallow() + j++ + for ; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + slh.ElemContainerState(j) + d.swallow() } + slh.End() + return } - if decodeIntoBlank { - if !decodeAsNil { - d.swallow() + // rv = reflect.Append(rv, reflect.Zero(rtelem0)) // append logic + varargs + + // expand the slice up to the cap. + // Note that we did, so we have to reset it later. + + if rvlen < rvcap { + if rv.CanSet() { + rvSetSliceLen(rv, rvcap) + } else if rvCanset { + rv = rvSlice(rv, rvcap) + rvChanged = true + } else { + d.errorf(errmsgExpandSliceCannotChange) + return } + rvlen = rvcap } else { - rv9 = rv.Index(j) - if d.h.SliceElementReset || decodeAsNil { - if !rtelem0ZeroValid { - rtelem0ZeroValid = true - rtelem0Zero = reflect.Zero(rtelem0) - } - rv9.Set(rtelem0Zero) - if decodeAsNil { - continue - } + if !rvCanset { + d.errorf(errmsgExpandSliceCannotChange) + return } - - if fn == nil { - fn = d.h.fn(rtelem, true, true) - } - d.decodeValue(rv9, fn, true) + rvcap = growCap(rvcap, rtelem0Size, rvcap) + rv9 = reflect.MakeSlice(f.ti.rt, rvcap, rvcap) + rvCopySlice(rv9, rv) + rv = rv9 + rvChanged = true + rvlen = rvcap } } + rv9 = rvSliceIndex(rv, j, f.ti) + if d.h.SliceElementReset { + if !rtelem0ZeroValid { + rtelem0ZeroValid = true + rtelem0Zero = reflect.Zero(rtelem0) + } + rv9.Set(rtelem0Zero) + } + + if fn == nil { + fn = d.h.fn(rtelem) + } + d.decodeValue(rv9, fn) } - if f.seq == seqTypeSlice { - if j < rvlen { - if rv.CanSet() { - rv.SetLen(j) - } else if rvCanset { - rv = rv.Slice(0, j) - rvChanged = true - } // else { d.errorf("kSlice: cannot change non-settable slice") } - rvlen = j - } else if j == 0 && rv.IsNil() { + if j < rvlen { + if rv.CanSet() { + rvSetSliceLen(rv, j) + } else if rvCanset { + rv = rvSlice(rv, j) + rvChanged = true + } + rvlen = j + } else if j == 0 && rvIsNil(rv) { + if rvCanset { + rv = reflect.MakeSlice(f.ti.rt, 0, 0) + rvChanged = true + } + } + slh.End() + + if rvChanged { // infers rvCanset=true, so it can be reset + rv0.Set(rv) + } + +} + +func (d *Decoder) kSliceForChan(f *codecFnInfo, rv reflect.Value) { + // A slice can be set from a map or array in stream. + // This way, the order can be kept (as order is lost with map). + + if f.ti.chandir&uint8(reflect.SendDir) == 0 { + d.errorf("receive-only channel cannot be decoded") + } + rtelem0 := f.ti.elem + ctyp := d.d.ContainerType() + if ctyp == valueTypeNil { + rvSetDirect(rv, f.ti.rv0) + return + } + if ctyp == valueTypeBytes || ctyp == valueTypeString { + // you can only decode bytes or string in the stream into a slice or array of bytes + if !(f.ti.rtid == uint8SliceTypId || rtelem0.Kind() == reflect.Uint8) { + d.errorf("bytes/string in stream must decode into slice/array of bytes, not %v", f.ti.rt) + } + bs2 := d.d.DecodeBytes(nil, true) + irv := rv2i(rv) + ch, ok := irv.(chan<- byte) + if !ok { + ch = irv.(chan byte) + } + for _, b := range bs2 { + ch <- b + } + return + } + + // only expects valueType(Array|Map - nil handled above) + slh, containerLenS := d.decSliceHelperStart() + + // an array can never return a nil slice. so no need to check f.array here. + if containerLenS == 0 { + if rv.CanSet() && rvIsNil(rv) { + rvSetDirect(rv, reflect.MakeChan(f.ti.rt, 0)) + } + slh.End() + return + } + + rtelem0Size := int(rtelem0.Size()) + rtElem0Kind := rtelem0.Kind() + rtelem0Mut := !isImmutableKind(rtElem0Kind) + rtelem := rtelem0 + rtelemkind := rtelem.Kind() + for rtelemkind == reflect.Ptr { + rtelem = rtelem.Elem() + rtelemkind = rtelem.Kind() + } + + var fn *codecFn + + var rvCanset = rv.CanSet() + var rvChanged bool + var rv0 = rv + var rv9 reflect.Value + + var rvlen int // := rv.Len() + hasLen := containerLenS > 0 + + var j int + + for ; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && rvIsNil(rv) { + if hasLen { + rvlen = decInferLen(containerLenS, d.h.MaxInitLen, rtelem0Size) + } else { + rvlen = decDefChanCap + } if rvCanset { - rv = reflect.MakeSlice(ti.rt, 0, 0) + rv = reflect.MakeChan(f.ti.rt, rvlen) rvChanged = true - } // else { d.errorf("kSlice: cannot change non-settable slice") } + } else { + d.errorf("cannot decode into non-settable chan") + } + } + slh.ElemContainerState(j) + if rtelem0Mut || !rv9.IsValid() { // || (rtElem0Kind == reflect.Ptr && rvIsNil(rv9)) { + rv9 = rvZeroAddrK(rtelem0, rtElem0Kind) + } + if fn == nil { + fn = d.h.fn(rtelem) } + d.decodeValue(rv9, fn) + rv.Send(rv9) } slh.End() @@ -1738,34 +945,31 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { rv0.Set(rv) } - d.depthDecr() } -// func (d *Decoder) kArray(f *codecFnInfo, rv reflect.Value) { -// // d.decodeValueFn(rv.Slice(0, rv.Len())) -// f.kSlice(rv.Slice(0, rv.Len())) -// } - func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { - dd := d.d - containerLen := dd.ReadMapStart() - elemsep := d.esep + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + rvSetDirect(rv, f.ti.rv0) + return + } ti := f.ti - if rv.IsNil() { + if rvIsNil(rv) { rvlen := decInferLen(containerLen, d.h.MaxInitLen, int(ti.key.Size()+ti.elem.Size())) - rv.Set(makeMapReflect(ti.rt, rvlen)) + rvSetDirect(rv, makeMapReflect(ti.rt, rvlen)) } if containerLen == 0 { - dd.ReadMapEnd() + d.mapEnd() return } - d.depthIncr() - ktype, vtype := ti.key, ti.elem ktypeId := rt2id(ktype) vtypeKind := vtype.Kind() + ktypeKind := ktype.Kind() + + var vtypeElem reflect.Type var keyFn, valFn *codecFn var ktypeLo, vtypeLo reflect.Type @@ -1776,137 +980,116 @@ func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { for vtypeLo = vtype; vtypeLo.Kind() == reflect.Ptr; vtypeLo = vtypeLo.Elem() { } - var mapGet, mapSet bool - rvvImmut := isImmutableKind(vtypeKind) + rvvMut := !isImmutableKind(vtypeKind) + + // we do a doMapGet if kind is mutable, and InterfaceReset=true if interface + var doMapGet, doMapSet bool if !d.h.MapValueReset { - // if pointer, mapGet = true - // if interface, mapGet = true if !DecodeNakedAlways (else false) - // if builtin, mapGet = false - // else mapGet = true - if vtypeKind == reflect.Ptr { - mapGet = true - } else if vtypeKind == reflect.Interface { - if !d.h.InterfaceReset { - mapGet = true + if rvvMut { + if vtypeKind == reflect.Interface { + if !d.h.InterfaceReset { + doMapGet = true + } + } else { + doMapGet = true } - } else if !rvvImmut { - mapGet = true } } - var rvk, rvkp, rvv, rvz reflect.Value + var rvk, rvkn, rvv, rvvn, rvva reflect.Value + var rvvaSet bool rvkMut := !isImmutableKind(ktype.Kind()) // if ktype is immutable, then re-use the same rvk. ktypeIsString := ktypeId == stringTypId ktypeIsIntf := ktypeId == intfTypId hasLen := containerLen > 0 var kstrbs []byte - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if rvkMut || !rvkp.IsValid() { - rvkp = reflect.New(ktype) - rvk = rvkp.Elem() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + if j == 0 { + if !rvkMut { + rvkn = rvZeroAddrK(ktype, ktypeKind) + } + if !rvvMut { + rvvn = rvZeroAddrK(vtype, vtypeKind) + } } - if elemsep { - dd.ReadMapElemKey() + + if rvkMut { + rvk = rvZeroAddrK(ktype, ktypeKind) + } else { + rvk = rvkn } - // if false && dd.TryDecodeAsNil() { // nil cannot be a map key, so disregard this block - // // Previously, if a nil key, we just ignored the mapped value and continued. - // // However, that makes the result of encoding and then decoding map[intf]intf{nil:nil} - // // to be an empty map. - // // Instead, we treat a nil key as the zero value of the type. - // rvk.Set(reflect.Zero(ktype)) - // } else if ktypeIsString { + + d.mapElemKey() + if ktypeIsString { - kstrbs = dd.DecodeStringAsBytes() - rvk.SetString(stringView(kstrbs)) - // NOTE: if doing an insert, you MUST use a real string (not stringview) + kstrbs = d.d.DecodeStringAsBytes() + rvk.SetString(stringView(kstrbs)) // NOTE: if doing an insert, use real string (not stringview) } else { if keyFn == nil { - keyFn = d.h.fn(ktypeLo, true, true) + keyFn = d.h.fn(ktypeLo) } - d.decodeValue(rvk, keyFn, true) + d.decodeValue(rvk, keyFn) } - // special case if a byte array. + + // special case if interface wrapping a byte array. if ktypeIsIntf { - if rvk2 := rvk.Elem(); rvk2.IsValid() { - if rvk2.Type() == uint8SliceTyp { - rvk = reflect.ValueOf(d.string(rvk2.Bytes())) - } else { - rvk = rvk2 - } + if rvk2 := rvk.Elem(); rvk2.IsValid() && rvk2.Type() == uint8SliceTyp { + rvk.Set(rv4i(d.string(rvGetBytes(rvk2)))) } + // NOTE: consider failing early if map/slice/func } - if elemsep { - dd.ReadMapElemValue() - } + d.mapElemValue() - // Brittle, but OK per TryDecodeAsNil() contract. - // i.e. TryDecodeAsNil never shares slices with other decDriver procedures - if dd.TryDecodeAsNil() { - if ktypeIsString { - rvk.SetString(d.string(kstrbs)) - } - if d.h.DeleteOnNilMapValue { - rv.SetMapIndex(rvk, reflect.Value{}) - } else { - rv.SetMapIndex(rvk, reflect.Zero(vtype)) + doMapSet = true // set to false if u do a get, and its a non-nil pointer + if doMapGet { + if !rvvaSet { + rvva = mapAddressableRV(vtype, vtypeKind) + rvvaSet = true } - continue - } - - mapSet = true // set to false if u do a get, and its a non-nil pointer - if mapGet { - // mapGet true only in case where kind=Ptr|Interface or kind is otherwise mutable. - rvv = rv.MapIndex(rvk) - if !rvv.IsValid() { - rvv = reflect.New(vtype).Elem() - } else if vtypeKind == reflect.Ptr { - if rvv.IsNil() { - rvv = reflect.New(vtype).Elem() + rvv = mapGet(rv, rvk, rvva) // reflect.Value{}) + if vtypeKind == reflect.Ptr { + if rvv.IsValid() && !rvIsNil(rvv) { + doMapSet = false } else { - mapSet = false - } - } else if vtypeKind == reflect.Interface { - // not addressable, and thus not settable. - // e MUST create a settable/addressable variant - rvv2 := reflect.New(rvv.Type()).Elem() - if !rvv.IsNil() { - rvv2.Set(rvv) + if vtypeElem == nil { + vtypeElem = vtype.Elem() + } + rvv = reflect.New(vtypeElem) } - rvv = rvv2 - } - // else it is ~mutable, and we can just decode into it directly - } else if rvvImmut { - if !rvz.IsValid() { - rvz = reflect.New(vtype).Elem() + } else if rvv.IsValid() && vtypeKind == reflect.Interface && !rvIsNil(rvv) { + rvvn = rvZeroAddrK(vtype, vtypeKind) + rvvn.Set(rvv) + rvv = rvvn + } else if rvvMut { + rvv = rvZeroAddrK(vtype, vtypeKind) + } else { + rvv = rvvn } - rvv = rvz + } else if rvvMut { + rvv = rvZeroAddrK(vtype, vtypeKind) } else { - rvv = reflect.New(vtype).Elem() + rvv = rvvn } - // We MUST be done with the stringview of the key, before decoding the value - // so that we don't bastardize the reused byte array. - if mapSet && ktypeIsString { - rvk.SetString(d.string(kstrbs)) - } if valFn == nil { - valFn = d.h.fn(vtypeLo, true, true) + valFn = d.h.fn(vtypeLo) + } + + // We MUST be done with the stringview of the key, BEFORE decoding the value (rvv) + // so that we don't unknowingly reuse the rvk backing buffer during rvv decode. + if doMapSet && ktypeIsString { // set to a real string (not string view) + rvk.SetString(d.string(kstrbs)) } - d.decodeValue(rvv, valFn, true) - // d.decodeValueFn(rvv, valFn) - if mapSet { - rv.SetMapIndex(rvk, rvv) + d.decodeValue(rvv, valFn) + if doMapSet { + mapSet(rv, rvk, rvv) } - // if ktypeIsString { - // // keepAlive4StringView(kstrbs) // not needed, as reference is outside loop - // } } - dd.ReadMapEnd() + d.mapEnd() - d.depthDecr() } // decNaked is used to keep track of the primitives decoded. @@ -1944,331 +1127,6 @@ type decNaked struct { // state v valueType - _ [6]bool // padding - - // ru, ri, rf, rl, rs, rb, rt reflect.Value // mapping to the primitives above - // - // _ [3]uint64 // padding -} - -// func (n *decNaked) init() { -// n.ru = reflect.ValueOf(&n.u).Elem() -// n.ri = reflect.ValueOf(&n.i).Elem() -// n.rf = reflect.ValueOf(&n.f).Elem() -// n.rl = reflect.ValueOf(&n.l).Elem() -// n.rs = reflect.ValueOf(&n.s).Elem() -// n.rt = reflect.ValueOf(&n.t).Elem() -// n.rb = reflect.ValueOf(&n.b).Elem() -// // n.rr[] = reflect.ValueOf(&n.) -// } - -// type decNakedPooler struct { -// n *decNaked -// nsp *sync.Pool -// } - -// // naked must be called before each call to .DecodeNaked, as they will use it. -// func (d *decNakedPooler) naked() *decNaked { -// if d.n == nil { -// // consider one of: -// // - get from sync.Pool (if GC is frequent, there's no value here) -// // - new alloc (safest. only init'ed if it a naked decode will be done) -// // - field in Decoder (makes the Decoder struct very big) -// // To support using a decoder where a DecodeNaked is not needed, -// // we prefer #1 or #2. -// // d.n = new(decNaked) // &d.nv // new(decNaked) // grab from a sync.Pool -// // d.n.init() -// var v interface{} -// d.nsp, v = pool.decNaked() -// d.n = v.(*decNaked) -// } -// return d.n -// } - -// func (d *decNakedPooler) end() { -// if d.n != nil { -// // if n != nil, then nsp != nil (they are always set together) -// d.nsp.Put(d.n) -// d.n, d.nsp = nil, nil -// } -// } - -// type rtid2rv struct { -// rtid uintptr -// rv reflect.Value -// } - -// -------------- - -type decReaderSwitch struct { - rb bytesDecReader - // ---- cpu cache line boundary? - ri *ioDecReader - bi *bufioDecReader - - mtr, str bool // whether maptype or slicetype are known types - - be bool // is binary encoding - js bool // is json handle - jsms bool // is json handle, and MapKeyAsString - esep bool // has elem separators - - // typ entryType - bytes bool // is bytes reader - bufio bool // is this a bufioDecReader? -} - -// numread, track and stopTrack are always inlined, as they just check int fields, etc. - -/* -func (z *decReaderSwitch) numread() int { - switch z.typ { - case entryTypeBytes: - return z.rb.numread() - case entryTypeIo: - return z.ri.numread() - default: - return z.bi.numread() - } -} -func (z *decReaderSwitch) track() { - switch z.typ { - case entryTypeBytes: - z.rb.track() - case entryTypeIo: - z.ri.track() - default: - z.bi.track() - } -} -func (z *decReaderSwitch) stopTrack() []byte { - switch z.typ { - case entryTypeBytes: - return z.rb.stopTrack() - case entryTypeIo: - return z.ri.stopTrack() - default: - return z.bi.stopTrack() - } -} - -func (z *decReaderSwitch) unreadn1() { - switch z.typ { - case entryTypeBytes: - z.rb.unreadn1() - case entryTypeIo: - z.ri.unreadn1() - default: - z.bi.unreadn1() - } -} -func (z *decReaderSwitch) readx(n int) []byte { - switch z.typ { - case entryTypeBytes: - return z.rb.readx(n) - case entryTypeIo: - return z.ri.readx(n) - default: - return z.bi.readx(n) - } -} -func (z *decReaderSwitch) readb(s []byte) { - switch z.typ { - case entryTypeBytes: - z.rb.readb(s) - case entryTypeIo: - z.ri.readb(s) - default: - z.bi.readb(s) - } -} -func (z *decReaderSwitch) readn1() uint8 { - switch z.typ { - case entryTypeBytes: - return z.rb.readn1() - case entryTypeIo: - return z.ri.readn1() - default: - return z.bi.readn1() - } -} -func (z *decReaderSwitch) skip(accept *bitset256) (token byte) { - switch z.typ { - case entryTypeBytes: - return z.rb.skip(accept) - case entryTypeIo: - return z.ri.skip(accept) - default: - return z.bi.skip(accept) - } -} -func (z *decReaderSwitch) readTo(in []byte, accept *bitset256) (out []byte) { - switch z.typ { - case entryTypeBytes: - return z.rb.readTo(in, accept) - case entryTypeIo: - return z.ri.readTo(in, accept) - default: - return z.bi.readTo(in, accept) - } -} -func (z *decReaderSwitch) readUntil(in []byte, stop byte) (out []byte) { - switch z.typ { - case entryTypeBytes: - return z.rb.readUntil(in, stop) - case entryTypeIo: - return z.ri.readUntil(in, stop) - default: - return z.bi.readUntil(in, stop) - } -} - -*/ - -// the if/else-if/else block is expensive to inline. -// Each node of this construct costs a lot and dominates the budget. -// Best to only do an if fast-path else block (so fast-path is inlined). -// This is irrespective of inlineExtraCallCost set in $GOROOT/src/cmd/compile/internal/gc/inl.go -// -// In decReaderSwitch methods below, we delegate all IO functions into their own methods. -// This allows for the inlining of the common path when z.bytes=true. -// Go 1.12+ supports inlining methods with up to 1 inlined function (or 2 if no other constructs). - -func (z *decReaderSwitch) numread() uint { - if z.bytes { - return z.rb.numread() - } else if z.bufio { - return z.bi.numread() - } else { - return z.ri.numread() - } -} -func (z *decReaderSwitch) track() { - if z.bytes { - z.rb.track() - } else if z.bufio { - z.bi.track() - } else { - z.ri.track() - } -} -func (z *decReaderSwitch) stopTrack() []byte { - if z.bytes { - return z.rb.stopTrack() - } else if z.bufio { - return z.bi.stopTrack() - } else { - return z.ri.stopTrack() - } -} - -// func (z *decReaderSwitch) unreadn1() { -// if z.bytes { -// z.rb.unreadn1() -// } else { -// z.unreadn1IO() -// } -// } -// func (z *decReaderSwitch) unreadn1IO() { -// if z.bufio { -// z.bi.unreadn1() -// } else { -// z.ri.unreadn1() -// } -// } - -func (z *decReaderSwitch) unreadn1() { - if z.bytes { - z.rb.unreadn1() - } else if z.bufio { - z.bi.unreadn1() - } else { - z.ri.unreadn1() // not inlined - } -} - -func (z *decReaderSwitch) readx(n uint) []byte { - if z.bytes { - return z.rb.readx(n) - } - return z.readxIO(n) -} -func (z *decReaderSwitch) readxIO(n uint) []byte { - if z.bufio { - return z.bi.readx(n) - } - return z.ri.readx(n) -} - -func (z *decReaderSwitch) readb(s []byte) { - if z.bytes { - z.rb.readb(s) - } else { - z.readbIO(s) - } -} - -//go:noinline - fallback for io, ensures z.bytes path is inlined -func (z *decReaderSwitch) readbIO(s []byte) { - if z.bufio { - z.bi.readb(s) - } else { - z.ri.readb(s) - } -} - -func (z *decReaderSwitch) readn1() uint8 { - if z.bytes { - return z.rb.readn1() - } - return z.readn1IO() -} -func (z *decReaderSwitch) readn1IO() uint8 { - if z.bufio { - return z.bi.readn1() - } - return z.ri.readn1() -} - -func (z *decReaderSwitch) skip(accept *bitset256) (token byte) { - if z.bytes { - return z.rb.skip(accept) - } - return z.skipIO(accept) -} -func (z *decReaderSwitch) skipIO(accept *bitset256) (token byte) { - if z.bufio { - return z.bi.skip(accept) - } - return z.ri.skip(accept) -} - -func (z *decReaderSwitch) readTo(in []byte, accept *bitset256) (out []byte) { - if z.bytes { - return z.rb.readToNoInput(accept) // z.rb.readTo(in, accept) - } - return z.readToIO(in, accept) -} - -//go:noinline - fallback for io, ensures z.bytes path is inlined -func (z *decReaderSwitch) readToIO(in []byte, accept *bitset256) (out []byte) { - if z.bufio { - return z.bi.readTo(in, accept) - } - return z.ri.readTo(in, accept) -} -func (z *decReaderSwitch) readUntil(in []byte, stop byte) (out []byte) { - if z.bytes { - return z.rb.readUntilNoInput(stop) - } - return z.readUntilIO(in, stop) -} - -func (z *decReaderSwitch) readUntilIO(in []byte, stop byte) (out []byte) { - if z.bufio { - return z.bi.readUntil(in, stop) - } - return z.ri.readUntil(in, stop) } // Decoder reads and decodes an object from an input stream in a supported format. @@ -2286,39 +1144,44 @@ type Decoder struct { d decDriver - // NOTE: Decoder shouldn't call it's read methods, - // as the handler MAY need to do some coordination. - r *decReaderSwitch - - // bi *bufioDecReader // cache the mapTypeId and sliceTypeId for faster comparisons mtid uintptr stid uintptr - hh Handle - h *BasicHandle + h *BasicHandle + + blist bytesFreelist // ---- cpu cache line boundary? - decReaderSwitch + decRd // ---- cpu cache line boundary? n decNaked - // cr containerStateRecv + hh Handle err error - depth int16 + // ---- cpu cache line boundary? + is map[string]string // used for interning strings + + // ---- writable fields during execution --- *try* to keep in sep cache line maxdepth int16 + depth int16 - _ [4]uint8 // padding + // Extensions can call Decode() within a current Decode() call. + // We need to know when the top level Decode() call returns, + // so we can decide whether to Release() or not. + calls uint16 // what depth in mustDecode are we in now. - is map[string]string // used for interning strings + c containerState + _ [1]byte // padding // ---- cpu cache line boundary? - b [decScratchByteArrayLen]byte // scratch buffer, used by Decoder and xxxEncDrivers - // padding - false sharing help // modify 232 if Decoder struct changes. - // _ [cacheLineSize - 232%cacheLineSize]byte + // b is an always-available scratch buffer used by Decoder and decDrivers. + // By being always-available, it can be used for one-off things without + // having to get from freelist, use, and return back to freelist. + b [decScratchByteArrayLen]byte } // NewDecoder returns a Decoder for decoding a stream of bytes from an io.Reader. @@ -2326,7 +1189,7 @@ type Decoder struct { // For efficiency, Users are encouraged to configure ReaderBufferSize on the handle // OR pass in a memory buffered reader (eg bufio.Reader, bytes.Buffer). func NewDecoder(r io.Reader, h Handle) *Decoder { - d := newDecoder(h) + d := h.newDecDriver().decoder() d.Reset(r) return d } @@ -2334,43 +1197,32 @@ func NewDecoder(r io.Reader, h Handle) *Decoder { // NewDecoderBytes returns a Decoder which efficiently decodes directly // from a byte slice with zero copying. func NewDecoderBytes(in []byte, h Handle) *Decoder { - d := newDecoder(h) + d := h.newDecDriver().decoder() d.ResetBytes(in) return d } -// var defaultDecNaked decNaked +func (d *Decoder) r() *decRd { + return &d.decRd +} -func newDecoder(h Handle) *Decoder { - d := &Decoder{h: basicHandle(h), err: errDecoderNotInitialized} +func (d *Decoder) init(h Handle) { d.bytes = true - if useFinalizers { - runtime.SetFinalizer(d, (*Decoder).finalize) - // xdebugf(">>>> new(Decoder) with finalizer") - } - d.r = &d.decReaderSwitch + d.err = errDecoderNotInitialized + d.h = basicHandle(h) d.hh = h d.be = h.isBinary() // NOTE: do not initialize d.n here. It is lazily initialized in d.naked() - var jh *JsonHandle - jh, d.js = h.(*JsonHandle) - if d.js { - d.jsms = jh.MapKeyAsString - } - d.esep = d.hh.hasElemSeparators() if d.h.InternString { d.is = make(map[string]string, 32) } - d.d = h.newDecDriver(d) - // d.cr, _ = d.d.(containerStateRecv) - return d } func (d *Decoder) resetCommon() { - // d.r = &d.decReaderSwitch d.d.reset() d.err = nil d.depth = 0 + d.calls = 0 d.maxdepth = d.h.MaxDepth if d.maxdepth <= 0 { d.maxdepth = decDefMaxDepth @@ -2395,24 +1247,17 @@ func (d *Decoder) Reset(r io.Reader) { return } d.bytes = false - // d.typ = entryTypeUnset if d.h.ReaderBufferSize > 0 { if d.bi == nil { d.bi = new(bufioDecReader) } - d.bi.reset(r, d.h.ReaderBufferSize) - // d.r = d.bi - // d.typ = entryTypeBufio + d.bi.reset(r, d.h.ReaderBufferSize, &d.blist) d.bufio = true } else { - // d.ri.x = &d.b - // d.s = d.sa[:0] if d.ri == nil { d.ri = new(ioDecReader) } - d.ri.reset(r) - // d.r = d.ri - // d.typ = entryTypeIo + d.ri.reset(r, &d.blist) d.bufio = false } d.resetCommon() @@ -2426,9 +1271,7 @@ func (d *Decoder) ResetBytes(in []byte) { } d.bytes = true d.bufio = false - // d.typ = entryTypeBytes d.rb.reset(in) - // d.r = &d.rb d.resetCommon() } @@ -2510,7 +1353,9 @@ func (d *Decoder) Decode(v interface{}) (err error) { defer func() { if x := recover(); x != nil { panicValToErr(d, x, &d.err) - err = d.err + if d.err != err { + err = d.err + } } }() } @@ -2532,105 +1377,58 @@ func (d *Decoder) MustDecode(v interface{}) { // MustDecode is like Decode, but panics if unable to Decode. // This provides insight to the code location that triggered the error. func (d *Decoder) mustDecode(v interface{}) { - // TODO: Top-level: ensure that v is a pointer and not nil. - if d.d.TryDecodeAsNil() { - setZero(v) - return - } - if d.bi == nil { - d.decode(v) - return - } + // Top-level: v is a pointer and not nil. - d.bi.calls++ + d.calls++ d.decode(v) - // xprintf(">>>>>>>> >>>>>>>> num decFns: %v\n", d.cf.sn) - d.bi.calls-- - if !d.h.ExplicitRelease && d.bi.calls == 0 { - d.bi.release() + d.calls-- + if d.calls == 0 { + d.d.atEndOfDecode() } } -// func (d *Decoder) deferred(err1 *error) { -// if recoverPanicToErr { -// if x := recover(); x != nil { -// panicValToErr(d, x, err1) -// panicValToErr(d, x, &d.err) -// } -// } -// } - -//go:noinline -- as it is run by finalizer -func (d *Decoder) finalize() { - // xdebugf("finalizing Decoder") - d.Release() -} - // Release releases shared (pooled) resources. // // It is important to call Release() when done with a Decoder, so those resources // are released instantly for use by subsequently created Decoders. // // By default, Release() is automatically called unless the option ExplicitRelease is set. +// +// Deprecated: Release is a no-op as pooled resources are not used with an Decoder. +// This method is kept for compatibility reasons only. func (d *Decoder) Release() { - if d.bi != nil { - d.bi.release() - } - // d.decNakedPooler.end() } -// // this is not a smart swallow, as it allocates objects and does unnecessary work. -// func (d *Decoder) swallowViaHammer() { -// var blank interface{} -// d.decodeValueNoFn(reflect.ValueOf(&blank).Elem()) -// } - func (d *Decoder) swallow() { - // smarter decode that just swallows the content - dd := d.d - if dd.TryDecodeAsNil() { - return - } - elemsep := d.esep - switch dd.ContainerType() { + switch d.d.ContainerType() { + case valueTypeNil: case valueTypeMap: - containerLen := dd.ReadMapStart() - d.depthIncr() + containerLen := d.mapStart() hasLen := containerLen >= 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - // if clenGtEqualZero {if j >= containerLen {break} } else if dd.CheckBreak() {break} - if elemsep { - dd.ReadMapElemKey() - } + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() d.swallow() - if elemsep { - dd.ReadMapElemValue() - } + d.mapElemValue() d.swallow() } - dd.ReadMapEnd() - d.depthDecr() + d.mapEnd() case valueTypeArray: - containerLen := dd.ReadArrayStart() - d.depthIncr() + containerLen := d.arrayStart() hasLen := containerLen >= 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if elemsep { - dd.ReadArrayElem() - } + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.arrayElem() d.swallow() } - dd.ReadArrayEnd() - d.depthDecr() + d.arrayEnd() case valueTypeBytes: - dd.DecodeBytes(d.b[:], true) + d.d.DecodeBytes(d.b[:], true) case valueTypeString: - dd.DecodeStringAsBytes() + d.d.DecodeStringAsBytes() default: // these are all primitives, which we can get from decodeNaked // if RawExt using Value, complete the processing. n := d.naked() - dd.DecodeNaked() + d.d.DecodeNaked() if n.v == valueTypeExt && n.l == nil { var v2 interface{} d.decode(&v2) @@ -2639,10 +1437,13 @@ func (d *Decoder) swallow() { } func setZero(iv interface{}) { - if iv == nil || definitelyNil(iv) { + if iv == nil { + return + } + if _, ok := isNil(iv); ok { return } - var canDecode bool + // var canDecode bool switch v := iv.(type) { case *string: *v = "" @@ -2679,15 +1480,29 @@ func setZero(iv interface{}) { case *time.Time: *v = time.Time{} case reflect.Value: - if v, canDecode = isDecodeable(v); canDecode && v.CanSet() { - v.Set(reflect.Zero(v.Type())) - } // TODO: else drain if chan, clear if map, set all to nil if slice??? + setZeroRV(v) default: if !fastpathDecodeSetZeroTypeSwitch(iv) { - v := reflect.ValueOf(iv) - if v, canDecode = isDecodeable(v); canDecode && v.CanSet() { - v.Set(reflect.Zero(v.Type())) - } // TODO: else drain if chan, clear if map, set all to nil if slice??? + setZeroRV(rv4i(iv)) + } + } +} + +func setZeroRV(v reflect.Value) { + // It not decodeable, we do not touch it. + // We considered empty'ing it if not decodeable e.g. + // - if chan, drain it + // - if map, clear it + // - if slice or array, zero all elements up to len + // + // However, we decided instead that we either will set the + // whole value to the zero value, or leave AS IS. + if isDecodeable(v) { + if v.Kind() == reflect.Ptr { + v = v.Elem() + } + if v.CanSet() { + v.Set(reflect.Zero(v.Type())) } } } @@ -2705,11 +1520,11 @@ func (d *Decoder) decode(iv interface{}) { // case nil: // case Selfer: case reflect.Value: - v = d.ensureDecodeable(v) - d.decodeValue(v, nil, true) + d.ensureDecodeable(v) + d.decodeValue(v, nil) case *string: - *v = d.d.DecodeString() + *v = string(d.d.DecodeStringAsBytes()) case *bool: *v = d.d.DecodeBool() case *int: @@ -2733,11 +1548,7 @@ func (d *Decoder) decode(iv interface{}) { case *uint64: *v = d.d.DecodeUint64() case *float32: - f64 := d.d.DecodeFloat64() - if chkOvf.Float32(f64) { - d.errorf("float32 overflow: %v", f64) - } - *v = float32(f64) + *v = float32(d.decodeFloat32()) case *float64: *v = d.d.DecodeFloat64() case *[]uint8: @@ -2753,43 +1564,48 @@ func (d *Decoder) decode(iv interface{}) { *v = d.rawBytes() case *interface{}: - d.decodeValue(reflect.ValueOf(iv).Elem(), nil, true) - // d.decodeValueNotNil(reflect.ValueOf(iv).Elem()) + d.decodeValue(rv4i(iv), nil) default: if v, ok := iv.(Selfer); ok { v.CodecDecodeSelf(d) } else if !fastpathDecodeTypeSwitch(iv, d) { - v := reflect.ValueOf(iv) - v = d.ensureDecodeable(v) - d.decodeValue(v, nil, false) - // d.decodeValueFallback(v) + v := rv4i(iv) + d.ensureDecodeable(v) + d.decodeValue(v, nil) } } } -func (d *Decoder) decodeValue(rv reflect.Value, fn *codecFn, chkAll bool) { +// decodeValue MUST be called by the actual value we want to decode into, +// not its addr or a reference to it. +// +// This way, we know if it is itself a pointer, and can handle nil in +// the stream effectively. +func (d *Decoder) decodeValue(rv reflect.Value, fn *codecFn) { // If stream is not containing a nil value, then we can deref to the base // non-pointer value, and decode into that. var rvp reflect.Value var rvpValid bool if rv.Kind() == reflect.Ptr { + if d.d.TryNil() { + if rvelem := rv.Elem(); rvelem.CanSet() { + rvelem.Set(reflect.Zero(rvelem.Type())) + } + return + } rvpValid = true - for { - if rv.IsNil() { - rv.Set(reflect.New(rv.Type().Elem())) + for rv.Kind() == reflect.Ptr { + if rvIsNil(rv) { + rvSetDirect(rv, reflect.New(rv.Type().Elem())) } rvp = rv rv = rv.Elem() - if rv.Kind() != reflect.Ptr { - break - } } } if fn == nil { - // always pass checkCodecSelfer=true, in case T or ****T is passed, where *T is a Selfer - fn = d.h.fn(rv.Type(), chkAll, true) // chkAll, chkAll) + fn = d.h.fn(rv.Type()) } if fn.i.addrD { if rvpValid { @@ -2804,7 +1620,6 @@ func (d *Decoder) decodeValue(rv reflect.Value, fn *codecFn, chkAll bool) { } else { fn.fd(d, &fn.i, rv) } - // return rv } func (d *Decoder) structFieldNotFound(index int, rvkencname string) { @@ -2827,31 +1642,30 @@ func (d *Decoder) arrayCannotExpand(sliceLen, streamLen int) { } } -func isDecodeable(rv reflect.Value) (rv2 reflect.Value, canDecode bool) { +func isDecodeable(rv reflect.Value) (canDecode bool) { switch rv.Kind() { case reflect.Array: - return rv, rv.CanAddr() + return rv.CanAddr() case reflect.Ptr: - if !rv.IsNil() { - return rv.Elem(), true + if !rvIsNil(rv) { + return true } case reflect.Slice, reflect.Chan, reflect.Map: - if !rv.IsNil() { - return rv, true + if !rvIsNil(rv) { + return true } } return } -func (d *Decoder) ensureDecodeable(rv reflect.Value) (rv2 reflect.Value) { +func (d *Decoder) ensureDecodeable(rv reflect.Value) { // decode can take any reflect.Value that is a inherently addressable i.e. // - array // - non-nil chan (we will SEND to it) // - non-nil slice (we will set its elements) // - non-nil map (we will put into it) // - non-nil pointer (we can "update" it) - rv2, canDecode := isDecodeable(rv) - if canDecode { + if isDecodeable(rv) { return } if !rv.IsValid() { @@ -2864,8 +1678,7 @@ func (d *Decoder) ensureDecodeable(rv reflect.Value) (rv2 reflect.Value) { } rvi := rv2i(rv) rvk := rv.Kind() - d.errorf("cannot decode into value of kind: %v, type: %T, %v", rvk, rvi, rvi) - return + d.errorf("cannot decode into value of kind: %v, type: %T, %#v", rvk, rvi, rvi) } func (d *Decoder) depthIncr() { @@ -2884,6 +1697,9 @@ func (d *Decoder) depthDecr() { // This should mostly be used for map keys, where the key type is string. // This is because keys of a map/struct are typically reused across many objects. func (d *Decoder) string(v []byte) (s string) { + if v == nil { + return + } if d.is == nil { return string(v) // don't return stringView, as we need a real string here. } @@ -2892,15 +1708,15 @@ func (d *Decoder) string(v []byte) (s string) { s = string(v) // new allocation here d.is[s] = s } - return s + return } // nextValueBytes returns the next value in the stream as a set of bytes. func (d *Decoder) nextValueBytes() (bs []byte) { d.d.uncacheRead() - d.r.track() + d.r().track() d.swallow() - bs = d.r.stopTrack() + bs = d.r().stopTrack() return } @@ -2914,60 +1730,180 @@ func (d *Decoder) rawBytes() []byte { } func (d *Decoder) wrapErr(v interface{}, err *error) { - *err = decodeError{codecError: codecError{name: d.hh.Name(), err: v}, pos: int(d.r.numread())} + *err = decodeError{codecError: codecError{name: d.hh.Name(), err: v}, pos: d.NumBytesRead()} } // NumBytesRead returns the number of bytes read func (d *Decoder) NumBytesRead() int { - return int(d.r.numread()) + return int(d.r().numread()) +} + +// decodeFloat32 will delegate to an appropriate DecodeFloat32 implementation (if exists), +// else if will call DecodeFloat64 and ensure the value doesn't overflow. +// +// Note that we return float64 to reduce unnecessary conversions +func (d *Decoder) decodeFloat32() float32 { + if d.js { + return d.jsondriver().DecodeFloat32() // custom implementation for 32-bit + } + return float32(chkOvf.Float32V(d.d.DecodeFloat64())) +} + +// ---- container tracking +// Note: We update the .c after calling the callback. +// This way, the callback can know what the last status was. + +// Note: if you call mapStart and it returns decContainerLenNil, +// then do NOT call mapEnd. + +func (d *Decoder) mapStart() (v int) { + v = d.d.ReadMapStart() + if v != decContainerLenNil { + d.depthIncr() + d.c = containerMapStart + } + return +} + +func (d *Decoder) mapElemKey() { + if d.js { + d.jsondriver().ReadMapElemKey() + } + d.c = containerMapKey +} + +func (d *Decoder) mapElemValue() { + if d.js { + d.jsondriver().ReadMapElemValue() + } + d.c = containerMapValue +} + +func (d *Decoder) mapEnd() { + d.d.ReadMapEnd() + d.depthDecr() + // d.c = containerMapEnd + d.c = 0 +} + +func (d *Decoder) arrayStart() (v int) { + v = d.d.ReadArrayStart() + if v != decContainerLenNil { + d.depthIncr() + d.c = containerArrayStart + } + return +} + +func (d *Decoder) arrayElem() { + if d.js { + d.jsondriver().ReadArrayElem() + } + d.c = containerArrayElem +} + +func (d *Decoder) arrayEnd() { + d.d.ReadArrayEnd() + d.depthDecr() + // d.c = containerArrayEnd + d.c = 0 +} + +func (d *Decoder) interfaceExtConvertAndDecode(v interface{}, ext Ext) { + // var v interface{} = ext.ConvertExt(rv) + // d.d.decode(&v) + // ext.UpdateExt(rv, v) + + // assume v is a pointer: + // - if struct|array, pass as is to ConvertExt + // - else make it non-addressable and pass to ConvertExt + // - make return value from ConvertExt addressable + // - decode into it + // - return the interface for passing into UpdateExt. + // - interface should be a pointer if struct|array, else a value + + var s interface{} + rv := rv4i(v) + rv2 := rv.Elem() + rvk := rv2.Kind() + if rvk == reflect.Struct || rvk == reflect.Array { + s = ext.ConvertExt(v) + } else { + s = ext.ConvertExt(rv2i(rv2)) + } + rv = rv4i(s) + if !rv.CanAddr() { + if rv.Kind() == reflect.Ptr { + rv2 = reflect.New(rv.Type().Elem()) + } else { + rv2 = rvZeroAddrK(rv.Type(), rv.Kind()) + } + rvSetDirect(rv2, rv) + rv = rv2 + } + d.decodeValue(rv, nil) + ext.UpdateExt(v, rv2i(rv)) +} + +func (d *Decoder) sideDecode(v interface{}, bs []byte) { + rv := baseRV(v) + NewDecoderBytes(bs, d.hh).decodeValue(rv, d.h.fnNoExt(rv.Type())) } // -------------------------------------------------- // decSliceHelper assists when decoding into a slice, from a map or an array in the stream. // A slice can be set from a map or array in stream. This supports the MapBySlice interface. +// +// Note: if IsNil, do not call ElemContainerState. type decSliceHelper struct { - d *Decoder - // ct valueType - array bool + d *Decoder + ct valueType + Array bool + IsNil bool } func (d *Decoder) decSliceHelperStart() (x decSliceHelper, clen int) { - dd := d.d - ctyp := dd.ContainerType() - switch ctyp { + x.ct = d.d.ContainerType() + x.d = d + switch x.ct { + case valueTypeNil: + x.IsNil = true case valueTypeArray: - x.array = true - clen = dd.ReadArrayStart() + x.Array = true + clen = d.arrayStart() case valueTypeMap: - clen = dd.ReadMapStart() * 2 + clen = d.mapStart() * 2 default: - d.errorf("only encoded map or array can be decoded into a slice (%d)", ctyp) + d.errorf("only encoded map or array can be decoded into a slice (%d)", x.ct) } - // x.ct = ctyp - x.d = d return } func (x decSliceHelper) End() { - if x.array { - x.d.d.ReadArrayEnd() + if x.IsNil { + } else if x.Array { + x.d.arrayEnd() } else { - x.d.d.ReadMapEnd() + x.d.mapEnd() } } func (x decSliceHelper) ElemContainerState(index int) { - if x.array { - x.d.d.ReadArrayElem() - } else if index%2 == 0 { - x.d.d.ReadMapElemKey() + // Note: if isnil, clen=0, so we never call into ElemContainerState + + if x.Array { + x.d.arrayElem() } else { - x.d.d.ReadMapElemValue() + if index%2 == 0 { + x.d.mapElemKey() + } else { + x.d.mapElemValue() + } } } -func decByteSlice(r *decReaderSwitch, clen, maxInitLen int, bs []byte) (bsOut []byte) { +func decByteSlice(r *decRd, clen, maxInitLen int, bs []byte) (bsOut []byte) { if clen == 0 { return zeroByteSlice } @@ -2978,7 +1914,6 @@ func decByteSlice(r *decReaderSwitch, clen, maxInitLen int, bs []byte) (bsOut [] bsOut = bs[:clen] r.readb(bsOut) } else { - // bsOut = make([]byte, clen) len2 := decInferLen(clen, maxInitLen, 1) bsOut = make([]byte, len2) r.readb(bsOut) @@ -2994,24 +1929,29 @@ func decByteSlice(r *decReaderSwitch, clen, maxInitLen int, bs []byte) (bsOut [] return } -// func decByteSliceZeroCopy(r decReader, clen, maxInitLen int, bs []byte) (bsOut []byte) { -// if _, ok := r.(*bytesDecReader); ok && clen <= maxInitLen { -// return r.readx(clen) -// } -// return decByteSlice(r, clen, maxInitLen, bs) -// } - +// detachZeroCopyBytes will copy the in bytes into dest, +// or create a new one if not large enough. +// +// It is used to ensure that the []byte returned is not +// part of the input stream or input stream buffers. func detachZeroCopyBytes(isBytesReader bool, dest []byte, in []byte) (out []byte) { - if xlen := len(in); xlen > 0 { - if isBytesReader || xlen <= scratchByteArrayLen { - if cap(dest) >= xlen { - out = dest[:xlen] - } else { - out = make([]byte, xlen) - } - copy(out, in) - return + if len(in) > 0 { + // if isBytesReader || len(in) <= scratchByteArrayLen { + // if cap(dest) >= len(in) { + // out = dest[:len(in)] + // } else { + // out = make([]byte, len(in)) + // } + // copy(out, in) + // return + // } + if cap(dest) >= len(in) { + out = dest[:len(in)] + } else { + out = make([]byte, len(in)) } + copy(out, in) + return } return in } @@ -3022,10 +1962,24 @@ func detachZeroCopyBytes(isBytesReader bool, dest []byte, in []byte) (out []byte // if <= 0, it is unset, and we infer it based on the unit size // - unit: number of bytes for each element of the collection func decInferLen(clen, maxlen, unit int) (rvlen int) { + const maxLenIfUnset = 8 // 64 // handle when maxlen is not set i.e. <= 0 - if clen <= 0 { + + // clen==0: use 0 + // maxlen<=0, clen<0: use default + // maxlen> 0, clen<0: use default + // maxlen<=0, clen>0: infer maxlen, and cap on it + // maxlen> 0, clen>0: cap at maxlen + + if clen == 0 { return } + if clen < 0 { + if clen == decContainerLenNil { + return 0 + } + return maxLenIfUnset + } if unit == 0 { return clen } @@ -3040,6 +1994,9 @@ func decInferLen(clen, maxlen, unit int) (rvlen int) { } else { maxlen = 4 * 1024 } + // if maxlen > maxLenIfUnset { + // maxlen = maxLenIfUnset + // } } if clen > maxlen { rvlen = maxlen @@ -3049,37 +2006,6 @@ func decInferLen(clen, maxlen, unit int) (rvlen int) { return } -func expandSliceRV(s reflect.Value, st reflect.Type, canChange bool, stElemSize, num, slen, scap int) ( - s2 reflect.Value, scap2 int, changed bool, err string) { - l1 := slen + num // new slice length - if l1 < slen { - err = errmsgExpandSliceOverflow - return - } - if l1 <= scap { - if s.CanSet() { - s.SetLen(l1) - } else if canChange { - s2 = s.Slice(0, l1) - scap2 = scap - changed = true - } else { - err = errmsgExpandSliceCannotChange - return - } - return - } - if !canChange { - err = errmsgExpandSliceCannotChange - return - } - scap2 = growCap(scap, stElemSize, num) - s2 = reflect.MakeSlice(st, l1, scap2) - changed = true - reflect.Copy(s2, s) - return -} - func decReadFull(r io.Reader, bs []byte) (n uint, err error) { var nn int for n < uint(len(bs)) && err == nil { @@ -3092,7 +2018,6 @@ func decReadFull(r io.Reader, bs []byte) (n uint, err error) { n += uint(nn) } } - // xdebugf("decReadFull: len(bs): %v, n: %v, err: %v", len(bs), n, err) // do not do this - it serves no purpose // if n != len(bs) && err == io.EOF { err = io.ErrUnexpectedEOF } return diff --git a/vendor/github.com/ugorji/go/codec/doc.go b/vendor/github.com/ugorji/go/codec/doc.go new file mode 100644 index 00000000..e987fa6b --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/doc.go @@ -0,0 +1,226 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +/* +Package codec provides a +High Performance, Feature-Rich Idiomatic Go 1.4+ codec/encoding library +for binc, msgpack, cbor, json. + +Supported Serialization formats are: + + - msgpack: https://github.com/msgpack/msgpack + - binc: http://github.com/ugorji/binc + - cbor: http://cbor.io http://tools.ietf.org/html/rfc7049 + - json: http://json.org http://tools.ietf.org/html/rfc7159 + - simple: + +This package will carefully use 'package unsafe' for performance reasons in specific places. +You can build without unsafe use by passing the safe or appengine tag +i.e. 'go install -tags=safe ...'. + +For detailed usage information, read the primer at http://ugorji.net/blog/go-codec-primer . + +The idiomatic Go support is as seen in other encoding packages in +the standard library (ie json, xml, gob, etc). + +Rich Feature Set includes: + + - Simple but extremely powerful and feature-rich API + - Support for go 1.4 and above, while selectively using newer APIs for later releases + - Excellent code coverage ( > 90% ) + - Very High Performance. + Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X. + - Careful selected use of 'unsafe' for targeted performance gains. + - 100% safe mode supported, where 'unsafe' is not used at all. + - Lock-free (sans mutex) concurrency for scaling to 100's of cores + - In-place updates during decode, with option to zero value in maps and slices prior to decode + - Coerce types where appropriate + e.g. decode an int in the stream into a float, decode numbers from formatted strings, etc + - Corner Cases: + Overflows, nil maps/slices, nil values in streams are handled correctly + - Standard field renaming via tags + - Support for omitting empty fields during an encoding + - Encoding from any value and decoding into pointer to any value + (struct, slice, map, primitives, pointers, interface{}, etc) + - Extensions to support efficient encoding/decoding of any named types + - Support encoding.(Binary|Text)(M|Unm)arshaler interfaces + - Support IsZero() bool to determine if a value is a zero value. + Analogous to time.Time.IsZero() bool. + - Decoding without a schema (into a interface{}). + Includes Options to configure what specific map or slice type to use + when decoding an encoded list or map into a nil interface{} + - Mapping a non-interface type to an interface, so we can decode appropriately + into any interface type with a correctly configured non-interface value. + - Encode a struct as an array, and decode struct from an array in the data stream + - Option to encode struct keys as numbers (instead of strings) + (to support structured streams with fields encoded as numeric codes) + - Comprehensive support for anonymous fields + - Fast (no-reflection) encoding/decoding of common maps and slices + - Code-generation for faster performance, supported in go 1.6+ + - Support binary (e.g. messagepack, cbor) and text (e.g. json) formats + - Support indefinite-length formats to enable true streaming + (for formats which support it e.g. json, cbor) + - Support canonical encoding, where a value is ALWAYS encoded as same sequence of bytes. + This mostly applies to maps, where iteration order is non-deterministic. + - NIL in data stream decoded as zero value + - Never silently skip data when decoding. + User decides whether to return an error or silently skip data when keys or indexes + in the data stream do not map to fields in the struct. + - Detect and error when encoding a cyclic reference (instead of stack overflow shutdown) + - Encode/Decode from/to chan types (for iterative streaming support) + - Drop-in replacement for encoding/json. `json:` key in struct tag supported. + - Provides a RPC Server and Client Codec for net/rpc communication protocol. + - Handle unique idiosyncrasies of codecs e.g. + - For messagepack, configure how ambiguities in handling raw bytes are resolved + - For messagepack, provide rpc server/client codec to support + msgpack-rpc protocol defined at: + https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md + +Extension Support + +Users can register a function to handle the encoding or decoding of +their custom types. + +There are no restrictions on what the custom type can be. Some examples: + + type BisSet []int + type BitSet64 uint64 + type UUID string + type MyStructWithUnexportedFields struct { a int; b bool; c []int; } + type GifImage struct { ... } + +As an illustration, MyStructWithUnexportedFields would normally be +encoded as an empty map because it has no exported fields, while UUID +would be encoded as a string. However, with extension support, you can +encode any of these however you like. + +There is also seamless support provided for registering an extension (with a tag) +but letting the encoding mechanism default to the standard way. + +Custom Encoding and Decoding + +This package maintains symmetry in the encoding and decoding halfs. +We determine how to encode or decode by walking this decision tree + + - is there an extension registered for the type? + - is type a codec.Selfer? + - is format binary, and is type a encoding.BinaryMarshaler and BinaryUnmarshaler? + - is format specifically json, and is type a encoding/json.Marshaler and Unmarshaler? + - is format text-based, and type an encoding.TextMarshaler and TextUnmarshaler? + - else we use a pair of functions based on the "kind" of the type e.g. map, slice, int64, etc + +This symmetry is important to reduce chances of issues happening because the +encoding and decoding sides are out of sync e.g. decoded via very specific +encoding.TextUnmarshaler but encoded via kind-specific generalized mode. + +Consequently, if a type only defines one-half of the symmetry +(e.g. it implements UnmarshalJSON() but not MarshalJSON() ), +then that type doesn't satisfy the check and we will continue walking down the +decision tree. + +RPC + +RPC Client and Server Codecs are implemented, so the codecs can be used +with the standard net/rpc package. + +Usage + +The Handle is SAFE for concurrent READ, but NOT SAFE for concurrent modification. + +The Encoder and Decoder are NOT safe for concurrent use. + +Consequently, the usage model is basically: + + - Create and initialize the Handle before any use. + Once created, DO NOT modify it. + - Multiple Encoders or Decoders can now use the Handle concurrently. + They only read information off the Handle (never write). + - However, each Encoder or Decoder MUST not be used concurrently + - To re-use an Encoder/Decoder, call Reset(...) on it first. + This allows you use state maintained on the Encoder/Decoder. + +Sample usage model: + + // create and configure Handle + var ( + bh codec.BincHandle + mh codec.MsgpackHandle + ch codec.CborHandle + ) + + mh.MapType = reflect.TypeOf(map[string]interface{}(nil)) + + // configure extensions + // e.g. for msgpack, define functions and enable Time support for tag 1 + // mh.SetExt(reflect.TypeOf(time.Time{}), 1, myExt) + + // create and use decoder/encoder + var ( + r io.Reader + w io.Writer + b []byte + h = &bh // or mh to use msgpack + ) + + dec = codec.NewDecoder(r, h) + dec = codec.NewDecoderBytes(b, h) + err = dec.Decode(&v) + + enc = codec.NewEncoder(w, h) + enc = codec.NewEncoderBytes(&b, h) + err = enc.Encode(v) + + //RPC Server + go func() { + for { + conn, err := listener.Accept() + rpcCodec := codec.GoRpc.ServerCodec(conn, h) + //OR rpcCodec := codec.MsgpackSpecRpc.ServerCodec(conn, h) + rpc.ServeCodec(rpcCodec) + } + }() + + //RPC Communication (client side) + conn, err = net.Dial("tcp", "localhost:5555") + rpcCodec := codec.GoRpc.ClientCodec(conn, h) + //OR rpcCodec := codec.MsgpackSpecRpc.ClientCodec(conn, h) + client := rpc.NewClientWithCodec(rpcCodec) + +Running Tests + +To run tests, use the following: + + go test + +To run the full suite of tests, use the following: + + go test -tags alltests -run Suite + +You can run the tag 'safe' to run tests or build in safe mode. e.g. + + go test -tags safe -run Json + go test -tags "alltests safe" -run Suite + +Running Benchmarks + + cd bench + go test -bench . -benchmem -benchtime 1s + +Please see http://github.com/ugorji/go-codec-bench . + +Caveats + +Struct fields matching the following are ignored during encoding and decoding + - struct tag value set to - + - func, complex numbers, unsafe pointers + - unexported and not embedded + - unexported and embedded and not struct kind + - unexported and embedded pointers (from go1.10) + +Every other field in a struct will be encoded/decoded. + +Embedded fields are encoded as if they exist in the top-level struct, +with some caveats. See Encode documentation. + +*/ +package codec diff --git a/vendor/github.com/ugorji/go/codec/encode.go b/vendor/github.com/ugorji/go/codec/encode.go index 8462440c..351dd2d0 100644 --- a/vendor/github.com/ugorji/go/codec/encode.go +++ b/vendor/github.com/ugorji/go/codec/encode.go @@ -9,7 +9,6 @@ import ( "fmt" "io" "reflect" - "runtime" "sort" "strconv" "time" @@ -21,22 +20,6 @@ const defEncByteBufSize = 1 << 10 // 4:16, 6:64, 8:256, 10:1024 var errEncoderNotInitialized = errors.New("Encoder not initialized") -/* - -// encWriter abstracts writing to a byte array or to an io.Writer. -// -// -// Deprecated: Use encWriterSwitch instead. -type encWriter interface { - writeb([]byte) - writestr(string) - writen1(byte) - writen2(byte, byte) - end() -} - -*/ - // encDriver abstracts the actual codec (binc vs msgpack, etc) type encDriver interface { EncodeNil() @@ -45,33 +28,26 @@ type encDriver interface { EncodeBool(b bool) EncodeFloat32(f float32) EncodeFloat64(f float64) - // encodeExtPreamble(xtag byte, length int) - EncodeRawExt(re *RawExt, e *Encoder) - EncodeExt(v interface{}, xtag uint64, ext Ext, e *Encoder) - // Deprecated: use EncodeStringEnc instead - EncodeString(c charEncoding, v string) - // Deprecated: use EncodeStringBytesRaw instead - EncodeStringBytes(c charEncoding, v []byte) - EncodeStringEnc(c charEncoding, v string) // c cannot be cRAW - // EncodeSymbol(v string) + EncodeRawExt(re *RawExt) + EncodeExt(v interface{}, xtag uint64, ext Ext) + // EncodeString using cUTF8, honor'ing StringToRaw flag + EncodeString(v string) EncodeStringBytesRaw(v []byte) EncodeTime(time.Time) - //encBignum(f *big.Int) - //encStringRunes(c charEncoding, v []rune) WriteArrayStart(length int) - WriteArrayElem() WriteArrayEnd() WriteMapStart(length int) - WriteMapElemKey() - WriteMapElemValue() WriteMapEnd() reset() atEndOfEncode() + encoder() *Encoder } -type encDriverAsis interface { - EncodeAsis(v []byte) +type encDriverContainerTracker interface { + WriteArrayElem() + WriteMapElemKey() + WriteMapElemValue() } type encodeError struct { @@ -85,33 +61,11 @@ func (e encodeError) Error() string { type encDriverNoopContainerWriter struct{} func (encDriverNoopContainerWriter) WriteArrayStart(length int) {} -func (encDriverNoopContainerWriter) WriteArrayElem() {} func (encDriverNoopContainerWriter) WriteArrayEnd() {} func (encDriverNoopContainerWriter) WriteMapStart(length int) {} -func (encDriverNoopContainerWriter) WriteMapElemKey() {} -func (encDriverNoopContainerWriter) WriteMapElemValue() {} func (encDriverNoopContainerWriter) WriteMapEnd() {} func (encDriverNoopContainerWriter) atEndOfEncode() {} -type encDriverTrackContainerWriter struct { - c containerState -} - -func (e *encDriverTrackContainerWriter) WriteArrayStart(length int) { e.c = containerArrayStart } -func (e *encDriverTrackContainerWriter) WriteArrayElem() { e.c = containerArrayElem } -func (e *encDriverTrackContainerWriter) WriteArrayEnd() { e.c = containerArrayEnd } -func (e *encDriverTrackContainerWriter) WriteMapStart(length int) { e.c = containerMapStart } -func (e *encDriverTrackContainerWriter) WriteMapElemKey() { e.c = containerMapKey } -func (e *encDriverTrackContainerWriter) WriteMapElemValue() { e.c = containerMapValue } -func (e *encDriverTrackContainerWriter) WriteMapEnd() { e.c = containerMapEnd } -func (e *encDriverTrackContainerWriter) atEndOfEncode() {} - -// type ioEncWriterWriter interface { -// WriteByte(c byte) error -// WriteString(s string) (n int, err error) -// Write(p []byte) (n int, err error) -// } - // EncodeOptions captures configuration options during encode. type EncodeOptions struct { // WriterBufferSize is the size of the buffer used when writing. @@ -199,264 +153,99 @@ type EncodeOptions struct { // --------------------------------------------- -/* - -type ioEncStringWriter interface { - WriteString(s string) (n int, err error) -} - -// ioEncWriter implements encWriter and can write to an io.Writer implementation -type ioEncWriter struct { - w io.Writer - ww io.Writer - bw io.ByteWriter - sw ioEncStringWriter - fw ioFlusher - b [8]byte -} - -func (z *ioEncWriter) reset(w io.Writer) { - z.w = w - var ok bool - if z.bw, ok = w.(io.ByteWriter); !ok { - z.bw = z - } - if z.sw, ok = w.(ioEncStringWriter); !ok { - z.sw = z - } - z.fw, _ = w.(ioFlusher) - z.ww = w -} - -func (z *ioEncWriter) WriteByte(b byte) (err error) { - z.b[0] = b - _, err = z.w.Write(z.b[:1]) - return -} - -func (z *ioEncWriter) WriteString(s string) (n int, err error) { - return z.w.Write(bytesView(s)) -} - -func (z *ioEncWriter) writeb(bs []byte) { - if _, err := z.ww.Write(bs); err != nil { - panic(err) - } +func (e *Encoder) rawExt(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeRawExt(rv2i(rv).(*RawExt)) } -func (z *ioEncWriter) writestr(s string) { - if _, err := z.sw.WriteString(s); err != nil { - panic(err) - } +func (e *Encoder) ext(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeExt(rv2i(rv), f.xfTag, f.xfFn) } -func (z *ioEncWriter) writen1(b byte) { - if err := z.bw.WriteByte(b); err != nil { - panic(err) - } +func (e *Encoder) selferMarshal(f *codecFnInfo, rv reflect.Value) { + rv2i(rv).(Selfer).CodecEncodeSelf(e) } -func (z *ioEncWriter) writen2(b1, b2 byte) { - var err error - if err = z.bw.WriteByte(b1); err == nil { - if err = z.bw.WriteByte(b2); err == nil { - return - } - } - panic(err) +func (e *Encoder) binaryMarshal(f *codecFnInfo, rv reflect.Value) { + bs, fnerr := rv2i(rv).(encoding.BinaryMarshaler).MarshalBinary() + e.marshalRaw(bs, fnerr) } -// func (z *ioEncWriter) writen5(b1, b2, b3, b4, b5 byte) { -// z.b[0], z.b[1], z.b[2], z.b[3], z.b[4] = b1, b2, b3, b4, b5 -// if _, err := z.ww.Write(z.b[:5]); err != nil { -// panic(err) -// } -// } - -//go:noinline - so *encWriterSwitch.XXX has the bytesEncAppender.XXX inlined -func (z *ioEncWriter) end() { - if z.fw != nil { - if err := z.fw.Flush(); err != nil { - panic(err) - } - } +func (e *Encoder) textMarshal(f *codecFnInfo, rv reflect.Value) { + bs, fnerr := rv2i(rv).(encoding.TextMarshaler).MarshalText() + e.marshalUtf8(bs, fnerr) } -*/ - -// --------------------------------------------- - -// bufioEncWriter -type bufioEncWriter struct { - buf []byte - w io.Writer - n int - sz int // buf size - - // Extensions can call Encode() within a current Encode() call. - // We need to know when the top level Encode() call returns, - // so we can decide whether to Release() or not. - calls uint16 // what depth in mustDecode are we in now. - - _ [6]uint8 // padding - - bytesBufPooler - - _ [1]uint64 // padding - // a int - // b [4]byte - // err +func (e *Encoder) jsonMarshal(f *codecFnInfo, rv reflect.Value) { + bs, fnerr := rv2i(rv).(jsonMarshaler).MarshalJSON() + e.marshalAsis(bs, fnerr) } -func (z *bufioEncWriter) reset(w io.Writer, bufsize int) { - z.w = w - z.n = 0 - z.calls = 0 - if bufsize <= 0 { - bufsize = defEncByteBufSize - } - z.sz = bufsize - if cap(z.buf) >= bufsize { - z.buf = z.buf[:cap(z.buf)] - } else { - z.buf = z.bytesBufPooler.get(bufsize) - // z.buf = make([]byte, bufsize) - } +func (e *Encoder) raw(f *codecFnInfo, rv reflect.Value) { + e.rawBytes(rv2i(rv).(Raw)) } -func (z *bufioEncWriter) release() { - z.buf = nil - z.bytesBufPooler.end() +func (e *Encoder) kBool(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeBool(rvGetBool(rv)) } -//go:noinline - flush only called intermittently -func (z *bufioEncWriter) flushErr() (err error) { - n, err := z.w.Write(z.buf[:z.n]) - z.n -= n - if z.n > 0 && err == nil { - err = io.ErrShortWrite - } - if n > 0 && z.n > 0 { - copy(z.buf, z.buf[n:z.n+n]) - } - return err +func (e *Encoder) kTime(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeTime(rvGetTime(rv)) } -func (z *bufioEncWriter) flush() { - if err := z.flushErr(); err != nil { - panic(err) - } +func (e *Encoder) kString(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeString(rvGetString(rv)) } -func (z *bufioEncWriter) writeb(s []byte) { -LOOP: - a := len(z.buf) - z.n - if len(s) > a { - z.n += copy(z.buf[z.n:], s[:a]) - s = s[a:] - z.flush() - goto LOOP - } - z.n += copy(z.buf[z.n:], s) -} - -func (z *bufioEncWriter) writestr(s string) { - // z.writeb(bytesView(s)) // inlined below -LOOP: - a := len(z.buf) - z.n - if len(s) > a { - z.n += copy(z.buf[z.n:], s[:a]) - s = s[a:] - z.flush() - goto LOOP - } - z.n += copy(z.buf[z.n:], s) +func (e *Encoder) kFloat64(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeFloat64(rvGetFloat64(rv)) } -func (z *bufioEncWriter) writen1(b1 byte) { - if 1 > len(z.buf)-z.n { - z.flush() - } - z.buf[z.n] = b1 - z.n++ +func (e *Encoder) kFloat32(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeFloat32(rvGetFloat32(rv)) } -func (z *bufioEncWriter) writen2(b1, b2 byte) { - if 2 > len(z.buf)-z.n { - z.flush() - } - z.buf[z.n+1] = b2 - z.buf[z.n] = b1 - z.n += 2 +func (e *Encoder) kInt(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeInt(int64(rvGetInt(rv))) } -func (z *bufioEncWriter) endErr() (err error) { - if z.n > 0 { - err = z.flushErr() - } - return +func (e *Encoder) kInt8(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeInt(int64(rvGetInt8(rv))) } -// --------------------------------------------- - -// bytesEncAppender implements encWriter and can write to an byte slice. -type bytesEncAppender struct { - b []byte - out *[]byte +func (e *Encoder) kInt16(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeInt(int64(rvGetInt16(rv))) } -func (z *bytesEncAppender) writeb(s []byte) { - z.b = append(z.b, s...) -} -func (z *bytesEncAppender) writestr(s string) { - z.b = append(z.b, s...) -} -func (z *bytesEncAppender) writen1(b1 byte) { - z.b = append(z.b, b1) -} -func (z *bytesEncAppender) writen2(b1, b2 byte) { - z.b = append(z.b, b1, b2) -} -func (z *bytesEncAppender) endErr() error { - *(z.out) = z.b - return nil -} -func (z *bytesEncAppender) reset(in []byte, out *[]byte) { - z.b = in[:0] - z.out = out +func (e *Encoder) kInt32(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeInt(int64(rvGetInt32(rv))) } -// --------------------------------------------- - -func (e *Encoder) rawExt(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeRawExt(rv2i(rv).(*RawExt), e) +func (e *Encoder) kInt64(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeInt(int64(rvGetInt64(rv))) } -func (e *Encoder) ext(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeExt(rv2i(rv), f.xfTag, f.xfFn, e) +func (e *Encoder) kUint(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeUint(uint64(rvGetUint(rv))) } -func (e *Encoder) selferMarshal(f *codecFnInfo, rv reflect.Value) { - rv2i(rv).(Selfer).CodecEncodeSelf(e) +func (e *Encoder) kUint8(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeUint(uint64(rvGetUint8(rv))) } -func (e *Encoder) binaryMarshal(f *codecFnInfo, rv reflect.Value) { - bs, fnerr := rv2i(rv).(encoding.BinaryMarshaler).MarshalBinary() - e.marshalRaw(bs, fnerr) +func (e *Encoder) kUint16(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeUint(uint64(rvGetUint16(rv))) } -func (e *Encoder) textMarshal(f *codecFnInfo, rv reflect.Value) { - bs, fnerr := rv2i(rv).(encoding.TextMarshaler).MarshalText() - e.marshalUtf8(bs, fnerr) +func (e *Encoder) kUint32(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeUint(uint64(rvGetUint32(rv))) } -func (e *Encoder) jsonMarshal(f *codecFnInfo, rv reflect.Value) { - bs, fnerr := rv2i(rv).(jsonMarshaler).MarshalJSON() - e.marshalAsis(bs, fnerr) +func (e *Encoder) kUint64(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeUint(uint64(rvGetUint64(rv))) } -func (e *Encoder) raw(f *codecFnInfo, rv reflect.Value) { - e.rawBytes(rv2i(rv).(Raw)) +func (e *Encoder) kUintptr(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeUint(uint64(rvGetUintptr(rv))) } func (e *Encoder) kInvalid(f *codecFnInfo, rv reflect.Value) { @@ -467,373 +256,354 @@ func (e *Encoder) kErr(f *codecFnInfo, rv reflect.Value) { e.errorf("unsupported kind %s, for %#v", rv.Kind(), rv) } -func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { - ti := f.ti - ee := e.e - // array may be non-addressable, so we have to manage with care - // (don't call rv.Bytes, rv.Slice, etc). - // E.g. type struct S{B [2]byte}; - // Encode(S{}) will bomb on "panic: slice of unaddressable array". - if f.seq != seqTypeArray { - if rv.IsNil() { - ee.EncodeNil() - return +func chanToSlice(rv reflect.Value, rtslice reflect.Type, timeout time.Duration) (rvcs reflect.Value) { + rvcs = reflect.Zero(rtslice) + if timeout < 0 { // consume until close + for { + recv, recvOk := rv.Recv() + if !recvOk { + break + } + rvcs = reflect.Append(rvcs, recv) } - // If in this method, then there was no extension function defined. - // So it's okay to treat as []byte. - if ti.rtid == uint8SliceTypId { - ee.EncodeStringBytesRaw(rv.Bytes()) - return + } else { + cases := make([]reflect.SelectCase, 2) + cases[0] = reflect.SelectCase{Dir: reflect.SelectRecv, Chan: rv} + if timeout == 0 { + cases[1] = reflect.SelectCase{Dir: reflect.SelectDefault} + } else { + tt := time.NewTimer(timeout) + cases[1] = reflect.SelectCase{Dir: reflect.SelectRecv, Chan: rv4i(tt.C)} } - } - if f.seq == seqTypeChan && ti.chandir&uint8(reflect.RecvDir) == 0 { - e.errorf("send-only channel cannot be encoded") - } - elemsep := e.esep - rtelem := ti.elem - rtelemIsByte := uint8TypId == rt2id(rtelem) // NOT rtelem.Kind() == reflect.Uint8 - var l int - // if a slice, array or chan of bytes, treat specially - if rtelemIsByte { - switch f.seq { - case seqTypeSlice: - ee.EncodeStringBytesRaw(rv.Bytes()) - case seqTypeArray: - l = rv.Len() - if rv.CanAddr() { - ee.EncodeStringBytesRaw(rv.Slice(0, l).Bytes()) - } else { - var bs []byte - if l <= cap(e.b) { - bs = e.b[:l] - } else { - bs = make([]byte, l) - } - reflect.Copy(reflect.ValueOf(bs), rv) - ee.EncodeStringBytesRaw(bs) - } - case seqTypeChan: - // do not use range, so that the number of elements encoded - // does not change, and encoding does not hang waiting on someone to close chan. - // for b := range rv2i(rv).(<-chan byte) { bs = append(bs, b) } - // ch := rv2i(rv).(<-chan byte) // fix error - that this is a chan byte, not a <-chan byte. - - if rv.IsNil() { - ee.EncodeNil() + for { + chosen, recv, recvOk := reflect.Select(cases) + if chosen == 1 || !recvOk { break } - bs := e.b[:0] - irv := rv2i(rv) - ch, ok := irv.(<-chan byte) - if !ok { - ch = irv.(chan byte) - } - - L1: - switch timeout := e.h.ChanRecvTimeout; { - case timeout == 0: // only consume available - for { - select { - case b := <-ch: - bs = append(bs, b) - default: - break L1 - } - } - case timeout > 0: // consume until timeout - tt := time.NewTimer(timeout) - for { - select { - case b := <-ch: - bs = append(bs, b) - case <-tt.C: - // close(tt.C) - break L1 - } - } - default: // consume until close - for b := range ch { - bs = append(bs, b) - } - } - - ee.EncodeStringBytesRaw(bs) + rvcs = reflect.Append(rvcs, recv) } - return } + return +} - // if chan, consume chan into a slice, and work off that slice. - if f.seq == seqTypeChan { - rvcs := reflect.Zero(reflect.SliceOf(rtelem)) - timeout := e.h.ChanRecvTimeout - if timeout < 0 { // consume until close - for { - recv, recvOk := rv.Recv() - if !recvOk { - break - } - rvcs = reflect.Append(rvcs, recv) - } - } else { - cases := make([]reflect.SelectCase, 2) - cases[0] = reflect.SelectCase{Dir: reflect.SelectRecv, Chan: rv} - if timeout == 0 { - cases[1] = reflect.SelectCase{Dir: reflect.SelectDefault} - } else { - tt := time.NewTimer(timeout) - cases[1] = reflect.SelectCase{Dir: reflect.SelectRecv, Chan: reflect.ValueOf(tt.C)} - } - for { - chosen, recv, recvOk := reflect.Select(cases) - if chosen == 1 || !recvOk { - break - } - rvcs = reflect.Append(rvcs, recv) - } - } - rv = rvcs // TODO: ensure this doesn't mess up anywhere that rv of kind chan is expected +func (e *Encoder) kSeqFn(rtelem reflect.Type) (fn *codecFn) { + for rtelem.Kind() == reflect.Ptr { + rtelem = rtelem.Elem() } + // if kind is reflect.Interface, do not pre-determine the + // encoding type, because preEncodeValue may break it down to + // a concrete type and kInterface will bomb. + if rtelem.Kind() != reflect.Interface { + fn = e.h.fn(rtelem) + } + return +} - l = rv.Len() - if ti.mbs { +func (e *Encoder) kSliceWMbs(rv reflect.Value, ti *typeInfo) { + var l = rvGetSliceLen(rv) + if l == 0 { + e.mapStart(0) + } else { if l%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", l) return } - ee.WriteMapStart(l / 2) - } else { - ee.WriteArrayStart(l) + e.mapStart(l / 2) + fn := e.kSeqFn(ti.elem) + for j := 0; j < l; j++ { + if j%2 == 0 { + e.mapElemKey() + } else { + e.mapElemValue() + } + e.encodeValue(rvSliceIndex(rv, j, ti), fn) + } } + e.mapEnd() +} +func (e *Encoder) kSliceW(rv reflect.Value, ti *typeInfo) { + var l = rvGetSliceLen(rv) + e.arrayStart(l) if l > 0 { - var fn *codecFn - for rtelem.Kind() == reflect.Ptr { - rtelem = rtelem.Elem() + fn := e.kSeqFn(ti.elem) + for j := 0; j < l; j++ { + e.arrayElem() + e.encodeValue(rvSliceIndex(rv, j, ti), fn) } - // if kind is reflect.Interface, do not pre-determine the - // encoding type, because preEncodeValue may break it down to - // a concrete type and kInterface will bomb. - if rtelem.Kind() != reflect.Interface { - fn = e.h.fn(rtelem, true, true) + } + e.arrayEnd() +} + +func (e *Encoder) kSeqWMbs(rv reflect.Value, ti *typeInfo) { + var l = rv.Len() + if l == 0 { + e.mapStart(0) + } else { + if l%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", l) + return } + e.mapStart(l / 2) + fn := e.kSeqFn(ti.elem) for j := 0; j < l; j++ { - if elemsep { - if ti.mbs { - if j%2 == 0 { - ee.WriteMapElemKey() - } else { - ee.WriteMapElemValue() - } - } else { - ee.WriteArrayElem() - } + if j%2 == 0 { + e.mapElemKey() + } else { + e.mapElemValue() } - e.encodeValue(rv.Index(j), fn, true) + e.encodeValue(rv.Index(j), fn) } } + e.mapEnd() +} - if ti.mbs { - ee.WriteMapEnd() +func (e *Encoder) kSeqW(rv reflect.Value, ti *typeInfo) { + var l = rv.Len() + e.arrayStart(l) + if l > 0 { + fn := e.kSeqFn(ti.elem) + for j := 0; j < l; j++ { + e.arrayElem() + e.encodeValue(rv.Index(j), fn) + } + } + e.arrayEnd() +} + +func (e *Encoder) kChan(f *codecFnInfo, rv reflect.Value) { + if rvIsNil(rv) { + e.e.EncodeNil() + return + } + if f.ti.chandir&uint8(reflect.RecvDir) == 0 { + e.errorf("send-only channel cannot be encoded") + return + } + if !f.ti.mbs && uint8TypId == rt2id(f.ti.elem) { + e.kSliceBytesChan(rv) + return + } + rtslice := reflect.SliceOf(f.ti.elem) + rv = chanToSlice(rv, rtslice, e.h.ChanRecvTimeout) + ti := e.h.getTypeInfo(rt2id(rtslice), rtslice) + if f.ti.mbs { + e.kSliceWMbs(rv, ti) } else { - ee.WriteArrayEnd() + e.kSliceW(rv, ti) } } -func (e *Encoder) kStructNoOmitempty(f *codecFnInfo, rv reflect.Value) { - fti := f.ti - tisfi := fti.sfiSrc - toMap := !(fti.toArray || e.h.StructToArray) - if toMap { - tisfi = fti.sfiSort +func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { + if rvIsNil(rv) { + e.e.EncodeNil() + return + } + if f.ti.mbs { + e.kSliceWMbs(rv, f.ti) + } else { + if f.ti.rtid == uint8SliceTypId || uint8TypId == rt2id(f.ti.elem) { + e.e.EncodeStringBytesRaw(rvGetBytes(rv)) + } else { + e.kSliceW(rv, f.ti) + } + } +} + +func (e *Encoder) kArray(f *codecFnInfo, rv reflect.Value) { + if f.ti.mbs { + e.kSeqWMbs(rv, f.ti) + } else { + if uint8TypId == rt2id(f.ti.elem) { + e.e.EncodeStringBytesRaw(rvGetArrayBytesRO(rv, e.b[:])) + } else { + e.kSeqW(rv, f.ti) + } } +} - ee := e.e +func (e *Encoder) kSliceBytesChan(rv reflect.Value) { + // do not use range, so that the number of elements encoded + // does not change, and encoding does not hang waiting on someone to close chan. - sfn := structFieldNode{v: rv, update: false} - if toMap { - ee.WriteMapStart(len(tisfi)) - if e.esep { - for _, si := range tisfi { - ee.WriteMapElemKey() - e.kStructFieldKey(fti.keyType, si.encNameAsciiAlphaNum, si.encName) - ee.WriteMapElemValue() - e.encodeValue(sfn.field(si), nil, true) + // for b := range rv2i(rv).(<-chan byte) { bs = append(bs, b) } + // ch := rv2i(rv).(<-chan byte) // fix error - that this is a chan byte, not a <-chan byte. + + bs := e.b[:0] + irv := rv2i(rv) + ch, ok := irv.(<-chan byte) + if !ok { + ch = irv.(chan byte) + } + +L1: + switch timeout := e.h.ChanRecvTimeout; { + case timeout == 0: // only consume available + for { + select { + case b := <-ch: + bs = append(bs, b) + default: + break L1 } - } else { - for _, si := range tisfi { - e.kStructFieldKey(fti.keyType, si.encNameAsciiAlphaNum, si.encName) - e.encodeValue(sfn.field(si), nil, true) + } + case timeout > 0: // consume until timeout + tt := time.NewTimer(timeout) + for { + select { + case b := <-ch: + bs = append(bs, b) + case <-tt.C: + // close(tt.C) + break L1 } } - ee.WriteMapEnd() + default: // consume until close + for b := range ch { + bs = append(bs, b) + } + } + + e.e.EncodeStringBytesRaw(bs) +} + +func (e *Encoder) kStructNoOmitempty(f *codecFnInfo, rv reflect.Value) { + sfn := structFieldNode{v: rv, update: false} + if f.ti.toArray || e.h.StructToArray { // toArray + e.arrayStart(len(f.ti.sfiSrc)) + for _, si := range f.ti.sfiSrc { + e.arrayElem() + e.encodeValue(sfn.field(si), nil) + } + e.arrayEnd() } else { - ee.WriteArrayStart(len(tisfi)) - if e.esep { - for _, si := range tisfi { - ee.WriteArrayElem() - e.encodeValue(sfn.field(si), nil, true) - } - } else { - for _, si := range tisfi { - e.encodeValue(sfn.field(si), nil, true) - } + e.mapStart(len(f.ti.sfiSort)) + for _, si := range f.ti.sfiSort { + e.mapElemKey() + e.kStructFieldKey(f.ti.keyType, si.encNameAsciiAlphaNum, si.encName) + e.mapElemValue() + e.encodeValue(sfn.field(si), nil) } - ee.WriteArrayEnd() + e.mapEnd() } } func (e *Encoder) kStructFieldKey(keyType valueType, encNameAsciiAlphaNum bool, encName string) { - encStructFieldKey(encName, e.e, e.w, keyType, encNameAsciiAlphaNum, e.js) + encStructFieldKey(encName, e.e, e.w(), keyType, encNameAsciiAlphaNum, e.js) } func (e *Encoder) kStruct(f *codecFnInfo, rv reflect.Value) { - fti := f.ti - elemsep := e.esep - tisfi := fti.sfiSrc var newlen int - toMap := !(fti.toArray || e.h.StructToArray) + toMap := !(f.ti.toArray || e.h.StructToArray) var mf map[string]interface{} - if f.ti.mf { + if f.ti.isFlag(tiflagMissingFielder) { mf = rv2i(rv).(MissingFielder).CodecMissingFields() toMap = true newlen += len(mf) - } else if f.ti.mfp { + } else if f.ti.isFlag(tiflagMissingFielderPtr) { if rv.CanAddr() { mf = rv2i(rv.Addr()).(MissingFielder).CodecMissingFields() } else { // make a new addressable value of same one, and use it rv2 := reflect.New(rv.Type()) - rv2.Elem().Set(rv) + rvSetDirect(rv2.Elem(), rv) mf = rv2i(rv2).(MissingFielder).CodecMissingFields() } toMap = true newlen += len(mf) } - // if toMap, use the sorted array. If toArray, use unsorted array (to match sequence in struct) - if toMap { - tisfi = fti.sfiSort - } - newlen += len(tisfi) - ee := e.e + newlen += len(f.ti.sfiSrc) - // Use sync.Pool to reduce allocating slices unnecessarily. - // The cost of sync.Pool is less than the cost of new allocation. - // - // Each element of the array pools one of encStructPool(8|16|32|64). - // It allows the re-use of slices up to 64 in length. - // A performance cost of encoding structs was collecting - // which values were empty and should be omitted. - // We needed slices of reflect.Value and string to collect them. - // This shared pool reduces the amount of unnecessary creation we do. - // The cost is that of locking sometimes, but sync.Pool is efficient - // enough to reduce thread contention. - - // fmt.Printf(">>>>>>>>>>>>>> encode.kStruct: newlen: %d\n", newlen) - var spool sfiRvPooler - var fkvs = spool.get(newlen) + var fkvs = e.slist.get(newlen) - var kv sfiRv recur := e.h.RecursiveEmptyCheck sfn := structFieldNode{v: rv, update: false} - newlen = 0 - for _, si := range tisfi { - // kv.r = si.field(rv, false) - kv.r = sfn.field(si) - if toMap { + + var kv sfiRv + var j int + if toMap { + newlen = 0 + for _, si := range f.ti.sfiSort { // use sorted array + kv.r = sfn.field(si) if si.omitEmpty() && isEmptyValue(kv.r, e.h.TypeInfos, recur, recur) { continue } kv.v = si // si.encName - } else { - // use the zero value. - // if a reference or struct, set to nil (so you do not output too much) - if si.omitEmpty() && isEmptyValue(kv.r, e.h.TypeInfos, recur, recur) { - switch kv.r.Kind() { - case reflect.Struct, reflect.Interface, reflect.Ptr, - reflect.Array, reflect.Map, reflect.Slice: - kv.r = reflect.Value{} //encode as nil - } - } - } - fkvs[newlen] = kv - newlen++ - } - fkvs = fkvs[:newlen] - - var mflen int - for k, v := range mf { - if k == "" { - delete(mf, k) - continue + fkvs[newlen] = kv + newlen++ } - if fti.infoFieldOmitempty && isEmptyValue(reflect.ValueOf(v), e.h.TypeInfos, recur, recur) { - delete(mf, k) - continue - } - mflen++ - } - - var j int - if toMap { - ee.WriteMapStart(newlen + mflen) - if elemsep { - for j = 0; j < len(fkvs); j++ { - kv = fkvs[j] - ee.WriteMapElemKey() - e.kStructFieldKey(fti.keyType, kv.v.encNameAsciiAlphaNum, kv.v.encName) - ee.WriteMapElemValue() - e.encodeValue(kv.r, nil, true) + var mflen int + for k, v := range mf { + if k == "" { + delete(mf, k) + continue } - } else { - for j = 0; j < len(fkvs); j++ { - kv = fkvs[j] - e.kStructFieldKey(fti.keyType, kv.v.encNameAsciiAlphaNum, kv.v.encName) - e.encodeValue(kv.r, nil, true) + if f.ti.infoFieldOmitempty && isEmptyValue(rv4i(v), e.h.TypeInfos, recur, recur) { + delete(mf, k) + continue } + mflen++ + } + // encode it all + e.mapStart(newlen + mflen) + for j = 0; j < newlen; j++ { + kv = fkvs[j] + e.mapElemKey() + e.kStructFieldKey(f.ti.keyType, kv.v.encNameAsciiAlphaNum, kv.v.encName) + e.mapElemValue() + e.encodeValue(kv.r, nil) } // now, add the others for k, v := range mf { - ee.WriteMapElemKey() - e.kStructFieldKey(fti.keyType, false, k) - ee.WriteMapElemValue() + e.mapElemKey() + e.kStructFieldKey(f.ti.keyType, false, k) + e.mapElemValue() e.encode(v) } - ee.WriteMapEnd() + e.mapEnd() } else { - ee.WriteArrayStart(newlen) - if elemsep { - for j = 0; j < len(fkvs); j++ { - ee.WriteArrayElem() - e.encodeValue(fkvs[j].r, nil, true) - } - } else { - for j = 0; j < len(fkvs); j++ { - e.encodeValue(fkvs[j].r, nil, true) + newlen = len(f.ti.sfiSrc) + for i, si := range f.ti.sfiSrc { // use unsorted array (to match sequence in struct) + kv.r = sfn.field(si) + // use the zero value. + // if a reference or struct, set to nil (so you do not output too much) + if si.omitEmpty() && isEmptyValue(kv.r, e.h.TypeInfos, recur, recur) { + switch kv.r.Kind() { + case reflect.Struct, reflect.Interface, reflect.Ptr, reflect.Array, reflect.Map, reflect.Slice: + kv.r = reflect.Value{} //encode as nil + } } + fkvs[i] = kv + } + // encode it all + e.arrayStart(newlen) + for j = 0; j < newlen; j++ { + e.arrayElem() + e.encodeValue(fkvs[j].r, nil) } - ee.WriteArrayEnd() + e.arrayEnd() } // do not use defer. Instead, use explicit pool return at end of function. // defer has a cost we are trying to avoid. // If there is a panic and these slices are not returned, it is ok. - spool.end() + // spool.end() + e.slist.put(fkvs) } func (e *Encoder) kMap(f *codecFnInfo, rv reflect.Value) { - ee := e.e - if rv.IsNil() { - ee.EncodeNil() + if rvIsNil(rv) { + e.e.EncodeNil() return } l := rv.Len() - ee.WriteMapStart(l) + e.mapStart(l) if l == 0 { - ee.WriteMapEnd() + e.mapEnd() return } - // var asSymbols bool + // determine the underlying key and val encFn's for the map. // This eliminates some work which is done for each loop iteration i.e. // rv.Type(), ref.ValueOf(rt).Pointer(), then check map/list for fn. @@ -841,67 +611,77 @@ func (e *Encoder) kMap(f *codecFnInfo, rv reflect.Value) { // However, if kind is reflect.Interface, do not pre-determine the // encoding type, because preEncodeValue may break it down to // a concrete type and kInterface will bomb. + var keyFn, valFn *codecFn - ti := f.ti - rtkey0 := ti.key - rtkey := rtkey0 - rtval0 := ti.elem - rtval := rtval0 - // rtkeyid := rt2id(rtkey0) - for rtval.Kind() == reflect.Ptr { + + ktypeKind := f.ti.key.Kind() + vtypeKind := f.ti.elem.Kind() + + rtval := f.ti.elem + rtvalkind := vtypeKind + for rtvalkind == reflect.Ptr { rtval = rtval.Elem() + rtvalkind = rtval.Kind() } - if rtval.Kind() != reflect.Interface { - valFn = e.h.fn(rtval, true, true) + if rtvalkind != reflect.Interface { + valFn = e.h.fn(rtval) } - mks := rv.MapKeys() + + var rvv = mapAddressableRV(f.ti.elem, vtypeKind) if e.h.Canonical { - e.kMapCanonical(rtkey, rv, mks, valFn) - ee.WriteMapEnd() + e.kMapCanonical(f.ti.key, f.ti.elem, rv, rvv, valFn) + e.mapEnd() return } - var keyTypeIsString = stringTypId == rt2id(rtkey0) // rtkeyid + rtkey := f.ti.key + var keyTypeIsString = stringTypId == rt2id(rtkey) // rtkeyid if !keyTypeIsString { for rtkey.Kind() == reflect.Ptr { rtkey = rtkey.Elem() } if rtkey.Kind() != reflect.Interface { - // rtkeyid = rt2id(rtkey) - keyFn = e.h.fn(rtkey, true, true) + keyFn = e.h.fn(rtkey) } } - // for j, lmks := 0, len(mks); j < lmks; j++ { - for j := range mks { - if e.esep { - ee.WriteMapElemKey() + var rvk = mapAddressableRV(f.ti.key, ktypeKind) + + var it mapIter + mapRange(&it, rv, rvk, rvv, true) + validKV := it.ValidKV() + var vx reflect.Value + for it.Next() { + e.mapElemKey() + if validKV { + vx = it.Key() + } else { + vx = rvk } if keyTypeIsString { - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(mks[j].String())) - } else { - ee.EncodeStringEnc(cUTF8, mks[j].String()) - } + e.e.EncodeString(vx.String()) } else { - e.encodeValue(mks[j], keyFn, true) + e.encodeValue(vx, keyFn) } - if e.esep { - ee.WriteMapElemValue() + e.mapElemValue() + if validKV { + vx = it.Value() + } else { + vx = rvv } - e.encodeValue(rv.MapIndex(mks[j]), valFn, true) - + e.encodeValue(vx, valFn) } - ee.WriteMapEnd() + it.Done() + + e.mapEnd() } -func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []reflect.Value, valFn *codecFn) { - ee := e.e - elemsep := e.esep +func (e *Encoder) kMapCanonical(rtkey, rtval reflect.Type, rv, rvv reflect.Value, valFn *codecFn) { // we previously did out-of-band if an extension was registered. // This is not necessary, as the natural kind is sufficient for ordering. + mks := rv.MapKeys() switch rtkey.Kind() { case reflect.Bool: mksv := make([]boolRv, len(mks)) @@ -912,14 +692,10 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl } sort.Sort(boolRvSlice(mksv)) for i := range mksv { - if elemsep { - ee.WriteMapElemKey() - } - ee.EncodeBool(mksv[i].v) - if elemsep { - ee.WriteMapElemValue() - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + e.mapElemKey() + e.e.EncodeBool(mksv[i].v) + e.mapElemValue() + e.encodeValue(mapGet(rv, mksv[i].r, rvv), valFn) } case reflect.String: mksv := make([]stringRv, len(mks)) @@ -930,93 +706,69 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl } sort.Sort(stringRvSlice(mksv)) for i := range mksv { - if elemsep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(mksv[i].v)) - } else { - ee.EncodeStringEnc(cUTF8, mksv[i].v) - } - if elemsep { - ee.WriteMapElemValue() - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + e.mapElemKey() + e.e.EncodeString(mksv[i].v) + e.mapElemValue() + e.encodeValue(mapGet(rv, mksv[i].r, rvv), valFn) } case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint, reflect.Uintptr: - mksv := make([]uintRv, len(mks)) + mksv := make([]uint64Rv, len(mks)) for i, k := range mks { v := &mksv[i] v.r = k v.v = k.Uint() } - sort.Sort(uintRvSlice(mksv)) + sort.Sort(uint64RvSlice(mksv)) for i := range mksv { - if elemsep { - ee.WriteMapElemKey() - } - ee.EncodeUint(mksv[i].v) - if elemsep { - ee.WriteMapElemValue() - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + e.mapElemKey() + e.e.EncodeUint(mksv[i].v) + e.mapElemValue() + e.encodeValue(mapGet(rv, mksv[i].r, rvv), valFn) } case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: - mksv := make([]intRv, len(mks)) + mksv := make([]int64Rv, len(mks)) for i, k := range mks { v := &mksv[i] v.r = k v.v = k.Int() } - sort.Sort(intRvSlice(mksv)) + sort.Sort(int64RvSlice(mksv)) for i := range mksv { - if elemsep { - ee.WriteMapElemKey() - } - ee.EncodeInt(mksv[i].v) - if elemsep { - ee.WriteMapElemValue() - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + e.mapElemKey() + e.e.EncodeInt(mksv[i].v) + e.mapElemValue() + e.encodeValue(mapGet(rv, mksv[i].r, rvv), valFn) } case reflect.Float32: - mksv := make([]floatRv, len(mks)) + mksv := make([]float64Rv, len(mks)) for i, k := range mks { v := &mksv[i] v.r = k v.v = k.Float() } - sort.Sort(floatRvSlice(mksv)) + sort.Sort(float64RvSlice(mksv)) for i := range mksv { - if elemsep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(mksv[i].v)) - if elemsep { - ee.WriteMapElemValue() - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + e.mapElemKey() + e.e.EncodeFloat32(float32(mksv[i].v)) + e.mapElemValue() + e.encodeValue(mapGet(rv, mksv[i].r, rvv), valFn) } case reflect.Float64: - mksv := make([]floatRv, len(mks)) + mksv := make([]float64Rv, len(mks)) for i, k := range mks { v := &mksv[i] v.r = k v.v = k.Float() } - sort.Sort(floatRvSlice(mksv)) + sort.Sort(float64RvSlice(mksv)) for i := range mksv { - if elemsep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(mksv[i].v) - if elemsep { - ee.WriteMapElemValue() - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + e.mapElemKey() + e.e.EncodeFloat64(mksv[i].v) + e.mapElemValue() + e.encodeValue(mapGet(rv, mksv[i].r, rvv), valFn) } case reflect.Struct: - if rv.Type() == timeTyp { + if rtkey == timeTyp { mksv := make([]timeRv, len(mks)) for i, k := range mks { v := &mksv[i] @@ -1025,14 +777,10 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl } sort.Sort(timeRvSlice(mksv)) for i := range mksv { - if elemsep { - ee.WriteMapElemKey() - } - ee.EncodeTime(mksv[i].v) - if elemsep { - ee.WriteMapElemValue() - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + e.mapElemKey() + e.e.EncodeTime(mksv[i].v) + e.mapElemValue() + e.encodeValue(mapGet(rv, mksv[i].r, rvv), valFn) } break } @@ -1040,7 +788,7 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl default: // out-of-band // first encode each key to a []byte first, then sort them, then record - var mksv []byte = make([]byte, 0, len(mks)*16) // temporary byte slice for the encoding + var mksv []byte = e.blist.get(len(mks) * 16)[:0] e2 := NewEncoderBytes(&mksv, e.hh) mksbv := make([]bytesRv, len(mks)) for i, k := range mks { @@ -1052,169 +800,15 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl } sort.Sort(bytesRvSlice(mksbv)) for j := range mksbv { - if elemsep { - ee.WriteMapElemKey() - } - e.asis(mksbv[j].v) - if elemsep { - ee.WriteMapElemValue() - } - e.encodeValue(rv.MapIndex(mksbv[j].r), valFn, true) + e.mapElemKey() + e.encWr.writeb(mksbv[j].v) // e.asis(mksbv[j].v) + e.mapElemValue() + e.encodeValue(mapGet(rv, mksbv[j].r, rvv), valFn) } + e.blist.put(mksv) } } -// // -------------------------------------------------- - -type encWriterSwitch struct { - // wi *ioEncWriter - wb bytesEncAppender - wf *bufioEncWriter - // typ entryType - bytes bool // encoding to []byte - esep bool // whether it has elem separators - isas bool // whether e.as != nil - js bool // is json encoder? - be bool // is binary encoder? - _ [2]byte // padding - // _ [2]uint64 // padding - // _ uint64 // padding -} - -func (z *encWriterSwitch) writeb(s []byte) { - if z.bytes { - z.wb.writeb(s) - } else { - z.wf.writeb(s) - } -} -func (z *encWriterSwitch) writestr(s string) { - if z.bytes { - z.wb.writestr(s) - } else { - z.wf.writestr(s) - } -} -func (z *encWriterSwitch) writen1(b1 byte) { - if z.bytes { - z.wb.writen1(b1) - } else { - z.wf.writen1(b1) - } -} -func (z *encWriterSwitch) writen2(b1, b2 byte) { - if z.bytes { - z.wb.writen2(b1, b2) - } else { - z.wf.writen2(b1, b2) - } -} -func (z *encWriterSwitch) endErr() error { - if z.bytes { - return z.wb.endErr() - } - return z.wf.endErr() -} - -func (z *encWriterSwitch) end() { - if err := z.endErr(); err != nil { - panic(err) - } -} - -/* - -// ------------------------------------------ -func (z *encWriterSwitch) writeb(s []byte) { - switch z.typ { - case entryTypeBytes: - z.wb.writeb(s) - case entryTypeIo: - z.wi.writeb(s) - default: - z.wf.writeb(s) - } -} -func (z *encWriterSwitch) writestr(s string) { - switch z.typ { - case entryTypeBytes: - z.wb.writestr(s) - case entryTypeIo: - z.wi.writestr(s) - default: - z.wf.writestr(s) - } -} -func (z *encWriterSwitch) writen1(b1 byte) { - switch z.typ { - case entryTypeBytes: - z.wb.writen1(b1) - case entryTypeIo: - z.wi.writen1(b1) - default: - z.wf.writen1(b1) - } -} -func (z *encWriterSwitch) writen2(b1, b2 byte) { - switch z.typ { - case entryTypeBytes: - z.wb.writen2(b1, b2) - case entryTypeIo: - z.wi.writen2(b1, b2) - default: - z.wf.writen2(b1, b2) - } -} -func (z *encWriterSwitch) end() { - switch z.typ { - case entryTypeBytes: - z.wb.end() - case entryTypeIo: - z.wi.end() - default: - z.wf.end() - } -} - -// ------------------------------------------ -func (z *encWriterSwitch) writeb(s []byte) { - if z.bytes { - z.wb.writeb(s) - } else { - z.wi.writeb(s) - } -} -func (z *encWriterSwitch) writestr(s string) { - if z.bytes { - z.wb.writestr(s) - } else { - z.wi.writestr(s) - } -} -func (z *encWriterSwitch) writen1(b1 byte) { - if z.bytes { - z.wb.writen1(b1) - } else { - z.wi.writen1(b1) - } -} -func (z *encWriterSwitch) writen2(b1, b2 byte) { - if z.bytes { - z.wb.writen2(b1, b2) - } else { - z.wi.writen2(b1, b2) - } -} -func (z *encWriterSwitch) end() { - if z.bytes { - z.wb.end() - } else { - z.wi.end() - } -} - -*/ - // Encoder writes an object to an output stream in a supported format. // // Encoder is NOT safe for concurrent use i.e. a Encoder cannot be used @@ -1225,33 +819,30 @@ func (z *encWriterSwitch) end() { // This is the idiomatic way to use. type Encoder struct { panicHdl - // hopefully, reduce derefencing cost by laying the encWriter inside the Encoder - e encDriver - // NOTE: Encoder shouldn't call it's write methods, - // as the handler MAY need to do some coordination. - w *encWriterSwitch + e encDriver - // bw *bufio.Writer - as encDriverAsis + h *BasicHandle - err error + // hopefully, reduce derefencing cost by laying the encWriter inside the Encoder + encWr - h *BasicHandle + // ---- cpu cache line boundary hh Handle - // ---- cpu cache line boundary? + 3 - encWriterSwitch - ci set + blist bytesFreelist + err error - b [(5 * 8)]byte // for encoding chan or (non-addressable) [N]byte + // ---- cpu cache line boundary // ---- writable fields during execution --- *try* to keep in sep cache line + ci set // holds set of addresses found during an encoding (if CheckCircularRef=true) + + slist sfiRvFreelist + + b [(2 * 8)]byte // for encoding chan byte, (non-addressable) [N]byte, etc // ---- cpu cache line boundary? - // b [scratchByteArrayLen]byte - // _ [cacheLineSize - scratchByteArrayLen]byte // padding - // b [cacheLineSize - (8 * 0)]byte // used for encoding a chan or (non-addressable) array of bytes } // NewEncoder returns an Encoder for encoding into an io.Writer. @@ -1259,7 +850,7 @@ type Encoder struct { // For efficiency, Users are encouraged to configure WriterBufferSize on the handle // OR pass in a memory buffered writer (eg bufio.Writer, bytes.Buffer). func NewEncoder(w io.Writer, h Handle) *Encoder { - e := newEncoder(h) + e := h.newEncDriver().encoder() e.Reset(w) return e } @@ -1270,35 +861,31 @@ func NewEncoder(w io.Writer, h Handle) *Encoder { // It will potentially replace the output byte slice pointed to. // After encoding, the out parameter contains the encoded contents. func NewEncoderBytes(out *[]byte, h Handle) *Encoder { - e := newEncoder(h) + e := h.newEncDriver().encoder() e.ResetBytes(out) return e } -func newEncoder(h Handle) *Encoder { - e := &Encoder{h: basicHandle(h), err: errEncoderNotInitialized} +func (e *Encoder) init(h Handle) { + e.err = errEncoderNotInitialized e.bytes = true - if useFinalizers { - runtime.SetFinalizer(e, (*Encoder).finalize) - // xdebugf(">>>> new(Encoder) with finalizer") - } - e.w = &e.encWriterSwitch e.hh = h - e.esep = h.hasElemSeparators() + e.h = basicHandle(h) + e.be = e.hh.isBinary() +} - return e +func (e *Encoder) w() *encWr { + return &e.encWr } func (e *Encoder) resetCommon() { - // e.w = &e.encWriterSwitch - if e.e == nil || e.hh.recreateEncDriver(e.e) { - e.e = e.hh.newEncDriver(e) - e.as, e.isas = e.e.(encDriverAsis) - // e.cr, _ = e.e.(containerStateRecv) - } - e.be = e.hh.isBinary() - _, e.js = e.hh.(*JsonHandle) e.e.reset() + if e.ci == nil { + // e.ci = (set)(e.cidef[:0]) + } else { + e.ci = e.ci[:0] + } + e.c = 0 e.err = nil } @@ -1310,34 +897,11 @@ func (e *Encoder) Reset(w io.Writer) { if w == nil { return } - // var ok bool e.bytes = false if e.wf == nil { e.wf = new(bufioEncWriter) } - // e.typ = entryTypeUnset - // if e.h.WriterBufferSize > 0 { - // // bw := bufio.NewWriterSize(w, e.h.WriterBufferSize) - // // e.wi.bw = bw - // // e.wi.sw = bw - // // e.wi.fw = bw - // // e.wi.ww = bw - // if e.wf == nil { - // e.wf = new(bufioEncWriter) - // } - // e.wf.reset(w, e.h.WriterBufferSize) - // e.typ = entryTypeBufio - // } else { - // if e.wi == nil { - // e.wi = new(ioEncWriter) - // } - // e.wi.reset(w) - // e.typ = entryTypeIo - // } - e.wf.reset(w, e.h.WriterBufferSize) - // e.typ = entryTypeBufio - - // e.w = e.wi + e.wf.reset(w, e.h.WriterBufferSize, &e.blist) e.resetCommon() } @@ -1351,9 +915,7 @@ func (e *Encoder) ResetBytes(out *[]byte) { in = make([]byte, defEncByteBufSize) } e.bytes = true - // e.typ = entryTypeBytes e.wb.reset(in, out) - // e.w = &e.wb e.resetCommon() } @@ -1446,6 +1008,7 @@ func (e *Encoder) Encode(v interface{}) (err error) { // Also, see https://github.com/golang/go/issues/14939#issuecomment-417836139 // defer func() { e.deferred(&err) }() } // { x, y := e, &err; defer func() { x.deferred(y) }() } + if e.err != nil { return e.err } @@ -1453,13 +1016,17 @@ func (e *Encoder) Encode(v interface{}) (err error) { defer func() { // if error occurred during encoding, return that error; // else if error occurred on end'ing (i.e. during flush), return that error. - err = e.w.endErr() + err = e.w().endErr() x := recover() if x == nil { - e.err = err + if e.err != err { + e.err = err + } } else { panicValToErr(e, x, &e.err) - err = e.err + if e.err != err { + err = e.err + } } }() } @@ -1479,78 +1046,52 @@ func (e *Encoder) MustEncode(v interface{}) { } func (e *Encoder) mustEncode(v interface{}) { - if e.wf == nil { - e.encode(v) - e.e.atEndOfEncode() - e.w.end() - return - } - - if e.wf.buf == nil { - e.wf.buf = e.wf.bytesBufPooler.get(e.wf.sz) - } - e.wf.calls++ - + e.calls++ e.encode(v) - e.e.atEndOfEncode() - e.w.end() - - e.wf.calls-- - - if !e.h.ExplicitRelease && e.wf.calls == 0 { - e.wf.release() + e.calls-- + if e.calls == 0 { + e.e.atEndOfEncode() + e.w().end() } } -// func (e *Encoder) deferred(err1 *error) { -// e.w.end() -// if recoverPanicToErr { -// if x := recover(); x != nil { -// panicValToErr(e, x, err1) -// panicValToErr(e, x, &e.err) -// } -// } -// } - -//go:noinline -- as it is run by finalizer -func (e *Encoder) finalize() { - // xdebugf("finalizing Encoder") - e.Release() -} - // Release releases shared (pooled) resources. // // It is important to call Release() when done with an Encoder, so those resources // are released instantly for use by subsequently created Encoders. +// +// Deprecated: Release is a no-op as pooled resources are not used with an Encoder. +// This method is kept for compatibility reasons only. func (e *Encoder) Release() { - if e.wf != nil { - e.wf.release() - } } func (e *Encoder) encode(iv interface{}) { // a switch with only concrete types can be optimized. // consequently, we deal with nil and interfaces outside the switch. - if iv == nil || definitelyNil(iv) { + if iv == nil { + e.e.EncodeNil() + return + } + + rv, ok := isNil(iv) + if ok { e.e.EncodeNil() return } + var vself Selfer + switch v := iv.(type) { // case nil: // case Selfer: case Raw: e.rawBytes(v) case reflect.Value: - e.encodeValue(v, nil, true) + e.encodeValue(v, nil) case string: - if e.h.StringToRaw { - e.e.EncodeStringBytesRaw(bytesView(v)) - } else { - e.e.EncodeStringEnc(cUTF8, v) - } + e.e.EncodeString(v) case bool: e.e.EncodeBool(v) case int: @@ -1583,16 +1124,10 @@ func (e *Encoder) encode(iv interface{}) { e.e.EncodeTime(v) case []uint8: e.e.EncodeStringBytesRaw(v) - case *Raw: e.rawBytes(*v) - case *string: - if e.h.StringToRaw { - e.e.EncodeStringBytesRaw(bytesView(*v)) - } else { - e.e.EncodeStringEnc(cUTF8, *v) - } + e.e.EncodeString(*v) case *bool: e.e.EncodeBool(*v) case *int: @@ -1623,29 +1158,39 @@ func (e *Encoder) encode(iv interface{}) { e.e.EncodeFloat64(*v) case *time.Time: e.e.EncodeTime(*v) - case *[]uint8: - e.e.EncodeStringBytesRaw(*v) - + if *v == nil { + e.e.EncodeNil() + } else { + e.e.EncodeStringBytesRaw(*v) + } default: - if v, ok := iv.(Selfer); ok { - v.CodecEncodeSelf(e) + if vself, ok = iv.(Selfer); ok { + vself.CodecEncodeSelf(e) } else if !fastpathEncodeTypeSwitch(iv, e) { - // checkfastpath=true (not false), as underlying slice/map type may be fast-path - e.encodeValue(reflect.ValueOf(iv), nil, true) + if !rv.IsValid() { + rv = rv4i(iv) + } + e.encodeValue(rv, nil) } } } -func (e *Encoder) encodeValue(rv reflect.Value, fn *codecFn, checkFastpath bool) { +func (e *Encoder) encodeValue(rv reflect.Value, fn *codecFn) { // if a valid fn is passed, it MUST BE for the dereferenced type of rv - var sptr uintptr + + // We considered using a uintptr (a pointer) retrievable via rv.UnsafeAddr. + // However, it is possible for the same pointer to point to 2 different types e.g. + // type T struct { tHelper } + // Here, for var v T; &v and &v.tHelper are the same pointer. + // Consequently, we need a tuple of type and pointer, which interface{} natively provides. + var sptr interface{} // uintptr var rvp reflect.Value var rvpValid bool TOP: switch rv.Kind() { case reflect.Ptr: - if rv.IsNil() { + if rvIsNil(rv) { e.e.EncodeNil() return } @@ -1653,20 +1198,19 @@ TOP: rvp = rv rv = rv.Elem() if e.h.CheckCircularRef && rv.Kind() == reflect.Struct { - // TODO: Movable pointers will be an issue here. Future problem. - sptr = rv.UnsafeAddr() + sptr = rv2i(rvp) // rv.UnsafeAddr() break TOP } goto TOP case reflect.Interface: - if rv.IsNil() { + if rvIsNil(rv) { e.e.EncodeNil() return } rv = rv.Elem() goto TOP case reflect.Slice, reflect.Map: - if rv.IsNil() { + if rvIsNil(rv) { e.e.EncodeNil() return } @@ -1675,14 +1219,14 @@ TOP: return } - if sptr != 0 && (&e.ci).add(sptr) { - e.errorf("circular reference found: # %d", sptr) + if sptr != nil && (&e.ci).add(sptr) { + e.errorf("circular reference found: # %p, %T", sptr, sptr) } + var rt reflect.Type if fn == nil { - rt := rv.Type() - // always pass checkCodecSelfer=true, in case T or ****T is passed, where *T is a Selfer - fn = e.h.fn(rt, checkFastpath, true) + rt = rv.Type() + fn = e.h.fn(rt) } if fn.i.addrE { if rvpValid { @@ -1690,8 +1234,11 @@ TOP: } else if rv.CanAddr() { fn.fe(e, &fn.i, rv.Addr()) } else { - rv2 := reflect.New(rv.Type()) - rv2.Elem().Set(rv) + if rt == nil { + rt = rv.Type() + } + rv2 := reflect.New(rt) + rvSetDirect(rv2.Elem(), rv) fn.fe(e, &fn.i, rv2) } } else { @@ -1702,19 +1249,6 @@ TOP: } } -// func (e *Encoder) marshal(bs []byte, fnerr error, asis bool, c charEncoding) { -// if fnerr != nil { -// panic(fnerr) -// } -// if bs == nil { -// e.e.EncodeNil() -// } else if asis { -// e.asis(bs) -// } else { -// e.e.EncodeStringBytesRaw(bs) -// } -// } - func (e *Encoder) marshalUtf8(bs []byte, fnerr error) { if fnerr != nil { panic(fnerr) @@ -1722,7 +1256,8 @@ func (e *Encoder) marshalUtf8(bs []byte, fnerr error) { if bs == nil { e.e.EncodeNil() } else { - e.e.EncodeStringEnc(cUTF8, stringView(bs)) + e.e.EncodeString(stringView(bs)) + // e.e.EncodeStringEnc(cUTF8, stringView(bs)) } } @@ -1733,7 +1268,7 @@ func (e *Encoder) marshalAsis(bs []byte, fnerr error) { if bs == nil { e.e.EncodeNil() } else { - e.asis(bs) + e.encWr.writeb(bs) // e.asis(bs) } } @@ -1748,47 +1283,85 @@ func (e *Encoder) marshalRaw(bs []byte, fnerr error) { } } -func (e *Encoder) asis(v []byte) { - if e.isas { - e.as.EncodeAsis(v) - } else { - e.w.writeb(v) - } -} - func (e *Encoder) rawBytes(vv Raw) { v := []byte(vv) if !e.h.Raw { e.errorf("Raw values cannot be encoded: %v", v) } - e.asis(v) + e.encWr.writeb(v) // e.asis(v) } func (e *Encoder) wrapErr(v interface{}, err *error) { *err = encodeError{codecError{name: e.hh.Name(), err: v}} } -func encStructFieldKey(encName string, ee encDriver, w *encWriterSwitch, +// ---- container tracker methods +// Note: We update the .c after calling the callback. +// This way, the callback can know what the last status was. + +func (e *Encoder) mapStart(length int) { + e.e.WriteMapStart(length) + e.c = containerMapStart +} + +func (e *Encoder) mapElemKey() { + if e.js { + e.jsondriver().WriteMapElemKey() + } + e.c = containerMapKey +} + +func (e *Encoder) mapElemValue() { + if e.js { + e.jsondriver().WriteMapElemValue() + } + e.c = containerMapValue +} + +func (e *Encoder) mapEnd() { + e.e.WriteMapEnd() + // e.c = containerMapEnd + e.c = 0 +} + +func (e *Encoder) arrayStart(length int) { + e.e.WriteArrayStart(length) + e.c = containerArrayStart +} + +func (e *Encoder) arrayElem() { + if e.js { + e.jsondriver().WriteArrayElem() + } + e.c = containerArrayElem +} + +func (e *Encoder) arrayEnd() { + e.e.WriteArrayEnd() + e.c = 0 + // e.c = containerArrayEnd +} + +// ---------- + +func (e *Encoder) sideEncode(v interface{}, bs *[]byte) { + rv := baseRV(v) + e2 := NewEncoderBytes(bs, e.hh) + e2.encodeValue(rv, e.h.fnNoExt(rv.Type())) + e2.e.atEndOfEncode() + e2.w().end() +} + +func encStructFieldKey(encName string, ee encDriver, w *encWr, keyType valueType, encNameAsciiAlphaNum bool, js bool) { var m must // use if-else-if, not switch (which compiles to binary-search) // since keyType is typically valueTypeString, branch prediction is pretty good. if keyType == valueTypeString { if js && encNameAsciiAlphaNum { // keyType == valueTypeString - // w.writen1('"') - // w.writestr(encName) - // w.writen1('"') - // ---- - // w.writestr(`"` + encName + `"`) - // ---- - // do concat myself, so it is faster than the generic string concat - b := make([]byte, len(encName)+2) - copy(b[1:], encName) - b[0] = '"' - b[len(b)-1] = '"' - w.writeb(b) + w.writeqstr(encName) } else { // keyType == valueTypeString - ee.EncodeStringEnc(cUTF8, encName) + ee.EncodeString(encName) } } else if keyType == valueTypeInt { ee.EncodeInt(m.Int(strconv.ParseInt(encName, 10, 64))) @@ -1798,11 +1371,3 @@ func encStructFieldKey(encName string, ee encDriver, w *encWriterSwitch, ee.EncodeFloat64(m.Float(strconv.ParseFloat(encName, 64))) } } - -// func encStringAsRawBytesMaybe(ee encDriver, s string, stringToRaw bool) { -// if stringToRaw { -// ee.EncodeStringBytesRaw(bytesView(s)) -// } else { -// ee.EncodeStringEnc(cUTF8, s) -// } -// } diff --git a/vendor/github.com/ugorji/go/codec/fast-path.generated.go b/vendor/github.com/ugorji/go/codec/fast-path.generated.go index 9bc14bd6..e9b7f230 100644 --- a/vendor/github.com/ugorji/go/codec/fast-path.generated.go +++ b/vendor/github.com/ugorji/go/codec/fast-path.generated.go @@ -10,7 +10,7 @@ package codec // Fast path functions try to create a fast path encode or decode implementation // for common maps and slices. // -// We define the functions and register then in this single file +// We define the functions and register them in this single file // so as not to pollute the encode.go and decode.go, and create a dependency in there. // This file can be omitted without causing a build failure. // @@ -18,9 +18,10 @@ package codec // - Many calls bypass reflection altogether // // Currently support -// - slice of all builtin types, -// - map of all builtin types to string or interface value -// - symmetrical maps of all builtin types (e.g. str-str, uint8-uint8) +// - slice of all builtin types (numeric, bool, string, []byte) +// - maps of builtin types to builtin or interface{} type, EXCEPT FOR +// keys of type uintptr, int8/16/32, uint16/32, float32/64, bool, interface{} +// AND values of type type int8/16/32, uint16/32 // This should provide adequate "typical" implementations. // // Note that fast track decode functions must handle values for which an address cannot be obtained. @@ -50,7 +51,7 @@ type fastpathE struct { decfn func(*Decoder, *codecFnInfo, reflect.Value) } -type fastpathA [271]fastpathE +type fastpathA [81]fastpathE func (x *fastpathA) index(rtid uintptr) int { // use binary search to grab the index (adapted from sort/search.go) @@ -96,13 +97,13 @@ func init() { fn([]interface{}(nil), (*Encoder).fastpathEncSliceIntfR, (*Decoder).fastpathDecSliceIntfR) fn([]string(nil), (*Encoder).fastpathEncSliceStringR, (*Decoder).fastpathDecSliceStringR) + fn([][]byte(nil), (*Encoder).fastpathEncSliceBytesR, (*Decoder).fastpathDecSliceBytesR) fn([]float32(nil), (*Encoder).fastpathEncSliceFloat32R, (*Decoder).fastpathDecSliceFloat32R) fn([]float64(nil), (*Encoder).fastpathEncSliceFloat64R, (*Decoder).fastpathDecSliceFloat64R) fn([]uint(nil), (*Encoder).fastpathEncSliceUintR, (*Decoder).fastpathDecSliceUintR) fn([]uint16(nil), (*Encoder).fastpathEncSliceUint16R, (*Decoder).fastpathDecSliceUint16R) fn([]uint32(nil), (*Encoder).fastpathEncSliceUint32R, (*Decoder).fastpathDecSliceUint32R) fn([]uint64(nil), (*Encoder).fastpathEncSliceUint64R, (*Decoder).fastpathDecSliceUint64R) - fn([]uintptr(nil), (*Encoder).fastpathEncSliceUintptrR, (*Decoder).fastpathDecSliceUintptrR) fn([]int(nil), (*Encoder).fastpathEncSliceIntR, (*Decoder).fastpathDecSliceIntR) fn([]int8(nil), (*Encoder).fastpathEncSliceInt8R, (*Decoder).fastpathDecSliceInt8R) fn([]int16(nil), (*Encoder).fastpathEncSliceInt16R, (*Decoder).fastpathDecSliceInt16R) @@ -110,262 +111,72 @@ func init() { fn([]int64(nil), (*Encoder).fastpathEncSliceInt64R, (*Decoder).fastpathDecSliceInt64R) fn([]bool(nil), (*Encoder).fastpathEncSliceBoolR, (*Decoder).fastpathDecSliceBoolR) - fn(map[interface{}]interface{}(nil), (*Encoder).fastpathEncMapIntfIntfR, (*Decoder).fastpathDecMapIntfIntfR) - fn(map[interface{}]string(nil), (*Encoder).fastpathEncMapIntfStringR, (*Decoder).fastpathDecMapIntfStringR) - fn(map[interface{}]uint(nil), (*Encoder).fastpathEncMapIntfUintR, (*Decoder).fastpathDecMapIntfUintR) - fn(map[interface{}]uint8(nil), (*Encoder).fastpathEncMapIntfUint8R, (*Decoder).fastpathDecMapIntfUint8R) - fn(map[interface{}]uint16(nil), (*Encoder).fastpathEncMapIntfUint16R, (*Decoder).fastpathDecMapIntfUint16R) - fn(map[interface{}]uint32(nil), (*Encoder).fastpathEncMapIntfUint32R, (*Decoder).fastpathDecMapIntfUint32R) - fn(map[interface{}]uint64(nil), (*Encoder).fastpathEncMapIntfUint64R, (*Decoder).fastpathDecMapIntfUint64R) - fn(map[interface{}]uintptr(nil), (*Encoder).fastpathEncMapIntfUintptrR, (*Decoder).fastpathDecMapIntfUintptrR) - fn(map[interface{}]int(nil), (*Encoder).fastpathEncMapIntfIntR, (*Decoder).fastpathDecMapIntfIntR) - fn(map[interface{}]int8(nil), (*Encoder).fastpathEncMapIntfInt8R, (*Decoder).fastpathDecMapIntfInt8R) - fn(map[interface{}]int16(nil), (*Encoder).fastpathEncMapIntfInt16R, (*Decoder).fastpathDecMapIntfInt16R) - fn(map[interface{}]int32(nil), (*Encoder).fastpathEncMapIntfInt32R, (*Decoder).fastpathDecMapIntfInt32R) - fn(map[interface{}]int64(nil), (*Encoder).fastpathEncMapIntfInt64R, (*Decoder).fastpathDecMapIntfInt64R) - fn(map[interface{}]float32(nil), (*Encoder).fastpathEncMapIntfFloat32R, (*Decoder).fastpathDecMapIntfFloat32R) - fn(map[interface{}]float64(nil), (*Encoder).fastpathEncMapIntfFloat64R, (*Decoder).fastpathDecMapIntfFloat64R) - fn(map[interface{}]bool(nil), (*Encoder).fastpathEncMapIntfBoolR, (*Decoder).fastpathDecMapIntfBoolR) fn(map[string]interface{}(nil), (*Encoder).fastpathEncMapStringIntfR, (*Decoder).fastpathDecMapStringIntfR) fn(map[string]string(nil), (*Encoder).fastpathEncMapStringStringR, (*Decoder).fastpathDecMapStringStringR) + fn(map[string][]byte(nil), (*Encoder).fastpathEncMapStringBytesR, (*Decoder).fastpathDecMapStringBytesR) fn(map[string]uint(nil), (*Encoder).fastpathEncMapStringUintR, (*Decoder).fastpathDecMapStringUintR) fn(map[string]uint8(nil), (*Encoder).fastpathEncMapStringUint8R, (*Decoder).fastpathDecMapStringUint8R) - fn(map[string]uint16(nil), (*Encoder).fastpathEncMapStringUint16R, (*Decoder).fastpathDecMapStringUint16R) - fn(map[string]uint32(nil), (*Encoder).fastpathEncMapStringUint32R, (*Decoder).fastpathDecMapStringUint32R) fn(map[string]uint64(nil), (*Encoder).fastpathEncMapStringUint64R, (*Decoder).fastpathDecMapStringUint64R) - fn(map[string]uintptr(nil), (*Encoder).fastpathEncMapStringUintptrR, (*Decoder).fastpathDecMapStringUintptrR) fn(map[string]int(nil), (*Encoder).fastpathEncMapStringIntR, (*Decoder).fastpathDecMapStringIntR) - fn(map[string]int8(nil), (*Encoder).fastpathEncMapStringInt8R, (*Decoder).fastpathDecMapStringInt8R) - fn(map[string]int16(nil), (*Encoder).fastpathEncMapStringInt16R, (*Decoder).fastpathDecMapStringInt16R) - fn(map[string]int32(nil), (*Encoder).fastpathEncMapStringInt32R, (*Decoder).fastpathDecMapStringInt32R) fn(map[string]int64(nil), (*Encoder).fastpathEncMapStringInt64R, (*Decoder).fastpathDecMapStringInt64R) fn(map[string]float32(nil), (*Encoder).fastpathEncMapStringFloat32R, (*Decoder).fastpathDecMapStringFloat32R) fn(map[string]float64(nil), (*Encoder).fastpathEncMapStringFloat64R, (*Decoder).fastpathDecMapStringFloat64R) fn(map[string]bool(nil), (*Encoder).fastpathEncMapStringBoolR, (*Decoder).fastpathDecMapStringBoolR) - fn(map[float32]interface{}(nil), (*Encoder).fastpathEncMapFloat32IntfR, (*Decoder).fastpathDecMapFloat32IntfR) - fn(map[float32]string(nil), (*Encoder).fastpathEncMapFloat32StringR, (*Decoder).fastpathDecMapFloat32StringR) - fn(map[float32]uint(nil), (*Encoder).fastpathEncMapFloat32UintR, (*Decoder).fastpathDecMapFloat32UintR) - fn(map[float32]uint8(nil), (*Encoder).fastpathEncMapFloat32Uint8R, (*Decoder).fastpathDecMapFloat32Uint8R) - fn(map[float32]uint16(nil), (*Encoder).fastpathEncMapFloat32Uint16R, (*Decoder).fastpathDecMapFloat32Uint16R) - fn(map[float32]uint32(nil), (*Encoder).fastpathEncMapFloat32Uint32R, (*Decoder).fastpathDecMapFloat32Uint32R) - fn(map[float32]uint64(nil), (*Encoder).fastpathEncMapFloat32Uint64R, (*Decoder).fastpathDecMapFloat32Uint64R) - fn(map[float32]uintptr(nil), (*Encoder).fastpathEncMapFloat32UintptrR, (*Decoder).fastpathDecMapFloat32UintptrR) - fn(map[float32]int(nil), (*Encoder).fastpathEncMapFloat32IntR, (*Decoder).fastpathDecMapFloat32IntR) - fn(map[float32]int8(nil), (*Encoder).fastpathEncMapFloat32Int8R, (*Decoder).fastpathDecMapFloat32Int8R) - fn(map[float32]int16(nil), (*Encoder).fastpathEncMapFloat32Int16R, (*Decoder).fastpathDecMapFloat32Int16R) - fn(map[float32]int32(nil), (*Encoder).fastpathEncMapFloat32Int32R, (*Decoder).fastpathDecMapFloat32Int32R) - fn(map[float32]int64(nil), (*Encoder).fastpathEncMapFloat32Int64R, (*Decoder).fastpathDecMapFloat32Int64R) - fn(map[float32]float32(nil), (*Encoder).fastpathEncMapFloat32Float32R, (*Decoder).fastpathDecMapFloat32Float32R) - fn(map[float32]float64(nil), (*Encoder).fastpathEncMapFloat32Float64R, (*Decoder).fastpathDecMapFloat32Float64R) - fn(map[float32]bool(nil), (*Encoder).fastpathEncMapFloat32BoolR, (*Decoder).fastpathDecMapFloat32BoolR) - fn(map[float64]interface{}(nil), (*Encoder).fastpathEncMapFloat64IntfR, (*Decoder).fastpathDecMapFloat64IntfR) - fn(map[float64]string(nil), (*Encoder).fastpathEncMapFloat64StringR, (*Decoder).fastpathDecMapFloat64StringR) - fn(map[float64]uint(nil), (*Encoder).fastpathEncMapFloat64UintR, (*Decoder).fastpathDecMapFloat64UintR) - fn(map[float64]uint8(nil), (*Encoder).fastpathEncMapFloat64Uint8R, (*Decoder).fastpathDecMapFloat64Uint8R) - fn(map[float64]uint16(nil), (*Encoder).fastpathEncMapFloat64Uint16R, (*Decoder).fastpathDecMapFloat64Uint16R) - fn(map[float64]uint32(nil), (*Encoder).fastpathEncMapFloat64Uint32R, (*Decoder).fastpathDecMapFloat64Uint32R) - fn(map[float64]uint64(nil), (*Encoder).fastpathEncMapFloat64Uint64R, (*Decoder).fastpathDecMapFloat64Uint64R) - fn(map[float64]uintptr(nil), (*Encoder).fastpathEncMapFloat64UintptrR, (*Decoder).fastpathDecMapFloat64UintptrR) - fn(map[float64]int(nil), (*Encoder).fastpathEncMapFloat64IntR, (*Decoder).fastpathDecMapFloat64IntR) - fn(map[float64]int8(nil), (*Encoder).fastpathEncMapFloat64Int8R, (*Decoder).fastpathDecMapFloat64Int8R) - fn(map[float64]int16(nil), (*Encoder).fastpathEncMapFloat64Int16R, (*Decoder).fastpathDecMapFloat64Int16R) - fn(map[float64]int32(nil), (*Encoder).fastpathEncMapFloat64Int32R, (*Decoder).fastpathDecMapFloat64Int32R) - fn(map[float64]int64(nil), (*Encoder).fastpathEncMapFloat64Int64R, (*Decoder).fastpathDecMapFloat64Int64R) - fn(map[float64]float32(nil), (*Encoder).fastpathEncMapFloat64Float32R, (*Decoder).fastpathDecMapFloat64Float32R) - fn(map[float64]float64(nil), (*Encoder).fastpathEncMapFloat64Float64R, (*Decoder).fastpathDecMapFloat64Float64R) - fn(map[float64]bool(nil), (*Encoder).fastpathEncMapFloat64BoolR, (*Decoder).fastpathDecMapFloat64BoolR) fn(map[uint]interface{}(nil), (*Encoder).fastpathEncMapUintIntfR, (*Decoder).fastpathDecMapUintIntfR) fn(map[uint]string(nil), (*Encoder).fastpathEncMapUintStringR, (*Decoder).fastpathDecMapUintStringR) + fn(map[uint][]byte(nil), (*Encoder).fastpathEncMapUintBytesR, (*Decoder).fastpathDecMapUintBytesR) fn(map[uint]uint(nil), (*Encoder).fastpathEncMapUintUintR, (*Decoder).fastpathDecMapUintUintR) fn(map[uint]uint8(nil), (*Encoder).fastpathEncMapUintUint8R, (*Decoder).fastpathDecMapUintUint8R) - fn(map[uint]uint16(nil), (*Encoder).fastpathEncMapUintUint16R, (*Decoder).fastpathDecMapUintUint16R) - fn(map[uint]uint32(nil), (*Encoder).fastpathEncMapUintUint32R, (*Decoder).fastpathDecMapUintUint32R) fn(map[uint]uint64(nil), (*Encoder).fastpathEncMapUintUint64R, (*Decoder).fastpathDecMapUintUint64R) - fn(map[uint]uintptr(nil), (*Encoder).fastpathEncMapUintUintptrR, (*Decoder).fastpathDecMapUintUintptrR) fn(map[uint]int(nil), (*Encoder).fastpathEncMapUintIntR, (*Decoder).fastpathDecMapUintIntR) - fn(map[uint]int8(nil), (*Encoder).fastpathEncMapUintInt8R, (*Decoder).fastpathDecMapUintInt8R) - fn(map[uint]int16(nil), (*Encoder).fastpathEncMapUintInt16R, (*Decoder).fastpathDecMapUintInt16R) - fn(map[uint]int32(nil), (*Encoder).fastpathEncMapUintInt32R, (*Decoder).fastpathDecMapUintInt32R) fn(map[uint]int64(nil), (*Encoder).fastpathEncMapUintInt64R, (*Decoder).fastpathDecMapUintInt64R) fn(map[uint]float32(nil), (*Encoder).fastpathEncMapUintFloat32R, (*Decoder).fastpathDecMapUintFloat32R) fn(map[uint]float64(nil), (*Encoder).fastpathEncMapUintFloat64R, (*Decoder).fastpathDecMapUintFloat64R) fn(map[uint]bool(nil), (*Encoder).fastpathEncMapUintBoolR, (*Decoder).fastpathDecMapUintBoolR) fn(map[uint8]interface{}(nil), (*Encoder).fastpathEncMapUint8IntfR, (*Decoder).fastpathDecMapUint8IntfR) fn(map[uint8]string(nil), (*Encoder).fastpathEncMapUint8StringR, (*Decoder).fastpathDecMapUint8StringR) + fn(map[uint8][]byte(nil), (*Encoder).fastpathEncMapUint8BytesR, (*Decoder).fastpathDecMapUint8BytesR) fn(map[uint8]uint(nil), (*Encoder).fastpathEncMapUint8UintR, (*Decoder).fastpathDecMapUint8UintR) fn(map[uint8]uint8(nil), (*Encoder).fastpathEncMapUint8Uint8R, (*Decoder).fastpathDecMapUint8Uint8R) - fn(map[uint8]uint16(nil), (*Encoder).fastpathEncMapUint8Uint16R, (*Decoder).fastpathDecMapUint8Uint16R) - fn(map[uint8]uint32(nil), (*Encoder).fastpathEncMapUint8Uint32R, (*Decoder).fastpathDecMapUint8Uint32R) fn(map[uint8]uint64(nil), (*Encoder).fastpathEncMapUint8Uint64R, (*Decoder).fastpathDecMapUint8Uint64R) - fn(map[uint8]uintptr(nil), (*Encoder).fastpathEncMapUint8UintptrR, (*Decoder).fastpathDecMapUint8UintptrR) fn(map[uint8]int(nil), (*Encoder).fastpathEncMapUint8IntR, (*Decoder).fastpathDecMapUint8IntR) - fn(map[uint8]int8(nil), (*Encoder).fastpathEncMapUint8Int8R, (*Decoder).fastpathDecMapUint8Int8R) - fn(map[uint8]int16(nil), (*Encoder).fastpathEncMapUint8Int16R, (*Decoder).fastpathDecMapUint8Int16R) - fn(map[uint8]int32(nil), (*Encoder).fastpathEncMapUint8Int32R, (*Decoder).fastpathDecMapUint8Int32R) fn(map[uint8]int64(nil), (*Encoder).fastpathEncMapUint8Int64R, (*Decoder).fastpathDecMapUint8Int64R) fn(map[uint8]float32(nil), (*Encoder).fastpathEncMapUint8Float32R, (*Decoder).fastpathDecMapUint8Float32R) fn(map[uint8]float64(nil), (*Encoder).fastpathEncMapUint8Float64R, (*Decoder).fastpathDecMapUint8Float64R) fn(map[uint8]bool(nil), (*Encoder).fastpathEncMapUint8BoolR, (*Decoder).fastpathDecMapUint8BoolR) - fn(map[uint16]interface{}(nil), (*Encoder).fastpathEncMapUint16IntfR, (*Decoder).fastpathDecMapUint16IntfR) - fn(map[uint16]string(nil), (*Encoder).fastpathEncMapUint16StringR, (*Decoder).fastpathDecMapUint16StringR) - fn(map[uint16]uint(nil), (*Encoder).fastpathEncMapUint16UintR, (*Decoder).fastpathDecMapUint16UintR) - fn(map[uint16]uint8(nil), (*Encoder).fastpathEncMapUint16Uint8R, (*Decoder).fastpathDecMapUint16Uint8R) - fn(map[uint16]uint16(nil), (*Encoder).fastpathEncMapUint16Uint16R, (*Decoder).fastpathDecMapUint16Uint16R) - fn(map[uint16]uint32(nil), (*Encoder).fastpathEncMapUint16Uint32R, (*Decoder).fastpathDecMapUint16Uint32R) - fn(map[uint16]uint64(nil), (*Encoder).fastpathEncMapUint16Uint64R, (*Decoder).fastpathDecMapUint16Uint64R) - fn(map[uint16]uintptr(nil), (*Encoder).fastpathEncMapUint16UintptrR, (*Decoder).fastpathDecMapUint16UintptrR) - fn(map[uint16]int(nil), (*Encoder).fastpathEncMapUint16IntR, (*Decoder).fastpathDecMapUint16IntR) - fn(map[uint16]int8(nil), (*Encoder).fastpathEncMapUint16Int8R, (*Decoder).fastpathDecMapUint16Int8R) - fn(map[uint16]int16(nil), (*Encoder).fastpathEncMapUint16Int16R, (*Decoder).fastpathDecMapUint16Int16R) - fn(map[uint16]int32(nil), (*Encoder).fastpathEncMapUint16Int32R, (*Decoder).fastpathDecMapUint16Int32R) - fn(map[uint16]int64(nil), (*Encoder).fastpathEncMapUint16Int64R, (*Decoder).fastpathDecMapUint16Int64R) - fn(map[uint16]float32(nil), (*Encoder).fastpathEncMapUint16Float32R, (*Decoder).fastpathDecMapUint16Float32R) - fn(map[uint16]float64(nil), (*Encoder).fastpathEncMapUint16Float64R, (*Decoder).fastpathDecMapUint16Float64R) - fn(map[uint16]bool(nil), (*Encoder).fastpathEncMapUint16BoolR, (*Decoder).fastpathDecMapUint16BoolR) - fn(map[uint32]interface{}(nil), (*Encoder).fastpathEncMapUint32IntfR, (*Decoder).fastpathDecMapUint32IntfR) - fn(map[uint32]string(nil), (*Encoder).fastpathEncMapUint32StringR, (*Decoder).fastpathDecMapUint32StringR) - fn(map[uint32]uint(nil), (*Encoder).fastpathEncMapUint32UintR, (*Decoder).fastpathDecMapUint32UintR) - fn(map[uint32]uint8(nil), (*Encoder).fastpathEncMapUint32Uint8R, (*Decoder).fastpathDecMapUint32Uint8R) - fn(map[uint32]uint16(nil), (*Encoder).fastpathEncMapUint32Uint16R, (*Decoder).fastpathDecMapUint32Uint16R) - fn(map[uint32]uint32(nil), (*Encoder).fastpathEncMapUint32Uint32R, (*Decoder).fastpathDecMapUint32Uint32R) - fn(map[uint32]uint64(nil), (*Encoder).fastpathEncMapUint32Uint64R, (*Decoder).fastpathDecMapUint32Uint64R) - fn(map[uint32]uintptr(nil), (*Encoder).fastpathEncMapUint32UintptrR, (*Decoder).fastpathDecMapUint32UintptrR) - fn(map[uint32]int(nil), (*Encoder).fastpathEncMapUint32IntR, (*Decoder).fastpathDecMapUint32IntR) - fn(map[uint32]int8(nil), (*Encoder).fastpathEncMapUint32Int8R, (*Decoder).fastpathDecMapUint32Int8R) - fn(map[uint32]int16(nil), (*Encoder).fastpathEncMapUint32Int16R, (*Decoder).fastpathDecMapUint32Int16R) - fn(map[uint32]int32(nil), (*Encoder).fastpathEncMapUint32Int32R, (*Decoder).fastpathDecMapUint32Int32R) - fn(map[uint32]int64(nil), (*Encoder).fastpathEncMapUint32Int64R, (*Decoder).fastpathDecMapUint32Int64R) - fn(map[uint32]float32(nil), (*Encoder).fastpathEncMapUint32Float32R, (*Decoder).fastpathDecMapUint32Float32R) - fn(map[uint32]float64(nil), (*Encoder).fastpathEncMapUint32Float64R, (*Decoder).fastpathDecMapUint32Float64R) - fn(map[uint32]bool(nil), (*Encoder).fastpathEncMapUint32BoolR, (*Decoder).fastpathDecMapUint32BoolR) fn(map[uint64]interface{}(nil), (*Encoder).fastpathEncMapUint64IntfR, (*Decoder).fastpathDecMapUint64IntfR) fn(map[uint64]string(nil), (*Encoder).fastpathEncMapUint64StringR, (*Decoder).fastpathDecMapUint64StringR) + fn(map[uint64][]byte(nil), (*Encoder).fastpathEncMapUint64BytesR, (*Decoder).fastpathDecMapUint64BytesR) fn(map[uint64]uint(nil), (*Encoder).fastpathEncMapUint64UintR, (*Decoder).fastpathDecMapUint64UintR) fn(map[uint64]uint8(nil), (*Encoder).fastpathEncMapUint64Uint8R, (*Decoder).fastpathDecMapUint64Uint8R) - fn(map[uint64]uint16(nil), (*Encoder).fastpathEncMapUint64Uint16R, (*Decoder).fastpathDecMapUint64Uint16R) - fn(map[uint64]uint32(nil), (*Encoder).fastpathEncMapUint64Uint32R, (*Decoder).fastpathDecMapUint64Uint32R) fn(map[uint64]uint64(nil), (*Encoder).fastpathEncMapUint64Uint64R, (*Decoder).fastpathDecMapUint64Uint64R) - fn(map[uint64]uintptr(nil), (*Encoder).fastpathEncMapUint64UintptrR, (*Decoder).fastpathDecMapUint64UintptrR) fn(map[uint64]int(nil), (*Encoder).fastpathEncMapUint64IntR, (*Decoder).fastpathDecMapUint64IntR) - fn(map[uint64]int8(nil), (*Encoder).fastpathEncMapUint64Int8R, (*Decoder).fastpathDecMapUint64Int8R) - fn(map[uint64]int16(nil), (*Encoder).fastpathEncMapUint64Int16R, (*Decoder).fastpathDecMapUint64Int16R) - fn(map[uint64]int32(nil), (*Encoder).fastpathEncMapUint64Int32R, (*Decoder).fastpathDecMapUint64Int32R) fn(map[uint64]int64(nil), (*Encoder).fastpathEncMapUint64Int64R, (*Decoder).fastpathDecMapUint64Int64R) fn(map[uint64]float32(nil), (*Encoder).fastpathEncMapUint64Float32R, (*Decoder).fastpathDecMapUint64Float32R) fn(map[uint64]float64(nil), (*Encoder).fastpathEncMapUint64Float64R, (*Decoder).fastpathDecMapUint64Float64R) fn(map[uint64]bool(nil), (*Encoder).fastpathEncMapUint64BoolR, (*Decoder).fastpathDecMapUint64BoolR) - fn(map[uintptr]interface{}(nil), (*Encoder).fastpathEncMapUintptrIntfR, (*Decoder).fastpathDecMapUintptrIntfR) - fn(map[uintptr]string(nil), (*Encoder).fastpathEncMapUintptrStringR, (*Decoder).fastpathDecMapUintptrStringR) - fn(map[uintptr]uint(nil), (*Encoder).fastpathEncMapUintptrUintR, (*Decoder).fastpathDecMapUintptrUintR) - fn(map[uintptr]uint8(nil), (*Encoder).fastpathEncMapUintptrUint8R, (*Decoder).fastpathDecMapUintptrUint8R) - fn(map[uintptr]uint16(nil), (*Encoder).fastpathEncMapUintptrUint16R, (*Decoder).fastpathDecMapUintptrUint16R) - fn(map[uintptr]uint32(nil), (*Encoder).fastpathEncMapUintptrUint32R, (*Decoder).fastpathDecMapUintptrUint32R) - fn(map[uintptr]uint64(nil), (*Encoder).fastpathEncMapUintptrUint64R, (*Decoder).fastpathDecMapUintptrUint64R) - fn(map[uintptr]uintptr(nil), (*Encoder).fastpathEncMapUintptrUintptrR, (*Decoder).fastpathDecMapUintptrUintptrR) - fn(map[uintptr]int(nil), (*Encoder).fastpathEncMapUintptrIntR, (*Decoder).fastpathDecMapUintptrIntR) - fn(map[uintptr]int8(nil), (*Encoder).fastpathEncMapUintptrInt8R, (*Decoder).fastpathDecMapUintptrInt8R) - fn(map[uintptr]int16(nil), (*Encoder).fastpathEncMapUintptrInt16R, (*Decoder).fastpathDecMapUintptrInt16R) - fn(map[uintptr]int32(nil), (*Encoder).fastpathEncMapUintptrInt32R, (*Decoder).fastpathDecMapUintptrInt32R) - fn(map[uintptr]int64(nil), (*Encoder).fastpathEncMapUintptrInt64R, (*Decoder).fastpathDecMapUintptrInt64R) - fn(map[uintptr]float32(nil), (*Encoder).fastpathEncMapUintptrFloat32R, (*Decoder).fastpathDecMapUintptrFloat32R) - fn(map[uintptr]float64(nil), (*Encoder).fastpathEncMapUintptrFloat64R, (*Decoder).fastpathDecMapUintptrFloat64R) - fn(map[uintptr]bool(nil), (*Encoder).fastpathEncMapUintptrBoolR, (*Decoder).fastpathDecMapUintptrBoolR) fn(map[int]interface{}(nil), (*Encoder).fastpathEncMapIntIntfR, (*Decoder).fastpathDecMapIntIntfR) fn(map[int]string(nil), (*Encoder).fastpathEncMapIntStringR, (*Decoder).fastpathDecMapIntStringR) + fn(map[int][]byte(nil), (*Encoder).fastpathEncMapIntBytesR, (*Decoder).fastpathDecMapIntBytesR) fn(map[int]uint(nil), (*Encoder).fastpathEncMapIntUintR, (*Decoder).fastpathDecMapIntUintR) fn(map[int]uint8(nil), (*Encoder).fastpathEncMapIntUint8R, (*Decoder).fastpathDecMapIntUint8R) - fn(map[int]uint16(nil), (*Encoder).fastpathEncMapIntUint16R, (*Decoder).fastpathDecMapIntUint16R) - fn(map[int]uint32(nil), (*Encoder).fastpathEncMapIntUint32R, (*Decoder).fastpathDecMapIntUint32R) fn(map[int]uint64(nil), (*Encoder).fastpathEncMapIntUint64R, (*Decoder).fastpathDecMapIntUint64R) - fn(map[int]uintptr(nil), (*Encoder).fastpathEncMapIntUintptrR, (*Decoder).fastpathDecMapIntUintptrR) fn(map[int]int(nil), (*Encoder).fastpathEncMapIntIntR, (*Decoder).fastpathDecMapIntIntR) - fn(map[int]int8(nil), (*Encoder).fastpathEncMapIntInt8R, (*Decoder).fastpathDecMapIntInt8R) - fn(map[int]int16(nil), (*Encoder).fastpathEncMapIntInt16R, (*Decoder).fastpathDecMapIntInt16R) - fn(map[int]int32(nil), (*Encoder).fastpathEncMapIntInt32R, (*Decoder).fastpathDecMapIntInt32R) fn(map[int]int64(nil), (*Encoder).fastpathEncMapIntInt64R, (*Decoder).fastpathDecMapIntInt64R) fn(map[int]float32(nil), (*Encoder).fastpathEncMapIntFloat32R, (*Decoder).fastpathDecMapIntFloat32R) fn(map[int]float64(nil), (*Encoder).fastpathEncMapIntFloat64R, (*Decoder).fastpathDecMapIntFloat64R) fn(map[int]bool(nil), (*Encoder).fastpathEncMapIntBoolR, (*Decoder).fastpathDecMapIntBoolR) - fn(map[int8]interface{}(nil), (*Encoder).fastpathEncMapInt8IntfR, (*Decoder).fastpathDecMapInt8IntfR) - fn(map[int8]string(nil), (*Encoder).fastpathEncMapInt8StringR, (*Decoder).fastpathDecMapInt8StringR) - fn(map[int8]uint(nil), (*Encoder).fastpathEncMapInt8UintR, (*Decoder).fastpathDecMapInt8UintR) - fn(map[int8]uint8(nil), (*Encoder).fastpathEncMapInt8Uint8R, (*Decoder).fastpathDecMapInt8Uint8R) - fn(map[int8]uint16(nil), (*Encoder).fastpathEncMapInt8Uint16R, (*Decoder).fastpathDecMapInt8Uint16R) - fn(map[int8]uint32(nil), (*Encoder).fastpathEncMapInt8Uint32R, (*Decoder).fastpathDecMapInt8Uint32R) - fn(map[int8]uint64(nil), (*Encoder).fastpathEncMapInt8Uint64R, (*Decoder).fastpathDecMapInt8Uint64R) - fn(map[int8]uintptr(nil), (*Encoder).fastpathEncMapInt8UintptrR, (*Decoder).fastpathDecMapInt8UintptrR) - fn(map[int8]int(nil), (*Encoder).fastpathEncMapInt8IntR, (*Decoder).fastpathDecMapInt8IntR) - fn(map[int8]int8(nil), (*Encoder).fastpathEncMapInt8Int8R, (*Decoder).fastpathDecMapInt8Int8R) - fn(map[int8]int16(nil), (*Encoder).fastpathEncMapInt8Int16R, (*Decoder).fastpathDecMapInt8Int16R) - fn(map[int8]int32(nil), (*Encoder).fastpathEncMapInt8Int32R, (*Decoder).fastpathDecMapInt8Int32R) - fn(map[int8]int64(nil), (*Encoder).fastpathEncMapInt8Int64R, (*Decoder).fastpathDecMapInt8Int64R) - fn(map[int8]float32(nil), (*Encoder).fastpathEncMapInt8Float32R, (*Decoder).fastpathDecMapInt8Float32R) - fn(map[int8]float64(nil), (*Encoder).fastpathEncMapInt8Float64R, (*Decoder).fastpathDecMapInt8Float64R) - fn(map[int8]bool(nil), (*Encoder).fastpathEncMapInt8BoolR, (*Decoder).fastpathDecMapInt8BoolR) - fn(map[int16]interface{}(nil), (*Encoder).fastpathEncMapInt16IntfR, (*Decoder).fastpathDecMapInt16IntfR) - fn(map[int16]string(nil), (*Encoder).fastpathEncMapInt16StringR, (*Decoder).fastpathDecMapInt16StringR) - fn(map[int16]uint(nil), (*Encoder).fastpathEncMapInt16UintR, (*Decoder).fastpathDecMapInt16UintR) - fn(map[int16]uint8(nil), (*Encoder).fastpathEncMapInt16Uint8R, (*Decoder).fastpathDecMapInt16Uint8R) - fn(map[int16]uint16(nil), (*Encoder).fastpathEncMapInt16Uint16R, (*Decoder).fastpathDecMapInt16Uint16R) - fn(map[int16]uint32(nil), (*Encoder).fastpathEncMapInt16Uint32R, (*Decoder).fastpathDecMapInt16Uint32R) - fn(map[int16]uint64(nil), (*Encoder).fastpathEncMapInt16Uint64R, (*Decoder).fastpathDecMapInt16Uint64R) - fn(map[int16]uintptr(nil), (*Encoder).fastpathEncMapInt16UintptrR, (*Decoder).fastpathDecMapInt16UintptrR) - fn(map[int16]int(nil), (*Encoder).fastpathEncMapInt16IntR, (*Decoder).fastpathDecMapInt16IntR) - fn(map[int16]int8(nil), (*Encoder).fastpathEncMapInt16Int8R, (*Decoder).fastpathDecMapInt16Int8R) - fn(map[int16]int16(nil), (*Encoder).fastpathEncMapInt16Int16R, (*Decoder).fastpathDecMapInt16Int16R) - fn(map[int16]int32(nil), (*Encoder).fastpathEncMapInt16Int32R, (*Decoder).fastpathDecMapInt16Int32R) - fn(map[int16]int64(nil), (*Encoder).fastpathEncMapInt16Int64R, (*Decoder).fastpathDecMapInt16Int64R) - fn(map[int16]float32(nil), (*Encoder).fastpathEncMapInt16Float32R, (*Decoder).fastpathDecMapInt16Float32R) - fn(map[int16]float64(nil), (*Encoder).fastpathEncMapInt16Float64R, (*Decoder).fastpathDecMapInt16Float64R) - fn(map[int16]bool(nil), (*Encoder).fastpathEncMapInt16BoolR, (*Decoder).fastpathDecMapInt16BoolR) - fn(map[int32]interface{}(nil), (*Encoder).fastpathEncMapInt32IntfR, (*Decoder).fastpathDecMapInt32IntfR) - fn(map[int32]string(nil), (*Encoder).fastpathEncMapInt32StringR, (*Decoder).fastpathDecMapInt32StringR) - fn(map[int32]uint(nil), (*Encoder).fastpathEncMapInt32UintR, (*Decoder).fastpathDecMapInt32UintR) - fn(map[int32]uint8(nil), (*Encoder).fastpathEncMapInt32Uint8R, (*Decoder).fastpathDecMapInt32Uint8R) - fn(map[int32]uint16(nil), (*Encoder).fastpathEncMapInt32Uint16R, (*Decoder).fastpathDecMapInt32Uint16R) - fn(map[int32]uint32(nil), (*Encoder).fastpathEncMapInt32Uint32R, (*Decoder).fastpathDecMapInt32Uint32R) - fn(map[int32]uint64(nil), (*Encoder).fastpathEncMapInt32Uint64R, (*Decoder).fastpathDecMapInt32Uint64R) - fn(map[int32]uintptr(nil), (*Encoder).fastpathEncMapInt32UintptrR, (*Decoder).fastpathDecMapInt32UintptrR) - fn(map[int32]int(nil), (*Encoder).fastpathEncMapInt32IntR, (*Decoder).fastpathDecMapInt32IntR) - fn(map[int32]int8(nil), (*Encoder).fastpathEncMapInt32Int8R, (*Decoder).fastpathDecMapInt32Int8R) - fn(map[int32]int16(nil), (*Encoder).fastpathEncMapInt32Int16R, (*Decoder).fastpathDecMapInt32Int16R) - fn(map[int32]int32(nil), (*Encoder).fastpathEncMapInt32Int32R, (*Decoder).fastpathDecMapInt32Int32R) - fn(map[int32]int64(nil), (*Encoder).fastpathEncMapInt32Int64R, (*Decoder).fastpathDecMapInt32Int64R) - fn(map[int32]float32(nil), (*Encoder).fastpathEncMapInt32Float32R, (*Decoder).fastpathDecMapInt32Float32R) - fn(map[int32]float64(nil), (*Encoder).fastpathEncMapInt32Float64R, (*Decoder).fastpathDecMapInt32Float64R) - fn(map[int32]bool(nil), (*Encoder).fastpathEncMapInt32BoolR, (*Decoder).fastpathDecMapInt32BoolR) fn(map[int64]interface{}(nil), (*Encoder).fastpathEncMapInt64IntfR, (*Decoder).fastpathDecMapInt64IntfR) fn(map[int64]string(nil), (*Encoder).fastpathEncMapInt64StringR, (*Decoder).fastpathDecMapInt64StringR) + fn(map[int64][]byte(nil), (*Encoder).fastpathEncMapInt64BytesR, (*Decoder).fastpathDecMapInt64BytesR) fn(map[int64]uint(nil), (*Encoder).fastpathEncMapInt64UintR, (*Decoder).fastpathDecMapInt64UintR) fn(map[int64]uint8(nil), (*Encoder).fastpathEncMapInt64Uint8R, (*Decoder).fastpathDecMapInt64Uint8R) - fn(map[int64]uint16(nil), (*Encoder).fastpathEncMapInt64Uint16R, (*Decoder).fastpathDecMapInt64Uint16R) - fn(map[int64]uint32(nil), (*Encoder).fastpathEncMapInt64Uint32R, (*Decoder).fastpathDecMapInt64Uint32R) fn(map[int64]uint64(nil), (*Encoder).fastpathEncMapInt64Uint64R, (*Decoder).fastpathDecMapInt64Uint64R) - fn(map[int64]uintptr(nil), (*Encoder).fastpathEncMapInt64UintptrR, (*Decoder).fastpathDecMapInt64UintptrR) fn(map[int64]int(nil), (*Encoder).fastpathEncMapInt64IntR, (*Decoder).fastpathDecMapInt64IntR) - fn(map[int64]int8(nil), (*Encoder).fastpathEncMapInt64Int8R, (*Decoder).fastpathDecMapInt64Int8R) - fn(map[int64]int16(nil), (*Encoder).fastpathEncMapInt64Int16R, (*Decoder).fastpathDecMapInt64Int16R) - fn(map[int64]int32(nil), (*Encoder).fastpathEncMapInt64Int32R, (*Decoder).fastpathDecMapInt64Int32R) fn(map[int64]int64(nil), (*Encoder).fastpathEncMapInt64Int64R, (*Decoder).fastpathDecMapInt64Int64R) fn(map[int64]float32(nil), (*Encoder).fastpathEncMapInt64Float32R, (*Decoder).fastpathDecMapInt64Float32R) fn(map[int64]float64(nil), (*Encoder).fastpathEncMapInt64Float64R, (*Decoder).fastpathDecMapInt64Float64R) fn(map[int64]bool(nil), (*Encoder).fastpathEncMapInt64BoolR, (*Decoder).fastpathDecMapInt64BoolR) - fn(map[bool]interface{}(nil), (*Encoder).fastpathEncMapBoolIntfR, (*Decoder).fastpathDecMapBoolIntfR) - fn(map[bool]string(nil), (*Encoder).fastpathEncMapBoolStringR, (*Decoder).fastpathDecMapBoolStringR) - fn(map[bool]uint(nil), (*Encoder).fastpathEncMapBoolUintR, (*Decoder).fastpathDecMapBoolUintR) - fn(map[bool]uint8(nil), (*Encoder).fastpathEncMapBoolUint8R, (*Decoder).fastpathDecMapBoolUint8R) - fn(map[bool]uint16(nil), (*Encoder).fastpathEncMapBoolUint16R, (*Decoder).fastpathDecMapBoolUint16R) - fn(map[bool]uint32(nil), (*Encoder).fastpathEncMapBoolUint32R, (*Decoder).fastpathDecMapBoolUint32R) - fn(map[bool]uint64(nil), (*Encoder).fastpathEncMapBoolUint64R, (*Decoder).fastpathDecMapBoolUint64R) - fn(map[bool]uintptr(nil), (*Encoder).fastpathEncMapBoolUintptrR, (*Decoder).fastpathDecMapBoolUintptrR) - fn(map[bool]int(nil), (*Encoder).fastpathEncMapBoolIntR, (*Decoder).fastpathDecMapBoolIntR) - fn(map[bool]int8(nil), (*Encoder).fastpathEncMapBoolInt8R, (*Decoder).fastpathDecMapBoolInt8R) - fn(map[bool]int16(nil), (*Encoder).fastpathEncMapBoolInt16R, (*Decoder).fastpathDecMapBoolInt16R) - fn(map[bool]int32(nil), (*Encoder).fastpathEncMapBoolInt32R, (*Decoder).fastpathDecMapBoolInt32R) - fn(map[bool]int64(nil), (*Encoder).fastpathEncMapBoolInt64R, (*Decoder).fastpathDecMapBoolInt64R) - fn(map[bool]float32(nil), (*Encoder).fastpathEncMapBoolFloat32R, (*Decoder).fastpathDecMapBoolFloat32R) - fn(map[bool]float64(nil), (*Encoder).fastpathEncMapBoolFloat64R, (*Decoder).fastpathDecMapBoolFloat64R) - fn(map[bool]bool(nil), (*Encoder).fastpathEncMapBoolBoolR, (*Decoder).fastpathDecMapBoolBoolR) sort.Sort(fastpathAslice(fastpathAV[:])) } @@ -375,1093 +186,654 @@ func init() { // -- -- fast path type switch func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { switch v := iv.(type) { - case []interface{}: fastpathTV.EncSliceIntfV(v, e) case *[]interface{}: - fastpathTV.EncSliceIntfV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceIntfV(*v, e) + } case []string: fastpathTV.EncSliceStringV(v, e) case *[]string: - fastpathTV.EncSliceStringV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceStringV(*v, e) + } + case [][]byte: + fastpathTV.EncSliceBytesV(v, e) + case *[][]byte: + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceBytesV(*v, e) + } case []float32: fastpathTV.EncSliceFloat32V(v, e) case *[]float32: - fastpathTV.EncSliceFloat32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceFloat32V(*v, e) + } case []float64: fastpathTV.EncSliceFloat64V(v, e) case *[]float64: - fastpathTV.EncSliceFloat64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceFloat64V(*v, e) + } case []uint: fastpathTV.EncSliceUintV(v, e) case *[]uint: - fastpathTV.EncSliceUintV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceUintV(*v, e) + } case []uint16: fastpathTV.EncSliceUint16V(v, e) case *[]uint16: - fastpathTV.EncSliceUint16V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceUint16V(*v, e) + } case []uint32: fastpathTV.EncSliceUint32V(v, e) case *[]uint32: - fastpathTV.EncSliceUint32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceUint32V(*v, e) + } case []uint64: fastpathTV.EncSliceUint64V(v, e) case *[]uint64: - fastpathTV.EncSliceUint64V(*v, e) - case []uintptr: - fastpathTV.EncSliceUintptrV(v, e) - case *[]uintptr: - fastpathTV.EncSliceUintptrV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceUint64V(*v, e) + } case []int: fastpathTV.EncSliceIntV(v, e) case *[]int: - fastpathTV.EncSliceIntV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceIntV(*v, e) + } case []int8: fastpathTV.EncSliceInt8V(v, e) case *[]int8: - fastpathTV.EncSliceInt8V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceInt8V(*v, e) + } case []int16: fastpathTV.EncSliceInt16V(v, e) case *[]int16: - fastpathTV.EncSliceInt16V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceInt16V(*v, e) + } case []int32: fastpathTV.EncSliceInt32V(v, e) case *[]int32: - fastpathTV.EncSliceInt32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceInt32V(*v, e) + } case []int64: fastpathTV.EncSliceInt64V(v, e) case *[]int64: - fastpathTV.EncSliceInt64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceInt64V(*v, e) + } case []bool: fastpathTV.EncSliceBoolV(v, e) case *[]bool: - fastpathTV.EncSliceBoolV(*v, e) - - case map[interface{}]interface{}: - fastpathTV.EncMapIntfIntfV(v, e) - case *map[interface{}]interface{}: - fastpathTV.EncMapIntfIntfV(*v, e) - case map[interface{}]string: - fastpathTV.EncMapIntfStringV(v, e) - case *map[interface{}]string: - fastpathTV.EncMapIntfStringV(*v, e) - case map[interface{}]uint: - fastpathTV.EncMapIntfUintV(v, e) - case *map[interface{}]uint: - fastpathTV.EncMapIntfUintV(*v, e) - case map[interface{}]uint8: - fastpathTV.EncMapIntfUint8V(v, e) - case *map[interface{}]uint8: - fastpathTV.EncMapIntfUint8V(*v, e) - case map[interface{}]uint16: - fastpathTV.EncMapIntfUint16V(v, e) - case *map[interface{}]uint16: - fastpathTV.EncMapIntfUint16V(*v, e) - case map[interface{}]uint32: - fastpathTV.EncMapIntfUint32V(v, e) - case *map[interface{}]uint32: - fastpathTV.EncMapIntfUint32V(*v, e) - case map[interface{}]uint64: - fastpathTV.EncMapIntfUint64V(v, e) - case *map[interface{}]uint64: - fastpathTV.EncMapIntfUint64V(*v, e) - case map[interface{}]uintptr: - fastpathTV.EncMapIntfUintptrV(v, e) - case *map[interface{}]uintptr: - fastpathTV.EncMapIntfUintptrV(*v, e) - case map[interface{}]int: - fastpathTV.EncMapIntfIntV(v, e) - case *map[interface{}]int: - fastpathTV.EncMapIntfIntV(*v, e) - case map[interface{}]int8: - fastpathTV.EncMapIntfInt8V(v, e) - case *map[interface{}]int8: - fastpathTV.EncMapIntfInt8V(*v, e) - case map[interface{}]int16: - fastpathTV.EncMapIntfInt16V(v, e) - case *map[interface{}]int16: - fastpathTV.EncMapIntfInt16V(*v, e) - case map[interface{}]int32: - fastpathTV.EncMapIntfInt32V(v, e) - case *map[interface{}]int32: - fastpathTV.EncMapIntfInt32V(*v, e) - case map[interface{}]int64: - fastpathTV.EncMapIntfInt64V(v, e) - case *map[interface{}]int64: - fastpathTV.EncMapIntfInt64V(*v, e) - case map[interface{}]float32: - fastpathTV.EncMapIntfFloat32V(v, e) - case *map[interface{}]float32: - fastpathTV.EncMapIntfFloat32V(*v, e) - case map[interface{}]float64: - fastpathTV.EncMapIntfFloat64V(v, e) - case *map[interface{}]float64: - fastpathTV.EncMapIntfFloat64V(*v, e) - case map[interface{}]bool: - fastpathTV.EncMapIntfBoolV(v, e) - case *map[interface{}]bool: - fastpathTV.EncMapIntfBoolV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncSliceBoolV(*v, e) + } case map[string]interface{}: fastpathTV.EncMapStringIntfV(v, e) case *map[string]interface{}: - fastpathTV.EncMapStringIntfV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapStringIntfV(*v, e) + } case map[string]string: fastpathTV.EncMapStringStringV(v, e) case *map[string]string: - fastpathTV.EncMapStringStringV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapStringStringV(*v, e) + } + case map[string][]byte: + fastpathTV.EncMapStringBytesV(v, e) + case *map[string][]byte: + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapStringBytesV(*v, e) + } case map[string]uint: fastpathTV.EncMapStringUintV(v, e) case *map[string]uint: - fastpathTV.EncMapStringUintV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapStringUintV(*v, e) + } case map[string]uint8: fastpathTV.EncMapStringUint8V(v, e) case *map[string]uint8: - fastpathTV.EncMapStringUint8V(*v, e) - case map[string]uint16: - fastpathTV.EncMapStringUint16V(v, e) - case *map[string]uint16: - fastpathTV.EncMapStringUint16V(*v, e) - case map[string]uint32: - fastpathTV.EncMapStringUint32V(v, e) - case *map[string]uint32: - fastpathTV.EncMapStringUint32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapStringUint8V(*v, e) + } case map[string]uint64: fastpathTV.EncMapStringUint64V(v, e) case *map[string]uint64: - fastpathTV.EncMapStringUint64V(*v, e) - case map[string]uintptr: - fastpathTV.EncMapStringUintptrV(v, e) - case *map[string]uintptr: - fastpathTV.EncMapStringUintptrV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapStringUint64V(*v, e) + } case map[string]int: fastpathTV.EncMapStringIntV(v, e) case *map[string]int: - fastpathTV.EncMapStringIntV(*v, e) - case map[string]int8: - fastpathTV.EncMapStringInt8V(v, e) - case *map[string]int8: - fastpathTV.EncMapStringInt8V(*v, e) - case map[string]int16: - fastpathTV.EncMapStringInt16V(v, e) - case *map[string]int16: - fastpathTV.EncMapStringInt16V(*v, e) - case map[string]int32: - fastpathTV.EncMapStringInt32V(v, e) - case *map[string]int32: - fastpathTV.EncMapStringInt32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapStringIntV(*v, e) + } case map[string]int64: fastpathTV.EncMapStringInt64V(v, e) case *map[string]int64: - fastpathTV.EncMapStringInt64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapStringInt64V(*v, e) + } case map[string]float32: fastpathTV.EncMapStringFloat32V(v, e) case *map[string]float32: - fastpathTV.EncMapStringFloat32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapStringFloat32V(*v, e) + } case map[string]float64: fastpathTV.EncMapStringFloat64V(v, e) case *map[string]float64: - fastpathTV.EncMapStringFloat64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapStringFloat64V(*v, e) + } case map[string]bool: fastpathTV.EncMapStringBoolV(v, e) case *map[string]bool: - fastpathTV.EncMapStringBoolV(*v, e) - case map[float32]interface{}: - fastpathTV.EncMapFloat32IntfV(v, e) - case *map[float32]interface{}: - fastpathTV.EncMapFloat32IntfV(*v, e) - case map[float32]string: - fastpathTV.EncMapFloat32StringV(v, e) - case *map[float32]string: - fastpathTV.EncMapFloat32StringV(*v, e) - case map[float32]uint: - fastpathTV.EncMapFloat32UintV(v, e) - case *map[float32]uint: - fastpathTV.EncMapFloat32UintV(*v, e) - case map[float32]uint8: - fastpathTV.EncMapFloat32Uint8V(v, e) - case *map[float32]uint8: - fastpathTV.EncMapFloat32Uint8V(*v, e) - case map[float32]uint16: - fastpathTV.EncMapFloat32Uint16V(v, e) - case *map[float32]uint16: - fastpathTV.EncMapFloat32Uint16V(*v, e) - case map[float32]uint32: - fastpathTV.EncMapFloat32Uint32V(v, e) - case *map[float32]uint32: - fastpathTV.EncMapFloat32Uint32V(*v, e) - case map[float32]uint64: - fastpathTV.EncMapFloat32Uint64V(v, e) - case *map[float32]uint64: - fastpathTV.EncMapFloat32Uint64V(*v, e) - case map[float32]uintptr: - fastpathTV.EncMapFloat32UintptrV(v, e) - case *map[float32]uintptr: - fastpathTV.EncMapFloat32UintptrV(*v, e) - case map[float32]int: - fastpathTV.EncMapFloat32IntV(v, e) - case *map[float32]int: - fastpathTV.EncMapFloat32IntV(*v, e) - case map[float32]int8: - fastpathTV.EncMapFloat32Int8V(v, e) - case *map[float32]int8: - fastpathTV.EncMapFloat32Int8V(*v, e) - case map[float32]int16: - fastpathTV.EncMapFloat32Int16V(v, e) - case *map[float32]int16: - fastpathTV.EncMapFloat32Int16V(*v, e) - case map[float32]int32: - fastpathTV.EncMapFloat32Int32V(v, e) - case *map[float32]int32: - fastpathTV.EncMapFloat32Int32V(*v, e) - case map[float32]int64: - fastpathTV.EncMapFloat32Int64V(v, e) - case *map[float32]int64: - fastpathTV.EncMapFloat32Int64V(*v, e) - case map[float32]float32: - fastpathTV.EncMapFloat32Float32V(v, e) - case *map[float32]float32: - fastpathTV.EncMapFloat32Float32V(*v, e) - case map[float32]float64: - fastpathTV.EncMapFloat32Float64V(v, e) - case *map[float32]float64: - fastpathTV.EncMapFloat32Float64V(*v, e) - case map[float32]bool: - fastpathTV.EncMapFloat32BoolV(v, e) - case *map[float32]bool: - fastpathTV.EncMapFloat32BoolV(*v, e) - case map[float64]interface{}: - fastpathTV.EncMapFloat64IntfV(v, e) - case *map[float64]interface{}: - fastpathTV.EncMapFloat64IntfV(*v, e) - case map[float64]string: - fastpathTV.EncMapFloat64StringV(v, e) - case *map[float64]string: - fastpathTV.EncMapFloat64StringV(*v, e) - case map[float64]uint: - fastpathTV.EncMapFloat64UintV(v, e) - case *map[float64]uint: - fastpathTV.EncMapFloat64UintV(*v, e) - case map[float64]uint8: - fastpathTV.EncMapFloat64Uint8V(v, e) - case *map[float64]uint8: - fastpathTV.EncMapFloat64Uint8V(*v, e) - case map[float64]uint16: - fastpathTV.EncMapFloat64Uint16V(v, e) - case *map[float64]uint16: - fastpathTV.EncMapFloat64Uint16V(*v, e) - case map[float64]uint32: - fastpathTV.EncMapFloat64Uint32V(v, e) - case *map[float64]uint32: - fastpathTV.EncMapFloat64Uint32V(*v, e) - case map[float64]uint64: - fastpathTV.EncMapFloat64Uint64V(v, e) - case *map[float64]uint64: - fastpathTV.EncMapFloat64Uint64V(*v, e) - case map[float64]uintptr: - fastpathTV.EncMapFloat64UintptrV(v, e) - case *map[float64]uintptr: - fastpathTV.EncMapFloat64UintptrV(*v, e) - case map[float64]int: - fastpathTV.EncMapFloat64IntV(v, e) - case *map[float64]int: - fastpathTV.EncMapFloat64IntV(*v, e) - case map[float64]int8: - fastpathTV.EncMapFloat64Int8V(v, e) - case *map[float64]int8: - fastpathTV.EncMapFloat64Int8V(*v, e) - case map[float64]int16: - fastpathTV.EncMapFloat64Int16V(v, e) - case *map[float64]int16: - fastpathTV.EncMapFloat64Int16V(*v, e) - case map[float64]int32: - fastpathTV.EncMapFloat64Int32V(v, e) - case *map[float64]int32: - fastpathTV.EncMapFloat64Int32V(*v, e) - case map[float64]int64: - fastpathTV.EncMapFloat64Int64V(v, e) - case *map[float64]int64: - fastpathTV.EncMapFloat64Int64V(*v, e) - case map[float64]float32: - fastpathTV.EncMapFloat64Float32V(v, e) - case *map[float64]float32: - fastpathTV.EncMapFloat64Float32V(*v, e) - case map[float64]float64: - fastpathTV.EncMapFloat64Float64V(v, e) - case *map[float64]float64: - fastpathTV.EncMapFloat64Float64V(*v, e) - case map[float64]bool: - fastpathTV.EncMapFloat64BoolV(v, e) - case *map[float64]bool: - fastpathTV.EncMapFloat64BoolV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapStringBoolV(*v, e) + } case map[uint]interface{}: fastpathTV.EncMapUintIntfV(v, e) case *map[uint]interface{}: - fastpathTV.EncMapUintIntfV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUintIntfV(*v, e) + } case map[uint]string: fastpathTV.EncMapUintStringV(v, e) case *map[uint]string: - fastpathTV.EncMapUintStringV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUintStringV(*v, e) + } + case map[uint][]byte: + fastpathTV.EncMapUintBytesV(v, e) + case *map[uint][]byte: + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUintBytesV(*v, e) + } case map[uint]uint: fastpathTV.EncMapUintUintV(v, e) case *map[uint]uint: - fastpathTV.EncMapUintUintV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUintUintV(*v, e) + } case map[uint]uint8: fastpathTV.EncMapUintUint8V(v, e) case *map[uint]uint8: - fastpathTV.EncMapUintUint8V(*v, e) - case map[uint]uint16: - fastpathTV.EncMapUintUint16V(v, e) - case *map[uint]uint16: - fastpathTV.EncMapUintUint16V(*v, e) - case map[uint]uint32: - fastpathTV.EncMapUintUint32V(v, e) - case *map[uint]uint32: - fastpathTV.EncMapUintUint32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUintUint8V(*v, e) + } case map[uint]uint64: fastpathTV.EncMapUintUint64V(v, e) case *map[uint]uint64: - fastpathTV.EncMapUintUint64V(*v, e) - case map[uint]uintptr: - fastpathTV.EncMapUintUintptrV(v, e) - case *map[uint]uintptr: - fastpathTV.EncMapUintUintptrV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUintUint64V(*v, e) + } case map[uint]int: fastpathTV.EncMapUintIntV(v, e) case *map[uint]int: - fastpathTV.EncMapUintIntV(*v, e) - case map[uint]int8: - fastpathTV.EncMapUintInt8V(v, e) - case *map[uint]int8: - fastpathTV.EncMapUintInt8V(*v, e) - case map[uint]int16: - fastpathTV.EncMapUintInt16V(v, e) - case *map[uint]int16: - fastpathTV.EncMapUintInt16V(*v, e) - case map[uint]int32: - fastpathTV.EncMapUintInt32V(v, e) - case *map[uint]int32: - fastpathTV.EncMapUintInt32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUintIntV(*v, e) + } case map[uint]int64: fastpathTV.EncMapUintInt64V(v, e) case *map[uint]int64: - fastpathTV.EncMapUintInt64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUintInt64V(*v, e) + } case map[uint]float32: fastpathTV.EncMapUintFloat32V(v, e) case *map[uint]float32: - fastpathTV.EncMapUintFloat32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUintFloat32V(*v, e) + } case map[uint]float64: fastpathTV.EncMapUintFloat64V(v, e) case *map[uint]float64: - fastpathTV.EncMapUintFloat64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUintFloat64V(*v, e) + } case map[uint]bool: fastpathTV.EncMapUintBoolV(v, e) case *map[uint]bool: - fastpathTV.EncMapUintBoolV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUintBoolV(*v, e) + } case map[uint8]interface{}: fastpathTV.EncMapUint8IntfV(v, e) case *map[uint8]interface{}: - fastpathTV.EncMapUint8IntfV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint8IntfV(*v, e) + } case map[uint8]string: fastpathTV.EncMapUint8StringV(v, e) case *map[uint8]string: - fastpathTV.EncMapUint8StringV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint8StringV(*v, e) + } + case map[uint8][]byte: + fastpathTV.EncMapUint8BytesV(v, e) + case *map[uint8][]byte: + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint8BytesV(*v, e) + } case map[uint8]uint: fastpathTV.EncMapUint8UintV(v, e) case *map[uint8]uint: - fastpathTV.EncMapUint8UintV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint8UintV(*v, e) + } case map[uint8]uint8: fastpathTV.EncMapUint8Uint8V(v, e) case *map[uint8]uint8: - fastpathTV.EncMapUint8Uint8V(*v, e) - case map[uint8]uint16: - fastpathTV.EncMapUint8Uint16V(v, e) - case *map[uint8]uint16: - fastpathTV.EncMapUint8Uint16V(*v, e) - case map[uint8]uint32: - fastpathTV.EncMapUint8Uint32V(v, e) - case *map[uint8]uint32: - fastpathTV.EncMapUint8Uint32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint8Uint8V(*v, e) + } case map[uint8]uint64: fastpathTV.EncMapUint8Uint64V(v, e) case *map[uint8]uint64: - fastpathTV.EncMapUint8Uint64V(*v, e) - case map[uint8]uintptr: - fastpathTV.EncMapUint8UintptrV(v, e) - case *map[uint8]uintptr: - fastpathTV.EncMapUint8UintptrV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint8Uint64V(*v, e) + } case map[uint8]int: fastpathTV.EncMapUint8IntV(v, e) case *map[uint8]int: - fastpathTV.EncMapUint8IntV(*v, e) - case map[uint8]int8: - fastpathTV.EncMapUint8Int8V(v, e) - case *map[uint8]int8: - fastpathTV.EncMapUint8Int8V(*v, e) - case map[uint8]int16: - fastpathTV.EncMapUint8Int16V(v, e) - case *map[uint8]int16: - fastpathTV.EncMapUint8Int16V(*v, e) - case map[uint8]int32: - fastpathTV.EncMapUint8Int32V(v, e) - case *map[uint8]int32: - fastpathTV.EncMapUint8Int32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint8IntV(*v, e) + } case map[uint8]int64: fastpathTV.EncMapUint8Int64V(v, e) case *map[uint8]int64: - fastpathTV.EncMapUint8Int64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint8Int64V(*v, e) + } case map[uint8]float32: fastpathTV.EncMapUint8Float32V(v, e) case *map[uint8]float32: - fastpathTV.EncMapUint8Float32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint8Float32V(*v, e) + } case map[uint8]float64: fastpathTV.EncMapUint8Float64V(v, e) case *map[uint8]float64: - fastpathTV.EncMapUint8Float64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint8Float64V(*v, e) + } case map[uint8]bool: fastpathTV.EncMapUint8BoolV(v, e) case *map[uint8]bool: - fastpathTV.EncMapUint8BoolV(*v, e) - case map[uint16]interface{}: - fastpathTV.EncMapUint16IntfV(v, e) - case *map[uint16]interface{}: - fastpathTV.EncMapUint16IntfV(*v, e) - case map[uint16]string: - fastpathTV.EncMapUint16StringV(v, e) - case *map[uint16]string: - fastpathTV.EncMapUint16StringV(*v, e) - case map[uint16]uint: - fastpathTV.EncMapUint16UintV(v, e) - case *map[uint16]uint: - fastpathTV.EncMapUint16UintV(*v, e) - case map[uint16]uint8: - fastpathTV.EncMapUint16Uint8V(v, e) - case *map[uint16]uint8: - fastpathTV.EncMapUint16Uint8V(*v, e) - case map[uint16]uint16: - fastpathTV.EncMapUint16Uint16V(v, e) - case *map[uint16]uint16: - fastpathTV.EncMapUint16Uint16V(*v, e) - case map[uint16]uint32: - fastpathTV.EncMapUint16Uint32V(v, e) - case *map[uint16]uint32: - fastpathTV.EncMapUint16Uint32V(*v, e) - case map[uint16]uint64: - fastpathTV.EncMapUint16Uint64V(v, e) - case *map[uint16]uint64: - fastpathTV.EncMapUint16Uint64V(*v, e) - case map[uint16]uintptr: - fastpathTV.EncMapUint16UintptrV(v, e) - case *map[uint16]uintptr: - fastpathTV.EncMapUint16UintptrV(*v, e) - case map[uint16]int: - fastpathTV.EncMapUint16IntV(v, e) - case *map[uint16]int: - fastpathTV.EncMapUint16IntV(*v, e) - case map[uint16]int8: - fastpathTV.EncMapUint16Int8V(v, e) - case *map[uint16]int8: - fastpathTV.EncMapUint16Int8V(*v, e) - case map[uint16]int16: - fastpathTV.EncMapUint16Int16V(v, e) - case *map[uint16]int16: - fastpathTV.EncMapUint16Int16V(*v, e) - case map[uint16]int32: - fastpathTV.EncMapUint16Int32V(v, e) - case *map[uint16]int32: - fastpathTV.EncMapUint16Int32V(*v, e) - case map[uint16]int64: - fastpathTV.EncMapUint16Int64V(v, e) - case *map[uint16]int64: - fastpathTV.EncMapUint16Int64V(*v, e) - case map[uint16]float32: - fastpathTV.EncMapUint16Float32V(v, e) - case *map[uint16]float32: - fastpathTV.EncMapUint16Float32V(*v, e) - case map[uint16]float64: - fastpathTV.EncMapUint16Float64V(v, e) - case *map[uint16]float64: - fastpathTV.EncMapUint16Float64V(*v, e) - case map[uint16]bool: - fastpathTV.EncMapUint16BoolV(v, e) - case *map[uint16]bool: - fastpathTV.EncMapUint16BoolV(*v, e) - case map[uint32]interface{}: - fastpathTV.EncMapUint32IntfV(v, e) - case *map[uint32]interface{}: - fastpathTV.EncMapUint32IntfV(*v, e) - case map[uint32]string: - fastpathTV.EncMapUint32StringV(v, e) - case *map[uint32]string: - fastpathTV.EncMapUint32StringV(*v, e) - case map[uint32]uint: - fastpathTV.EncMapUint32UintV(v, e) - case *map[uint32]uint: - fastpathTV.EncMapUint32UintV(*v, e) - case map[uint32]uint8: - fastpathTV.EncMapUint32Uint8V(v, e) - case *map[uint32]uint8: - fastpathTV.EncMapUint32Uint8V(*v, e) - case map[uint32]uint16: - fastpathTV.EncMapUint32Uint16V(v, e) - case *map[uint32]uint16: - fastpathTV.EncMapUint32Uint16V(*v, e) - case map[uint32]uint32: - fastpathTV.EncMapUint32Uint32V(v, e) - case *map[uint32]uint32: - fastpathTV.EncMapUint32Uint32V(*v, e) - case map[uint32]uint64: - fastpathTV.EncMapUint32Uint64V(v, e) - case *map[uint32]uint64: - fastpathTV.EncMapUint32Uint64V(*v, e) - case map[uint32]uintptr: - fastpathTV.EncMapUint32UintptrV(v, e) - case *map[uint32]uintptr: - fastpathTV.EncMapUint32UintptrV(*v, e) - case map[uint32]int: - fastpathTV.EncMapUint32IntV(v, e) - case *map[uint32]int: - fastpathTV.EncMapUint32IntV(*v, e) - case map[uint32]int8: - fastpathTV.EncMapUint32Int8V(v, e) - case *map[uint32]int8: - fastpathTV.EncMapUint32Int8V(*v, e) - case map[uint32]int16: - fastpathTV.EncMapUint32Int16V(v, e) - case *map[uint32]int16: - fastpathTV.EncMapUint32Int16V(*v, e) - case map[uint32]int32: - fastpathTV.EncMapUint32Int32V(v, e) - case *map[uint32]int32: - fastpathTV.EncMapUint32Int32V(*v, e) - case map[uint32]int64: - fastpathTV.EncMapUint32Int64V(v, e) - case *map[uint32]int64: - fastpathTV.EncMapUint32Int64V(*v, e) - case map[uint32]float32: - fastpathTV.EncMapUint32Float32V(v, e) - case *map[uint32]float32: - fastpathTV.EncMapUint32Float32V(*v, e) - case map[uint32]float64: - fastpathTV.EncMapUint32Float64V(v, e) - case *map[uint32]float64: - fastpathTV.EncMapUint32Float64V(*v, e) - case map[uint32]bool: - fastpathTV.EncMapUint32BoolV(v, e) - case *map[uint32]bool: - fastpathTV.EncMapUint32BoolV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint8BoolV(*v, e) + } case map[uint64]interface{}: fastpathTV.EncMapUint64IntfV(v, e) case *map[uint64]interface{}: - fastpathTV.EncMapUint64IntfV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint64IntfV(*v, e) + } case map[uint64]string: fastpathTV.EncMapUint64StringV(v, e) case *map[uint64]string: - fastpathTV.EncMapUint64StringV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint64StringV(*v, e) + } + case map[uint64][]byte: + fastpathTV.EncMapUint64BytesV(v, e) + case *map[uint64][]byte: + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint64BytesV(*v, e) + } case map[uint64]uint: fastpathTV.EncMapUint64UintV(v, e) case *map[uint64]uint: - fastpathTV.EncMapUint64UintV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint64UintV(*v, e) + } case map[uint64]uint8: fastpathTV.EncMapUint64Uint8V(v, e) case *map[uint64]uint8: - fastpathTV.EncMapUint64Uint8V(*v, e) - case map[uint64]uint16: - fastpathTV.EncMapUint64Uint16V(v, e) - case *map[uint64]uint16: - fastpathTV.EncMapUint64Uint16V(*v, e) - case map[uint64]uint32: - fastpathTV.EncMapUint64Uint32V(v, e) - case *map[uint64]uint32: - fastpathTV.EncMapUint64Uint32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint64Uint8V(*v, e) + } case map[uint64]uint64: fastpathTV.EncMapUint64Uint64V(v, e) case *map[uint64]uint64: - fastpathTV.EncMapUint64Uint64V(*v, e) - case map[uint64]uintptr: - fastpathTV.EncMapUint64UintptrV(v, e) - case *map[uint64]uintptr: - fastpathTV.EncMapUint64UintptrV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint64Uint64V(*v, e) + } case map[uint64]int: fastpathTV.EncMapUint64IntV(v, e) case *map[uint64]int: - fastpathTV.EncMapUint64IntV(*v, e) - case map[uint64]int8: - fastpathTV.EncMapUint64Int8V(v, e) - case *map[uint64]int8: - fastpathTV.EncMapUint64Int8V(*v, e) - case map[uint64]int16: - fastpathTV.EncMapUint64Int16V(v, e) - case *map[uint64]int16: - fastpathTV.EncMapUint64Int16V(*v, e) - case map[uint64]int32: - fastpathTV.EncMapUint64Int32V(v, e) - case *map[uint64]int32: - fastpathTV.EncMapUint64Int32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint64IntV(*v, e) + } case map[uint64]int64: fastpathTV.EncMapUint64Int64V(v, e) case *map[uint64]int64: - fastpathTV.EncMapUint64Int64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint64Int64V(*v, e) + } case map[uint64]float32: fastpathTV.EncMapUint64Float32V(v, e) case *map[uint64]float32: - fastpathTV.EncMapUint64Float32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint64Float32V(*v, e) + } case map[uint64]float64: fastpathTV.EncMapUint64Float64V(v, e) case *map[uint64]float64: - fastpathTV.EncMapUint64Float64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint64Float64V(*v, e) + } case map[uint64]bool: fastpathTV.EncMapUint64BoolV(v, e) case *map[uint64]bool: - fastpathTV.EncMapUint64BoolV(*v, e) - case map[uintptr]interface{}: - fastpathTV.EncMapUintptrIntfV(v, e) - case *map[uintptr]interface{}: - fastpathTV.EncMapUintptrIntfV(*v, e) - case map[uintptr]string: - fastpathTV.EncMapUintptrStringV(v, e) - case *map[uintptr]string: - fastpathTV.EncMapUintptrStringV(*v, e) - case map[uintptr]uint: - fastpathTV.EncMapUintptrUintV(v, e) - case *map[uintptr]uint: - fastpathTV.EncMapUintptrUintV(*v, e) - case map[uintptr]uint8: - fastpathTV.EncMapUintptrUint8V(v, e) - case *map[uintptr]uint8: - fastpathTV.EncMapUintptrUint8V(*v, e) - case map[uintptr]uint16: - fastpathTV.EncMapUintptrUint16V(v, e) - case *map[uintptr]uint16: - fastpathTV.EncMapUintptrUint16V(*v, e) - case map[uintptr]uint32: - fastpathTV.EncMapUintptrUint32V(v, e) - case *map[uintptr]uint32: - fastpathTV.EncMapUintptrUint32V(*v, e) - case map[uintptr]uint64: - fastpathTV.EncMapUintptrUint64V(v, e) - case *map[uintptr]uint64: - fastpathTV.EncMapUintptrUint64V(*v, e) - case map[uintptr]uintptr: - fastpathTV.EncMapUintptrUintptrV(v, e) - case *map[uintptr]uintptr: - fastpathTV.EncMapUintptrUintptrV(*v, e) - case map[uintptr]int: - fastpathTV.EncMapUintptrIntV(v, e) - case *map[uintptr]int: - fastpathTV.EncMapUintptrIntV(*v, e) - case map[uintptr]int8: - fastpathTV.EncMapUintptrInt8V(v, e) - case *map[uintptr]int8: - fastpathTV.EncMapUintptrInt8V(*v, e) - case map[uintptr]int16: - fastpathTV.EncMapUintptrInt16V(v, e) - case *map[uintptr]int16: - fastpathTV.EncMapUintptrInt16V(*v, e) - case map[uintptr]int32: - fastpathTV.EncMapUintptrInt32V(v, e) - case *map[uintptr]int32: - fastpathTV.EncMapUintptrInt32V(*v, e) - case map[uintptr]int64: - fastpathTV.EncMapUintptrInt64V(v, e) - case *map[uintptr]int64: - fastpathTV.EncMapUintptrInt64V(*v, e) - case map[uintptr]float32: - fastpathTV.EncMapUintptrFloat32V(v, e) - case *map[uintptr]float32: - fastpathTV.EncMapUintptrFloat32V(*v, e) - case map[uintptr]float64: - fastpathTV.EncMapUintptrFloat64V(v, e) - case *map[uintptr]float64: - fastpathTV.EncMapUintptrFloat64V(*v, e) - case map[uintptr]bool: - fastpathTV.EncMapUintptrBoolV(v, e) - case *map[uintptr]bool: - fastpathTV.EncMapUintptrBoolV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapUint64BoolV(*v, e) + } case map[int]interface{}: fastpathTV.EncMapIntIntfV(v, e) case *map[int]interface{}: - fastpathTV.EncMapIntIntfV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapIntIntfV(*v, e) + } case map[int]string: fastpathTV.EncMapIntStringV(v, e) case *map[int]string: - fastpathTV.EncMapIntStringV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapIntStringV(*v, e) + } + case map[int][]byte: + fastpathTV.EncMapIntBytesV(v, e) + case *map[int][]byte: + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapIntBytesV(*v, e) + } case map[int]uint: fastpathTV.EncMapIntUintV(v, e) case *map[int]uint: - fastpathTV.EncMapIntUintV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapIntUintV(*v, e) + } case map[int]uint8: fastpathTV.EncMapIntUint8V(v, e) case *map[int]uint8: - fastpathTV.EncMapIntUint8V(*v, e) - case map[int]uint16: - fastpathTV.EncMapIntUint16V(v, e) - case *map[int]uint16: - fastpathTV.EncMapIntUint16V(*v, e) - case map[int]uint32: - fastpathTV.EncMapIntUint32V(v, e) - case *map[int]uint32: - fastpathTV.EncMapIntUint32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapIntUint8V(*v, e) + } case map[int]uint64: fastpathTV.EncMapIntUint64V(v, e) case *map[int]uint64: - fastpathTV.EncMapIntUint64V(*v, e) - case map[int]uintptr: - fastpathTV.EncMapIntUintptrV(v, e) - case *map[int]uintptr: - fastpathTV.EncMapIntUintptrV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapIntUint64V(*v, e) + } case map[int]int: fastpathTV.EncMapIntIntV(v, e) case *map[int]int: - fastpathTV.EncMapIntIntV(*v, e) - case map[int]int8: - fastpathTV.EncMapIntInt8V(v, e) - case *map[int]int8: - fastpathTV.EncMapIntInt8V(*v, e) - case map[int]int16: - fastpathTV.EncMapIntInt16V(v, e) - case *map[int]int16: - fastpathTV.EncMapIntInt16V(*v, e) - case map[int]int32: - fastpathTV.EncMapIntInt32V(v, e) - case *map[int]int32: - fastpathTV.EncMapIntInt32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapIntIntV(*v, e) + } case map[int]int64: fastpathTV.EncMapIntInt64V(v, e) case *map[int]int64: - fastpathTV.EncMapIntInt64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapIntInt64V(*v, e) + } case map[int]float32: fastpathTV.EncMapIntFloat32V(v, e) case *map[int]float32: - fastpathTV.EncMapIntFloat32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapIntFloat32V(*v, e) + } case map[int]float64: fastpathTV.EncMapIntFloat64V(v, e) case *map[int]float64: - fastpathTV.EncMapIntFloat64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapIntFloat64V(*v, e) + } case map[int]bool: fastpathTV.EncMapIntBoolV(v, e) case *map[int]bool: - fastpathTV.EncMapIntBoolV(*v, e) - case map[int8]interface{}: - fastpathTV.EncMapInt8IntfV(v, e) - case *map[int8]interface{}: - fastpathTV.EncMapInt8IntfV(*v, e) - case map[int8]string: - fastpathTV.EncMapInt8StringV(v, e) - case *map[int8]string: - fastpathTV.EncMapInt8StringV(*v, e) - case map[int8]uint: - fastpathTV.EncMapInt8UintV(v, e) - case *map[int8]uint: - fastpathTV.EncMapInt8UintV(*v, e) - case map[int8]uint8: - fastpathTV.EncMapInt8Uint8V(v, e) - case *map[int8]uint8: - fastpathTV.EncMapInt8Uint8V(*v, e) - case map[int8]uint16: - fastpathTV.EncMapInt8Uint16V(v, e) - case *map[int8]uint16: - fastpathTV.EncMapInt8Uint16V(*v, e) - case map[int8]uint32: - fastpathTV.EncMapInt8Uint32V(v, e) - case *map[int8]uint32: - fastpathTV.EncMapInt8Uint32V(*v, e) - case map[int8]uint64: - fastpathTV.EncMapInt8Uint64V(v, e) - case *map[int8]uint64: - fastpathTV.EncMapInt8Uint64V(*v, e) - case map[int8]uintptr: - fastpathTV.EncMapInt8UintptrV(v, e) - case *map[int8]uintptr: - fastpathTV.EncMapInt8UintptrV(*v, e) - case map[int8]int: - fastpathTV.EncMapInt8IntV(v, e) - case *map[int8]int: - fastpathTV.EncMapInt8IntV(*v, e) - case map[int8]int8: - fastpathTV.EncMapInt8Int8V(v, e) - case *map[int8]int8: - fastpathTV.EncMapInt8Int8V(*v, e) - case map[int8]int16: - fastpathTV.EncMapInt8Int16V(v, e) - case *map[int8]int16: - fastpathTV.EncMapInt8Int16V(*v, e) - case map[int8]int32: - fastpathTV.EncMapInt8Int32V(v, e) - case *map[int8]int32: - fastpathTV.EncMapInt8Int32V(*v, e) - case map[int8]int64: - fastpathTV.EncMapInt8Int64V(v, e) - case *map[int8]int64: - fastpathTV.EncMapInt8Int64V(*v, e) - case map[int8]float32: - fastpathTV.EncMapInt8Float32V(v, e) - case *map[int8]float32: - fastpathTV.EncMapInt8Float32V(*v, e) - case map[int8]float64: - fastpathTV.EncMapInt8Float64V(v, e) - case *map[int8]float64: - fastpathTV.EncMapInt8Float64V(*v, e) - case map[int8]bool: - fastpathTV.EncMapInt8BoolV(v, e) - case *map[int8]bool: - fastpathTV.EncMapInt8BoolV(*v, e) - case map[int16]interface{}: - fastpathTV.EncMapInt16IntfV(v, e) - case *map[int16]interface{}: - fastpathTV.EncMapInt16IntfV(*v, e) - case map[int16]string: - fastpathTV.EncMapInt16StringV(v, e) - case *map[int16]string: - fastpathTV.EncMapInt16StringV(*v, e) - case map[int16]uint: - fastpathTV.EncMapInt16UintV(v, e) - case *map[int16]uint: - fastpathTV.EncMapInt16UintV(*v, e) - case map[int16]uint8: - fastpathTV.EncMapInt16Uint8V(v, e) - case *map[int16]uint8: - fastpathTV.EncMapInt16Uint8V(*v, e) - case map[int16]uint16: - fastpathTV.EncMapInt16Uint16V(v, e) - case *map[int16]uint16: - fastpathTV.EncMapInt16Uint16V(*v, e) - case map[int16]uint32: - fastpathTV.EncMapInt16Uint32V(v, e) - case *map[int16]uint32: - fastpathTV.EncMapInt16Uint32V(*v, e) - case map[int16]uint64: - fastpathTV.EncMapInt16Uint64V(v, e) - case *map[int16]uint64: - fastpathTV.EncMapInt16Uint64V(*v, e) - case map[int16]uintptr: - fastpathTV.EncMapInt16UintptrV(v, e) - case *map[int16]uintptr: - fastpathTV.EncMapInt16UintptrV(*v, e) - case map[int16]int: - fastpathTV.EncMapInt16IntV(v, e) - case *map[int16]int: - fastpathTV.EncMapInt16IntV(*v, e) - case map[int16]int8: - fastpathTV.EncMapInt16Int8V(v, e) - case *map[int16]int8: - fastpathTV.EncMapInt16Int8V(*v, e) - case map[int16]int16: - fastpathTV.EncMapInt16Int16V(v, e) - case *map[int16]int16: - fastpathTV.EncMapInt16Int16V(*v, e) - case map[int16]int32: - fastpathTV.EncMapInt16Int32V(v, e) - case *map[int16]int32: - fastpathTV.EncMapInt16Int32V(*v, e) - case map[int16]int64: - fastpathTV.EncMapInt16Int64V(v, e) - case *map[int16]int64: - fastpathTV.EncMapInt16Int64V(*v, e) - case map[int16]float32: - fastpathTV.EncMapInt16Float32V(v, e) - case *map[int16]float32: - fastpathTV.EncMapInt16Float32V(*v, e) - case map[int16]float64: - fastpathTV.EncMapInt16Float64V(v, e) - case *map[int16]float64: - fastpathTV.EncMapInt16Float64V(*v, e) - case map[int16]bool: - fastpathTV.EncMapInt16BoolV(v, e) - case *map[int16]bool: - fastpathTV.EncMapInt16BoolV(*v, e) - case map[int32]interface{}: - fastpathTV.EncMapInt32IntfV(v, e) - case *map[int32]interface{}: - fastpathTV.EncMapInt32IntfV(*v, e) - case map[int32]string: - fastpathTV.EncMapInt32StringV(v, e) - case *map[int32]string: - fastpathTV.EncMapInt32StringV(*v, e) - case map[int32]uint: - fastpathTV.EncMapInt32UintV(v, e) - case *map[int32]uint: - fastpathTV.EncMapInt32UintV(*v, e) - case map[int32]uint8: - fastpathTV.EncMapInt32Uint8V(v, e) - case *map[int32]uint8: - fastpathTV.EncMapInt32Uint8V(*v, e) - case map[int32]uint16: - fastpathTV.EncMapInt32Uint16V(v, e) - case *map[int32]uint16: - fastpathTV.EncMapInt32Uint16V(*v, e) - case map[int32]uint32: - fastpathTV.EncMapInt32Uint32V(v, e) - case *map[int32]uint32: - fastpathTV.EncMapInt32Uint32V(*v, e) - case map[int32]uint64: - fastpathTV.EncMapInt32Uint64V(v, e) - case *map[int32]uint64: - fastpathTV.EncMapInt32Uint64V(*v, e) - case map[int32]uintptr: - fastpathTV.EncMapInt32UintptrV(v, e) - case *map[int32]uintptr: - fastpathTV.EncMapInt32UintptrV(*v, e) - case map[int32]int: - fastpathTV.EncMapInt32IntV(v, e) - case *map[int32]int: - fastpathTV.EncMapInt32IntV(*v, e) - case map[int32]int8: - fastpathTV.EncMapInt32Int8V(v, e) - case *map[int32]int8: - fastpathTV.EncMapInt32Int8V(*v, e) - case map[int32]int16: - fastpathTV.EncMapInt32Int16V(v, e) - case *map[int32]int16: - fastpathTV.EncMapInt32Int16V(*v, e) - case map[int32]int32: - fastpathTV.EncMapInt32Int32V(v, e) - case *map[int32]int32: - fastpathTV.EncMapInt32Int32V(*v, e) - case map[int32]int64: - fastpathTV.EncMapInt32Int64V(v, e) - case *map[int32]int64: - fastpathTV.EncMapInt32Int64V(*v, e) - case map[int32]float32: - fastpathTV.EncMapInt32Float32V(v, e) - case *map[int32]float32: - fastpathTV.EncMapInt32Float32V(*v, e) - case map[int32]float64: - fastpathTV.EncMapInt32Float64V(v, e) - case *map[int32]float64: - fastpathTV.EncMapInt32Float64V(*v, e) - case map[int32]bool: - fastpathTV.EncMapInt32BoolV(v, e) - case *map[int32]bool: - fastpathTV.EncMapInt32BoolV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapIntBoolV(*v, e) + } case map[int64]interface{}: fastpathTV.EncMapInt64IntfV(v, e) case *map[int64]interface{}: - fastpathTV.EncMapInt64IntfV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapInt64IntfV(*v, e) + } case map[int64]string: fastpathTV.EncMapInt64StringV(v, e) case *map[int64]string: - fastpathTV.EncMapInt64StringV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapInt64StringV(*v, e) + } + case map[int64][]byte: + fastpathTV.EncMapInt64BytesV(v, e) + case *map[int64][]byte: + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapInt64BytesV(*v, e) + } case map[int64]uint: fastpathTV.EncMapInt64UintV(v, e) case *map[int64]uint: - fastpathTV.EncMapInt64UintV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapInt64UintV(*v, e) + } case map[int64]uint8: fastpathTV.EncMapInt64Uint8V(v, e) case *map[int64]uint8: - fastpathTV.EncMapInt64Uint8V(*v, e) - case map[int64]uint16: - fastpathTV.EncMapInt64Uint16V(v, e) - case *map[int64]uint16: - fastpathTV.EncMapInt64Uint16V(*v, e) - case map[int64]uint32: - fastpathTV.EncMapInt64Uint32V(v, e) - case *map[int64]uint32: - fastpathTV.EncMapInt64Uint32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapInt64Uint8V(*v, e) + } case map[int64]uint64: fastpathTV.EncMapInt64Uint64V(v, e) case *map[int64]uint64: - fastpathTV.EncMapInt64Uint64V(*v, e) - case map[int64]uintptr: - fastpathTV.EncMapInt64UintptrV(v, e) - case *map[int64]uintptr: - fastpathTV.EncMapInt64UintptrV(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapInt64Uint64V(*v, e) + } case map[int64]int: fastpathTV.EncMapInt64IntV(v, e) case *map[int64]int: - fastpathTV.EncMapInt64IntV(*v, e) - case map[int64]int8: - fastpathTV.EncMapInt64Int8V(v, e) - case *map[int64]int8: - fastpathTV.EncMapInt64Int8V(*v, e) - case map[int64]int16: - fastpathTV.EncMapInt64Int16V(v, e) - case *map[int64]int16: - fastpathTV.EncMapInt64Int16V(*v, e) - case map[int64]int32: - fastpathTV.EncMapInt64Int32V(v, e) - case *map[int64]int32: - fastpathTV.EncMapInt64Int32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapInt64IntV(*v, e) + } case map[int64]int64: fastpathTV.EncMapInt64Int64V(v, e) case *map[int64]int64: - fastpathTV.EncMapInt64Int64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapInt64Int64V(*v, e) + } case map[int64]float32: fastpathTV.EncMapInt64Float32V(v, e) case *map[int64]float32: - fastpathTV.EncMapInt64Float32V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapInt64Float32V(*v, e) + } case map[int64]float64: fastpathTV.EncMapInt64Float64V(v, e) case *map[int64]float64: - fastpathTV.EncMapInt64Float64V(*v, e) + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapInt64Float64V(*v, e) + } case map[int64]bool: fastpathTV.EncMapInt64BoolV(v, e) case *map[int64]bool: - fastpathTV.EncMapInt64BoolV(*v, e) - case map[bool]interface{}: - fastpathTV.EncMapBoolIntfV(v, e) - case *map[bool]interface{}: - fastpathTV.EncMapBoolIntfV(*v, e) - case map[bool]string: - fastpathTV.EncMapBoolStringV(v, e) - case *map[bool]string: - fastpathTV.EncMapBoolStringV(*v, e) - case map[bool]uint: - fastpathTV.EncMapBoolUintV(v, e) - case *map[bool]uint: - fastpathTV.EncMapBoolUintV(*v, e) - case map[bool]uint8: - fastpathTV.EncMapBoolUint8V(v, e) - case *map[bool]uint8: - fastpathTV.EncMapBoolUint8V(*v, e) - case map[bool]uint16: - fastpathTV.EncMapBoolUint16V(v, e) - case *map[bool]uint16: - fastpathTV.EncMapBoolUint16V(*v, e) - case map[bool]uint32: - fastpathTV.EncMapBoolUint32V(v, e) - case *map[bool]uint32: - fastpathTV.EncMapBoolUint32V(*v, e) - case map[bool]uint64: - fastpathTV.EncMapBoolUint64V(v, e) - case *map[bool]uint64: - fastpathTV.EncMapBoolUint64V(*v, e) - case map[bool]uintptr: - fastpathTV.EncMapBoolUintptrV(v, e) - case *map[bool]uintptr: - fastpathTV.EncMapBoolUintptrV(*v, e) - case map[bool]int: - fastpathTV.EncMapBoolIntV(v, e) - case *map[bool]int: - fastpathTV.EncMapBoolIntV(*v, e) - case map[bool]int8: - fastpathTV.EncMapBoolInt8V(v, e) - case *map[bool]int8: - fastpathTV.EncMapBoolInt8V(*v, e) - case map[bool]int16: - fastpathTV.EncMapBoolInt16V(v, e) - case *map[bool]int16: - fastpathTV.EncMapBoolInt16V(*v, e) - case map[bool]int32: - fastpathTV.EncMapBoolInt32V(v, e) - case *map[bool]int32: - fastpathTV.EncMapBoolInt32V(*v, e) - case map[bool]int64: - fastpathTV.EncMapBoolInt64V(v, e) - case *map[bool]int64: - fastpathTV.EncMapBoolInt64V(*v, e) - case map[bool]float32: - fastpathTV.EncMapBoolFloat32V(v, e) - case *map[bool]float32: - fastpathTV.EncMapBoolFloat32V(*v, e) - case map[bool]float64: - fastpathTV.EncMapBoolFloat64V(v, e) - case *map[bool]float64: - fastpathTV.EncMapBoolFloat64V(*v, e) - case map[bool]bool: - fastpathTV.EncMapBoolBoolV(v, e) - case *map[bool]bool: - fastpathTV.EncMapBoolBoolV(*v, e) - + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.EncMapInt64BoolV(*v, e) + } default: _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 return false @@ -1470,7 +842,6 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { } // -- -- fast path functions - func (e *Encoder) fastpathEncSliceIntfR(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { fastpathTV.EncAsMapSliceIntfV(rv2i(rv).([]interface{}), e) @@ -1478,41 +849,30 @@ func (e *Encoder) fastpathEncSliceIntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncSliceIntfV(rv2i(rv).([]interface{}), e) } } -func (_ fastpathT) EncSliceIntfV(v []interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - e.encode(v2) +func (fastpathT) EncSliceIntfV(v []interface{}, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.encode(v[j]) } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceIntfV(v []interface{}, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceIntfV(v []interface{}, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.encode(v[j]) } - e.encode(v2) + e.mapEnd() } - ee.WriteMapEnd() } - func (e *Encoder) fastpathEncSliceStringR(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { fastpathTV.EncAsMapSliceStringV(rv2i(rv).([]string), e) @@ -1520,217 +880,154 @@ func (e *Encoder) fastpathEncSliceStringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncSliceStringV(rv2i(rv).([]string), e) } } -func (_ fastpathT) EncSliceStringV(v []string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } +func (fastpathT) EncSliceStringV(v []string, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeString(v[j]) } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceStringV(v []string, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceStringV(v []string, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeString(v[j]) } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } + e.mapEnd() } - ee.WriteMapEnd() } - -func (e *Encoder) fastpathEncSliceFloat32R(f *codecFnInfo, rv reflect.Value) { +func (e *Encoder) fastpathEncSliceBytesR(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceFloat32V(rv2i(rv).([]float32), e) + fastpathTV.EncAsMapSliceBytesV(rv2i(rv).([][]byte), e) } else { - fastpathTV.EncSliceFloat32V(rv2i(rv).([]float32), e) + fastpathTV.EncSliceBytesV(rv2i(rv).([][]byte), e) } } -func (_ fastpathT) EncSliceFloat32V(v []float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return +func (fastpathT) EncSliceBytesV(v [][]byte, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeStringBytesRaw(v[j]) } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeFloat32(v2) - } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceFloat32V(v []float32, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceBytesV(v [][]byte, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeStringBytesRaw(v[j]) } - ee.EncodeFloat32(v2) + e.mapEnd() } - ee.WriteMapEnd() } - -func (e *Encoder) fastpathEncSliceFloat64R(f *codecFnInfo, rv reflect.Value) { +func (e *Encoder) fastpathEncSliceFloat32R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceFloat64V(rv2i(rv).([]float64), e) + fastpathTV.EncAsMapSliceFloat32V(rv2i(rv).([]float32), e) } else { - fastpathTV.EncSliceFloat64V(rv2i(rv).([]float64), e) + fastpathTV.EncSliceFloat32V(rv2i(rv).([]float32), e) } } -func (_ fastpathT) EncSliceFloat64V(v []float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeFloat64(v2) +func (fastpathT) EncSliceFloat32V(v []float32, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeFloat32(v[j]) } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceFloat64V(v []float64, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceFloat32V(v []float32, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeFloat32(v[j]) } - ee.EncodeFloat64(v2) + e.mapEnd() } - ee.WriteMapEnd() } - -func (e *Encoder) fastpathEncSliceUintR(f *codecFnInfo, rv reflect.Value) { +func (e *Encoder) fastpathEncSliceFloat64R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceUintV(rv2i(rv).([]uint), e) + fastpathTV.EncAsMapSliceFloat64V(rv2i(rv).([]float64), e) } else { - fastpathTV.EncSliceUintV(rv2i(rv).([]uint), e) + fastpathTV.EncSliceFloat64V(rv2i(rv).([]float64), e) } } -func (_ fastpathT) EncSliceUintV(v []uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeUint(uint64(v2)) +func (fastpathT) EncSliceFloat64V(v []float64, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeFloat64(v[j]) } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceUintV(v []uint, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceFloat64V(v []float64, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeFloat64(v[j]) } - ee.EncodeUint(uint64(v2)) + e.mapEnd() } - ee.WriteMapEnd() } - -func (e *Encoder) fastpathEncSliceUint8R(f *codecFnInfo, rv reflect.Value) { +func (e *Encoder) fastpathEncSliceUintR(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceUint8V(rv2i(rv).([]uint8), e) + fastpathTV.EncAsMapSliceUintV(rv2i(rv).([]uint), e) } else { - fastpathTV.EncSliceUint8V(rv2i(rv).([]uint8), e) + fastpathTV.EncSliceUintV(rv2i(rv).([]uint), e) } } -func (_ fastpathT) EncSliceUint8V(v []uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return +func (fastpathT) EncSliceUintV(v []uint, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeUint(uint64(v[j])) } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeUint(uint64(v2)) - } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceUint8V(v []uint8, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceUintV(v []uint, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeUint(uint64(v[j])) } - ee.EncodeUint(uint64(v2)) + e.mapEnd() } - ee.WriteMapEnd() } - func (e *Encoder) fastpathEncSliceUint16R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { fastpathTV.EncAsMapSliceUint16V(rv2i(rv).([]uint16), e) @@ -1738,41 +1035,30 @@ func (e *Encoder) fastpathEncSliceUint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncSliceUint16V(rv2i(rv).([]uint16), e) } } -func (_ fastpathT) EncSliceUint16V(v []uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeUint(uint64(v2)) +func (fastpathT) EncSliceUint16V(v []uint16, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeUint(uint64(v[j])) } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceUint16V(v []uint16, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceUint16V(v []uint16, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeUint(uint64(v[j])) } - ee.EncodeUint(uint64(v2)) + e.mapEnd() } - ee.WriteMapEnd() } - func (e *Encoder) fastpathEncSliceUint32R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { fastpathTV.EncAsMapSliceUint32V(rv2i(rv).([]uint32), e) @@ -1780,41 +1066,30 @@ func (e *Encoder) fastpathEncSliceUint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncSliceUint32V(rv2i(rv).([]uint32), e) } } -func (_ fastpathT) EncSliceUint32V(v []uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeUint(uint64(v2)) +func (fastpathT) EncSliceUint32V(v []uint32, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeUint(uint64(v[j])) } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceUint32V(v []uint32, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceUint32V(v []uint32, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeUint(uint64(v[j])) } - ee.EncodeUint(uint64(v2)) + e.mapEnd() } - ee.WriteMapEnd() } - func (e *Encoder) fastpathEncSliceUint64R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { fastpathTV.EncAsMapSliceUint64V(rv2i(rv).([]uint64), e) @@ -1822,125 +1097,61 @@ func (e *Encoder) fastpathEncSliceUint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncSliceUint64V(rv2i(rv).([]uint64), e) } } -func (_ fastpathT) EncSliceUint64V(v []uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeUint(uint64(v2)) +func (fastpathT) EncSliceUint64V(v []uint64, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeUint(v[j]) } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceUint64V(v []uint64, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceUint64V(v []uint64, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeUint(v[j]) } - ee.EncodeUint(uint64(v2)) + e.mapEnd() } - ee.WriteMapEnd() } - -func (e *Encoder) fastpathEncSliceUintptrR(f *codecFnInfo, rv reflect.Value) { +func (e *Encoder) fastpathEncSliceIntR(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceUintptrV(rv2i(rv).([]uintptr), e) + fastpathTV.EncAsMapSliceIntV(rv2i(rv).([]int), e) } else { - fastpathTV.EncSliceUintptrV(rv2i(rv).([]uintptr), e) + fastpathTV.EncSliceIntV(rv2i(rv).([]int), e) } } -func (_ fastpathT) EncSliceUintptrV(v []uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return +func (fastpathT) EncSliceIntV(v []int, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeInt(int64(v[j])) } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - e.encode(v2) - } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceUintptrV(v []uintptr, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceIntV(v []int, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { - if j%2 == 0 { - ee.WriteMapElemKey() - } else { - ee.WriteMapElemValue() - } - } - e.encode(v2) - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncSliceIntR(f *codecFnInfo, rv reflect.Value) { - if f.ti.mbs { - fastpathTV.EncAsMapSliceIntV(rv2i(rv).([]int), e) } else { - fastpathTV.EncSliceIntV(rv2i(rv).([]int), e) - } -} -func (_ fastpathT) EncSliceIntV(v []int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeInt(int64(v2)) - } - ee.WriteArrayEnd() -} -func (_ fastpathT) EncAsMapSliceIntV(v []int, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() - if len(v)%2 == 1 { - e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeInt(int64(v[j])) } - ee.EncodeInt(int64(v2)) + e.mapEnd() } - ee.WriteMapEnd() } - func (e *Encoder) fastpathEncSliceInt8R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { fastpathTV.EncAsMapSliceInt8V(rv2i(rv).([]int8), e) @@ -1948,41 +1159,30 @@ func (e *Encoder) fastpathEncSliceInt8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncSliceInt8V(rv2i(rv).([]int8), e) } } -func (_ fastpathT) EncSliceInt8V(v []int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeInt(int64(v2)) +func (fastpathT) EncSliceInt8V(v []int8, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeInt(int64(v[j])) } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceInt8V(v []int8, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceInt8V(v []int8, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeInt(int64(v[j])) } - ee.EncodeInt(int64(v2)) + e.mapEnd() } - ee.WriteMapEnd() } - func (e *Encoder) fastpathEncSliceInt16R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { fastpathTV.EncAsMapSliceInt16V(rv2i(rv).([]int16), e) @@ -1990,41 +1190,30 @@ func (e *Encoder) fastpathEncSliceInt16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncSliceInt16V(rv2i(rv).([]int16), e) } } -func (_ fastpathT) EncSliceInt16V(v []int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeInt(int64(v2)) +func (fastpathT) EncSliceInt16V(v []int16, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeInt(int64(v[j])) } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceInt16V(v []int16, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceInt16V(v []int16, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeInt(int64(v[j])) } - ee.EncodeInt(int64(v2)) + e.mapEnd() } - ee.WriteMapEnd() } - func (e *Encoder) fastpathEncSliceInt32R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { fastpathTV.EncAsMapSliceInt32V(rv2i(rv).([]int32), e) @@ -2032,41 +1221,30 @@ func (e *Encoder) fastpathEncSliceInt32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncSliceInt32V(rv2i(rv).([]int32), e) } } -func (_ fastpathT) EncSliceInt32V(v []int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeInt(int64(v2)) +func (fastpathT) EncSliceInt32V(v []int32, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeInt(int64(v[j])) } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceInt32V(v []int32, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceInt32V(v []int32, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeInt(int64(v[j])) } - ee.EncodeInt(int64(v2)) + e.mapEnd() } - ee.WriteMapEnd() } - func (e *Encoder) fastpathEncSliceInt64R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { fastpathTV.EncAsMapSliceInt64V(rv2i(rv).([]int64), e) @@ -2074,41 +1252,30 @@ func (e *Encoder) fastpathEncSliceInt64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncSliceInt64V(rv2i(rv).([]int64), e) } } -func (_ fastpathT) EncSliceInt64V(v []int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return +func (fastpathT) EncSliceInt64V(v []int64, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeInt(v[j]) } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeInt(int64(v2)) - } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceInt64V(v []int64, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceInt64V(v []int64, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeInt(v[j]) } - ee.EncodeInt(int64(v2)) + e.mapEnd() } - ee.WriteMapEnd() } - func (e *Encoder) fastpathEncSliceBoolR(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { fastpathTV.EncAsMapSliceBoolV(rv2i(rv).([]bool), e) @@ -2116,27681 +1283,4409 @@ func (e *Encoder) fastpathEncSliceBoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncSliceBoolV(rv2i(rv).([]bool), e) } } -func (_ fastpathT) EncSliceBoolV(v []bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { - ee.WriteArrayElem() - } - ee.EncodeBool(v2) +func (fastpathT) EncSliceBoolV(v []bool, e *Encoder) { + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + e.e.EncodeBool(v[j]) } - ee.WriteArrayEnd() + e.arrayEnd() } -func (_ fastpathT) EncAsMapSliceBoolV(v []bool, e *Encoder) { - ee, esep := e.e, e.hh.hasElemSeparators() +func (fastpathT) EncAsMapSliceBoolV(v []bool, e *Encoder) { if len(v)%2 == 1 { e.errorf(fastpathMapBySliceErrMsg, len(v)) - return - } - ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + } else { + e.mapStart(len(v) / 2) + for j := range v { if j%2 == 0 { - ee.WriteMapElemKey() + e.mapElemKey() } else { - ee.WriteMapElemValue() + e.mapElemValue() } + e.e.EncodeBool(v[j]) } - ee.EncodeBool(v2) + e.mapEnd() } - ee.WriteMapEnd() } - -func (e *Encoder) fastpathEncMapIntfIntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfIntfV(rv2i(rv).(map[interface{}]interface{}), e) +func (e *Encoder) fastpathEncMapStringIntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringIntfV(rv2i(rv).(map[string]interface{}), e) } -func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapStringIntfV(v map[string]interface{}, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]string, len(v)) + var i uint + for k := range v { + v2[i] = k i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.encode(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() e.encode(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfStringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfStringV(rv2i(rv).(map[interface{}]string), e) +func (e *Encoder) fastpathEncMapStringStringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringStringV(rv2i(rv).(map[string]string), e) } -func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapStringStringV(v map[string]string, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]string, len(v)) + var i uint + for k := range v { + v2[i] = k i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeString(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeString(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfUintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfUintV(rv2i(rv).(map[interface{}]uint), e) +func (e *Encoder) fastpathEncMapStringBytesR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringBytesV(rv2i(rv).(map[string][]byte), e) } -func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapStringBytesV(v map[string][]byte, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]string, len(v)) + var i uint + for k := range v { + v2[i] = k i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeStringBytesRaw(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeStringBytesRaw(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfUint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfUint8V(rv2i(rv).(map[interface{}]uint8), e) +func (e *Encoder) fastpathEncMapStringUintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringUintV(rv2i(rv).(map[string]uint), e) } -func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapStringUintV(v map[string]uint, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]string, len(v)) + var i uint + for k := range v { + v2[i] = k i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeUint(uint64(v[k2])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeUint(uint64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfUint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfUint16V(rv2i(rv).(map[interface{}]uint16), e) +func (e *Encoder) fastpathEncMapStringUint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringUint8V(rv2i(rv).(map[string]uint8), e) } -func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapStringUint8V(v map[string]uint8, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]string, len(v)) + var i uint + for k := range v { + v2[i] = k i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeUint(uint64(v[k2])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeUint(uint64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfUint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfUint32V(rv2i(rv).(map[interface{}]uint32), e) +func (e *Encoder) fastpathEncMapStringUint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringUint64V(rv2i(rv).(map[string]uint64), e) } -func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapStringUint64V(v map[string]uint64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]string, len(v)) + var i uint + for k := range v { + v2[i] = k i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeUint(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeUint(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfUint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfUint64V(rv2i(rv).(map[interface{}]uint64), e) +func (e *Encoder) fastpathEncMapStringIntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringIntV(rv2i(rv).(map[string]int), e) } -func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapStringIntV(v map[string]int, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]string, len(v)) + var i uint + for k := range v { + v2[i] = k i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeInt(int64(v[k2])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeInt(int64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfUintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfUintptrV(rv2i(rv).(map[interface{}]uintptr), e) +func (e *Encoder) fastpathEncMapStringInt64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringInt64V(rv2i(rv).(map[string]int64), e) } -func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapStringInt64V(v map[string]int64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]string, len(v)) + var i uint + for k := range v { + v2[i] = k i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeInt(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeInt(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfIntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfIntV(rv2i(rv).(map[interface{}]int), e) +func (e *Encoder) fastpathEncMapStringFloat32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringFloat32V(rv2i(rv).(map[string]float32), e) } -func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapStringFloat32V(v map[string]float32, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]string, len(v)) + var i uint + for k := range v { + v2[i] = k i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeFloat32(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeFloat32(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfInt8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfInt8V(rv2i(rv).(map[interface{}]int8), e) +func (e *Encoder) fastpathEncMapStringFloat64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringFloat64V(rv2i(rv).(map[string]float64), e) } -func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapStringFloat64V(v map[string]float64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]string, len(v)) + var i uint + for k := range v { + v2[i] = k i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeFloat64(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeFloat64(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfInt16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfInt16V(rv2i(rv).(map[interface{}]int16), e) +func (e *Encoder) fastpathEncMapStringBoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringBoolV(rv2i(rv).(map[string]bool), e) } -func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapStringBoolV(v map[string]bool, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]string, len(v)) + var i uint + for k := range v { + v2[i] = k i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeBool(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeString(k2) + e.mapElemValue() + e.e.EncodeBool(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfInt32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfInt32V(rv2i(rv).(map[interface{}]int32), e) +func (e *Encoder) fastpathEncMapUintIntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintIntfV(rv2i(rv).(map[uint]interface{}), e) } -func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUintIntfV(v map[uint]interface{}, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]uint64, len(v)) + var i uint + for k := range v { + v2[i] = uint64(k) i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(uint64Slice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeUint(uint64(uint(k2))) + e.mapElemValue() + e.encode(v[uint(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.encode(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfInt64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfInt64V(rv2i(rv).(map[interface{}]int64), e) +func (e *Encoder) fastpathEncMapUintStringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintStringV(rv2i(rv).(map[uint]string), e) } -func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUintStringV(v map[uint]string, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]uint64, len(v)) + var i uint + for k := range v { + v2[i] = uint64(k) i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(uint64Slice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeUint(uint64(uint(k2))) + e.mapElemValue() + e.e.EncodeString(v[uint(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeString(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfFloat32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfFloat32V(rv2i(rv).(map[interface{}]float32), e) +func (e *Encoder) fastpathEncMapUintBytesR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintBytesV(rv2i(rv).(map[uint][]byte), e) } -func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUintBytesV(v map[uint][]byte, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]uint64, len(v)) + var i uint + for k := range v { + v2[i] = uint64(k) i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(uint64Slice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeUint(uint64(uint(k2))) + e.mapElemValue() + e.e.EncodeStringBytesRaw(v[uint(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeStringBytesRaw(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfFloat64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfFloat64V(rv2i(rv).(map[interface{}]float64), e) +func (e *Encoder) fastpathEncMapUintUintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintUintV(rv2i(rv).(map[uint]uint), e) } -func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUintUintV(v map[uint]uint, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]uint64, len(v)) + var i uint + for k := range v { + v2[i] = uint64(k) i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(uint64Slice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeUint(uint64(uint(k2))) + e.mapElemValue() + e.e.EncodeUint(uint64(v[uint(k2)])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeUint(uint64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapIntfBoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntfBoolV(rv2i(rv).(map[interface{}]bool), e) +func (e *Encoder) fastpathEncMapUintUint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintUint8V(rv2i(rv).(map[uint]uint8), e) } -func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUintUint8V(v map[uint]uint8, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - v2 := make([]bytesI, len(v)) - var i, l uint - var vp *bytesI - for k2 := range v { - l = uint(len(mksv)) - e2.MustEncode(k2) - vp = &v2[i] - vp.v = mksv[l:] - vp.i = k2 + v2 := make([]uint64, len(v)) + var i uint + for k := range v { + v2[i] = uint64(k) i++ } - sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[v2[j].i]) + sort.Sort(uint64Slice(v2)) + for _, k2 := range v2 { + e.mapElemKey() + e.e.EncodeUint(uint64(uint(k2))) + e.mapElemValue() + e.e.EncodeUint(uint64(v[uint(k2)])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeUint(uint64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringIntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringIntfV(rv2i(rv).(map[string]interface{}), e) +func (e *Encoder) fastpathEncMapUintUint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintUint64V(rv2i(rv).(map[uint]uint64), e) } -func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUintUint64V(v map[uint]uint64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - e.encode(v[string(k2)]) + e.mapElemKey() + e.e.EncodeUint(uint64(uint(k2))) + e.mapElemValue() + e.e.EncodeUint(v[uint(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeUint(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringStringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringStringV(rv2i(rv).(map[string]string), e) +func (e *Encoder) fastpathEncMapUintIntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintIntV(rv2i(rv).(map[uint]int), e) } -func (_ fastpathT) EncMapStringStringV(v map[string]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUintIntV(v map[uint]int, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[string(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[string(k2)]) - } + e.mapElemKey() + e.e.EncodeUint(uint64(uint(k2))) + e.mapElemValue() + e.e.EncodeInt(int64(v[uint(k2)])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeInt(int64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringUintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringUintV(rv2i(rv).(map[string]uint), e) +func (e *Encoder) fastpathEncMapUintInt64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintInt64V(rv2i(rv).(map[uint]int64), e) } -func (_ fastpathT) EncMapStringUintV(v map[string]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUintInt64V(v map[uint]int64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[string(k2)])) + e.mapElemKey() + e.e.EncodeUint(uint64(uint(k2))) + e.mapElemValue() + e.e.EncodeInt(v[uint(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeInt(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringUint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringUint8V(rv2i(rv).(map[string]uint8), e) +func (e *Encoder) fastpathEncMapUintFloat32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintFloat32V(rv2i(rv).(map[uint]float32), e) } -func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUintFloat32V(v map[uint]float32, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[string(k2)])) + e.mapElemKey() + e.e.EncodeUint(uint64(uint(k2))) + e.mapElemValue() + e.e.EncodeFloat32(v[uint(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeFloat32(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringUint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringUint16V(rv2i(rv).(map[string]uint16), e) +func (e *Encoder) fastpathEncMapUintFloat64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintFloat64V(rv2i(rv).(map[uint]float64), e) } -func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUintFloat64V(v map[uint]float64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[string(k2)])) + e.mapElemKey() + e.e.EncodeUint(uint64(uint(k2))) + e.mapElemValue() + e.e.EncodeFloat64(v[uint(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeFloat64(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringUint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringUint32V(rv2i(rv).(map[string]uint32), e) +func (e *Encoder) fastpathEncMapUintBoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintBoolV(rv2i(rv).(map[uint]bool), e) } -func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUintBoolV(v map[uint]bool, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[string(k2)])) + e.mapElemKey() + e.e.EncodeUint(uint64(uint(k2))) + e.mapElemValue() + e.e.EncodeBool(v[uint(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeBool(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringUint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringUint64V(rv2i(rv).(map[string]uint64), e) +func (e *Encoder) fastpathEncMapUint8IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8IntfV(rv2i(rv).(map[uint8]interface{}), e) } -func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[string(k2)])) + e.mapElemKey() + e.e.EncodeUint(uint64(uint8(k2))) + e.mapElemValue() + e.encode(v[uint8(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.encode(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringUintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringUintptrV(rv2i(rv).(map[string]uintptr), e) +func (e *Encoder) fastpathEncMapUint8StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8StringV(rv2i(rv).(map[uint8]string), e) } -func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint8StringV(v map[uint8]string, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - e.encode(v[string(k2)]) + e.mapElemKey() + e.e.EncodeUint(uint64(uint8(k2))) + e.mapElemValue() + e.e.EncodeString(v[uint8(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeString(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringIntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringIntV(rv2i(rv).(map[string]int), e) +func (e *Encoder) fastpathEncMapUint8BytesR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8BytesV(rv2i(rv).(map[uint8][]byte), e) } -func (_ fastpathT) EncMapStringIntV(v map[string]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint8BytesV(v map[uint8][]byte, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[string(k2)])) + e.mapElemKey() + e.e.EncodeUint(uint64(uint8(k2))) + e.mapElemValue() + e.e.EncodeStringBytesRaw(v[uint8(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeStringBytesRaw(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringInt8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringInt8V(rv2i(rv).(map[string]int8), e) +func (e *Encoder) fastpathEncMapUint8UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8UintV(rv2i(rv).(map[uint8]uint), e) } -func (_ fastpathT) EncMapStringInt8V(v map[string]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint8UintV(v map[uint8]uint, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[string(k2)])) + e.mapElemKey() + e.e.EncodeUint(uint64(uint8(k2))) + e.mapElemValue() + e.e.EncodeUint(uint64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeUint(uint64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringInt16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringInt16V(rv2i(rv).(map[string]int16), e) +func (e *Encoder) fastpathEncMapUint8Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Uint8V(rv2i(rv).(map[uint8]uint8), e) } -func (_ fastpathT) EncMapStringInt16V(v map[string]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[string(k2)])) + e.mapElemKey() + e.e.EncodeUint(uint64(uint8(k2))) + e.mapElemValue() + e.e.EncodeUint(uint64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeUint(uint64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringInt32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringInt32V(rv2i(rv).(map[string]int32), e) +func (e *Encoder) fastpathEncMapUint8Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Uint64V(rv2i(rv).(map[uint8]uint64), e) } -func (_ fastpathT) EncMapStringInt32V(v map[string]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[string(k2)])) + e.mapElemKey() + e.e.EncodeUint(uint64(uint8(k2))) + e.mapElemValue() + e.e.EncodeUint(v[uint8(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeUint(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringInt64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringInt64V(rv2i(rv).(map[string]int64), e) +func (e *Encoder) fastpathEncMapUint8IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8IntV(rv2i(rv).(map[uint8]int), e) } -func (_ fastpathT) EncMapStringInt64V(v map[string]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint8IntV(v map[uint8]int, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[string(k2)])) + e.mapElemKey() + e.e.EncodeUint(uint64(uint8(k2))) + e.mapElemValue() + e.e.EncodeInt(int64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeInt(int64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringFloat32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringFloat32V(rv2i(rv).(map[string]float32), e) +func (e *Encoder) fastpathEncMapUint8Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Int64V(rv2i(rv).(map[uint8]int64), e) } -func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint8Int64V(v map[uint8]int64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[string(k2)]) + e.mapElemKey() + e.e.EncodeUint(uint64(uint8(k2))) + e.mapElemValue() + e.e.EncodeInt(v[uint8(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeInt(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringFloat64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringFloat64V(rv2i(rv).(map[string]float64), e) +func (e *Encoder) fastpathEncMapUint8Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Float32V(rv2i(rv).(map[uint8]float32), e) } -func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint8Float32V(v map[uint8]float32, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[string(k2)]) + e.mapElemKey() + e.e.EncodeUint(uint64(uint8(k2))) + e.mapElemValue() + e.e.EncodeFloat32(v[uint8(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeFloat32(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapStringBoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapStringBoolV(rv2i(rv).(map[string]bool), e) +func (e *Encoder) fastpathEncMapUint8Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Float64V(rv2i(rv).(map[uint8]float64), e) } -func (_ fastpathT) EncMapStringBoolV(v map[string]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint8Float64V(v map[uint8]float64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]string, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = string(k) + v2[i] = uint64(k) i++ } - sort.Sort(stringSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[string(k2)]) + e.mapElemKey() + e.e.EncodeUint(uint64(uint8(k2))) + e.mapElemValue() + e.e.EncodeFloat64(v[uint8(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(k2)) - } else { - ee.EncodeStringEnc(cUTF8, k2) - } - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeFloat64(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32IntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32IntfV(rv2i(rv).(map[float32]interface{}), e) +func (e *Encoder) fastpathEncMapUint8BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8BoolV(rv2i(rv).(map[uint8]bool), e) } -func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint8BoolV(v map[uint8]bool, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = uint64(k) i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[float32(k2)]) + e.mapElemKey() + e.e.EncodeUint(uint64(uint8(k2))) + e.mapElemValue() + e.e.EncodeBool(v[uint8(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) + e.mapElemKey() + e.e.EncodeUint(uint64(k2)) + e.mapElemValue() + e.e.EncodeBool(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32StringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32StringV(rv2i(rv).(map[float32]string), e) +func (e *Encoder) fastpathEncMapUint64IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64IntfV(rv2i(rv).(map[uint64]interface{}), e) } -func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[float32(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[float32(k2)]) - } + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.encode(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.encode(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32UintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32UintV(rv2i(rv).(map[float32]uint), e) +func (e *Encoder) fastpathEncMapUint64StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64StringV(rv2i(rv).(map[uint64]string), e) } -func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint64StringV(v map[uint64]string, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[float32(k2)])) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeString(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeString(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32Uint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32Uint8V(rv2i(rv).(map[float32]uint8), e) +func (e *Encoder) fastpathEncMapUint64BytesR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64BytesV(rv2i(rv).(map[uint64][]byte), e) } -func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint64BytesV(v map[uint64][]byte, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[float32(k2)])) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeStringBytesRaw(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeStringBytesRaw(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32Uint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32Uint16V(rv2i(rv).(map[float32]uint16), e) +func (e *Encoder) fastpathEncMapUint64UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64UintV(rv2i(rv).(map[uint64]uint), e) } -func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint64UintV(v map[uint64]uint, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[float32(k2)])) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeUint(uint64(v[k2])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeUint(uint64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32Uint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32Uint32V(rv2i(rv).(map[float32]uint32), e) +func (e *Encoder) fastpathEncMapUint64Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Uint8V(rv2i(rv).(map[uint64]uint8), e) } -func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[float32(k2)])) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeUint(uint64(v[k2])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeUint(uint64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32Uint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32Uint64V(rv2i(rv).(map[float32]uint64), e) +func (e *Encoder) fastpathEncMapUint64Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Uint64V(rv2i(rv).(map[uint64]uint64), e) } -func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[float32(k2)])) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeUint(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeUint(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32UintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32UintptrV(rv2i(rv).(map[float32]uintptr), e) +func (e *Encoder) fastpathEncMapUint64IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64IntV(rv2i(rv).(map[uint64]int), e) } -func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint64IntV(v map[uint64]int, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[float32(k2)]) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeInt(int64(v[k2])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeInt(int64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32IntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32IntV(rv2i(rv).(map[float32]int), e) +func (e *Encoder) fastpathEncMapUint64Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Int64V(rv2i(rv).(map[uint64]int64), e) } -func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint64Int64V(v map[uint64]int64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[float32(k2)])) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeInt(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeInt(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32Int8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32Int8V(rv2i(rv).(map[float32]int8), e) +func (e *Encoder) fastpathEncMapUint64Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Float32V(rv2i(rv).(map[uint64]float32), e) } -func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint64Float32V(v map[uint64]float32, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[float32(k2)])) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeFloat32(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeFloat32(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32Int16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32Int16V(rv2i(rv).(map[float32]int16), e) +func (e *Encoder) fastpathEncMapUint64Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Float64V(rv2i(rv).(map[uint64]float64), e) } -func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint64Float64V(v map[uint64]float64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[float32(k2)])) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeFloat64(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeFloat64(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32Int32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32Int32V(rv2i(rv).(map[float32]int32), e) +func (e *Encoder) fastpathEncMapUint64BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64BoolV(rv2i(rv).(map[uint64]bool), e) } -func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapUint64BoolV(v map[uint64]bool, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]uint64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(uint64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[float32(k2)])) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeBool(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeUint(k2) + e.mapElemValue() + e.e.EncodeBool(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32Int64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32Int64V(rv2i(rv).(map[float32]int64), e) +func (e *Encoder) fastpathEncMapIntIntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntIntfV(rv2i(rv).(map[int]interface{}), e) } -func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapIntIntfV(v map[int]interface{}, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = int64(k) i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[float32(k2)])) + e.mapElemKey() + e.e.EncodeInt(int64(int(k2))) + e.mapElemValue() + e.encode(v[int(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeInt(int64(k2)) + e.mapElemValue() + e.encode(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32Float32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32Float32V(rv2i(rv).(map[float32]float32), e) +func (e *Encoder) fastpathEncMapIntStringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntStringV(rv2i(rv).(map[int]string), e) } -func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapIntStringV(v map[int]string, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = int64(k) i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[float32(k2)]) + e.mapElemKey() + e.e.EncodeInt(int64(int(k2))) + e.mapElemValue() + e.e.EncodeString(v[int(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) + e.mapElemKey() + e.e.EncodeInt(int64(k2)) + e.mapElemValue() + e.e.EncodeString(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32Float64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32Float64V(rv2i(rv).(map[float32]float64), e) +func (e *Encoder) fastpathEncMapIntBytesR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntBytesV(rv2i(rv).(map[int][]byte), e) } -func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapIntBytesV(v map[int][]byte, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = int64(k) i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[float32(k2)]) + e.mapElemKey() + e.e.EncodeInt(int64(int(k2))) + e.mapElemValue() + e.e.EncodeStringBytesRaw(v[int(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) + e.mapElemKey() + e.e.EncodeInt(int64(k2)) + e.mapElemValue() + e.e.EncodeStringBytesRaw(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat32BoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat32BoolV(rv2i(rv).(map[float32]bool), e) +func (e *Encoder) fastpathEncMapIntUintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntUintV(rv2i(rv).(map[int]uint), e) } -func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapIntUintV(v map[int]uint, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = int64(k) i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[float32(k2)]) + e.mapElemKey() + e.e.EncodeInt(int64(int(k2))) + e.mapElemValue() + e.e.EncodeUint(uint64(v[int(k2)])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) + e.mapElemKey() + e.e.EncodeInt(int64(k2)) + e.mapElemValue() + e.e.EncodeUint(uint64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64IntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64IntfV(rv2i(rv).(map[float64]interface{}), e) +func (e *Encoder) fastpathEncMapIntUint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntUint8V(rv2i(rv).(map[int]uint8), e) } -func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapIntUint8V(v map[int]uint8, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = int64(k) i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[float64(k2)]) + e.mapElemKey() + e.e.EncodeInt(int64(int(k2))) + e.mapElemValue() + e.e.EncodeUint(uint64(v[int(k2)])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) + e.mapElemKey() + e.e.EncodeInt(int64(k2)) + e.mapElemValue() + e.e.EncodeUint(uint64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64StringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64StringV(rv2i(rv).(map[float64]string), e) +func (e *Encoder) fastpathEncMapIntUint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntUint64V(rv2i(rv).(map[int]uint64), e) } -func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapIntUint64V(v map[int]uint64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = int64(k) i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[float64(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[float64(k2)]) - } + e.mapElemKey() + e.e.EncodeInt(int64(int(k2))) + e.mapElemValue() + e.e.EncodeUint(v[int(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } + e.mapElemKey() + e.e.EncodeInt(int64(k2)) + e.mapElemValue() + e.e.EncodeUint(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64UintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64UintV(rv2i(rv).(map[float64]uint), e) +func (e *Encoder) fastpathEncMapIntIntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntIntV(rv2i(rv).(map[int]int), e) } -func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapIntIntV(v map[int]int, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = int64(k) i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[float64(k2)])) + e.mapElemKey() + e.e.EncodeInt(int64(int(k2))) + e.mapElemValue() + e.e.EncodeInt(int64(v[int(k2)])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeInt(int64(k2)) + e.mapElemValue() + e.e.EncodeInt(int64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64Uint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64Uint8V(rv2i(rv).(map[float64]uint8), e) +func (e *Encoder) fastpathEncMapIntInt64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntInt64V(rv2i(rv).(map[int]int64), e) } -func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapIntInt64V(v map[int]int64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = int64(k) i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[float64(k2)])) + e.mapElemKey() + e.e.EncodeInt(int64(int(k2))) + e.mapElemValue() + e.e.EncodeInt(v[int(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeInt(int64(k2)) + e.mapElemValue() + e.e.EncodeInt(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64Uint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64Uint16V(rv2i(rv).(map[float64]uint16), e) +func (e *Encoder) fastpathEncMapIntFloat32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntFloat32V(rv2i(rv).(map[int]float32), e) } -func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapIntFloat32V(v map[int]float32, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = int64(k) i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[float64(k2)])) + e.mapElemKey() + e.e.EncodeInt(int64(int(k2))) + e.mapElemValue() + e.e.EncodeFloat32(v[int(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeInt(int64(k2)) + e.mapElemValue() + e.e.EncodeFloat32(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64Uint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64Uint32V(rv2i(rv).(map[float64]uint32), e) +func (e *Encoder) fastpathEncMapIntFloat64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntFloat64V(rv2i(rv).(map[int]float64), e) } -func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapIntFloat64V(v map[int]float64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = int64(k) i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[float64(k2)])) + e.mapElemKey() + e.e.EncodeInt(int64(int(k2))) + e.mapElemValue() + e.e.EncodeFloat64(v[int(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeInt(int64(k2)) + e.mapElemValue() + e.e.EncodeFloat64(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64Uint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64Uint64V(rv2i(rv).(map[float64]uint64), e) +func (e *Encoder) fastpathEncMapIntBoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntBoolV(rv2i(rv).(map[int]bool), e) } -func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapIntBoolV(v map[int]bool, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = int64(k) i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[float64(k2)])) + e.mapElemKey() + e.e.EncodeInt(int64(int(k2))) + e.mapElemValue() + e.e.EncodeBool(v[int(k2)]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + e.mapElemKey() + e.e.EncodeInt(int64(k2)) + e.mapElemValue() + e.e.EncodeBool(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64UintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64UintptrV(rv2i(rv).(map[float64]uintptr), e) +func (e *Encoder) fastpathEncMapInt64IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64IntfV(rv2i(rv).(map[int64]interface{}), e) } -func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapInt64IntfV(v map[int64]interface{}, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[float64(k2)]) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.encode(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() e.encode(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64IntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64IntV(rv2i(rv).(map[float64]int), e) +func (e *Encoder) fastpathEncMapInt64StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64StringV(rv2i(rv).(map[int64]string), e) } -func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapInt64StringV(v map[int64]string, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[float64(k2)])) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeString(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeString(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64Int8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64Int8V(rv2i(rv).(map[float64]int8), e) +func (e *Encoder) fastpathEncMapInt64BytesR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64BytesV(rv2i(rv).(map[int64][]byte), e) } -func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapInt64BytesV(v map[int64][]byte, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[float64(k2)])) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeStringBytesRaw(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeStringBytesRaw(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64Int16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64Int16V(rv2i(rv).(map[float64]int16), e) +func (e *Encoder) fastpathEncMapInt64UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64UintV(rv2i(rv).(map[int64]uint), e) } -func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapInt64UintV(v map[int64]uint, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[float64(k2)])) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeUint(uint64(v[k2])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeUint(uint64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64Int32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64Int32V(rv2i(rv).(map[float64]int32), e) +func (e *Encoder) fastpathEncMapInt64Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Uint8V(rv2i(rv).(map[int64]uint8), e) } -func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapInt64Uint8V(v map[int64]uint8, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[float64(k2)])) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeUint(uint64(v[k2])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeUint(uint64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64Int64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64Int64V(rv2i(rv).(map[float64]int64), e) +func (e *Encoder) fastpathEncMapInt64Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Uint64V(rv2i(rv).(map[int64]uint64), e) } -func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapInt64Uint64V(v map[int64]uint64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[float64(k2)])) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeUint(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeUint(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64Float32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64Float32V(rv2i(rv).(map[float64]float32), e) +func (e *Encoder) fastpathEncMapInt64IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64IntV(rv2i(rv).(map[int64]int), e) } -func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapInt64IntV(v map[int64]int, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[float64(k2)]) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeInt(int64(v[k2])) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeInt(int64(v2)) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64Float64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64Float64V(rv2i(rv).(map[float64]float64), e) +func (e *Encoder) fastpathEncMapInt64Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Int64V(rv2i(rv).(map[int64]int64), e) } -func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapInt64Int64V(v map[int64]int64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[float64(k2)]) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeInt(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeInt(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapFloat64BoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapFloat64BoolV(rv2i(rv).(map[float64]bool), e) +func (e *Encoder) fastpathEncMapInt64Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Float32V(rv2i(rv).(map[int64]float32), e) } -func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapInt64Float32V(v map[int64]float32, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]float64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = float64(k) + v2[i] = k i++ } - sort.Sort(floatSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[float64(k2)]) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeFloat32(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeFloat32(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapUintIntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintIntfV(rv2i(rv).(map[uint]interface{}), e) +func (e *Encoder) fastpathEncMapInt64Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Float64V(rv2i(rv).(map[int64]float64), e) } -func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapInt64Float64V(v map[int64]float64, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]uint64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = uint64(k) + v2[i] = k i++ } - sort.Sort(uintSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[uint(k2)]) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeFloat64(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeFloat64(v2) } } - ee.WriteMapEnd() + e.mapEnd() } - -func (e *Encoder) fastpathEncMapUintStringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintStringV(rv2i(rv).(map[uint]string), e) +func (e *Encoder) fastpathEncMapInt64BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64BoolV(rv2i(rv).(map[int64]bool), e) } -func (_ fastpathT) EncMapUintStringV(v map[uint]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) +func (fastpathT) EncMapInt64BoolV(v map[int64]bool, e *Encoder) { + e.mapStart(len(v)) if e.h.Canonical { - v2 := make([]uint64, len(v)) + v2 := make([]int64, len(v)) var i uint for k := range v { - v2[i] = uint64(k) + v2[i] = k i++ } - sort.Sort(uintSlice(v2)) + sort.Sort(int64Slice(v2)) for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[uint(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[uint(k2)]) - } + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeBool(v[k2]) } } else { for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } + e.mapElemKey() + e.e.EncodeInt(k2) + e.mapElemValue() + e.e.EncodeBool(v2) } } - ee.WriteMapEnd() + e.mapEnd() } -func (e *Encoder) fastpathEncMapUintUintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintUintV(rv2i(rv).(map[uint]uint), e) -} -func (_ fastpathT) EncMapUintUintV(v map[uint]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ +// -- decode + +// -- -- fast path type switch +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { + var changed bool + var containerLen int + switch v := iv.(type) { + case []interface{}: + fastpathTV.DecSliceIntfN(v, d) + case *[]interface{}: + var v2 []interface{} + if v2, changed = fastpathTV.DecSliceIntfY(*v, d); changed { + *v = v2 } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint(k2)])) + case []string: + fastpathTV.DecSliceStringN(v, d) + case *[]string: + var v2 []string + if v2, changed = fastpathTV.DecSliceStringY(*v, d); changed { + *v = v2 } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + case [][]byte: + fastpathTV.DecSliceBytesN(v, d) + case *[][]byte: + var v2 [][]byte + if v2, changed = fastpathTV.DecSliceBytesY(*v, d); changed { + *v = v2 } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintUint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintUint8V(rv2i(rv).(map[uint]uint8), e) -} -func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + case []float32: + fastpathTV.DecSliceFloat32N(v, d) + case *[]float32: + var v2 []float32 + if v2, changed = fastpathTV.DecSliceFloat32Y(*v, d); changed { + *v = v2 } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint(k2)])) + case []float64: + fastpathTV.DecSliceFloat64N(v, d) + case *[]float64: + var v2 []float64 + if v2, changed = fastpathTV.DecSliceFloat64Y(*v, d); changed { + *v = v2 } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) + case []uint: + fastpathTV.DecSliceUintN(v, d) + case *[]uint: + var v2 []uint + if v2, changed = fastpathTV.DecSliceUintY(*v, d); changed { + *v = v2 } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintUint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintUint16V(rv2i(rv).(map[uint]uint16), e) -} -func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + case []uint16: + fastpathTV.DecSliceUint16N(v, d) + case *[]uint16: + var v2 []uint16 + if v2, changed = fastpathTV.DecSliceUint16Y(*v, d); changed { + *v = v2 } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint(k2)])) + case []uint32: + fastpathTV.DecSliceUint32N(v, d) + case *[]uint32: + var v2 []uint32 + if v2, changed = fastpathTV.DecSliceUint32Y(*v, d); changed { + *v = v2 } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + case []uint64: + fastpathTV.DecSliceUint64N(v, d) + case *[]uint64: + var v2 []uint64 + if v2, changed = fastpathTV.DecSliceUint64Y(*v, d); changed { + *v = v2 + } + case []int: + fastpathTV.DecSliceIntN(v, d) + case *[]int: + var v2 []int + if v2, changed = fastpathTV.DecSliceIntY(*v, d); changed { + *v = v2 + } + case []int8: + fastpathTV.DecSliceInt8N(v, d) + case *[]int8: + var v2 []int8 + if v2, changed = fastpathTV.DecSliceInt8Y(*v, d); changed { + *v = v2 + } + case []int16: + fastpathTV.DecSliceInt16N(v, d) + case *[]int16: + var v2 []int16 + if v2, changed = fastpathTV.DecSliceInt16Y(*v, d); changed { + *v = v2 + } + case []int32: + fastpathTV.DecSliceInt32N(v, d) + case *[]int32: + var v2 []int32 + if v2, changed = fastpathTV.DecSliceInt32Y(*v, d); changed { + *v = v2 + } + case []int64: + fastpathTV.DecSliceInt64N(v, d) + case *[]int64: + var v2 []int64 + if v2, changed = fastpathTV.DecSliceInt64Y(*v, d); changed { + *v = v2 + } + case []bool: + fastpathTV.DecSliceBoolN(v, d) + case *[]bool: + var v2 []bool + if v2, changed = fastpathTV.DecSliceBoolY(*v, d); changed { + *v = v2 + } + case map[string]interface{}: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapStringIntfL(v, containerLen, d) } - ee.EncodeUint(uint64(v2)) + d.mapEnd() } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintUint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintUint32V(rv2i(rv).(map[uint]uint32), e) -} -func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + case *map[string]interface{}: + fastpathTV.DecMapStringIntfX(v, d) + case map[string]string: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapStringStringL(v, containerLen, d) + } + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() + case *map[string]string: + fastpathTV.DecMapStringStringX(v, d) + case map[string][]byte: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapStringBytesL(v, containerLen, d) } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[string][]byte: + fastpathTV.DecMapStringBytesX(v, d) + case map[string]uint: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapStringUintL(v, containerLen, d) } - ee.EncodeUint(uint64(v[uint(k2)])) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() + case *map[string]uint: + fastpathTV.DecMapStringUintX(v, d) + case map[string]uint8: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapStringUint8L(v, containerLen, d) } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[string]uint8: + fastpathTV.DecMapStringUint8X(v, d) + case map[string]uint64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapStringUint64L(v, containerLen, d) } - ee.EncodeUint(uint64(v2)) + d.mapEnd() } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintUint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintUint64V(rv2i(rv).(map[uint]uint64), e) -} -func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + case *map[string]uint64: + fastpathTV.DecMapStringUint64X(v, d) + case map[string]int: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapStringIntL(v, containerLen, d) + } + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() + case *map[string]int: + fastpathTV.DecMapStringIntX(v, d) + case map[string]int64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapStringInt64L(v, containerLen, d) } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[string]int64: + fastpathTV.DecMapStringInt64X(v, d) + case map[string]float32: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapStringFloat32L(v, containerLen, d) } - ee.EncodeUint(uint64(v[uint(k2)])) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() + case *map[string]float32: + fastpathTV.DecMapStringFloat32X(v, d) + case map[string]float64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapStringFloat64L(v, containerLen, d) } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[string]float64: + fastpathTV.DecMapStringFloat64X(v, d) + case map[string]bool: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapStringBoolL(v, containerLen, d) } - ee.EncodeUint(uint64(v2)) + d.mapEnd() } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintUintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintUintptrV(rv2i(rv).(map[uint]uintptr), e) -} -func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + case *map[string]bool: + fastpathTV.DecMapStringBoolX(v, d) + case map[uint]interface{}: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUintIntfL(v, containerLen, d) + } + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() + case *map[uint]interface{}: + fastpathTV.DecMapUintIntfX(v, d) + case map[uint]string: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUintStringL(v, containerLen, d) } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[uint]string: + fastpathTV.DecMapUintStringX(v, d) + case map[uint][]byte: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUintBytesL(v, containerLen, d) } - e.encode(v[uint(k2)]) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() + case *map[uint][]byte: + fastpathTV.DecMapUintBytesX(v, d) + case map[uint]uint: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUintUintL(v, containerLen, d) } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[uint]uint: + fastpathTV.DecMapUintUintX(v, d) + case map[uint]uint8: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUintUint8L(v, containerLen, d) } - e.encode(v2) + d.mapEnd() } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintIntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintIntV(rv2i(rv).(map[uint]int), e) -} -func (_ fastpathT) EncMapUintIntV(v map[uint]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + case *map[uint]uint8: + fastpathTV.DecMapUintUint8X(v, d) + case map[uint]uint64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUintUint64L(v, containerLen, d) + } + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() + case *map[uint]uint64: + fastpathTV.DecMapUintUint64X(v, d) + case map[uint]int: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUintIntL(v, containerLen, d) } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[uint]int: + fastpathTV.DecMapUintIntX(v, d) + case map[uint]int64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUintInt64L(v, containerLen, d) } - ee.EncodeInt(int64(v[uint(k2)])) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() + case *map[uint]int64: + fastpathTV.DecMapUintInt64X(v, d) + case map[uint]float32: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUintFloat32L(v, containerLen, d) } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[uint]float32: + fastpathTV.DecMapUintFloat32X(v, d) + case map[uint]float64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUintFloat64L(v, containerLen, d) } - ee.EncodeInt(int64(v2)) + d.mapEnd() } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintInt8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintInt8V(rv2i(rv).(map[uint]int8), e) -} -func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + case *map[uint]float64: + fastpathTV.DecMapUintFloat64X(v, d) + case map[uint]bool: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUintBoolL(v, containerLen, d) + } + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() + case *map[uint]bool: + fastpathTV.DecMapUintBoolX(v, d) + case map[uint8]interface{}: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint8IntfL(v, containerLen, d) } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[uint8]interface{}: + fastpathTV.DecMapUint8IntfX(v, d) + case map[uint8]string: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint8StringL(v, containerLen, d) } - ee.EncodeInt(int64(v[uint(k2)])) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() + case *map[uint8]string: + fastpathTV.DecMapUint8StringX(v, d) + case map[uint8][]byte: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint8BytesL(v, containerLen, d) } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[uint8][]byte: + fastpathTV.DecMapUint8BytesX(v, d) + case map[uint8]uint: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint8UintL(v, containerLen, d) } - ee.EncodeInt(int64(v2)) + d.mapEnd() } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintInt16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintInt16V(rv2i(rv).(map[uint]int16), e) -} -func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + case *map[uint8]uint: + fastpathTV.DecMapUint8UintX(v, d) + case map[uint8]uint8: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint8Uint8L(v, containerLen, d) + } + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() + case *map[uint8]uint8: + fastpathTV.DecMapUint8Uint8X(v, d) + case map[uint8]uint64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint8Uint64L(v, containerLen, d) } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[uint8]uint64: + fastpathTV.DecMapUint8Uint64X(v, d) + case map[uint8]int: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint8IntL(v, containerLen, d) } - ee.EncodeInt(int64(v[uint(k2)])) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() + case *map[uint8]int: + fastpathTV.DecMapUint8IntX(v, d) + case map[uint8]int64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint8Int64L(v, containerLen, d) } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[uint8]int64: + fastpathTV.DecMapUint8Int64X(v, d) + case map[uint8]float32: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint8Float32L(v, containerLen, d) } - ee.EncodeInt(int64(v2)) + d.mapEnd() } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintInt32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintInt32V(rv2i(rv).(map[uint]int32), e) -} -func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + case *map[uint8]float32: + fastpathTV.DecMapUint8Float32X(v, d) + case map[uint8]float64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint8Float64L(v, containerLen, d) + } + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() + case *map[uint8]float64: + fastpathTV.DecMapUint8Float64X(v, d) + case map[uint8]bool: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint8BoolL(v, containerLen, d) } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[uint8]bool: + fastpathTV.DecMapUint8BoolX(v, d) + case map[uint64]interface{}: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint64IntfL(v, containerLen, d) } - ee.EncodeInt(int64(v[uint(k2)])) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() + case *map[uint64]interface{}: + fastpathTV.DecMapUint64IntfX(v, d) + case map[uint64]string: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint64StringL(v, containerLen, d) } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[uint64]string: + fastpathTV.DecMapUint64StringX(v, d) + case map[uint64][]byte: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint64BytesL(v, containerLen, d) } - ee.EncodeInt(int64(v2)) + d.mapEnd() } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintInt64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintInt64V(rv2i(rv).(map[uint]int64), e) -} -func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() + case *map[uint64][]byte: + fastpathTV.DecMapUint64BytesX(v, d) + case map[uint64]uint: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint64UintL(v, containerLen, d) } - ee.EncodeInt(int64(v[uint(k2)])) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + case *map[uint64]uint: + fastpathTV.DecMapUint64UintX(v, d) + case map[uint64]uint8: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint64Uint8L(v, containerLen, d) } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintFloat32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintFloat32V(rv2i(rv).(map[uint]float32), e) -} -func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() + case *map[uint64]uint8: + fastpathTV.DecMapUint64Uint8X(v, d) + case map[uint64]uint64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint64Uint64L(v, containerLen, d) } - ee.EncodeFloat32(v[uint(k2)]) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + case *map[uint64]uint64: + fastpathTV.DecMapUint64Uint64X(v, d) + case map[uint64]int: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint64IntL(v, containerLen, d) } - ee.EncodeFloat32(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintFloat64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintFloat64V(rv2i(rv).(map[uint]float64), e) -} -func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() + case *map[uint64]int: + fastpathTV.DecMapUint64IntX(v, d) + case map[uint64]int64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint64Int64L(v, containerLen, d) } - ee.EncodeFloat64(v[uint(k2)]) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + case *map[uint64]int64: + fastpathTV.DecMapUint64Int64X(v, d) + case map[uint64]float32: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint64Float32L(v, containerLen, d) } - ee.EncodeFloat64(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintBoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintBoolV(rv2i(rv).(map[uint]bool), e) -} -func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { - ee.WriteMapElemValue() + case *map[uint64]float32: + fastpathTV.DecMapUint64Float32X(v, d) + case map[uint64]float64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint64Float64L(v, containerLen, d) } - ee.EncodeBool(v[uint(k2)]) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + case *map[uint64]float64: + fastpathTV.DecMapUint64Float64X(v, d) + case map[uint64]bool: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapUint64BoolL(v, containerLen, d) } - ee.EncodeBool(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8IntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8IntfV(rv2i(rv).(map[uint8]interface{}), e) -} -func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() + case *map[uint64]bool: + fastpathTV.DecMapUint64BoolX(v, d) + case map[int]interface{}: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapIntIntfL(v, containerLen, d) } - e.encode(v[uint8(k2)]) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + case *map[int]interface{}: + fastpathTV.DecMapIntIntfX(v, d) + case map[int]string: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapIntStringL(v, containerLen, d) } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8StringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8StringV(rv2i(rv).(map[uint8]string), e) -} -func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() + case *map[int]string: + fastpathTV.DecMapIntStringX(v, d) + case map[int][]byte: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapIntBytesL(v, containerLen, d) } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[uint8(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[uint8(k2)]) + d.mapEnd() + } + case *map[int][]byte: + fastpathTV.DecMapIntBytesX(v, d) + case map[int]uint: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapIntUintL(v, containerLen, d) } + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() + case *map[int]uint: + fastpathTV.DecMapIntUintX(v, d) + case map[int]uint8: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapIntUint8L(v, containerLen, d) } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[int]uint8: + fastpathTV.DecMapIntUint8X(v, d) + case map[int]uint64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapIntUint64L(v, containerLen, d) } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) + d.mapEnd() + } + case *map[int]uint64: + fastpathTV.DecMapIntUint64X(v, d) + case map[int]int: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapIntIntL(v, containerLen, d) } + d.mapEnd() } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8UintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8UintV(rv2i(rv).(map[uint8]uint), e) -} -func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + case *map[int]int: + fastpathTV.DecMapIntIntX(v, d) + case map[int]int64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapIntInt64L(v, containerLen, d) + } + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() + case *map[int]int64: + fastpathTV.DecMapIntInt64X(v, d) + case map[int]float32: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapIntFloat32L(v, containerLen, d) } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[int]float32: + fastpathTV.DecMapIntFloat32X(v, d) + case map[int]float64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapIntFloat64L(v, containerLen, d) } - ee.EncodeUint(uint64(v[uint8(k2)])) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() + case *map[int]float64: + fastpathTV.DecMapIntFloat64X(v, d) + case map[int]bool: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapIntBoolL(v, containerLen, d) } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[int]bool: + fastpathTV.DecMapIntBoolX(v, d) + case map[int64]interface{}: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapInt64IntfL(v, containerLen, d) } - ee.EncodeUint(uint64(v2)) + d.mapEnd() } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8Uint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8Uint8V(rv2i(rv).(map[uint8]uint8), e) -} -func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + case *map[int64]interface{}: + fastpathTV.DecMapInt64IntfX(v, d) + case map[int64]string: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapInt64StringL(v, containerLen, d) + } + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() + case *map[int64]string: + fastpathTV.DecMapInt64StringX(v, d) + case map[int64][]byte: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapInt64BytesL(v, containerLen, d) } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[int64][]byte: + fastpathTV.DecMapInt64BytesX(v, d) + case map[int64]uint: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapInt64UintL(v, containerLen, d) } - ee.EncodeUint(uint64(v[uint8(k2)])) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() + case *map[int64]uint: + fastpathTV.DecMapInt64UintX(v, d) + case map[int64]uint8: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapInt64Uint8L(v, containerLen, d) } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[int64]uint8: + fastpathTV.DecMapInt64Uint8X(v, d) + case map[int64]uint64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapInt64Uint64L(v, containerLen, d) } - ee.EncodeUint(uint64(v2)) + d.mapEnd() } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8Uint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8Uint16V(rv2i(rv).(map[uint8]uint16), e) -} -func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ + case *map[int64]uint64: + fastpathTV.DecMapInt64Uint64X(v, d) + case map[int64]int: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapInt64IntL(v, containerLen, d) + } + d.mapEnd() } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() + case *map[int64]int: + fastpathTV.DecMapInt64IntX(v, d) + case map[int64]int64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapInt64Int64L(v, containerLen, d) } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[int64]int64: + fastpathTV.DecMapInt64Int64X(v, d) + case map[int64]float32: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapInt64Float32L(v, containerLen, d) } - ee.EncodeUint(uint64(v[uint8(k2)])) + d.mapEnd() } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() + case *map[int64]float32: + fastpathTV.DecMapInt64Float32X(v, d) + case map[int64]float64: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapInt64Float64L(v, containerLen, d) } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() + d.mapEnd() + } + case *map[int64]float64: + fastpathTV.DecMapInt64Float64X(v, d) + case map[int64]bool: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.DecMapInt64BoolL(v, containerLen, d) } - ee.EncodeUint(uint64(v2)) + d.mapEnd() } + case *map[int64]bool: + fastpathTV.DecMapInt64BoolX(v, d) + default: + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 + return false } - ee.WriteMapEnd() + return true } -func (e *Encoder) fastpathEncMapUint8Uint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8Uint32V(rv2i(rv).(map[uint8]uint32), e) -} -func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8Uint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8Uint64V(rv2i(rv).(map[uint8]uint64), e) -} -func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8UintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8UintptrV(rv2i(rv).(map[uint8]uintptr), e) -} -func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[uint8(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8IntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8IntV(rv2i(rv).(map[uint8]int), e) -} -func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8Int8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8Int8V(rv2i(rv).(map[uint8]int8), e) -} -func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8Int16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8Int16V(rv2i(rv).(map[uint8]int16), e) -} -func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8Int32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8Int32V(rv2i(rv).(map[uint8]int32), e) -} -func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8Int64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8Int64V(rv2i(rv).(map[uint8]int64), e) -} -func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8Float32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8Float32V(rv2i(rv).(map[uint8]float32), e) -} -func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[uint8(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8Float64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8Float64V(rv2i(rv).(map[uint8]float64), e) -} -func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[uint8(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint8BoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint8BoolV(rv2i(rv).(map[uint8]bool), e) -} -func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[uint8(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16IntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16IntfV(rv2i(rv).(map[uint16]interface{}), e) -} -func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[uint16(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16StringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16StringV(rv2i(rv).(map[uint16]string), e) -} -func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[uint16(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[uint16(k2)]) - } - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16UintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16UintV(rv2i(rv).(map[uint16]uint), e) -} -func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16Uint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16Uint8V(rv2i(rv).(map[uint16]uint8), e) -} -func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16Uint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16Uint16V(rv2i(rv).(map[uint16]uint16), e) -} -func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16Uint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16Uint32V(rv2i(rv).(map[uint16]uint32), e) -} -func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16Uint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16Uint64V(rv2i(rv).(map[uint16]uint64), e) -} -func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16UintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16UintptrV(rv2i(rv).(map[uint16]uintptr), e) -} -func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[uint16(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16IntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16IntV(rv2i(rv).(map[uint16]int), e) -} -func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16Int8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16Int8V(rv2i(rv).(map[uint16]int8), e) -} -func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16Int16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16Int16V(rv2i(rv).(map[uint16]int16), e) -} -func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16Int32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16Int32V(rv2i(rv).(map[uint16]int32), e) -} -func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16Int64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16Int64V(rv2i(rv).(map[uint16]int64), e) -} -func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16Float32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16Float32V(rv2i(rv).(map[uint16]float32), e) -} -func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[uint16(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16Float64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16Float64V(rv2i(rv).(map[uint16]float64), e) -} -func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[uint16(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint16BoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint16BoolV(rv2i(rv).(map[uint16]bool), e) -} -func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[uint16(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32IntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32IntfV(rv2i(rv).(map[uint32]interface{}), e) -} -func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[uint32(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32StringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32StringV(rv2i(rv).(map[uint32]string), e) -} -func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[uint32(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[uint32(k2)]) - } - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32UintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32UintV(rv2i(rv).(map[uint32]uint), e) -} -func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32Uint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32Uint8V(rv2i(rv).(map[uint32]uint8), e) -} -func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32Uint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32Uint16V(rv2i(rv).(map[uint32]uint16), e) -} -func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32Uint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32Uint32V(rv2i(rv).(map[uint32]uint32), e) -} -func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32Uint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32Uint64V(rv2i(rv).(map[uint32]uint64), e) -} -func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32UintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32UintptrV(rv2i(rv).(map[uint32]uintptr), e) -} -func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[uint32(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32IntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32IntV(rv2i(rv).(map[uint32]int), e) -} -func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32Int8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32Int8V(rv2i(rv).(map[uint32]int8), e) -} -func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32Int16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32Int16V(rv2i(rv).(map[uint32]int16), e) -} -func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32Int32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32Int32V(rv2i(rv).(map[uint32]int32), e) -} -func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32Int64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32Int64V(rv2i(rv).(map[uint32]int64), e) -} -func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32Float32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32Float32V(rv2i(rv).(map[uint32]float32), e) -} -func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[uint32(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32Float64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32Float64V(rv2i(rv).(map[uint32]float64), e) -} -func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[uint32(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint32BoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint32BoolV(rv2i(rv).(map[uint32]bool), e) -} -func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[uint32(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64IntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64IntfV(rv2i(rv).(map[uint64]interface{}), e) -} -func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[uint64(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64StringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64StringV(rv2i(rv).(map[uint64]string), e) -} -func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[uint64(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[uint64(k2)]) - } - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64UintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64UintV(rv2i(rv).(map[uint64]uint), e) -} -func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64Uint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64Uint8V(rv2i(rv).(map[uint64]uint8), e) -} -func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64Uint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64Uint16V(rv2i(rv).(map[uint64]uint16), e) -} -func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64Uint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64Uint32V(rv2i(rv).(map[uint64]uint32), e) -} -func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64Uint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64Uint64V(rv2i(rv).(map[uint64]uint64), e) -} -func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uint64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64UintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64UintptrV(rv2i(rv).(map[uint64]uintptr), e) -} -func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[uint64(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64IntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64IntV(rv2i(rv).(map[uint64]int), e) -} -func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64Int8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64Int8V(rv2i(rv).(map[uint64]int8), e) -} -func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64Int16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64Int16V(rv2i(rv).(map[uint64]int16), e) -} -func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64Int32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64Int32V(rv2i(rv).(map[uint64]int32), e) -} -func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64Int64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64Int64V(rv2i(rv).(map[uint64]int64), e) -} -func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uint64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64Float32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64Float32V(rv2i(rv).(map[uint64]float32), e) -} -func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[uint64(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64Float64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64Float64V(rv2i(rv).(map[uint64]float64), e) -} -func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[uint64(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUint64BoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUint64BoolV(rv2i(rv).(map[uint64]bool), e) -} -func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[uint64(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrIntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrIntfV(rv2i(rv).(map[uintptr]interface{}), e) -} -func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[uintptr(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrStringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrStringV(rv2i(rv).(map[uintptr]string), e) -} -func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[uintptr(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[uintptr(k2)]) - } - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrUintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrUintV(rv2i(rv).(map[uintptr]uint), e) -} -func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uintptr(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrUint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrUint8V(rv2i(rv).(map[uintptr]uint8), e) -} -func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uintptr(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrUint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrUint16V(rv2i(rv).(map[uintptr]uint16), e) -} -func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uintptr(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrUint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrUint32V(rv2i(rv).(map[uintptr]uint32), e) -} -func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uintptr(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrUint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrUint64V(rv2i(rv).(map[uintptr]uint64), e) -} -func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[uintptr(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrUintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrUintptrV(rv2i(rv).(map[uintptr]uintptr), e) -} -func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[uintptr(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrIntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrIntV(rv2i(rv).(map[uintptr]int), e) -} -func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uintptr(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrInt8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrInt8V(rv2i(rv).(map[uintptr]int8), e) -} -func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uintptr(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrInt16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrInt16V(rv2i(rv).(map[uintptr]int16), e) -} -func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uintptr(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrInt32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrInt32V(rv2i(rv).(map[uintptr]int32), e) -} -func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uintptr(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrInt64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrInt64V(rv2i(rv).(map[uintptr]int64), e) -} -func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[uintptr(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrFloat32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrFloat32V(rv2i(rv).(map[uintptr]float32), e) -} -func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[uintptr(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrFloat64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrFloat64V(rv2i(rv).(map[uintptr]float64), e) -} -func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[uintptr(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapUintptrBoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapUintptrBoolV(rv2i(rv).(map[uintptr]bool), e) -} -func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]uint64, len(v)) - var i uint - for k := range v { - v2[i] = uint64(k) - i++ - } - sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[uintptr(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - e.encode(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntIntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntIntfV(rv2i(rv).(map[int]interface{}), e) -} -func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[int(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntStringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntStringV(rv2i(rv).(map[int]string), e) -} -func (_ fastpathT) EncMapIntStringV(v map[int]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[int(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[int(k2)]) - } - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntUintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntUintV(rv2i(rv).(map[int]uint), e) -} -func (_ fastpathT) EncMapIntUintV(v map[int]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntUint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntUint8V(rv2i(rv).(map[int]uint8), e) -} -func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntUint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntUint16V(rv2i(rv).(map[int]uint16), e) -} -func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntUint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntUint32V(rv2i(rv).(map[int]uint32), e) -} -func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntUint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntUint64V(rv2i(rv).(map[int]uint64), e) -} -func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntUintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntUintptrV(rv2i(rv).(map[int]uintptr), e) -} -func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[int(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntIntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntIntV(rv2i(rv).(map[int]int), e) -} -func (_ fastpathT) EncMapIntIntV(v map[int]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntInt8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntInt8V(rv2i(rv).(map[int]int8), e) -} -func (_ fastpathT) EncMapIntInt8V(v map[int]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntInt16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntInt16V(rv2i(rv).(map[int]int16), e) -} -func (_ fastpathT) EncMapIntInt16V(v map[int]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntInt32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntInt32V(rv2i(rv).(map[int]int32), e) -} -func (_ fastpathT) EncMapIntInt32V(v map[int]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntInt64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntInt64V(rv2i(rv).(map[int]int64), e) -} -func (_ fastpathT) EncMapIntInt64V(v map[int]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntFloat32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntFloat32V(rv2i(rv).(map[int]float32), e) -} -func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[int(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntFloat64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntFloat64V(rv2i(rv).(map[int]float64), e) -} -func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[int(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapIntBoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapIntBoolV(rv2i(rv).(map[int]bool), e) -} -func (_ fastpathT) EncMapIntBoolV(v map[int]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[int(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8IntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8IntfV(rv2i(rv).(map[int8]interface{}), e) -} -func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[int8(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8StringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8StringV(rv2i(rv).(map[int8]string), e) -} -func (_ fastpathT) EncMapInt8StringV(v map[int8]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[int8(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[int8(k2)]) - } - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8UintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8UintV(rv2i(rv).(map[int8]uint), e) -} -func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8Uint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8Uint8V(rv2i(rv).(map[int8]uint8), e) -} -func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8Uint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8Uint16V(rv2i(rv).(map[int8]uint16), e) -} -func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8Uint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8Uint32V(rv2i(rv).(map[int8]uint32), e) -} -func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8Uint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8Uint64V(rv2i(rv).(map[int8]uint64), e) -} -func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8UintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8UintptrV(rv2i(rv).(map[int8]uintptr), e) -} -func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[int8(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8IntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8IntV(rv2i(rv).(map[int8]int), e) -} -func (_ fastpathT) EncMapInt8IntV(v map[int8]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8Int8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8Int8V(rv2i(rv).(map[int8]int8), e) -} -func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8Int16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8Int16V(rv2i(rv).(map[int8]int16), e) -} -func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8Int32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8Int32V(rv2i(rv).(map[int8]int32), e) -} -func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8Int64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8Int64V(rv2i(rv).(map[int8]int64), e) -} -func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int8(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8Float32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8Float32V(rv2i(rv).(map[int8]float32), e) -} -func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[int8(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8Float64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8Float64V(rv2i(rv).(map[int8]float64), e) -} -func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[int8(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt8BoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt8BoolV(rv2i(rv).(map[int8]bool), e) -} -func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[int8(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16IntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16IntfV(rv2i(rv).(map[int16]interface{}), e) -} -func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[int16(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16StringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16StringV(rv2i(rv).(map[int16]string), e) -} -func (_ fastpathT) EncMapInt16StringV(v map[int16]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[int16(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[int16(k2)]) - } - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16UintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16UintV(rv2i(rv).(map[int16]uint), e) -} -func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16Uint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16Uint8V(rv2i(rv).(map[int16]uint8), e) -} -func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16Uint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16Uint16V(rv2i(rv).(map[int16]uint16), e) -} -func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16Uint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16Uint32V(rv2i(rv).(map[int16]uint32), e) -} -func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16Uint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16Uint64V(rv2i(rv).(map[int16]uint64), e) -} -func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16UintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16UintptrV(rv2i(rv).(map[int16]uintptr), e) -} -func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[int16(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16IntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16IntV(rv2i(rv).(map[int16]int), e) -} -func (_ fastpathT) EncMapInt16IntV(v map[int16]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16Int8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16Int8V(rv2i(rv).(map[int16]int8), e) -} -func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16Int16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16Int16V(rv2i(rv).(map[int16]int16), e) -} -func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16Int32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16Int32V(rv2i(rv).(map[int16]int32), e) -} -func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16Int64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16Int64V(rv2i(rv).(map[int16]int64), e) -} -func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int16(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16Float32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16Float32V(rv2i(rv).(map[int16]float32), e) -} -func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[int16(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16Float64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16Float64V(rv2i(rv).(map[int16]float64), e) -} -func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[int16(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt16BoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt16BoolV(rv2i(rv).(map[int16]bool), e) -} -func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[int16(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32IntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32IntfV(rv2i(rv).(map[int32]interface{}), e) -} -func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[int32(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32StringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32StringV(rv2i(rv).(map[int32]string), e) -} -func (_ fastpathT) EncMapInt32StringV(v map[int32]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[int32(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[int32(k2)]) - } - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32UintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32UintV(rv2i(rv).(map[int32]uint), e) -} -func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32Uint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32Uint8V(rv2i(rv).(map[int32]uint8), e) -} -func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32Uint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32Uint16V(rv2i(rv).(map[int32]uint16), e) -} -func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32Uint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32Uint32V(rv2i(rv).(map[int32]uint32), e) -} -func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32Uint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32Uint64V(rv2i(rv).(map[int32]uint64), e) -} -func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32UintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32UintptrV(rv2i(rv).(map[int32]uintptr), e) -} -func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[int32(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32IntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32IntV(rv2i(rv).(map[int32]int), e) -} -func (_ fastpathT) EncMapInt32IntV(v map[int32]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32Int8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32Int8V(rv2i(rv).(map[int32]int8), e) -} -func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32Int16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32Int16V(rv2i(rv).(map[int32]int16), e) -} -func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32Int32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32Int32V(rv2i(rv).(map[int32]int32), e) -} -func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32Int64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32Int64V(rv2i(rv).(map[int32]int64), e) -} -func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int32(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32Float32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32Float32V(rv2i(rv).(map[int32]float32), e) -} -func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[int32(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32Float64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32Float64V(rv2i(rv).(map[int32]float64), e) -} -func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[int32(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt32BoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt32BoolV(rv2i(rv).(map[int32]bool), e) -} -func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[int32(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64IntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64IntfV(rv2i(rv).(map[int64]interface{}), e) -} -func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[int64(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64StringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64StringV(rv2i(rv).(map[int64]string), e) -} -func (_ fastpathT) EncMapInt64StringV(v map[int64]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[int64(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[int64(k2)]) - } - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64UintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64UintV(rv2i(rv).(map[int64]uint), e) -} -func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64Uint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64Uint8V(rv2i(rv).(map[int64]uint8), e) -} -func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64Uint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64Uint16V(rv2i(rv).(map[int64]uint16), e) -} -func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64Uint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64Uint32V(rv2i(rv).(map[int64]uint32), e) -} -func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64Uint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64Uint64V(rv2i(rv).(map[int64]uint64), e) -} -func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[int64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64UintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64UintptrV(rv2i(rv).(map[int64]uintptr), e) -} -func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[int64(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64IntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64IntV(rv2i(rv).(map[int64]int), e) -} -func (_ fastpathT) EncMapInt64IntV(v map[int64]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64Int8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64Int8V(rv2i(rv).(map[int64]int8), e) -} -func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64Int16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64Int16V(rv2i(rv).(map[int64]int16), e) -} -func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64Int32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64Int32V(rv2i(rv).(map[int64]int32), e) -} -func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64Int64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64Int64V(rv2i(rv).(map[int64]int64), e) -} -func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[int64(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64Float32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64Float32V(rv2i(rv).(map[int64]float32), e) -} -func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[int64(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64Float64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64Float64V(rv2i(rv).(map[int64]float64), e) -} -func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[int64(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapInt64BoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapInt64BoolV(rv2i(rv).(map[int64]bool), e) -} -func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]int64, len(v)) - var i uint - for k := range v { - v2[i] = int64(k) - i++ - } - sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[int64(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolIntfR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolIntfV(rv2i(rv).(map[bool]interface{}), e) -} -func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[bool(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolStringR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolStringV(rv2i(rv).(map[bool]string), e) -} -func (_ fastpathT) EncMapBoolStringV(v map[bool]string, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v[bool(k2)])) - } else { - ee.EncodeStringEnc(cUTF8, v[bool(k2)]) - } - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - if e.h.StringToRaw { - ee.EncodeStringBytesRaw(bytesView(v2)) - } else { - ee.EncodeStringEnc(cUTF8, v2) - } - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolUintR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolUintV(rv2i(rv).(map[bool]uint), e) -} -func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[bool(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolUint8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolUint8V(rv2i(rv).(map[bool]uint8), e) -} -func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[bool(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolUint16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolUint16V(rv2i(rv).(map[bool]uint16), e) -} -func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[bool(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolUint32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolUint32V(rv2i(rv).(map[bool]uint32), e) -} -func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[bool(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolUint64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolUint64V(rv2i(rv).(map[bool]uint64), e) -} -func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v[bool(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeUint(uint64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolUintptrR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolUintptrV(rv2i(rv).(map[bool]uintptr), e) -} -func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - e.encode(v[bool(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - e.encode(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolIntR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolIntV(rv2i(rv).(map[bool]int), e) -} -func (_ fastpathT) EncMapBoolIntV(v map[bool]int, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[bool(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolInt8R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolInt8V(rv2i(rv).(map[bool]int8), e) -} -func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[bool(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolInt16R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolInt16V(rv2i(rv).(map[bool]int16), e) -} -func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[bool(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolInt32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolInt32V(rv2i(rv).(map[bool]int32), e) -} -func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[bool(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolInt64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolInt64V(rv2i(rv).(map[bool]int64), e) -} -func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v[bool(k2)])) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeInt(int64(v2)) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolFloat32R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolFloat32V(rv2i(rv).(map[bool]float32), e) -} -func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v[bool(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat32(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolFloat64R(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolFloat64V(rv2i(rv).(map[bool]float64), e) -} -func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v[bool(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeFloat64(v2) - } - } - ee.WriteMapEnd() -} - -func (e *Encoder) fastpathEncMapBoolBoolR(f *codecFnInfo, rv reflect.Value) { - fastpathTV.EncMapBoolBoolV(rv2i(rv).(map[bool]bool), e) -} -func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, e *Encoder) { - if v == nil { - e.e.EncodeNil() - return - } - ee, esep := e.e, e.hh.hasElemSeparators() - ee.WriteMapStart(len(v)) - if e.h.Canonical { - v2 := make([]bool, len(v)) - var i uint - for k := range v { - v2[i] = bool(k) - i++ - } - sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v[bool(k2)]) - } - } else { - for k2, v2 := range v { - if esep { - ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { - ee.WriteMapElemValue() - } - ee.EncodeBool(v2) - } - } - ee.WriteMapEnd() -} - -// -- decode - -// -- -- fast path type switch -func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { - var changed bool - switch v := iv.(type) { - - case []interface{}: - var v2 []interface{} - v2, changed = fastpathTV.DecSliceIntfV(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]interface{}: - var v2 []interface{} - v2, changed = fastpathTV.DecSliceIntfV(*v, true, d) - if changed { - *v = v2 - } - case []string: - var v2 []string - v2, changed = fastpathTV.DecSliceStringV(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]string: - var v2 []string - v2, changed = fastpathTV.DecSliceStringV(*v, true, d) - if changed { - *v = v2 - } - case []float32: - var v2 []float32 - v2, changed = fastpathTV.DecSliceFloat32V(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]float32: - var v2 []float32 - v2, changed = fastpathTV.DecSliceFloat32V(*v, true, d) - if changed { - *v = v2 - } - case []float64: - var v2 []float64 - v2, changed = fastpathTV.DecSliceFloat64V(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]float64: - var v2 []float64 - v2, changed = fastpathTV.DecSliceFloat64V(*v, true, d) - if changed { - *v = v2 - } - case []uint: - var v2 []uint - v2, changed = fastpathTV.DecSliceUintV(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]uint: - var v2 []uint - v2, changed = fastpathTV.DecSliceUintV(*v, true, d) - if changed { - *v = v2 - } - case []uint16: - var v2 []uint16 - v2, changed = fastpathTV.DecSliceUint16V(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]uint16: - var v2 []uint16 - v2, changed = fastpathTV.DecSliceUint16V(*v, true, d) - if changed { - *v = v2 - } - case []uint32: - var v2 []uint32 - v2, changed = fastpathTV.DecSliceUint32V(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]uint32: - var v2 []uint32 - v2, changed = fastpathTV.DecSliceUint32V(*v, true, d) - if changed { - *v = v2 - } - case []uint64: - var v2 []uint64 - v2, changed = fastpathTV.DecSliceUint64V(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]uint64: - var v2 []uint64 - v2, changed = fastpathTV.DecSliceUint64V(*v, true, d) - if changed { - *v = v2 - } - case []uintptr: - var v2 []uintptr - v2, changed = fastpathTV.DecSliceUintptrV(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]uintptr: - var v2 []uintptr - v2, changed = fastpathTV.DecSliceUintptrV(*v, true, d) - if changed { - *v = v2 - } - case []int: - var v2 []int - v2, changed = fastpathTV.DecSliceIntV(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]int: - var v2 []int - v2, changed = fastpathTV.DecSliceIntV(*v, true, d) - if changed { - *v = v2 - } - case []int8: - var v2 []int8 - v2, changed = fastpathTV.DecSliceInt8V(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]int8: - var v2 []int8 - v2, changed = fastpathTV.DecSliceInt8V(*v, true, d) - if changed { - *v = v2 - } - case []int16: - var v2 []int16 - v2, changed = fastpathTV.DecSliceInt16V(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]int16: - var v2 []int16 - v2, changed = fastpathTV.DecSliceInt16V(*v, true, d) - if changed { - *v = v2 - } - case []int32: - var v2 []int32 - v2, changed = fastpathTV.DecSliceInt32V(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]int32: - var v2 []int32 - v2, changed = fastpathTV.DecSliceInt32V(*v, true, d) - if changed { - *v = v2 - } - case []int64: - var v2 []int64 - v2, changed = fastpathTV.DecSliceInt64V(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]int64: - var v2 []int64 - v2, changed = fastpathTV.DecSliceInt64V(*v, true, d) - if changed { - *v = v2 - } - case []bool: - var v2 []bool - v2, changed = fastpathTV.DecSliceBoolV(v, false, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - case *[]bool: - var v2 []bool - v2, changed = fastpathTV.DecSliceBoolV(*v, true, d) - if changed { - *v = v2 - } - - case map[interface{}]interface{}: - fastpathTV.DecMapIntfIntfV(v, false, d) - case *map[interface{}]interface{}: - var v2 map[interface{}]interface{} - v2, changed = fastpathTV.DecMapIntfIntfV(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]string: - fastpathTV.DecMapIntfStringV(v, false, d) - case *map[interface{}]string: - var v2 map[interface{}]string - v2, changed = fastpathTV.DecMapIntfStringV(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]uint: - fastpathTV.DecMapIntfUintV(v, false, d) - case *map[interface{}]uint: - var v2 map[interface{}]uint - v2, changed = fastpathTV.DecMapIntfUintV(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]uint8: - fastpathTV.DecMapIntfUint8V(v, false, d) - case *map[interface{}]uint8: - var v2 map[interface{}]uint8 - v2, changed = fastpathTV.DecMapIntfUint8V(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]uint16: - fastpathTV.DecMapIntfUint16V(v, false, d) - case *map[interface{}]uint16: - var v2 map[interface{}]uint16 - v2, changed = fastpathTV.DecMapIntfUint16V(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]uint32: - fastpathTV.DecMapIntfUint32V(v, false, d) - case *map[interface{}]uint32: - var v2 map[interface{}]uint32 - v2, changed = fastpathTV.DecMapIntfUint32V(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]uint64: - fastpathTV.DecMapIntfUint64V(v, false, d) - case *map[interface{}]uint64: - var v2 map[interface{}]uint64 - v2, changed = fastpathTV.DecMapIntfUint64V(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]uintptr: - fastpathTV.DecMapIntfUintptrV(v, false, d) - case *map[interface{}]uintptr: - var v2 map[interface{}]uintptr - v2, changed = fastpathTV.DecMapIntfUintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]int: - fastpathTV.DecMapIntfIntV(v, false, d) - case *map[interface{}]int: - var v2 map[interface{}]int - v2, changed = fastpathTV.DecMapIntfIntV(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]int8: - fastpathTV.DecMapIntfInt8V(v, false, d) - case *map[interface{}]int8: - var v2 map[interface{}]int8 - v2, changed = fastpathTV.DecMapIntfInt8V(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]int16: - fastpathTV.DecMapIntfInt16V(v, false, d) - case *map[interface{}]int16: - var v2 map[interface{}]int16 - v2, changed = fastpathTV.DecMapIntfInt16V(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]int32: - fastpathTV.DecMapIntfInt32V(v, false, d) - case *map[interface{}]int32: - var v2 map[interface{}]int32 - v2, changed = fastpathTV.DecMapIntfInt32V(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]int64: - fastpathTV.DecMapIntfInt64V(v, false, d) - case *map[interface{}]int64: - var v2 map[interface{}]int64 - v2, changed = fastpathTV.DecMapIntfInt64V(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]float32: - fastpathTV.DecMapIntfFloat32V(v, false, d) - case *map[interface{}]float32: - var v2 map[interface{}]float32 - v2, changed = fastpathTV.DecMapIntfFloat32V(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]float64: - fastpathTV.DecMapIntfFloat64V(v, false, d) - case *map[interface{}]float64: - var v2 map[interface{}]float64 - v2, changed = fastpathTV.DecMapIntfFloat64V(*v, true, d) - if changed { - *v = v2 - } - case map[interface{}]bool: - fastpathTV.DecMapIntfBoolV(v, false, d) - case *map[interface{}]bool: - var v2 map[interface{}]bool - v2, changed = fastpathTV.DecMapIntfBoolV(*v, true, d) - if changed { - *v = v2 - } - case map[string]interface{}: - fastpathTV.DecMapStringIntfV(v, false, d) - case *map[string]interface{}: - var v2 map[string]interface{} - v2, changed = fastpathTV.DecMapStringIntfV(*v, true, d) - if changed { - *v = v2 - } - case map[string]string: - fastpathTV.DecMapStringStringV(v, false, d) - case *map[string]string: - var v2 map[string]string - v2, changed = fastpathTV.DecMapStringStringV(*v, true, d) - if changed { - *v = v2 - } - case map[string]uint: - fastpathTV.DecMapStringUintV(v, false, d) - case *map[string]uint: - var v2 map[string]uint - v2, changed = fastpathTV.DecMapStringUintV(*v, true, d) - if changed { - *v = v2 - } - case map[string]uint8: - fastpathTV.DecMapStringUint8V(v, false, d) - case *map[string]uint8: - var v2 map[string]uint8 - v2, changed = fastpathTV.DecMapStringUint8V(*v, true, d) - if changed { - *v = v2 - } - case map[string]uint16: - fastpathTV.DecMapStringUint16V(v, false, d) - case *map[string]uint16: - var v2 map[string]uint16 - v2, changed = fastpathTV.DecMapStringUint16V(*v, true, d) - if changed { - *v = v2 - } - case map[string]uint32: - fastpathTV.DecMapStringUint32V(v, false, d) - case *map[string]uint32: - var v2 map[string]uint32 - v2, changed = fastpathTV.DecMapStringUint32V(*v, true, d) - if changed { - *v = v2 - } - case map[string]uint64: - fastpathTV.DecMapStringUint64V(v, false, d) - case *map[string]uint64: - var v2 map[string]uint64 - v2, changed = fastpathTV.DecMapStringUint64V(*v, true, d) - if changed { - *v = v2 - } - case map[string]uintptr: - fastpathTV.DecMapStringUintptrV(v, false, d) - case *map[string]uintptr: - var v2 map[string]uintptr - v2, changed = fastpathTV.DecMapStringUintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[string]int: - fastpathTV.DecMapStringIntV(v, false, d) - case *map[string]int: - var v2 map[string]int - v2, changed = fastpathTV.DecMapStringIntV(*v, true, d) - if changed { - *v = v2 - } - case map[string]int8: - fastpathTV.DecMapStringInt8V(v, false, d) - case *map[string]int8: - var v2 map[string]int8 - v2, changed = fastpathTV.DecMapStringInt8V(*v, true, d) - if changed { - *v = v2 - } - case map[string]int16: - fastpathTV.DecMapStringInt16V(v, false, d) - case *map[string]int16: - var v2 map[string]int16 - v2, changed = fastpathTV.DecMapStringInt16V(*v, true, d) - if changed { - *v = v2 - } - case map[string]int32: - fastpathTV.DecMapStringInt32V(v, false, d) - case *map[string]int32: - var v2 map[string]int32 - v2, changed = fastpathTV.DecMapStringInt32V(*v, true, d) - if changed { - *v = v2 - } - case map[string]int64: - fastpathTV.DecMapStringInt64V(v, false, d) - case *map[string]int64: - var v2 map[string]int64 - v2, changed = fastpathTV.DecMapStringInt64V(*v, true, d) - if changed { - *v = v2 - } - case map[string]float32: - fastpathTV.DecMapStringFloat32V(v, false, d) - case *map[string]float32: - var v2 map[string]float32 - v2, changed = fastpathTV.DecMapStringFloat32V(*v, true, d) - if changed { - *v = v2 - } - case map[string]float64: - fastpathTV.DecMapStringFloat64V(v, false, d) - case *map[string]float64: - var v2 map[string]float64 - v2, changed = fastpathTV.DecMapStringFloat64V(*v, true, d) - if changed { - *v = v2 - } - case map[string]bool: - fastpathTV.DecMapStringBoolV(v, false, d) - case *map[string]bool: - var v2 map[string]bool - v2, changed = fastpathTV.DecMapStringBoolV(*v, true, d) - if changed { - *v = v2 - } - case map[float32]interface{}: - fastpathTV.DecMapFloat32IntfV(v, false, d) - case *map[float32]interface{}: - var v2 map[float32]interface{} - v2, changed = fastpathTV.DecMapFloat32IntfV(*v, true, d) - if changed { - *v = v2 - } - case map[float32]string: - fastpathTV.DecMapFloat32StringV(v, false, d) - case *map[float32]string: - var v2 map[float32]string - v2, changed = fastpathTV.DecMapFloat32StringV(*v, true, d) - if changed { - *v = v2 - } - case map[float32]uint: - fastpathTV.DecMapFloat32UintV(v, false, d) - case *map[float32]uint: - var v2 map[float32]uint - v2, changed = fastpathTV.DecMapFloat32UintV(*v, true, d) - if changed { - *v = v2 - } - case map[float32]uint8: - fastpathTV.DecMapFloat32Uint8V(v, false, d) - case *map[float32]uint8: - var v2 map[float32]uint8 - v2, changed = fastpathTV.DecMapFloat32Uint8V(*v, true, d) - if changed { - *v = v2 - } - case map[float32]uint16: - fastpathTV.DecMapFloat32Uint16V(v, false, d) - case *map[float32]uint16: - var v2 map[float32]uint16 - v2, changed = fastpathTV.DecMapFloat32Uint16V(*v, true, d) - if changed { - *v = v2 - } - case map[float32]uint32: - fastpathTV.DecMapFloat32Uint32V(v, false, d) - case *map[float32]uint32: - var v2 map[float32]uint32 - v2, changed = fastpathTV.DecMapFloat32Uint32V(*v, true, d) - if changed { - *v = v2 - } - case map[float32]uint64: - fastpathTV.DecMapFloat32Uint64V(v, false, d) - case *map[float32]uint64: - var v2 map[float32]uint64 - v2, changed = fastpathTV.DecMapFloat32Uint64V(*v, true, d) - if changed { - *v = v2 - } - case map[float32]uintptr: - fastpathTV.DecMapFloat32UintptrV(v, false, d) - case *map[float32]uintptr: - var v2 map[float32]uintptr - v2, changed = fastpathTV.DecMapFloat32UintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[float32]int: - fastpathTV.DecMapFloat32IntV(v, false, d) - case *map[float32]int: - var v2 map[float32]int - v2, changed = fastpathTV.DecMapFloat32IntV(*v, true, d) - if changed { - *v = v2 - } - case map[float32]int8: - fastpathTV.DecMapFloat32Int8V(v, false, d) - case *map[float32]int8: - var v2 map[float32]int8 - v2, changed = fastpathTV.DecMapFloat32Int8V(*v, true, d) - if changed { - *v = v2 - } - case map[float32]int16: - fastpathTV.DecMapFloat32Int16V(v, false, d) - case *map[float32]int16: - var v2 map[float32]int16 - v2, changed = fastpathTV.DecMapFloat32Int16V(*v, true, d) - if changed { - *v = v2 - } - case map[float32]int32: - fastpathTV.DecMapFloat32Int32V(v, false, d) - case *map[float32]int32: - var v2 map[float32]int32 - v2, changed = fastpathTV.DecMapFloat32Int32V(*v, true, d) - if changed { - *v = v2 - } - case map[float32]int64: - fastpathTV.DecMapFloat32Int64V(v, false, d) - case *map[float32]int64: - var v2 map[float32]int64 - v2, changed = fastpathTV.DecMapFloat32Int64V(*v, true, d) - if changed { - *v = v2 - } - case map[float32]float32: - fastpathTV.DecMapFloat32Float32V(v, false, d) - case *map[float32]float32: - var v2 map[float32]float32 - v2, changed = fastpathTV.DecMapFloat32Float32V(*v, true, d) - if changed { - *v = v2 - } - case map[float32]float64: - fastpathTV.DecMapFloat32Float64V(v, false, d) - case *map[float32]float64: - var v2 map[float32]float64 - v2, changed = fastpathTV.DecMapFloat32Float64V(*v, true, d) - if changed { - *v = v2 - } - case map[float32]bool: - fastpathTV.DecMapFloat32BoolV(v, false, d) - case *map[float32]bool: - var v2 map[float32]bool - v2, changed = fastpathTV.DecMapFloat32BoolV(*v, true, d) - if changed { - *v = v2 - } - case map[float64]interface{}: - fastpathTV.DecMapFloat64IntfV(v, false, d) - case *map[float64]interface{}: - var v2 map[float64]interface{} - v2, changed = fastpathTV.DecMapFloat64IntfV(*v, true, d) - if changed { - *v = v2 - } - case map[float64]string: - fastpathTV.DecMapFloat64StringV(v, false, d) - case *map[float64]string: - var v2 map[float64]string - v2, changed = fastpathTV.DecMapFloat64StringV(*v, true, d) - if changed { - *v = v2 - } - case map[float64]uint: - fastpathTV.DecMapFloat64UintV(v, false, d) - case *map[float64]uint: - var v2 map[float64]uint - v2, changed = fastpathTV.DecMapFloat64UintV(*v, true, d) - if changed { - *v = v2 - } - case map[float64]uint8: - fastpathTV.DecMapFloat64Uint8V(v, false, d) - case *map[float64]uint8: - var v2 map[float64]uint8 - v2, changed = fastpathTV.DecMapFloat64Uint8V(*v, true, d) - if changed { - *v = v2 - } - case map[float64]uint16: - fastpathTV.DecMapFloat64Uint16V(v, false, d) - case *map[float64]uint16: - var v2 map[float64]uint16 - v2, changed = fastpathTV.DecMapFloat64Uint16V(*v, true, d) - if changed { - *v = v2 - } - case map[float64]uint32: - fastpathTV.DecMapFloat64Uint32V(v, false, d) - case *map[float64]uint32: - var v2 map[float64]uint32 - v2, changed = fastpathTV.DecMapFloat64Uint32V(*v, true, d) - if changed { - *v = v2 - } - case map[float64]uint64: - fastpathTV.DecMapFloat64Uint64V(v, false, d) - case *map[float64]uint64: - var v2 map[float64]uint64 - v2, changed = fastpathTV.DecMapFloat64Uint64V(*v, true, d) - if changed { - *v = v2 - } - case map[float64]uintptr: - fastpathTV.DecMapFloat64UintptrV(v, false, d) - case *map[float64]uintptr: - var v2 map[float64]uintptr - v2, changed = fastpathTV.DecMapFloat64UintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[float64]int: - fastpathTV.DecMapFloat64IntV(v, false, d) - case *map[float64]int: - var v2 map[float64]int - v2, changed = fastpathTV.DecMapFloat64IntV(*v, true, d) - if changed { - *v = v2 - } - case map[float64]int8: - fastpathTV.DecMapFloat64Int8V(v, false, d) - case *map[float64]int8: - var v2 map[float64]int8 - v2, changed = fastpathTV.DecMapFloat64Int8V(*v, true, d) - if changed { - *v = v2 - } - case map[float64]int16: - fastpathTV.DecMapFloat64Int16V(v, false, d) - case *map[float64]int16: - var v2 map[float64]int16 - v2, changed = fastpathTV.DecMapFloat64Int16V(*v, true, d) - if changed { - *v = v2 - } - case map[float64]int32: - fastpathTV.DecMapFloat64Int32V(v, false, d) - case *map[float64]int32: - var v2 map[float64]int32 - v2, changed = fastpathTV.DecMapFloat64Int32V(*v, true, d) - if changed { - *v = v2 - } - case map[float64]int64: - fastpathTV.DecMapFloat64Int64V(v, false, d) - case *map[float64]int64: - var v2 map[float64]int64 - v2, changed = fastpathTV.DecMapFloat64Int64V(*v, true, d) - if changed { - *v = v2 - } - case map[float64]float32: - fastpathTV.DecMapFloat64Float32V(v, false, d) - case *map[float64]float32: - var v2 map[float64]float32 - v2, changed = fastpathTV.DecMapFloat64Float32V(*v, true, d) - if changed { - *v = v2 - } - case map[float64]float64: - fastpathTV.DecMapFloat64Float64V(v, false, d) - case *map[float64]float64: - var v2 map[float64]float64 - v2, changed = fastpathTV.DecMapFloat64Float64V(*v, true, d) - if changed { - *v = v2 - } - case map[float64]bool: - fastpathTV.DecMapFloat64BoolV(v, false, d) - case *map[float64]bool: - var v2 map[float64]bool - v2, changed = fastpathTV.DecMapFloat64BoolV(*v, true, d) - if changed { - *v = v2 - } - case map[uint]interface{}: - fastpathTV.DecMapUintIntfV(v, false, d) - case *map[uint]interface{}: - var v2 map[uint]interface{} - v2, changed = fastpathTV.DecMapUintIntfV(*v, true, d) - if changed { - *v = v2 - } - case map[uint]string: - fastpathTV.DecMapUintStringV(v, false, d) - case *map[uint]string: - var v2 map[uint]string - v2, changed = fastpathTV.DecMapUintStringV(*v, true, d) - if changed { - *v = v2 - } - case map[uint]uint: - fastpathTV.DecMapUintUintV(v, false, d) - case *map[uint]uint: - var v2 map[uint]uint - v2, changed = fastpathTV.DecMapUintUintV(*v, true, d) - if changed { - *v = v2 - } - case map[uint]uint8: - fastpathTV.DecMapUintUint8V(v, false, d) - case *map[uint]uint8: - var v2 map[uint]uint8 - v2, changed = fastpathTV.DecMapUintUint8V(*v, true, d) - if changed { - *v = v2 - } - case map[uint]uint16: - fastpathTV.DecMapUintUint16V(v, false, d) - case *map[uint]uint16: - var v2 map[uint]uint16 - v2, changed = fastpathTV.DecMapUintUint16V(*v, true, d) - if changed { - *v = v2 - } - case map[uint]uint32: - fastpathTV.DecMapUintUint32V(v, false, d) - case *map[uint]uint32: - var v2 map[uint]uint32 - v2, changed = fastpathTV.DecMapUintUint32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint]uint64: - fastpathTV.DecMapUintUint64V(v, false, d) - case *map[uint]uint64: - var v2 map[uint]uint64 - v2, changed = fastpathTV.DecMapUintUint64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint]uintptr: - fastpathTV.DecMapUintUintptrV(v, false, d) - case *map[uint]uintptr: - var v2 map[uint]uintptr - v2, changed = fastpathTV.DecMapUintUintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[uint]int: - fastpathTV.DecMapUintIntV(v, false, d) - case *map[uint]int: - var v2 map[uint]int - v2, changed = fastpathTV.DecMapUintIntV(*v, true, d) - if changed { - *v = v2 - } - case map[uint]int8: - fastpathTV.DecMapUintInt8V(v, false, d) - case *map[uint]int8: - var v2 map[uint]int8 - v2, changed = fastpathTV.DecMapUintInt8V(*v, true, d) - if changed { - *v = v2 - } - case map[uint]int16: - fastpathTV.DecMapUintInt16V(v, false, d) - case *map[uint]int16: - var v2 map[uint]int16 - v2, changed = fastpathTV.DecMapUintInt16V(*v, true, d) - if changed { - *v = v2 - } - case map[uint]int32: - fastpathTV.DecMapUintInt32V(v, false, d) - case *map[uint]int32: - var v2 map[uint]int32 - v2, changed = fastpathTV.DecMapUintInt32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint]int64: - fastpathTV.DecMapUintInt64V(v, false, d) - case *map[uint]int64: - var v2 map[uint]int64 - v2, changed = fastpathTV.DecMapUintInt64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint]float32: - fastpathTV.DecMapUintFloat32V(v, false, d) - case *map[uint]float32: - var v2 map[uint]float32 - v2, changed = fastpathTV.DecMapUintFloat32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint]float64: - fastpathTV.DecMapUintFloat64V(v, false, d) - case *map[uint]float64: - var v2 map[uint]float64 - v2, changed = fastpathTV.DecMapUintFloat64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint]bool: - fastpathTV.DecMapUintBoolV(v, false, d) - case *map[uint]bool: - var v2 map[uint]bool - v2, changed = fastpathTV.DecMapUintBoolV(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]interface{}: - fastpathTV.DecMapUint8IntfV(v, false, d) - case *map[uint8]interface{}: - var v2 map[uint8]interface{} - v2, changed = fastpathTV.DecMapUint8IntfV(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]string: - fastpathTV.DecMapUint8StringV(v, false, d) - case *map[uint8]string: - var v2 map[uint8]string - v2, changed = fastpathTV.DecMapUint8StringV(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]uint: - fastpathTV.DecMapUint8UintV(v, false, d) - case *map[uint8]uint: - var v2 map[uint8]uint - v2, changed = fastpathTV.DecMapUint8UintV(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]uint8: - fastpathTV.DecMapUint8Uint8V(v, false, d) - case *map[uint8]uint8: - var v2 map[uint8]uint8 - v2, changed = fastpathTV.DecMapUint8Uint8V(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]uint16: - fastpathTV.DecMapUint8Uint16V(v, false, d) - case *map[uint8]uint16: - var v2 map[uint8]uint16 - v2, changed = fastpathTV.DecMapUint8Uint16V(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]uint32: - fastpathTV.DecMapUint8Uint32V(v, false, d) - case *map[uint8]uint32: - var v2 map[uint8]uint32 - v2, changed = fastpathTV.DecMapUint8Uint32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]uint64: - fastpathTV.DecMapUint8Uint64V(v, false, d) - case *map[uint8]uint64: - var v2 map[uint8]uint64 - v2, changed = fastpathTV.DecMapUint8Uint64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]uintptr: - fastpathTV.DecMapUint8UintptrV(v, false, d) - case *map[uint8]uintptr: - var v2 map[uint8]uintptr - v2, changed = fastpathTV.DecMapUint8UintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]int: - fastpathTV.DecMapUint8IntV(v, false, d) - case *map[uint8]int: - var v2 map[uint8]int - v2, changed = fastpathTV.DecMapUint8IntV(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]int8: - fastpathTV.DecMapUint8Int8V(v, false, d) - case *map[uint8]int8: - var v2 map[uint8]int8 - v2, changed = fastpathTV.DecMapUint8Int8V(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]int16: - fastpathTV.DecMapUint8Int16V(v, false, d) - case *map[uint8]int16: - var v2 map[uint8]int16 - v2, changed = fastpathTV.DecMapUint8Int16V(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]int32: - fastpathTV.DecMapUint8Int32V(v, false, d) - case *map[uint8]int32: - var v2 map[uint8]int32 - v2, changed = fastpathTV.DecMapUint8Int32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]int64: - fastpathTV.DecMapUint8Int64V(v, false, d) - case *map[uint8]int64: - var v2 map[uint8]int64 - v2, changed = fastpathTV.DecMapUint8Int64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]float32: - fastpathTV.DecMapUint8Float32V(v, false, d) - case *map[uint8]float32: - var v2 map[uint8]float32 - v2, changed = fastpathTV.DecMapUint8Float32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]float64: - fastpathTV.DecMapUint8Float64V(v, false, d) - case *map[uint8]float64: - var v2 map[uint8]float64 - v2, changed = fastpathTV.DecMapUint8Float64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint8]bool: - fastpathTV.DecMapUint8BoolV(v, false, d) - case *map[uint8]bool: - var v2 map[uint8]bool - v2, changed = fastpathTV.DecMapUint8BoolV(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]interface{}: - fastpathTV.DecMapUint16IntfV(v, false, d) - case *map[uint16]interface{}: - var v2 map[uint16]interface{} - v2, changed = fastpathTV.DecMapUint16IntfV(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]string: - fastpathTV.DecMapUint16StringV(v, false, d) - case *map[uint16]string: - var v2 map[uint16]string - v2, changed = fastpathTV.DecMapUint16StringV(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]uint: - fastpathTV.DecMapUint16UintV(v, false, d) - case *map[uint16]uint: - var v2 map[uint16]uint - v2, changed = fastpathTV.DecMapUint16UintV(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]uint8: - fastpathTV.DecMapUint16Uint8V(v, false, d) - case *map[uint16]uint8: - var v2 map[uint16]uint8 - v2, changed = fastpathTV.DecMapUint16Uint8V(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]uint16: - fastpathTV.DecMapUint16Uint16V(v, false, d) - case *map[uint16]uint16: - var v2 map[uint16]uint16 - v2, changed = fastpathTV.DecMapUint16Uint16V(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]uint32: - fastpathTV.DecMapUint16Uint32V(v, false, d) - case *map[uint16]uint32: - var v2 map[uint16]uint32 - v2, changed = fastpathTV.DecMapUint16Uint32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]uint64: - fastpathTV.DecMapUint16Uint64V(v, false, d) - case *map[uint16]uint64: - var v2 map[uint16]uint64 - v2, changed = fastpathTV.DecMapUint16Uint64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]uintptr: - fastpathTV.DecMapUint16UintptrV(v, false, d) - case *map[uint16]uintptr: - var v2 map[uint16]uintptr - v2, changed = fastpathTV.DecMapUint16UintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]int: - fastpathTV.DecMapUint16IntV(v, false, d) - case *map[uint16]int: - var v2 map[uint16]int - v2, changed = fastpathTV.DecMapUint16IntV(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]int8: - fastpathTV.DecMapUint16Int8V(v, false, d) - case *map[uint16]int8: - var v2 map[uint16]int8 - v2, changed = fastpathTV.DecMapUint16Int8V(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]int16: - fastpathTV.DecMapUint16Int16V(v, false, d) - case *map[uint16]int16: - var v2 map[uint16]int16 - v2, changed = fastpathTV.DecMapUint16Int16V(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]int32: - fastpathTV.DecMapUint16Int32V(v, false, d) - case *map[uint16]int32: - var v2 map[uint16]int32 - v2, changed = fastpathTV.DecMapUint16Int32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]int64: - fastpathTV.DecMapUint16Int64V(v, false, d) - case *map[uint16]int64: - var v2 map[uint16]int64 - v2, changed = fastpathTV.DecMapUint16Int64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]float32: - fastpathTV.DecMapUint16Float32V(v, false, d) - case *map[uint16]float32: - var v2 map[uint16]float32 - v2, changed = fastpathTV.DecMapUint16Float32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]float64: - fastpathTV.DecMapUint16Float64V(v, false, d) - case *map[uint16]float64: - var v2 map[uint16]float64 - v2, changed = fastpathTV.DecMapUint16Float64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint16]bool: - fastpathTV.DecMapUint16BoolV(v, false, d) - case *map[uint16]bool: - var v2 map[uint16]bool - v2, changed = fastpathTV.DecMapUint16BoolV(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]interface{}: - fastpathTV.DecMapUint32IntfV(v, false, d) - case *map[uint32]interface{}: - var v2 map[uint32]interface{} - v2, changed = fastpathTV.DecMapUint32IntfV(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]string: - fastpathTV.DecMapUint32StringV(v, false, d) - case *map[uint32]string: - var v2 map[uint32]string - v2, changed = fastpathTV.DecMapUint32StringV(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]uint: - fastpathTV.DecMapUint32UintV(v, false, d) - case *map[uint32]uint: - var v2 map[uint32]uint - v2, changed = fastpathTV.DecMapUint32UintV(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]uint8: - fastpathTV.DecMapUint32Uint8V(v, false, d) - case *map[uint32]uint8: - var v2 map[uint32]uint8 - v2, changed = fastpathTV.DecMapUint32Uint8V(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]uint16: - fastpathTV.DecMapUint32Uint16V(v, false, d) - case *map[uint32]uint16: - var v2 map[uint32]uint16 - v2, changed = fastpathTV.DecMapUint32Uint16V(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]uint32: - fastpathTV.DecMapUint32Uint32V(v, false, d) - case *map[uint32]uint32: - var v2 map[uint32]uint32 - v2, changed = fastpathTV.DecMapUint32Uint32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]uint64: - fastpathTV.DecMapUint32Uint64V(v, false, d) - case *map[uint32]uint64: - var v2 map[uint32]uint64 - v2, changed = fastpathTV.DecMapUint32Uint64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]uintptr: - fastpathTV.DecMapUint32UintptrV(v, false, d) - case *map[uint32]uintptr: - var v2 map[uint32]uintptr - v2, changed = fastpathTV.DecMapUint32UintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]int: - fastpathTV.DecMapUint32IntV(v, false, d) - case *map[uint32]int: - var v2 map[uint32]int - v2, changed = fastpathTV.DecMapUint32IntV(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]int8: - fastpathTV.DecMapUint32Int8V(v, false, d) - case *map[uint32]int8: - var v2 map[uint32]int8 - v2, changed = fastpathTV.DecMapUint32Int8V(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]int16: - fastpathTV.DecMapUint32Int16V(v, false, d) - case *map[uint32]int16: - var v2 map[uint32]int16 - v2, changed = fastpathTV.DecMapUint32Int16V(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]int32: - fastpathTV.DecMapUint32Int32V(v, false, d) - case *map[uint32]int32: - var v2 map[uint32]int32 - v2, changed = fastpathTV.DecMapUint32Int32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]int64: - fastpathTV.DecMapUint32Int64V(v, false, d) - case *map[uint32]int64: - var v2 map[uint32]int64 - v2, changed = fastpathTV.DecMapUint32Int64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]float32: - fastpathTV.DecMapUint32Float32V(v, false, d) - case *map[uint32]float32: - var v2 map[uint32]float32 - v2, changed = fastpathTV.DecMapUint32Float32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]float64: - fastpathTV.DecMapUint32Float64V(v, false, d) - case *map[uint32]float64: - var v2 map[uint32]float64 - v2, changed = fastpathTV.DecMapUint32Float64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint32]bool: - fastpathTV.DecMapUint32BoolV(v, false, d) - case *map[uint32]bool: - var v2 map[uint32]bool - v2, changed = fastpathTV.DecMapUint32BoolV(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]interface{}: - fastpathTV.DecMapUint64IntfV(v, false, d) - case *map[uint64]interface{}: - var v2 map[uint64]interface{} - v2, changed = fastpathTV.DecMapUint64IntfV(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]string: - fastpathTV.DecMapUint64StringV(v, false, d) - case *map[uint64]string: - var v2 map[uint64]string - v2, changed = fastpathTV.DecMapUint64StringV(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]uint: - fastpathTV.DecMapUint64UintV(v, false, d) - case *map[uint64]uint: - var v2 map[uint64]uint - v2, changed = fastpathTV.DecMapUint64UintV(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]uint8: - fastpathTV.DecMapUint64Uint8V(v, false, d) - case *map[uint64]uint8: - var v2 map[uint64]uint8 - v2, changed = fastpathTV.DecMapUint64Uint8V(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]uint16: - fastpathTV.DecMapUint64Uint16V(v, false, d) - case *map[uint64]uint16: - var v2 map[uint64]uint16 - v2, changed = fastpathTV.DecMapUint64Uint16V(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]uint32: - fastpathTV.DecMapUint64Uint32V(v, false, d) - case *map[uint64]uint32: - var v2 map[uint64]uint32 - v2, changed = fastpathTV.DecMapUint64Uint32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]uint64: - fastpathTV.DecMapUint64Uint64V(v, false, d) - case *map[uint64]uint64: - var v2 map[uint64]uint64 - v2, changed = fastpathTV.DecMapUint64Uint64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]uintptr: - fastpathTV.DecMapUint64UintptrV(v, false, d) - case *map[uint64]uintptr: - var v2 map[uint64]uintptr - v2, changed = fastpathTV.DecMapUint64UintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]int: - fastpathTV.DecMapUint64IntV(v, false, d) - case *map[uint64]int: - var v2 map[uint64]int - v2, changed = fastpathTV.DecMapUint64IntV(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]int8: - fastpathTV.DecMapUint64Int8V(v, false, d) - case *map[uint64]int8: - var v2 map[uint64]int8 - v2, changed = fastpathTV.DecMapUint64Int8V(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]int16: - fastpathTV.DecMapUint64Int16V(v, false, d) - case *map[uint64]int16: - var v2 map[uint64]int16 - v2, changed = fastpathTV.DecMapUint64Int16V(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]int32: - fastpathTV.DecMapUint64Int32V(v, false, d) - case *map[uint64]int32: - var v2 map[uint64]int32 - v2, changed = fastpathTV.DecMapUint64Int32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]int64: - fastpathTV.DecMapUint64Int64V(v, false, d) - case *map[uint64]int64: - var v2 map[uint64]int64 - v2, changed = fastpathTV.DecMapUint64Int64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]float32: - fastpathTV.DecMapUint64Float32V(v, false, d) - case *map[uint64]float32: - var v2 map[uint64]float32 - v2, changed = fastpathTV.DecMapUint64Float32V(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]float64: - fastpathTV.DecMapUint64Float64V(v, false, d) - case *map[uint64]float64: - var v2 map[uint64]float64 - v2, changed = fastpathTV.DecMapUint64Float64V(*v, true, d) - if changed { - *v = v2 - } - case map[uint64]bool: - fastpathTV.DecMapUint64BoolV(v, false, d) - case *map[uint64]bool: - var v2 map[uint64]bool - v2, changed = fastpathTV.DecMapUint64BoolV(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]interface{}: - fastpathTV.DecMapUintptrIntfV(v, false, d) - case *map[uintptr]interface{}: - var v2 map[uintptr]interface{} - v2, changed = fastpathTV.DecMapUintptrIntfV(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]string: - fastpathTV.DecMapUintptrStringV(v, false, d) - case *map[uintptr]string: - var v2 map[uintptr]string - v2, changed = fastpathTV.DecMapUintptrStringV(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]uint: - fastpathTV.DecMapUintptrUintV(v, false, d) - case *map[uintptr]uint: - var v2 map[uintptr]uint - v2, changed = fastpathTV.DecMapUintptrUintV(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]uint8: - fastpathTV.DecMapUintptrUint8V(v, false, d) - case *map[uintptr]uint8: - var v2 map[uintptr]uint8 - v2, changed = fastpathTV.DecMapUintptrUint8V(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]uint16: - fastpathTV.DecMapUintptrUint16V(v, false, d) - case *map[uintptr]uint16: - var v2 map[uintptr]uint16 - v2, changed = fastpathTV.DecMapUintptrUint16V(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]uint32: - fastpathTV.DecMapUintptrUint32V(v, false, d) - case *map[uintptr]uint32: - var v2 map[uintptr]uint32 - v2, changed = fastpathTV.DecMapUintptrUint32V(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]uint64: - fastpathTV.DecMapUintptrUint64V(v, false, d) - case *map[uintptr]uint64: - var v2 map[uintptr]uint64 - v2, changed = fastpathTV.DecMapUintptrUint64V(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]uintptr: - fastpathTV.DecMapUintptrUintptrV(v, false, d) - case *map[uintptr]uintptr: - var v2 map[uintptr]uintptr - v2, changed = fastpathTV.DecMapUintptrUintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]int: - fastpathTV.DecMapUintptrIntV(v, false, d) - case *map[uintptr]int: - var v2 map[uintptr]int - v2, changed = fastpathTV.DecMapUintptrIntV(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]int8: - fastpathTV.DecMapUintptrInt8V(v, false, d) - case *map[uintptr]int8: - var v2 map[uintptr]int8 - v2, changed = fastpathTV.DecMapUintptrInt8V(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]int16: - fastpathTV.DecMapUintptrInt16V(v, false, d) - case *map[uintptr]int16: - var v2 map[uintptr]int16 - v2, changed = fastpathTV.DecMapUintptrInt16V(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]int32: - fastpathTV.DecMapUintptrInt32V(v, false, d) - case *map[uintptr]int32: - var v2 map[uintptr]int32 - v2, changed = fastpathTV.DecMapUintptrInt32V(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]int64: - fastpathTV.DecMapUintptrInt64V(v, false, d) - case *map[uintptr]int64: - var v2 map[uintptr]int64 - v2, changed = fastpathTV.DecMapUintptrInt64V(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]float32: - fastpathTV.DecMapUintptrFloat32V(v, false, d) - case *map[uintptr]float32: - var v2 map[uintptr]float32 - v2, changed = fastpathTV.DecMapUintptrFloat32V(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]float64: - fastpathTV.DecMapUintptrFloat64V(v, false, d) - case *map[uintptr]float64: - var v2 map[uintptr]float64 - v2, changed = fastpathTV.DecMapUintptrFloat64V(*v, true, d) - if changed { - *v = v2 - } - case map[uintptr]bool: - fastpathTV.DecMapUintptrBoolV(v, false, d) - case *map[uintptr]bool: - var v2 map[uintptr]bool - v2, changed = fastpathTV.DecMapUintptrBoolV(*v, true, d) - if changed { - *v = v2 - } - case map[int]interface{}: - fastpathTV.DecMapIntIntfV(v, false, d) - case *map[int]interface{}: - var v2 map[int]interface{} - v2, changed = fastpathTV.DecMapIntIntfV(*v, true, d) - if changed { - *v = v2 - } - case map[int]string: - fastpathTV.DecMapIntStringV(v, false, d) - case *map[int]string: - var v2 map[int]string - v2, changed = fastpathTV.DecMapIntStringV(*v, true, d) - if changed { - *v = v2 - } - case map[int]uint: - fastpathTV.DecMapIntUintV(v, false, d) - case *map[int]uint: - var v2 map[int]uint - v2, changed = fastpathTV.DecMapIntUintV(*v, true, d) - if changed { - *v = v2 - } - case map[int]uint8: - fastpathTV.DecMapIntUint8V(v, false, d) - case *map[int]uint8: - var v2 map[int]uint8 - v2, changed = fastpathTV.DecMapIntUint8V(*v, true, d) - if changed { - *v = v2 - } - case map[int]uint16: - fastpathTV.DecMapIntUint16V(v, false, d) - case *map[int]uint16: - var v2 map[int]uint16 - v2, changed = fastpathTV.DecMapIntUint16V(*v, true, d) - if changed { - *v = v2 - } - case map[int]uint32: - fastpathTV.DecMapIntUint32V(v, false, d) - case *map[int]uint32: - var v2 map[int]uint32 - v2, changed = fastpathTV.DecMapIntUint32V(*v, true, d) - if changed { - *v = v2 - } - case map[int]uint64: - fastpathTV.DecMapIntUint64V(v, false, d) - case *map[int]uint64: - var v2 map[int]uint64 - v2, changed = fastpathTV.DecMapIntUint64V(*v, true, d) - if changed { - *v = v2 - } - case map[int]uintptr: - fastpathTV.DecMapIntUintptrV(v, false, d) - case *map[int]uintptr: - var v2 map[int]uintptr - v2, changed = fastpathTV.DecMapIntUintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[int]int: - fastpathTV.DecMapIntIntV(v, false, d) - case *map[int]int: - var v2 map[int]int - v2, changed = fastpathTV.DecMapIntIntV(*v, true, d) - if changed { - *v = v2 - } - case map[int]int8: - fastpathTV.DecMapIntInt8V(v, false, d) - case *map[int]int8: - var v2 map[int]int8 - v2, changed = fastpathTV.DecMapIntInt8V(*v, true, d) - if changed { - *v = v2 - } - case map[int]int16: - fastpathTV.DecMapIntInt16V(v, false, d) - case *map[int]int16: - var v2 map[int]int16 - v2, changed = fastpathTV.DecMapIntInt16V(*v, true, d) - if changed { - *v = v2 - } - case map[int]int32: - fastpathTV.DecMapIntInt32V(v, false, d) - case *map[int]int32: - var v2 map[int]int32 - v2, changed = fastpathTV.DecMapIntInt32V(*v, true, d) - if changed { - *v = v2 - } - case map[int]int64: - fastpathTV.DecMapIntInt64V(v, false, d) - case *map[int]int64: - var v2 map[int]int64 - v2, changed = fastpathTV.DecMapIntInt64V(*v, true, d) - if changed { - *v = v2 - } - case map[int]float32: - fastpathTV.DecMapIntFloat32V(v, false, d) - case *map[int]float32: - var v2 map[int]float32 - v2, changed = fastpathTV.DecMapIntFloat32V(*v, true, d) - if changed { - *v = v2 - } - case map[int]float64: - fastpathTV.DecMapIntFloat64V(v, false, d) - case *map[int]float64: - var v2 map[int]float64 - v2, changed = fastpathTV.DecMapIntFloat64V(*v, true, d) - if changed { - *v = v2 - } - case map[int]bool: - fastpathTV.DecMapIntBoolV(v, false, d) - case *map[int]bool: - var v2 map[int]bool - v2, changed = fastpathTV.DecMapIntBoolV(*v, true, d) - if changed { - *v = v2 - } - case map[int8]interface{}: - fastpathTV.DecMapInt8IntfV(v, false, d) - case *map[int8]interface{}: - var v2 map[int8]interface{} - v2, changed = fastpathTV.DecMapInt8IntfV(*v, true, d) - if changed { - *v = v2 - } - case map[int8]string: - fastpathTV.DecMapInt8StringV(v, false, d) - case *map[int8]string: - var v2 map[int8]string - v2, changed = fastpathTV.DecMapInt8StringV(*v, true, d) - if changed { - *v = v2 - } - case map[int8]uint: - fastpathTV.DecMapInt8UintV(v, false, d) - case *map[int8]uint: - var v2 map[int8]uint - v2, changed = fastpathTV.DecMapInt8UintV(*v, true, d) - if changed { - *v = v2 - } - case map[int8]uint8: - fastpathTV.DecMapInt8Uint8V(v, false, d) - case *map[int8]uint8: - var v2 map[int8]uint8 - v2, changed = fastpathTV.DecMapInt8Uint8V(*v, true, d) - if changed { - *v = v2 - } - case map[int8]uint16: - fastpathTV.DecMapInt8Uint16V(v, false, d) - case *map[int8]uint16: - var v2 map[int8]uint16 - v2, changed = fastpathTV.DecMapInt8Uint16V(*v, true, d) - if changed { - *v = v2 - } - case map[int8]uint32: - fastpathTV.DecMapInt8Uint32V(v, false, d) - case *map[int8]uint32: - var v2 map[int8]uint32 - v2, changed = fastpathTV.DecMapInt8Uint32V(*v, true, d) - if changed { - *v = v2 - } - case map[int8]uint64: - fastpathTV.DecMapInt8Uint64V(v, false, d) - case *map[int8]uint64: - var v2 map[int8]uint64 - v2, changed = fastpathTV.DecMapInt8Uint64V(*v, true, d) - if changed { - *v = v2 - } - case map[int8]uintptr: - fastpathTV.DecMapInt8UintptrV(v, false, d) - case *map[int8]uintptr: - var v2 map[int8]uintptr - v2, changed = fastpathTV.DecMapInt8UintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[int8]int: - fastpathTV.DecMapInt8IntV(v, false, d) - case *map[int8]int: - var v2 map[int8]int - v2, changed = fastpathTV.DecMapInt8IntV(*v, true, d) - if changed { - *v = v2 - } - case map[int8]int8: - fastpathTV.DecMapInt8Int8V(v, false, d) - case *map[int8]int8: - var v2 map[int8]int8 - v2, changed = fastpathTV.DecMapInt8Int8V(*v, true, d) - if changed { - *v = v2 - } - case map[int8]int16: - fastpathTV.DecMapInt8Int16V(v, false, d) - case *map[int8]int16: - var v2 map[int8]int16 - v2, changed = fastpathTV.DecMapInt8Int16V(*v, true, d) - if changed { - *v = v2 - } - case map[int8]int32: - fastpathTV.DecMapInt8Int32V(v, false, d) - case *map[int8]int32: - var v2 map[int8]int32 - v2, changed = fastpathTV.DecMapInt8Int32V(*v, true, d) - if changed { - *v = v2 - } - case map[int8]int64: - fastpathTV.DecMapInt8Int64V(v, false, d) - case *map[int8]int64: - var v2 map[int8]int64 - v2, changed = fastpathTV.DecMapInt8Int64V(*v, true, d) - if changed { - *v = v2 - } - case map[int8]float32: - fastpathTV.DecMapInt8Float32V(v, false, d) - case *map[int8]float32: - var v2 map[int8]float32 - v2, changed = fastpathTV.DecMapInt8Float32V(*v, true, d) - if changed { - *v = v2 - } - case map[int8]float64: - fastpathTV.DecMapInt8Float64V(v, false, d) - case *map[int8]float64: - var v2 map[int8]float64 - v2, changed = fastpathTV.DecMapInt8Float64V(*v, true, d) - if changed { - *v = v2 - } - case map[int8]bool: - fastpathTV.DecMapInt8BoolV(v, false, d) - case *map[int8]bool: - var v2 map[int8]bool - v2, changed = fastpathTV.DecMapInt8BoolV(*v, true, d) - if changed { - *v = v2 - } - case map[int16]interface{}: - fastpathTV.DecMapInt16IntfV(v, false, d) - case *map[int16]interface{}: - var v2 map[int16]interface{} - v2, changed = fastpathTV.DecMapInt16IntfV(*v, true, d) - if changed { - *v = v2 - } - case map[int16]string: - fastpathTV.DecMapInt16StringV(v, false, d) - case *map[int16]string: - var v2 map[int16]string - v2, changed = fastpathTV.DecMapInt16StringV(*v, true, d) - if changed { - *v = v2 - } - case map[int16]uint: - fastpathTV.DecMapInt16UintV(v, false, d) - case *map[int16]uint: - var v2 map[int16]uint - v2, changed = fastpathTV.DecMapInt16UintV(*v, true, d) - if changed { - *v = v2 - } - case map[int16]uint8: - fastpathTV.DecMapInt16Uint8V(v, false, d) - case *map[int16]uint8: - var v2 map[int16]uint8 - v2, changed = fastpathTV.DecMapInt16Uint8V(*v, true, d) - if changed { - *v = v2 - } - case map[int16]uint16: - fastpathTV.DecMapInt16Uint16V(v, false, d) - case *map[int16]uint16: - var v2 map[int16]uint16 - v2, changed = fastpathTV.DecMapInt16Uint16V(*v, true, d) - if changed { - *v = v2 - } - case map[int16]uint32: - fastpathTV.DecMapInt16Uint32V(v, false, d) - case *map[int16]uint32: - var v2 map[int16]uint32 - v2, changed = fastpathTV.DecMapInt16Uint32V(*v, true, d) - if changed { - *v = v2 - } - case map[int16]uint64: - fastpathTV.DecMapInt16Uint64V(v, false, d) - case *map[int16]uint64: - var v2 map[int16]uint64 - v2, changed = fastpathTV.DecMapInt16Uint64V(*v, true, d) - if changed { - *v = v2 - } - case map[int16]uintptr: - fastpathTV.DecMapInt16UintptrV(v, false, d) - case *map[int16]uintptr: - var v2 map[int16]uintptr - v2, changed = fastpathTV.DecMapInt16UintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[int16]int: - fastpathTV.DecMapInt16IntV(v, false, d) - case *map[int16]int: - var v2 map[int16]int - v2, changed = fastpathTV.DecMapInt16IntV(*v, true, d) - if changed { - *v = v2 - } - case map[int16]int8: - fastpathTV.DecMapInt16Int8V(v, false, d) - case *map[int16]int8: - var v2 map[int16]int8 - v2, changed = fastpathTV.DecMapInt16Int8V(*v, true, d) - if changed { - *v = v2 - } - case map[int16]int16: - fastpathTV.DecMapInt16Int16V(v, false, d) - case *map[int16]int16: - var v2 map[int16]int16 - v2, changed = fastpathTV.DecMapInt16Int16V(*v, true, d) - if changed { - *v = v2 - } - case map[int16]int32: - fastpathTV.DecMapInt16Int32V(v, false, d) - case *map[int16]int32: - var v2 map[int16]int32 - v2, changed = fastpathTV.DecMapInt16Int32V(*v, true, d) - if changed { - *v = v2 - } - case map[int16]int64: - fastpathTV.DecMapInt16Int64V(v, false, d) - case *map[int16]int64: - var v2 map[int16]int64 - v2, changed = fastpathTV.DecMapInt16Int64V(*v, true, d) - if changed { - *v = v2 - } - case map[int16]float32: - fastpathTV.DecMapInt16Float32V(v, false, d) - case *map[int16]float32: - var v2 map[int16]float32 - v2, changed = fastpathTV.DecMapInt16Float32V(*v, true, d) - if changed { - *v = v2 - } - case map[int16]float64: - fastpathTV.DecMapInt16Float64V(v, false, d) - case *map[int16]float64: - var v2 map[int16]float64 - v2, changed = fastpathTV.DecMapInt16Float64V(*v, true, d) - if changed { - *v = v2 - } - case map[int16]bool: - fastpathTV.DecMapInt16BoolV(v, false, d) - case *map[int16]bool: - var v2 map[int16]bool - v2, changed = fastpathTV.DecMapInt16BoolV(*v, true, d) - if changed { - *v = v2 - } - case map[int32]interface{}: - fastpathTV.DecMapInt32IntfV(v, false, d) - case *map[int32]interface{}: - var v2 map[int32]interface{} - v2, changed = fastpathTV.DecMapInt32IntfV(*v, true, d) - if changed { - *v = v2 - } - case map[int32]string: - fastpathTV.DecMapInt32StringV(v, false, d) - case *map[int32]string: - var v2 map[int32]string - v2, changed = fastpathTV.DecMapInt32StringV(*v, true, d) - if changed { - *v = v2 - } - case map[int32]uint: - fastpathTV.DecMapInt32UintV(v, false, d) - case *map[int32]uint: - var v2 map[int32]uint - v2, changed = fastpathTV.DecMapInt32UintV(*v, true, d) - if changed { - *v = v2 - } - case map[int32]uint8: - fastpathTV.DecMapInt32Uint8V(v, false, d) - case *map[int32]uint8: - var v2 map[int32]uint8 - v2, changed = fastpathTV.DecMapInt32Uint8V(*v, true, d) - if changed { - *v = v2 - } - case map[int32]uint16: - fastpathTV.DecMapInt32Uint16V(v, false, d) - case *map[int32]uint16: - var v2 map[int32]uint16 - v2, changed = fastpathTV.DecMapInt32Uint16V(*v, true, d) - if changed { - *v = v2 - } - case map[int32]uint32: - fastpathTV.DecMapInt32Uint32V(v, false, d) - case *map[int32]uint32: - var v2 map[int32]uint32 - v2, changed = fastpathTV.DecMapInt32Uint32V(*v, true, d) - if changed { - *v = v2 - } - case map[int32]uint64: - fastpathTV.DecMapInt32Uint64V(v, false, d) - case *map[int32]uint64: - var v2 map[int32]uint64 - v2, changed = fastpathTV.DecMapInt32Uint64V(*v, true, d) - if changed { - *v = v2 - } - case map[int32]uintptr: - fastpathTV.DecMapInt32UintptrV(v, false, d) - case *map[int32]uintptr: - var v2 map[int32]uintptr - v2, changed = fastpathTV.DecMapInt32UintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[int32]int: - fastpathTV.DecMapInt32IntV(v, false, d) - case *map[int32]int: - var v2 map[int32]int - v2, changed = fastpathTV.DecMapInt32IntV(*v, true, d) - if changed { - *v = v2 - } - case map[int32]int8: - fastpathTV.DecMapInt32Int8V(v, false, d) - case *map[int32]int8: - var v2 map[int32]int8 - v2, changed = fastpathTV.DecMapInt32Int8V(*v, true, d) - if changed { - *v = v2 - } - case map[int32]int16: - fastpathTV.DecMapInt32Int16V(v, false, d) - case *map[int32]int16: - var v2 map[int32]int16 - v2, changed = fastpathTV.DecMapInt32Int16V(*v, true, d) - if changed { - *v = v2 - } - case map[int32]int32: - fastpathTV.DecMapInt32Int32V(v, false, d) - case *map[int32]int32: - var v2 map[int32]int32 - v2, changed = fastpathTV.DecMapInt32Int32V(*v, true, d) - if changed { - *v = v2 - } - case map[int32]int64: - fastpathTV.DecMapInt32Int64V(v, false, d) - case *map[int32]int64: - var v2 map[int32]int64 - v2, changed = fastpathTV.DecMapInt32Int64V(*v, true, d) - if changed { - *v = v2 - } - case map[int32]float32: - fastpathTV.DecMapInt32Float32V(v, false, d) - case *map[int32]float32: - var v2 map[int32]float32 - v2, changed = fastpathTV.DecMapInt32Float32V(*v, true, d) - if changed { - *v = v2 - } - case map[int32]float64: - fastpathTV.DecMapInt32Float64V(v, false, d) - case *map[int32]float64: - var v2 map[int32]float64 - v2, changed = fastpathTV.DecMapInt32Float64V(*v, true, d) - if changed { - *v = v2 - } - case map[int32]bool: - fastpathTV.DecMapInt32BoolV(v, false, d) - case *map[int32]bool: - var v2 map[int32]bool - v2, changed = fastpathTV.DecMapInt32BoolV(*v, true, d) - if changed { - *v = v2 - } - case map[int64]interface{}: - fastpathTV.DecMapInt64IntfV(v, false, d) - case *map[int64]interface{}: - var v2 map[int64]interface{} - v2, changed = fastpathTV.DecMapInt64IntfV(*v, true, d) - if changed { - *v = v2 - } - case map[int64]string: - fastpathTV.DecMapInt64StringV(v, false, d) - case *map[int64]string: - var v2 map[int64]string - v2, changed = fastpathTV.DecMapInt64StringV(*v, true, d) - if changed { - *v = v2 - } - case map[int64]uint: - fastpathTV.DecMapInt64UintV(v, false, d) - case *map[int64]uint: - var v2 map[int64]uint - v2, changed = fastpathTV.DecMapInt64UintV(*v, true, d) - if changed { - *v = v2 - } - case map[int64]uint8: - fastpathTV.DecMapInt64Uint8V(v, false, d) - case *map[int64]uint8: - var v2 map[int64]uint8 - v2, changed = fastpathTV.DecMapInt64Uint8V(*v, true, d) - if changed { - *v = v2 - } - case map[int64]uint16: - fastpathTV.DecMapInt64Uint16V(v, false, d) - case *map[int64]uint16: - var v2 map[int64]uint16 - v2, changed = fastpathTV.DecMapInt64Uint16V(*v, true, d) - if changed { - *v = v2 - } - case map[int64]uint32: - fastpathTV.DecMapInt64Uint32V(v, false, d) - case *map[int64]uint32: - var v2 map[int64]uint32 - v2, changed = fastpathTV.DecMapInt64Uint32V(*v, true, d) - if changed { - *v = v2 - } - case map[int64]uint64: - fastpathTV.DecMapInt64Uint64V(v, false, d) - case *map[int64]uint64: - var v2 map[int64]uint64 - v2, changed = fastpathTV.DecMapInt64Uint64V(*v, true, d) - if changed { - *v = v2 - } - case map[int64]uintptr: - fastpathTV.DecMapInt64UintptrV(v, false, d) - case *map[int64]uintptr: - var v2 map[int64]uintptr - v2, changed = fastpathTV.DecMapInt64UintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[int64]int: - fastpathTV.DecMapInt64IntV(v, false, d) - case *map[int64]int: - var v2 map[int64]int - v2, changed = fastpathTV.DecMapInt64IntV(*v, true, d) - if changed { - *v = v2 - } - case map[int64]int8: - fastpathTV.DecMapInt64Int8V(v, false, d) - case *map[int64]int8: - var v2 map[int64]int8 - v2, changed = fastpathTV.DecMapInt64Int8V(*v, true, d) - if changed { - *v = v2 - } - case map[int64]int16: - fastpathTV.DecMapInt64Int16V(v, false, d) - case *map[int64]int16: - var v2 map[int64]int16 - v2, changed = fastpathTV.DecMapInt64Int16V(*v, true, d) - if changed { - *v = v2 - } - case map[int64]int32: - fastpathTV.DecMapInt64Int32V(v, false, d) - case *map[int64]int32: - var v2 map[int64]int32 - v2, changed = fastpathTV.DecMapInt64Int32V(*v, true, d) - if changed { - *v = v2 - } - case map[int64]int64: - fastpathTV.DecMapInt64Int64V(v, false, d) - case *map[int64]int64: - var v2 map[int64]int64 - v2, changed = fastpathTV.DecMapInt64Int64V(*v, true, d) - if changed { - *v = v2 - } - case map[int64]float32: - fastpathTV.DecMapInt64Float32V(v, false, d) - case *map[int64]float32: - var v2 map[int64]float32 - v2, changed = fastpathTV.DecMapInt64Float32V(*v, true, d) - if changed { - *v = v2 - } - case map[int64]float64: - fastpathTV.DecMapInt64Float64V(v, false, d) - case *map[int64]float64: - var v2 map[int64]float64 - v2, changed = fastpathTV.DecMapInt64Float64V(*v, true, d) - if changed { - *v = v2 - } - case map[int64]bool: - fastpathTV.DecMapInt64BoolV(v, false, d) - case *map[int64]bool: - var v2 map[int64]bool - v2, changed = fastpathTV.DecMapInt64BoolV(*v, true, d) - if changed { - *v = v2 - } - case map[bool]interface{}: - fastpathTV.DecMapBoolIntfV(v, false, d) - case *map[bool]interface{}: - var v2 map[bool]interface{} - v2, changed = fastpathTV.DecMapBoolIntfV(*v, true, d) - if changed { - *v = v2 - } - case map[bool]string: - fastpathTV.DecMapBoolStringV(v, false, d) - case *map[bool]string: - var v2 map[bool]string - v2, changed = fastpathTV.DecMapBoolStringV(*v, true, d) - if changed { - *v = v2 - } - case map[bool]uint: - fastpathTV.DecMapBoolUintV(v, false, d) - case *map[bool]uint: - var v2 map[bool]uint - v2, changed = fastpathTV.DecMapBoolUintV(*v, true, d) - if changed { - *v = v2 - } - case map[bool]uint8: - fastpathTV.DecMapBoolUint8V(v, false, d) - case *map[bool]uint8: - var v2 map[bool]uint8 - v2, changed = fastpathTV.DecMapBoolUint8V(*v, true, d) - if changed { - *v = v2 - } - case map[bool]uint16: - fastpathTV.DecMapBoolUint16V(v, false, d) - case *map[bool]uint16: - var v2 map[bool]uint16 - v2, changed = fastpathTV.DecMapBoolUint16V(*v, true, d) - if changed { - *v = v2 - } - case map[bool]uint32: - fastpathTV.DecMapBoolUint32V(v, false, d) - case *map[bool]uint32: - var v2 map[bool]uint32 - v2, changed = fastpathTV.DecMapBoolUint32V(*v, true, d) - if changed { - *v = v2 - } - case map[bool]uint64: - fastpathTV.DecMapBoolUint64V(v, false, d) - case *map[bool]uint64: - var v2 map[bool]uint64 - v2, changed = fastpathTV.DecMapBoolUint64V(*v, true, d) - if changed { - *v = v2 - } - case map[bool]uintptr: - fastpathTV.DecMapBoolUintptrV(v, false, d) - case *map[bool]uintptr: - var v2 map[bool]uintptr - v2, changed = fastpathTV.DecMapBoolUintptrV(*v, true, d) - if changed { - *v = v2 - } - case map[bool]int: - fastpathTV.DecMapBoolIntV(v, false, d) - case *map[bool]int: - var v2 map[bool]int - v2, changed = fastpathTV.DecMapBoolIntV(*v, true, d) - if changed { - *v = v2 - } - case map[bool]int8: - fastpathTV.DecMapBoolInt8V(v, false, d) - case *map[bool]int8: - var v2 map[bool]int8 - v2, changed = fastpathTV.DecMapBoolInt8V(*v, true, d) - if changed { - *v = v2 - } - case map[bool]int16: - fastpathTV.DecMapBoolInt16V(v, false, d) - case *map[bool]int16: - var v2 map[bool]int16 - v2, changed = fastpathTV.DecMapBoolInt16V(*v, true, d) - if changed { - *v = v2 - } - case map[bool]int32: - fastpathTV.DecMapBoolInt32V(v, false, d) - case *map[bool]int32: - var v2 map[bool]int32 - v2, changed = fastpathTV.DecMapBoolInt32V(*v, true, d) - if changed { - *v = v2 - } - case map[bool]int64: - fastpathTV.DecMapBoolInt64V(v, false, d) - case *map[bool]int64: - var v2 map[bool]int64 - v2, changed = fastpathTV.DecMapBoolInt64V(*v, true, d) - if changed { - *v = v2 - } - case map[bool]float32: - fastpathTV.DecMapBoolFloat32V(v, false, d) - case *map[bool]float32: - var v2 map[bool]float32 - v2, changed = fastpathTV.DecMapBoolFloat32V(*v, true, d) - if changed { - *v = v2 - } - case map[bool]float64: - fastpathTV.DecMapBoolFloat64V(v, false, d) - case *map[bool]float64: - var v2 map[bool]float64 - v2, changed = fastpathTV.DecMapBoolFloat64V(*v, true, d) - if changed { - *v = v2 - } - case map[bool]bool: - fastpathTV.DecMapBoolBoolV(v, false, d) - case *map[bool]bool: - var v2 map[bool]bool - v2, changed = fastpathTV.DecMapBoolBoolV(*v, true, d) - if changed { - *v = v2 - } - default: - _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 - return false - } - return true -} - -func fastpathDecodeSetZeroTypeSwitch(iv interface{}) bool { - switch v := iv.(type) { - - case *[]interface{}: - *v = nil - case *[]string: - *v = nil - case *[]float32: - *v = nil - case *[]float64: - *v = nil - case *[]uint: - *v = nil - case *[]uint8: - *v = nil - case *[]uint16: - *v = nil - case *[]uint32: - *v = nil - case *[]uint64: - *v = nil - case *[]uintptr: - *v = nil - case *[]int: - *v = nil - case *[]int8: - *v = nil - case *[]int16: - *v = nil - case *[]int32: - *v = nil - case *[]int64: - *v = nil - case *[]bool: - *v = nil - - case *map[interface{}]interface{}: - *v = nil - case *map[interface{}]string: - *v = nil - case *map[interface{}]uint: - *v = nil - case *map[interface{}]uint8: - *v = nil - case *map[interface{}]uint16: - *v = nil - case *map[interface{}]uint32: - *v = nil - case *map[interface{}]uint64: - *v = nil - case *map[interface{}]uintptr: - *v = nil - case *map[interface{}]int: - *v = nil - case *map[interface{}]int8: - *v = nil - case *map[interface{}]int16: - *v = nil - case *map[interface{}]int32: - *v = nil - case *map[interface{}]int64: - *v = nil - case *map[interface{}]float32: - *v = nil - case *map[interface{}]float64: - *v = nil - case *map[interface{}]bool: - *v = nil - case *map[string]interface{}: - *v = nil - case *map[string]string: - *v = nil - case *map[string]uint: - *v = nil - case *map[string]uint8: - *v = nil - case *map[string]uint16: - *v = nil - case *map[string]uint32: - *v = nil - case *map[string]uint64: - *v = nil - case *map[string]uintptr: - *v = nil - case *map[string]int: - *v = nil - case *map[string]int8: - *v = nil - case *map[string]int16: - *v = nil - case *map[string]int32: - *v = nil - case *map[string]int64: - *v = nil - case *map[string]float32: - *v = nil - case *map[string]float64: - *v = nil - case *map[string]bool: - *v = nil - case *map[float32]interface{}: - *v = nil - case *map[float32]string: - *v = nil - case *map[float32]uint: - *v = nil - case *map[float32]uint8: - *v = nil - case *map[float32]uint16: - *v = nil - case *map[float32]uint32: - *v = nil - case *map[float32]uint64: - *v = nil - case *map[float32]uintptr: - *v = nil - case *map[float32]int: - *v = nil - case *map[float32]int8: - *v = nil - case *map[float32]int16: - *v = nil - case *map[float32]int32: - *v = nil - case *map[float32]int64: - *v = nil - case *map[float32]float32: - *v = nil - case *map[float32]float64: - *v = nil - case *map[float32]bool: - *v = nil - case *map[float64]interface{}: - *v = nil - case *map[float64]string: - *v = nil - case *map[float64]uint: - *v = nil - case *map[float64]uint8: - *v = nil - case *map[float64]uint16: - *v = nil - case *map[float64]uint32: - *v = nil - case *map[float64]uint64: - *v = nil - case *map[float64]uintptr: - *v = nil - case *map[float64]int: - *v = nil - case *map[float64]int8: - *v = nil - case *map[float64]int16: - *v = nil - case *map[float64]int32: - *v = nil - case *map[float64]int64: - *v = nil - case *map[float64]float32: - *v = nil - case *map[float64]float64: - *v = nil - case *map[float64]bool: - *v = nil - case *map[uint]interface{}: - *v = nil - case *map[uint]string: - *v = nil - case *map[uint]uint: - *v = nil - case *map[uint]uint8: - *v = nil - case *map[uint]uint16: - *v = nil - case *map[uint]uint32: - *v = nil - case *map[uint]uint64: - *v = nil - case *map[uint]uintptr: - *v = nil - case *map[uint]int: - *v = nil - case *map[uint]int8: - *v = nil - case *map[uint]int16: - *v = nil - case *map[uint]int32: - *v = nil - case *map[uint]int64: - *v = nil - case *map[uint]float32: - *v = nil - case *map[uint]float64: - *v = nil - case *map[uint]bool: - *v = nil - case *map[uint8]interface{}: - *v = nil - case *map[uint8]string: - *v = nil - case *map[uint8]uint: - *v = nil - case *map[uint8]uint8: - *v = nil - case *map[uint8]uint16: - *v = nil - case *map[uint8]uint32: - *v = nil - case *map[uint8]uint64: - *v = nil - case *map[uint8]uintptr: - *v = nil - case *map[uint8]int: - *v = nil - case *map[uint8]int8: - *v = nil - case *map[uint8]int16: - *v = nil - case *map[uint8]int32: - *v = nil - case *map[uint8]int64: - *v = nil - case *map[uint8]float32: - *v = nil - case *map[uint8]float64: - *v = nil - case *map[uint8]bool: - *v = nil - case *map[uint16]interface{}: - *v = nil - case *map[uint16]string: - *v = nil - case *map[uint16]uint: - *v = nil - case *map[uint16]uint8: - *v = nil - case *map[uint16]uint16: - *v = nil - case *map[uint16]uint32: - *v = nil - case *map[uint16]uint64: - *v = nil - case *map[uint16]uintptr: - *v = nil - case *map[uint16]int: - *v = nil - case *map[uint16]int8: - *v = nil - case *map[uint16]int16: - *v = nil - case *map[uint16]int32: - *v = nil - case *map[uint16]int64: - *v = nil - case *map[uint16]float32: - *v = nil - case *map[uint16]float64: - *v = nil - case *map[uint16]bool: - *v = nil - case *map[uint32]interface{}: - *v = nil - case *map[uint32]string: - *v = nil - case *map[uint32]uint: - *v = nil - case *map[uint32]uint8: - *v = nil - case *map[uint32]uint16: - *v = nil - case *map[uint32]uint32: - *v = nil - case *map[uint32]uint64: - *v = nil - case *map[uint32]uintptr: - *v = nil - case *map[uint32]int: - *v = nil - case *map[uint32]int8: - *v = nil - case *map[uint32]int16: - *v = nil - case *map[uint32]int32: - *v = nil - case *map[uint32]int64: - *v = nil - case *map[uint32]float32: - *v = nil - case *map[uint32]float64: - *v = nil - case *map[uint32]bool: - *v = nil - case *map[uint64]interface{}: - *v = nil - case *map[uint64]string: - *v = nil - case *map[uint64]uint: - *v = nil - case *map[uint64]uint8: - *v = nil - case *map[uint64]uint16: - *v = nil - case *map[uint64]uint32: - *v = nil - case *map[uint64]uint64: - *v = nil - case *map[uint64]uintptr: - *v = nil - case *map[uint64]int: - *v = nil - case *map[uint64]int8: - *v = nil - case *map[uint64]int16: - *v = nil - case *map[uint64]int32: - *v = nil - case *map[uint64]int64: - *v = nil - case *map[uint64]float32: - *v = nil - case *map[uint64]float64: - *v = nil - case *map[uint64]bool: - *v = nil - case *map[uintptr]interface{}: - *v = nil - case *map[uintptr]string: - *v = nil - case *map[uintptr]uint: - *v = nil - case *map[uintptr]uint8: - *v = nil - case *map[uintptr]uint16: - *v = nil - case *map[uintptr]uint32: - *v = nil - case *map[uintptr]uint64: - *v = nil - case *map[uintptr]uintptr: - *v = nil - case *map[uintptr]int: - *v = nil - case *map[uintptr]int8: - *v = nil - case *map[uintptr]int16: - *v = nil - case *map[uintptr]int32: - *v = nil - case *map[uintptr]int64: - *v = nil - case *map[uintptr]float32: - *v = nil - case *map[uintptr]float64: - *v = nil - case *map[uintptr]bool: - *v = nil - case *map[int]interface{}: - *v = nil - case *map[int]string: - *v = nil - case *map[int]uint: - *v = nil - case *map[int]uint8: - *v = nil - case *map[int]uint16: - *v = nil - case *map[int]uint32: - *v = nil - case *map[int]uint64: - *v = nil - case *map[int]uintptr: - *v = nil - case *map[int]int: - *v = nil - case *map[int]int8: - *v = nil - case *map[int]int16: - *v = nil - case *map[int]int32: - *v = nil - case *map[int]int64: - *v = nil - case *map[int]float32: - *v = nil - case *map[int]float64: - *v = nil - case *map[int]bool: - *v = nil - case *map[int8]interface{}: - *v = nil - case *map[int8]string: - *v = nil - case *map[int8]uint: - *v = nil - case *map[int8]uint8: - *v = nil - case *map[int8]uint16: - *v = nil - case *map[int8]uint32: - *v = nil - case *map[int8]uint64: - *v = nil - case *map[int8]uintptr: - *v = nil - case *map[int8]int: - *v = nil - case *map[int8]int8: - *v = nil - case *map[int8]int16: - *v = nil - case *map[int8]int32: - *v = nil - case *map[int8]int64: - *v = nil - case *map[int8]float32: - *v = nil - case *map[int8]float64: - *v = nil - case *map[int8]bool: - *v = nil - case *map[int16]interface{}: - *v = nil - case *map[int16]string: - *v = nil - case *map[int16]uint: - *v = nil - case *map[int16]uint8: - *v = nil - case *map[int16]uint16: - *v = nil - case *map[int16]uint32: - *v = nil - case *map[int16]uint64: - *v = nil - case *map[int16]uintptr: - *v = nil - case *map[int16]int: - *v = nil - case *map[int16]int8: - *v = nil - case *map[int16]int16: - *v = nil - case *map[int16]int32: - *v = nil - case *map[int16]int64: - *v = nil - case *map[int16]float32: - *v = nil - case *map[int16]float64: - *v = nil - case *map[int16]bool: - *v = nil - case *map[int32]interface{}: - *v = nil - case *map[int32]string: - *v = nil - case *map[int32]uint: - *v = nil - case *map[int32]uint8: - *v = nil - case *map[int32]uint16: - *v = nil - case *map[int32]uint32: - *v = nil - case *map[int32]uint64: - *v = nil - case *map[int32]uintptr: - *v = nil - case *map[int32]int: - *v = nil - case *map[int32]int8: - *v = nil - case *map[int32]int16: - *v = nil - case *map[int32]int32: - *v = nil - case *map[int32]int64: - *v = nil - case *map[int32]float32: - *v = nil - case *map[int32]float64: - *v = nil - case *map[int32]bool: - *v = nil - case *map[int64]interface{}: - *v = nil - case *map[int64]string: - *v = nil - case *map[int64]uint: - *v = nil - case *map[int64]uint8: - *v = nil - case *map[int64]uint16: - *v = nil - case *map[int64]uint32: - *v = nil - case *map[int64]uint64: - *v = nil - case *map[int64]uintptr: - *v = nil - case *map[int64]int: - *v = nil - case *map[int64]int8: - *v = nil - case *map[int64]int16: - *v = nil - case *map[int64]int32: - *v = nil - case *map[int64]int64: - *v = nil - case *map[int64]float32: - *v = nil - case *map[int64]float64: - *v = nil - case *map[int64]bool: - *v = nil - case *map[bool]interface{}: - *v = nil - case *map[bool]string: - *v = nil - case *map[bool]uint: - *v = nil - case *map[bool]uint8: - *v = nil - case *map[bool]uint16: - *v = nil - case *map[bool]uint32: - *v = nil - case *map[bool]uint64: - *v = nil - case *map[bool]uintptr: - *v = nil - case *map[bool]int: - *v = nil - case *map[bool]int8: - *v = nil - case *map[bool]int16: - *v = nil - case *map[bool]int32: - *v = nil - case *map[bool]int64: - *v = nil - case *map[bool]float32: - *v = nil - case *map[bool]float64: - *v = nil - case *map[bool]bool: - *v = nil - default: - _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 - return false - } - return true -} - -// -- -- fast path functions - -func (d *Decoder) fastpathDecSliceIntfR(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]interface{}) - v, changed := fastpathTV.DecSliceIntfV(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]interface{}) - v2, changed := fastpathTV.DecSliceIntfV(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceIntfX(vp *[]interface{}, d *Decoder) { - v, changed := f.DecSliceIntfV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceIntfV(v []interface{}, canChange bool, d *Decoder) (_ []interface{}, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []interface{}{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]interface{}, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) - } else { - xlen = 8 - } - v = make([]interface{}, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, nil) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = nil - } else { - d.decode(&v[uint(j)]) - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]interface{}, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceStringR(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]string) - v, changed := fastpathTV.DecSliceStringV(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]string) - v2, changed := fastpathTV.DecSliceStringV(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceStringX(vp *[]string, d *Decoder) { - v, changed := f.DecSliceStringV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceStringV(v []string, canChange bool, d *Decoder) (_ []string, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []string{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]string, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) - } else { - xlen = 8 - } - v = make([]string, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, "") - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = "" - } else { - v[uint(j)] = dd.DecodeString() - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]string, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceFloat32R(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]float32) - v, changed := fastpathTV.DecSliceFloat32V(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]float32) - v2, changed := fastpathTV.DecSliceFloat32V(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceFloat32X(vp *[]float32, d *Decoder) { - v, changed := f.DecSliceFloat32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceFloat32V(v []float32, canChange bool, d *Decoder) (_ []float32, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []float32{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]float32, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) - } else { - xlen = 8 - } - v = make([]float32, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = float32(chkOvf.Float32V(dd.DecodeFloat64())) - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]float32, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceFloat64R(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]float64) - v, changed := fastpathTV.DecSliceFloat64V(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]float64) - v2, changed := fastpathTV.DecSliceFloat64V(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceFloat64X(vp *[]float64, d *Decoder) { - v, changed := f.DecSliceFloat64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceFloat64V(v []float64, canChange bool, d *Decoder) (_ []float64, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []float64{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]float64, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) - } else { - xlen = 8 - } - v = make([]float64, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = dd.DecodeFloat64() - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]float64, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceUintR(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]uint) - v, changed := fastpathTV.DecSliceUintV(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]uint) - v2, changed := fastpathTV.DecSliceUintV(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceUintX(vp *[]uint, d *Decoder) { - v, changed := f.DecSliceUintV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceUintV(v []uint, canChange bool, d *Decoder) (_ []uint, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []uint{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]uint, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) - } else { - xlen = 8 - } - v = make([]uint, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]uint, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceUint8R(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]uint8) - v, changed := fastpathTV.DecSliceUint8V(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]uint8) - v2, changed := fastpathTV.DecSliceUint8V(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceUint8X(vp *[]uint8, d *Decoder) { - v, changed := f.DecSliceUint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceUint8V(v []uint8, canChange bool, d *Decoder) (_ []uint8, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []uint8{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]uint8, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) - } else { - xlen = 8 - } - v = make([]uint8, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]uint8, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceUint16R(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]uint16) - v, changed := fastpathTV.DecSliceUint16V(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]uint16) - v2, changed := fastpathTV.DecSliceUint16V(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceUint16X(vp *[]uint16, d *Decoder) { - v, changed := f.DecSliceUint16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceUint16V(v []uint16, canChange bool, d *Decoder) (_ []uint16, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []uint16{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]uint16, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2) - } else { - xlen = 8 - } - v = make([]uint16, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]uint16, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceUint32R(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]uint32) - v, changed := fastpathTV.DecSliceUint32V(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]uint32) - v2, changed := fastpathTV.DecSliceUint32V(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceUint32X(vp *[]uint32, d *Decoder) { - v, changed := f.DecSliceUint32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceUint32V(v []uint32, canChange bool, d *Decoder) (_ []uint32, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []uint32{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]uint32, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) - } else { - xlen = 8 - } - v = make([]uint32, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]uint32, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceUint64R(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]uint64) - v, changed := fastpathTV.DecSliceUint64V(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]uint64) - v2, changed := fastpathTV.DecSliceUint64V(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceUint64X(vp *[]uint64, d *Decoder) { - v, changed := f.DecSliceUint64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceUint64V(v []uint64, canChange bool, d *Decoder) (_ []uint64, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []uint64{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]uint64, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) - } else { - xlen = 8 - } - v = make([]uint64, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = dd.DecodeUint64() - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]uint64, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceUintptrR(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]uintptr) - v, changed := fastpathTV.DecSliceUintptrV(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]uintptr) - v2, changed := fastpathTV.DecSliceUintptrV(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceUintptrX(vp *[]uintptr, d *Decoder) { - v, changed := f.DecSliceUintptrV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceUintptrV(v []uintptr, canChange bool, d *Decoder) (_ []uintptr, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []uintptr{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]uintptr, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) - } else { - xlen = 8 - } - v = make([]uintptr, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]uintptr, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceIntR(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]int) - v, changed := fastpathTV.DecSliceIntV(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]int) - v2, changed := fastpathTV.DecSliceIntV(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceIntX(vp *[]int, d *Decoder) { - v, changed := f.DecSliceIntV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceIntV(v []int, canChange bool, d *Decoder) (_ []int, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []int{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]int, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) - } else { - xlen = 8 - } - v = make([]int, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]int, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceInt8R(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]int8) - v, changed := fastpathTV.DecSliceInt8V(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]int8) - v2, changed := fastpathTV.DecSliceInt8V(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceInt8X(vp *[]int8, d *Decoder) { - v, changed := f.DecSliceInt8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceInt8V(v []int8, canChange bool, d *Decoder) (_ []int8, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []int8{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]int8, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) - } else { - xlen = 8 - } - v = make([]int8, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]int8, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceInt16R(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]int16) - v, changed := fastpathTV.DecSliceInt16V(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]int16) - v2, changed := fastpathTV.DecSliceInt16V(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceInt16X(vp *[]int16, d *Decoder) { - v, changed := f.DecSliceInt16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceInt16V(v []int16, canChange bool, d *Decoder) (_ []int16, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []int16{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]int16, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2) - } else { - xlen = 8 - } - v = make([]int16, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]int16, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceInt32R(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]int32) - v, changed := fastpathTV.DecSliceInt32V(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]int32) - v2, changed := fastpathTV.DecSliceInt32V(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceInt32X(vp *[]int32, d *Decoder) { - v, changed := f.DecSliceInt32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceInt32V(v []int32, canChange bool, d *Decoder) (_ []int32, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []int32{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]int32, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) - } else { - xlen = 8 - } - v = make([]int32, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]int32, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceInt64R(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]int64) - v, changed := fastpathTV.DecSliceInt64V(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]int64) - v2, changed := fastpathTV.DecSliceInt64V(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceInt64X(vp *[]int64, d *Decoder) { - v, changed := f.DecSliceInt64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceInt64V(v []int64, canChange bool, d *Decoder) (_ []int64, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []int64{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]int64, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) - } else { - xlen = 8 - } - v = make([]int64, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = 0 - } else { - v[uint(j)] = dd.DecodeInt64() - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]int64, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecSliceBoolR(f *codecFnInfo, rv reflect.Value) { - if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*[]bool) - v, changed := fastpathTV.DecSliceBoolV(*vp, !array, d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]bool) - v2, changed := fastpathTV.DecSliceBoolV(v, !array, d) - if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { - copy(v, v2) - } - } -} -func (f fastpathT) DecSliceBoolX(vp *[]bool, d *Decoder) { - v, changed := f.DecSliceBoolV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceBoolV(v []bool, canChange bool, d *Decoder) (_ []bool, changed bool) { - dd := d.d - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []bool{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } - d.depthIncr() - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) - if xlen <= cap(v) { - v = v[:uint(xlen)] - } else { - v = make([]bool, uint(xlen)) - } - changed = true - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - } - var j int - for j = 0; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 && canChange { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) - } else { - xlen = 8 - } - v = make([]bool, uint(xlen)) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, false) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else if dd.TryDecodeAsNil() { - v[uint(j)] = false - } else { - v[uint(j)] = dd.DecodeBool() - } - } - if canChange { - if j < len(v) { - v = v[:uint(j)] - changed = true - } else if j == 0 && v == nil { - v = make([]bool, 0) - changed = true - } - } - slh.End() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfIntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]interface{}) - v, changed := fastpathTV.DecMapIntfIntfV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfIntfV(rv2i(rv).(map[interface{}]interface{}), false, d) - } -} -func (f fastpathT) DecMapIntfIntfX(vp *map[interface{}]interface{}, d *Decoder) { - v, changed := f.DecMapIntfIntfV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, canChange bool, - d *Decoder) (_ map[interface{}]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 32) - v = make(map[interface{}]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk interface{} - var mv interface{} - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfStringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]string) - v, changed := fastpathTV.DecMapIntfStringV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfStringV(rv2i(rv).(map[interface{}]string), false, d) - } -} -func (f fastpathT) DecMapIntfStringX(vp *map[interface{}]string, d *Decoder) { - v, changed := f.DecMapIntfStringV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, canChange bool, - d *Decoder) (_ map[interface{}]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 32) - v = make(map[interface{}]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv string - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfUintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]uint) - v, changed := fastpathTV.DecMapIntfUintV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfUintV(rv2i(rv).(map[interface{}]uint), false, d) - } -} -func (f fastpathT) DecMapIntfUintX(vp *map[interface{}]uint, d *Decoder) { - v, changed := f.DecMapIntfUintV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, canChange bool, - d *Decoder) (_ map[interface{}]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[interface{}]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv uint - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfUint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]uint8) - v, changed := fastpathTV.DecMapIntfUint8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfUint8V(rv2i(rv).(map[interface{}]uint8), false, d) - } -} -func (f fastpathT) DecMapIntfUint8X(vp *map[interface{}]uint8, d *Decoder) { - v, changed := f.DecMapIntfUint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, canChange bool, - d *Decoder) (_ map[interface{}]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) - v = make(map[interface{}]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv uint8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfUint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]uint16) - v, changed := fastpathTV.DecMapIntfUint16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfUint16V(rv2i(rv).(map[interface{}]uint16), false, d) - } -} -func (f fastpathT) DecMapIntfUint16X(vp *map[interface{}]uint16, d *Decoder) { - v, changed := f.DecMapIntfUint16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, canChange bool, - d *Decoder) (_ map[interface{}]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) - v = make(map[interface{}]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv uint16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfUint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]uint32) - v, changed := fastpathTV.DecMapIntfUint32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfUint32V(rv2i(rv).(map[interface{}]uint32), false, d) - } -} -func (f fastpathT) DecMapIntfUint32X(vp *map[interface{}]uint32, d *Decoder) { - v, changed := f.DecMapIntfUint32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, canChange bool, - d *Decoder) (_ map[interface{}]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) - v = make(map[interface{}]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv uint32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfUint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]uint64) - v, changed := fastpathTV.DecMapIntfUint64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfUint64V(rv2i(rv).(map[interface{}]uint64), false, d) - } -} -func (f fastpathT) DecMapIntfUint64X(vp *map[interface{}]uint64, d *Decoder) { - v, changed := f.DecMapIntfUint64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, canChange bool, - d *Decoder) (_ map[interface{}]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[interface{}]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv uint64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfUintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]uintptr) - v, changed := fastpathTV.DecMapIntfUintptrV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfUintptrV(rv2i(rv).(map[interface{}]uintptr), false, d) - } -} -func (f fastpathT) DecMapIntfUintptrX(vp *map[interface{}]uintptr, d *Decoder) { - v, changed := f.DecMapIntfUintptrV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, canChange bool, - d *Decoder) (_ map[interface{}]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[interface{}]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv uintptr - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfIntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]int) - v, changed := fastpathTV.DecMapIntfIntV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfIntV(rv2i(rv).(map[interface{}]int), false, d) - } -} -func (f fastpathT) DecMapIntfIntX(vp *map[interface{}]int, d *Decoder) { - v, changed := f.DecMapIntfIntV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, canChange bool, - d *Decoder) (_ map[interface{}]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[interface{}]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv int - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfInt8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]int8) - v, changed := fastpathTV.DecMapIntfInt8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfInt8V(rv2i(rv).(map[interface{}]int8), false, d) - } -} -func (f fastpathT) DecMapIntfInt8X(vp *map[interface{}]int8, d *Decoder) { - v, changed := f.DecMapIntfInt8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, canChange bool, - d *Decoder) (_ map[interface{}]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) - v = make(map[interface{}]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv int8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfInt16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]int16) - v, changed := fastpathTV.DecMapIntfInt16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfInt16V(rv2i(rv).(map[interface{}]int16), false, d) - } -} -func (f fastpathT) DecMapIntfInt16X(vp *map[interface{}]int16, d *Decoder) { - v, changed := f.DecMapIntfInt16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, canChange bool, - d *Decoder) (_ map[interface{}]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) - v = make(map[interface{}]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv int16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfInt32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]int32) - v, changed := fastpathTV.DecMapIntfInt32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfInt32V(rv2i(rv).(map[interface{}]int32), false, d) - } -} -func (f fastpathT) DecMapIntfInt32X(vp *map[interface{}]int32, d *Decoder) { - v, changed := f.DecMapIntfInt32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, canChange bool, - d *Decoder) (_ map[interface{}]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) - v = make(map[interface{}]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv int32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfInt64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]int64) - v, changed := fastpathTV.DecMapIntfInt64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfInt64V(rv2i(rv).(map[interface{}]int64), false, d) - } -} -func (f fastpathT) DecMapIntfInt64X(vp *map[interface{}]int64, d *Decoder) { - v, changed := f.DecMapIntfInt64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, canChange bool, - d *Decoder) (_ map[interface{}]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[interface{}]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv int64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfFloat32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]float32) - v, changed := fastpathTV.DecMapIntfFloat32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfFloat32V(rv2i(rv).(map[interface{}]float32), false, d) - } -} -func (f fastpathT) DecMapIntfFloat32X(vp *map[interface{}]float32, d *Decoder) { - v, changed := f.DecMapIntfFloat32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, canChange bool, - d *Decoder) (_ map[interface{}]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) - v = make(map[interface{}]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv float32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfFloat64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]float64) - v, changed := fastpathTV.DecMapIntfFloat64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfFloat64V(rv2i(rv).(map[interface{}]float64), false, d) - } -} -func (f fastpathT) DecMapIntfFloat64X(vp *map[interface{}]float64, d *Decoder) { - v, changed := f.DecMapIntfFloat64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, canChange bool, - d *Decoder) (_ map[interface{}]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[interface{}]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv float64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntfBoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[interface{}]bool) - v, changed := fastpathTV.DecMapIntfBoolV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntfBoolV(rv2i(rv).(map[interface{}]bool), false, d) - } -} -func (f fastpathT) DecMapIntfBoolX(vp *map[interface{}]bool, d *Decoder) { - v, changed := f.DecMapIntfBoolV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, canChange bool, - d *Decoder) (_ map[interface{}]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) - v = make(map[interface{}]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk interface{} - var mv bool - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = nil - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = d.string(bv) - } - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringIntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]interface{}) - v, changed := fastpathTV.DecMapStringIntfV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringIntfV(rv2i(rv).(map[string]interface{}), false, d) - } -} -func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, d *Decoder) { - v, changed := f.DecMapStringIntfV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, canChange bool, - d *Decoder) (_ map[string]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 32) - v = make(map[string]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk string - var mv interface{} - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringStringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]string) - v, changed := fastpathTV.DecMapStringStringV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringStringV(rv2i(rv).(map[string]string), false, d) - } -} -func (f fastpathT) DecMapStringStringX(vp *map[string]string, d *Decoder) { - v, changed := f.DecMapStringStringV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringStringV(v map[string]string, canChange bool, - d *Decoder) (_ map[string]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 32) - v = make(map[string]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv string - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringUintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]uint) - v, changed := fastpathTV.DecMapStringUintV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringUintV(rv2i(rv).(map[string]uint), false, d) - } -} -func (f fastpathT) DecMapStringUintX(vp *map[string]uint, d *Decoder) { - v, changed := f.DecMapStringUintV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringUintV(v map[string]uint, canChange bool, - d *Decoder) (_ map[string]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[string]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv uint - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringUint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]uint8) - v, changed := fastpathTV.DecMapStringUint8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringUint8V(rv2i(rv).(map[string]uint8), false, d) - } -} -func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, d *Decoder) { - v, changed := f.DecMapStringUint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, canChange bool, - d *Decoder) (_ map[string]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) - v = make(map[string]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv uint8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringUint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]uint16) - v, changed := fastpathTV.DecMapStringUint16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringUint16V(rv2i(rv).(map[string]uint16), false, d) - } -} -func (f fastpathT) DecMapStringUint16X(vp *map[string]uint16, d *Decoder) { - v, changed := f.DecMapStringUint16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, canChange bool, - d *Decoder) (_ map[string]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) - v = make(map[string]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv uint16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringUint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]uint32) - v, changed := fastpathTV.DecMapStringUint32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringUint32V(rv2i(rv).(map[string]uint32), false, d) - } -} -func (f fastpathT) DecMapStringUint32X(vp *map[string]uint32, d *Decoder) { - v, changed := f.DecMapStringUint32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, canChange bool, - d *Decoder) (_ map[string]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) - v = make(map[string]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv uint32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringUint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]uint64) - v, changed := fastpathTV.DecMapStringUint64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringUint64V(rv2i(rv).(map[string]uint64), false, d) - } -} -func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, d *Decoder) { - v, changed := f.DecMapStringUint64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, canChange bool, - d *Decoder) (_ map[string]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[string]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv uint64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringUintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]uintptr) - v, changed := fastpathTV.DecMapStringUintptrV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringUintptrV(rv2i(rv).(map[string]uintptr), false, d) - } -} -func (f fastpathT) DecMapStringUintptrX(vp *map[string]uintptr, d *Decoder) { - v, changed := f.DecMapStringUintptrV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, canChange bool, - d *Decoder) (_ map[string]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[string]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv uintptr - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringIntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]int) - v, changed := fastpathTV.DecMapStringIntV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringIntV(rv2i(rv).(map[string]int), false, d) - } -} -func (f fastpathT) DecMapStringIntX(vp *map[string]int, d *Decoder) { - v, changed := f.DecMapStringIntV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringIntV(v map[string]int, canChange bool, - d *Decoder) (_ map[string]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[string]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv int - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringInt8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]int8) - v, changed := fastpathTV.DecMapStringInt8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringInt8V(rv2i(rv).(map[string]int8), false, d) - } -} -func (f fastpathT) DecMapStringInt8X(vp *map[string]int8, d *Decoder) { - v, changed := f.DecMapStringInt8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringInt8V(v map[string]int8, canChange bool, - d *Decoder) (_ map[string]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) - v = make(map[string]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv int8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringInt16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]int16) - v, changed := fastpathTV.DecMapStringInt16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringInt16V(rv2i(rv).(map[string]int16), false, d) - } -} -func (f fastpathT) DecMapStringInt16X(vp *map[string]int16, d *Decoder) { - v, changed := f.DecMapStringInt16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringInt16V(v map[string]int16, canChange bool, - d *Decoder) (_ map[string]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) - v = make(map[string]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv int16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringInt32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]int32) - v, changed := fastpathTV.DecMapStringInt32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringInt32V(rv2i(rv).(map[string]int32), false, d) - } -} -func (f fastpathT) DecMapStringInt32X(vp *map[string]int32, d *Decoder) { - v, changed := f.DecMapStringInt32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringInt32V(v map[string]int32, canChange bool, - d *Decoder) (_ map[string]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) - v = make(map[string]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv int32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringInt64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]int64) - v, changed := fastpathTV.DecMapStringInt64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringInt64V(rv2i(rv).(map[string]int64), false, d) - } -} -func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, d *Decoder) { - v, changed := f.DecMapStringInt64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringInt64V(v map[string]int64, canChange bool, - d *Decoder) (_ map[string]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[string]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv int64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringFloat32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]float32) - v, changed := fastpathTV.DecMapStringFloat32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringFloat32V(rv2i(rv).(map[string]float32), false, d) - } -} -func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, d *Decoder) { - v, changed := f.DecMapStringFloat32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, canChange bool, - d *Decoder) (_ map[string]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) - v = make(map[string]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv float32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringFloat64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]float64) - v, changed := fastpathTV.DecMapStringFloat64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringFloat64V(rv2i(rv).(map[string]float64), false, d) - } -} -func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, d *Decoder) { - v, changed := f.DecMapStringFloat64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, canChange bool, - d *Decoder) (_ map[string]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[string]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv float64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapStringBoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[string]bool) - v, changed := fastpathTV.DecMapStringBoolV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapStringBoolV(rv2i(rv).(map[string]bool), false, d) - } -} -func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, d *Decoder) { - v, changed := f.DecMapStringBoolV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapStringBoolV(v map[string]bool, canChange bool, - d *Decoder) (_ map[string]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) - v = make(map[string]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk string - var mv bool - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeString() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32IntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]interface{}) - v, changed := fastpathTV.DecMapFloat32IntfV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32IntfV(rv2i(rv).(map[float32]interface{}), false, d) - } -} -func (f fastpathT) DecMapFloat32IntfX(vp *map[float32]interface{}, d *Decoder) { - v, changed := f.DecMapFloat32IntfV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, canChange bool, - d *Decoder) (_ map[float32]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) - v = make(map[float32]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk float32 - var mv interface{} - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32StringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]string) - v, changed := fastpathTV.DecMapFloat32StringV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32StringV(rv2i(rv).(map[float32]string), false, d) - } -} -func (f fastpathT) DecMapFloat32StringX(vp *map[float32]string, d *Decoder) { - v, changed := f.DecMapFloat32StringV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, canChange bool, - d *Decoder) (_ map[float32]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) - v = make(map[float32]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv string - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32UintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]uint) - v, changed := fastpathTV.DecMapFloat32UintV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32UintV(rv2i(rv).(map[float32]uint), false, d) - } -} -func (f fastpathT) DecMapFloat32UintX(vp *map[float32]uint, d *Decoder) { - v, changed := f.DecMapFloat32UintV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, canChange bool, - d *Decoder) (_ map[float32]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[float32]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv uint - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32Uint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]uint8) - v, changed := fastpathTV.DecMapFloat32Uint8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32Uint8V(rv2i(rv).(map[float32]uint8), false, d) - } -} -func (f fastpathT) DecMapFloat32Uint8X(vp *map[float32]uint8, d *Decoder) { - v, changed := f.DecMapFloat32Uint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, canChange bool, - d *Decoder) (_ map[float32]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[float32]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv uint8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32Uint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]uint16) - v, changed := fastpathTV.DecMapFloat32Uint16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32Uint16V(rv2i(rv).(map[float32]uint16), false, d) - } -} -func (f fastpathT) DecMapFloat32Uint16X(vp *map[float32]uint16, d *Decoder) { - v, changed := f.DecMapFloat32Uint16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, canChange bool, - d *Decoder) (_ map[float32]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) - v = make(map[float32]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv uint16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32Uint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]uint32) - v, changed := fastpathTV.DecMapFloat32Uint32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32Uint32V(rv2i(rv).(map[float32]uint32), false, d) - } -} -func (f fastpathT) DecMapFloat32Uint32X(vp *map[float32]uint32, d *Decoder) { - v, changed := f.DecMapFloat32Uint32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, canChange bool, - d *Decoder) (_ map[float32]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) - v = make(map[float32]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv uint32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32Uint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]uint64) - v, changed := fastpathTV.DecMapFloat32Uint64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32Uint64V(rv2i(rv).(map[float32]uint64), false, d) - } -} -func (f fastpathT) DecMapFloat32Uint64X(vp *map[float32]uint64, d *Decoder) { - v, changed := f.DecMapFloat32Uint64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, canChange bool, - d *Decoder) (_ map[float32]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[float32]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv uint64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32UintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]uintptr) - v, changed := fastpathTV.DecMapFloat32UintptrV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32UintptrV(rv2i(rv).(map[float32]uintptr), false, d) - } -} -func (f fastpathT) DecMapFloat32UintptrX(vp *map[float32]uintptr, d *Decoder) { - v, changed := f.DecMapFloat32UintptrV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, canChange bool, - d *Decoder) (_ map[float32]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[float32]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv uintptr - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32IntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]int) - v, changed := fastpathTV.DecMapFloat32IntV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32IntV(rv2i(rv).(map[float32]int), false, d) - } -} -func (f fastpathT) DecMapFloat32IntX(vp *map[float32]int, d *Decoder) { - v, changed := f.DecMapFloat32IntV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, canChange bool, - d *Decoder) (_ map[float32]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[float32]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv int - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32Int8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]int8) - v, changed := fastpathTV.DecMapFloat32Int8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32Int8V(rv2i(rv).(map[float32]int8), false, d) - } -} -func (f fastpathT) DecMapFloat32Int8X(vp *map[float32]int8, d *Decoder) { - v, changed := f.DecMapFloat32Int8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, canChange bool, - d *Decoder) (_ map[float32]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[float32]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv int8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32Int16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]int16) - v, changed := fastpathTV.DecMapFloat32Int16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32Int16V(rv2i(rv).(map[float32]int16), false, d) - } -} -func (f fastpathT) DecMapFloat32Int16X(vp *map[float32]int16, d *Decoder) { - v, changed := f.DecMapFloat32Int16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, canChange bool, - d *Decoder) (_ map[float32]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) - v = make(map[float32]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv int16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32Int32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]int32) - v, changed := fastpathTV.DecMapFloat32Int32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32Int32V(rv2i(rv).(map[float32]int32), false, d) - } -} -func (f fastpathT) DecMapFloat32Int32X(vp *map[float32]int32, d *Decoder) { - v, changed := f.DecMapFloat32Int32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, canChange bool, - d *Decoder) (_ map[float32]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) - v = make(map[float32]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv int32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32Int64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]int64) - v, changed := fastpathTV.DecMapFloat32Int64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32Int64V(rv2i(rv).(map[float32]int64), false, d) - } -} -func (f fastpathT) DecMapFloat32Int64X(vp *map[float32]int64, d *Decoder) { - v, changed := f.DecMapFloat32Int64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, canChange bool, - d *Decoder) (_ map[float32]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[float32]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv int64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32Float32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]float32) - v, changed := fastpathTV.DecMapFloat32Float32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32Float32V(rv2i(rv).(map[float32]float32), false, d) - } -} -func (f fastpathT) DecMapFloat32Float32X(vp *map[float32]float32, d *Decoder) { - v, changed := f.DecMapFloat32Float32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, canChange bool, - d *Decoder) (_ map[float32]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) - v = make(map[float32]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv float32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32Float64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]float64) - v, changed := fastpathTV.DecMapFloat32Float64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32Float64V(rv2i(rv).(map[float32]float64), false, d) - } -} -func (f fastpathT) DecMapFloat32Float64X(vp *map[float32]float64, d *Decoder) { - v, changed := f.DecMapFloat32Float64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, canChange bool, - d *Decoder) (_ map[float32]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[float32]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv float64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat32BoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float32]bool) - v, changed := fastpathTV.DecMapFloat32BoolV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat32BoolV(rv2i(rv).(map[float32]bool), false, d) - } -} -func (f fastpathT) DecMapFloat32BoolX(vp *map[float32]bool, d *Decoder) { - v, changed := f.DecMapFloat32BoolV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, canChange bool, - d *Decoder) (_ map[float32]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[float32]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float32 - var mv bool - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64IntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]interface{}) - v, changed := fastpathTV.DecMapFloat64IntfV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64IntfV(rv2i(rv).(map[float64]interface{}), false, d) - } -} -func (f fastpathT) DecMapFloat64IntfX(vp *map[float64]interface{}, d *Decoder) { - v, changed := f.DecMapFloat64IntfV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, canChange bool, - d *Decoder) (_ map[float64]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[float64]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk float64 - var mv interface{} - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64StringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]string) - v, changed := fastpathTV.DecMapFloat64StringV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64StringV(rv2i(rv).(map[float64]string), false, d) - } -} -func (f fastpathT) DecMapFloat64StringX(vp *map[float64]string, d *Decoder) { - v, changed := f.DecMapFloat64StringV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, canChange bool, - d *Decoder) (_ map[float64]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[float64]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv string - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64UintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]uint) - v, changed := fastpathTV.DecMapFloat64UintV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64UintV(rv2i(rv).(map[float64]uint), false, d) - } -} -func (f fastpathT) DecMapFloat64UintX(vp *map[float64]uint, d *Decoder) { - v, changed := f.DecMapFloat64UintV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, canChange bool, - d *Decoder) (_ map[float64]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[float64]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv uint - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64Uint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]uint8) - v, changed := fastpathTV.DecMapFloat64Uint8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64Uint8V(rv2i(rv).(map[float64]uint8), false, d) - } -} -func (f fastpathT) DecMapFloat64Uint8X(vp *map[float64]uint8, d *Decoder) { - v, changed := f.DecMapFloat64Uint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, canChange bool, - d *Decoder) (_ map[float64]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[float64]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv uint8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64Uint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]uint16) - v, changed := fastpathTV.DecMapFloat64Uint16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64Uint16V(rv2i(rv).(map[float64]uint16), false, d) - } -} -func (f fastpathT) DecMapFloat64Uint16X(vp *map[float64]uint16, d *Decoder) { - v, changed := f.DecMapFloat64Uint16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, canChange bool, - d *Decoder) (_ map[float64]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[float64]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv uint16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64Uint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]uint32) - v, changed := fastpathTV.DecMapFloat64Uint32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64Uint32V(rv2i(rv).(map[float64]uint32), false, d) - } -} -func (f fastpathT) DecMapFloat64Uint32X(vp *map[float64]uint32, d *Decoder) { - v, changed := f.DecMapFloat64Uint32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, canChange bool, - d *Decoder) (_ map[float64]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[float64]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv uint32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64Uint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]uint64) - v, changed := fastpathTV.DecMapFloat64Uint64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64Uint64V(rv2i(rv).(map[float64]uint64), false, d) - } -} -func (f fastpathT) DecMapFloat64Uint64X(vp *map[float64]uint64, d *Decoder) { - v, changed := f.DecMapFloat64Uint64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, canChange bool, - d *Decoder) (_ map[float64]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[float64]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv uint64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64UintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]uintptr) - v, changed := fastpathTV.DecMapFloat64UintptrV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64UintptrV(rv2i(rv).(map[float64]uintptr), false, d) - } -} -func (f fastpathT) DecMapFloat64UintptrX(vp *map[float64]uintptr, d *Decoder) { - v, changed := f.DecMapFloat64UintptrV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, canChange bool, - d *Decoder) (_ map[float64]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[float64]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv uintptr - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64IntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]int) - v, changed := fastpathTV.DecMapFloat64IntV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64IntV(rv2i(rv).(map[float64]int), false, d) - } -} -func (f fastpathT) DecMapFloat64IntX(vp *map[float64]int, d *Decoder) { - v, changed := f.DecMapFloat64IntV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, canChange bool, - d *Decoder) (_ map[float64]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[float64]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv int - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64Int8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]int8) - v, changed := fastpathTV.DecMapFloat64Int8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64Int8V(rv2i(rv).(map[float64]int8), false, d) - } -} -func (f fastpathT) DecMapFloat64Int8X(vp *map[float64]int8, d *Decoder) { - v, changed := f.DecMapFloat64Int8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, canChange bool, - d *Decoder) (_ map[float64]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[float64]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv int8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64Int16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]int16) - v, changed := fastpathTV.DecMapFloat64Int16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64Int16V(rv2i(rv).(map[float64]int16), false, d) - } -} -func (f fastpathT) DecMapFloat64Int16X(vp *map[float64]int16, d *Decoder) { - v, changed := f.DecMapFloat64Int16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, canChange bool, - d *Decoder) (_ map[float64]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[float64]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv int16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64Int32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]int32) - v, changed := fastpathTV.DecMapFloat64Int32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64Int32V(rv2i(rv).(map[float64]int32), false, d) - } -} -func (f fastpathT) DecMapFloat64Int32X(vp *map[float64]int32, d *Decoder) { - v, changed := f.DecMapFloat64Int32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, canChange bool, - d *Decoder) (_ map[float64]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[float64]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv int32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64Int64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]int64) - v, changed := fastpathTV.DecMapFloat64Int64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64Int64V(rv2i(rv).(map[float64]int64), false, d) - } -} -func (f fastpathT) DecMapFloat64Int64X(vp *map[float64]int64, d *Decoder) { - v, changed := f.DecMapFloat64Int64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, canChange bool, - d *Decoder) (_ map[float64]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[float64]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv int64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64Float32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]float32) - v, changed := fastpathTV.DecMapFloat64Float32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64Float32V(rv2i(rv).(map[float64]float32), false, d) - } -} -func (f fastpathT) DecMapFloat64Float32X(vp *map[float64]float32, d *Decoder) { - v, changed := f.DecMapFloat64Float32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, canChange bool, - d *Decoder) (_ map[float64]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[float64]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv float32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64Float64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]float64) - v, changed := fastpathTV.DecMapFloat64Float64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64Float64V(rv2i(rv).(map[float64]float64), false, d) - } -} -func (f fastpathT) DecMapFloat64Float64X(vp *map[float64]float64, d *Decoder) { - v, changed := f.DecMapFloat64Float64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, canChange bool, - d *Decoder) (_ map[float64]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[float64]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv float64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapFloat64BoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[float64]bool) - v, changed := fastpathTV.DecMapFloat64BoolV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapFloat64BoolV(rv2i(rv).(map[float64]bool), false, d) - } -} -func (f fastpathT) DecMapFloat64BoolX(vp *map[float64]bool, d *Decoder) { - v, changed := f.DecMapFloat64BoolV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, canChange bool, - d *Decoder) (_ map[float64]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[float64]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk float64 - var mv bool - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeFloat64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintIntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]interface{}) - v, changed := fastpathTV.DecMapUintIntfV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintIntfV(rv2i(rv).(map[uint]interface{}), false, d) - } -} -func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, d *Decoder) { - v, changed := f.DecMapUintIntfV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, canChange bool, - d *Decoder) (_ map[uint]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[uint]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk uint - var mv interface{} - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintStringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]string) - v, changed := fastpathTV.DecMapUintStringV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintStringV(rv2i(rv).(map[uint]string), false, d) - } -} -func (f fastpathT) DecMapUintStringX(vp *map[uint]string, d *Decoder) { - v, changed := f.DecMapUintStringV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintStringV(v map[uint]string, canChange bool, - d *Decoder) (_ map[uint]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[uint]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv string - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintUintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]uint) - v, changed := fastpathTV.DecMapUintUintV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintUintV(rv2i(rv).(map[uint]uint), false, d) - } -} -func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, d *Decoder) { - v, changed := f.DecMapUintUintV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintUintV(v map[uint]uint, canChange bool, - d *Decoder) (_ map[uint]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uint]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv uint - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintUint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]uint8) - v, changed := fastpathTV.DecMapUintUint8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintUint8V(rv2i(rv).(map[uint]uint8), false, d) - } -} -func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, d *Decoder) { - v, changed := f.DecMapUintUint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, canChange bool, - d *Decoder) (_ map[uint]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uint]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv uint8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintUint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]uint16) - v, changed := fastpathTV.DecMapUintUint16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintUint16V(rv2i(rv).(map[uint]uint16), false, d) - } -} -func (f fastpathT) DecMapUintUint16X(vp *map[uint]uint16, d *Decoder) { - v, changed := f.DecMapUintUint16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, canChange bool, - d *Decoder) (_ map[uint]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[uint]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv uint16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintUint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]uint32) - v, changed := fastpathTV.DecMapUintUint32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintUint32V(rv2i(rv).(map[uint]uint32), false, d) - } -} -func (f fastpathT) DecMapUintUint32X(vp *map[uint]uint32, d *Decoder) { - v, changed := f.DecMapUintUint32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, canChange bool, - d *Decoder) (_ map[uint]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uint]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv uint32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintUint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]uint64) - v, changed := fastpathTV.DecMapUintUint64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintUint64V(rv2i(rv).(map[uint]uint64), false, d) - } -} -func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, d *Decoder) { - v, changed := f.DecMapUintUint64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, canChange bool, - d *Decoder) (_ map[uint]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uint]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv uint64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintUintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]uintptr) - v, changed := fastpathTV.DecMapUintUintptrV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintUintptrV(rv2i(rv).(map[uint]uintptr), false, d) - } -} -func (f fastpathT) DecMapUintUintptrX(vp *map[uint]uintptr, d *Decoder) { - v, changed := f.DecMapUintUintptrV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, canChange bool, - d *Decoder) (_ map[uint]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uint]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv uintptr - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintIntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]int) - v, changed := fastpathTV.DecMapUintIntV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintIntV(rv2i(rv).(map[uint]int), false, d) - } -} -func (f fastpathT) DecMapUintIntX(vp *map[uint]int, d *Decoder) { - v, changed := f.DecMapUintIntV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintIntV(v map[uint]int, canChange bool, - d *Decoder) (_ map[uint]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uint]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv int - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintInt8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]int8) - v, changed := fastpathTV.DecMapUintInt8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintInt8V(rv2i(rv).(map[uint]int8), false, d) - } -} -func (f fastpathT) DecMapUintInt8X(vp *map[uint]int8, d *Decoder) { - v, changed := f.DecMapUintInt8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, canChange bool, - d *Decoder) (_ map[uint]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uint]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv int8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintInt16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]int16) - v, changed := fastpathTV.DecMapUintInt16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintInt16V(rv2i(rv).(map[uint]int16), false, d) - } -} -func (f fastpathT) DecMapUintInt16X(vp *map[uint]int16, d *Decoder) { - v, changed := f.DecMapUintInt16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, canChange bool, - d *Decoder) (_ map[uint]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[uint]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv int16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintInt32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]int32) - v, changed := fastpathTV.DecMapUintInt32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintInt32V(rv2i(rv).(map[uint]int32), false, d) - } -} -func (f fastpathT) DecMapUintInt32X(vp *map[uint]int32, d *Decoder) { - v, changed := f.DecMapUintInt32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, canChange bool, - d *Decoder) (_ map[uint]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uint]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv int32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintInt64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]int64) - v, changed := fastpathTV.DecMapUintInt64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintInt64V(rv2i(rv).(map[uint]int64), false, d) - } -} -func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, d *Decoder) { - v, changed := f.DecMapUintInt64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, canChange bool, - d *Decoder) (_ map[uint]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uint]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv int64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintFloat32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]float32) - v, changed := fastpathTV.DecMapUintFloat32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintFloat32V(rv2i(rv).(map[uint]float32), false, d) - } -} -func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, d *Decoder) { - v, changed := f.DecMapUintFloat32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, canChange bool, - d *Decoder) (_ map[uint]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uint]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv float32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintFloat64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]float64) - v, changed := fastpathTV.DecMapUintFloat64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintFloat64V(rv2i(rv).(map[uint]float64), false, d) - } -} -func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, d *Decoder) { - v, changed := f.DecMapUintFloat64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, canChange bool, - d *Decoder) (_ map[uint]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uint]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv float64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintBoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint]bool) - v, changed := fastpathTV.DecMapUintBoolV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintBoolV(rv2i(rv).(map[uint]bool), false, d) - } -} -func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, d *Decoder) { - v, changed := f.DecMapUintBoolV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, canChange bool, - d *Decoder) (_ map[uint]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uint]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint - var mv bool - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8IntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]interface{}) - v, changed := fastpathTV.DecMapUint8IntfV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8IntfV(rv2i(rv).(map[uint8]interface{}), false, d) - } -} -func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, d *Decoder) { - v, changed := f.DecMapUint8IntfV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, canChange bool, - d *Decoder) (_ map[uint8]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) - v = make(map[uint8]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk uint8 - var mv interface{} - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8StringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]string) - v, changed := fastpathTV.DecMapUint8StringV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8StringV(rv2i(rv).(map[uint8]string), false, d) - } -} -func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, d *Decoder) { - v, changed := f.DecMapUint8StringV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, canChange bool, - d *Decoder) (_ map[uint8]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) - v = make(map[uint8]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv string - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8UintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]uint) - v, changed := fastpathTV.DecMapUint8UintV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8UintV(rv2i(rv).(map[uint8]uint), false, d) - } -} -func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, d *Decoder) { - v, changed := f.DecMapUint8UintV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, canChange bool, - d *Decoder) (_ map[uint8]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uint8]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv uint - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8Uint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]uint8) - v, changed := fastpathTV.DecMapUint8Uint8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8Uint8V(rv2i(rv).(map[uint8]uint8), false, d) - } -} -func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, d *Decoder) { - v, changed := f.DecMapUint8Uint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, canChange bool, - d *Decoder) (_ map[uint8]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) - v = make(map[uint8]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv uint8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8Uint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]uint16) - v, changed := fastpathTV.DecMapUint8Uint16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8Uint16V(rv2i(rv).(map[uint8]uint16), false, d) - } -} -func (f fastpathT) DecMapUint8Uint16X(vp *map[uint8]uint16, d *Decoder) { - v, changed := f.DecMapUint8Uint16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, canChange bool, - d *Decoder) (_ map[uint8]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) - v = make(map[uint8]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv uint16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8Uint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]uint32) - v, changed := fastpathTV.DecMapUint8Uint32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8Uint32V(rv2i(rv).(map[uint8]uint32), false, d) - } -} -func (f fastpathT) DecMapUint8Uint32X(vp *map[uint8]uint32, d *Decoder) { - v, changed := f.DecMapUint8Uint32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, canChange bool, - d *Decoder) (_ map[uint8]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[uint8]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv uint32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8Uint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]uint64) - v, changed := fastpathTV.DecMapUint8Uint64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8Uint64V(rv2i(rv).(map[uint8]uint64), false, d) - } -} -func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, d *Decoder) { - v, changed := f.DecMapUint8Uint64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, canChange bool, - d *Decoder) (_ map[uint8]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uint8]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv uint64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8UintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]uintptr) - v, changed := fastpathTV.DecMapUint8UintptrV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8UintptrV(rv2i(rv).(map[uint8]uintptr), false, d) - } -} -func (f fastpathT) DecMapUint8UintptrX(vp *map[uint8]uintptr, d *Decoder) { - v, changed := f.DecMapUint8UintptrV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, canChange bool, - d *Decoder) (_ map[uint8]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uint8]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv uintptr - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8IntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]int) - v, changed := fastpathTV.DecMapUint8IntV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8IntV(rv2i(rv).(map[uint8]int), false, d) - } -} -func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, d *Decoder) { - v, changed := f.DecMapUint8IntV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, canChange bool, - d *Decoder) (_ map[uint8]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uint8]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv int - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8Int8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]int8) - v, changed := fastpathTV.DecMapUint8Int8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8Int8V(rv2i(rv).(map[uint8]int8), false, d) - } -} -func (f fastpathT) DecMapUint8Int8X(vp *map[uint8]int8, d *Decoder) { - v, changed := f.DecMapUint8Int8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, canChange bool, - d *Decoder) (_ map[uint8]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) - v = make(map[uint8]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv int8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8Int16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]int16) - v, changed := fastpathTV.DecMapUint8Int16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8Int16V(rv2i(rv).(map[uint8]int16), false, d) - } -} -func (f fastpathT) DecMapUint8Int16X(vp *map[uint8]int16, d *Decoder) { - v, changed := f.DecMapUint8Int16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, canChange bool, - d *Decoder) (_ map[uint8]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) - v = make(map[uint8]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv int16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8Int32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]int32) - v, changed := fastpathTV.DecMapUint8Int32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8Int32V(rv2i(rv).(map[uint8]int32), false, d) - } -} -func (f fastpathT) DecMapUint8Int32X(vp *map[uint8]int32, d *Decoder) { - v, changed := f.DecMapUint8Int32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, canChange bool, - d *Decoder) (_ map[uint8]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[uint8]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv int32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8Int64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]int64) - v, changed := fastpathTV.DecMapUint8Int64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8Int64V(rv2i(rv).(map[uint8]int64), false, d) - } -} -func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, d *Decoder) { - v, changed := f.DecMapUint8Int64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, canChange bool, - d *Decoder) (_ map[uint8]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uint8]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv int64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8Float32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]float32) - v, changed := fastpathTV.DecMapUint8Float32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8Float32V(rv2i(rv).(map[uint8]float32), false, d) - } -} -func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, d *Decoder) { - v, changed := f.DecMapUint8Float32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, canChange bool, - d *Decoder) (_ map[uint8]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[uint8]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv float32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8Float64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]float64) - v, changed := fastpathTV.DecMapUint8Float64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8Float64V(rv2i(rv).(map[uint8]float64), false, d) - } -} -func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, d *Decoder) { - v, changed := f.DecMapUint8Float64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, canChange bool, - d *Decoder) (_ map[uint8]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uint8]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv float64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint8BoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint8]bool) - v, changed := fastpathTV.DecMapUint8BoolV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint8BoolV(rv2i(rv).(map[uint8]bool), false, d) - } -} -func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, d *Decoder) { - v, changed := f.DecMapUint8BoolV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, canChange bool, - d *Decoder) (_ map[uint8]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) - v = make(map[uint8]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint8 - var mv bool - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16IntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]interface{}) - v, changed := fastpathTV.DecMapUint16IntfV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16IntfV(rv2i(rv).(map[uint16]interface{}), false, d) - } -} -func (f fastpathT) DecMapUint16IntfX(vp *map[uint16]interface{}, d *Decoder) { - v, changed := f.DecMapUint16IntfV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, canChange bool, - d *Decoder) (_ map[uint16]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) - v = make(map[uint16]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk uint16 - var mv interface{} - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16StringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]string) - v, changed := fastpathTV.DecMapUint16StringV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16StringV(rv2i(rv).(map[uint16]string), false, d) - } -} -func (f fastpathT) DecMapUint16StringX(vp *map[uint16]string, d *Decoder) { - v, changed := f.DecMapUint16StringV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, canChange bool, - d *Decoder) (_ map[uint16]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) - v = make(map[uint16]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv string - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16UintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]uint) - v, changed := fastpathTV.DecMapUint16UintV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16UintV(rv2i(rv).(map[uint16]uint), false, d) - } -} -func (f fastpathT) DecMapUint16UintX(vp *map[uint16]uint, d *Decoder) { - v, changed := f.DecMapUint16UintV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, canChange bool, - d *Decoder) (_ map[uint16]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[uint16]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv uint - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16Uint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]uint8) - v, changed := fastpathTV.DecMapUint16Uint8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16Uint8V(rv2i(rv).(map[uint16]uint8), false, d) - } -} -func (f fastpathT) DecMapUint16Uint8X(vp *map[uint16]uint8, d *Decoder) { - v, changed := f.DecMapUint16Uint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, canChange bool, - d *Decoder) (_ map[uint16]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) - v = make(map[uint16]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv uint8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16Uint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]uint16) - v, changed := fastpathTV.DecMapUint16Uint16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16Uint16V(rv2i(rv).(map[uint16]uint16), false, d) - } -} -func (f fastpathT) DecMapUint16Uint16X(vp *map[uint16]uint16, d *Decoder) { - v, changed := f.DecMapUint16Uint16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, canChange bool, - d *Decoder) (_ map[uint16]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 4) - v = make(map[uint16]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv uint16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16Uint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]uint32) - v, changed := fastpathTV.DecMapUint16Uint32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16Uint32V(rv2i(rv).(map[uint16]uint32), false, d) - } -} -func (f fastpathT) DecMapUint16Uint32X(vp *map[uint16]uint32, d *Decoder) { - v, changed := f.DecMapUint16Uint32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, canChange bool, - d *Decoder) (_ map[uint16]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) - v = make(map[uint16]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv uint32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16Uint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]uint64) - v, changed := fastpathTV.DecMapUint16Uint64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16Uint64V(rv2i(rv).(map[uint16]uint64), false, d) - } -} -func (f fastpathT) DecMapUint16Uint64X(vp *map[uint16]uint64, d *Decoder) { - v, changed := f.DecMapUint16Uint64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, canChange bool, - d *Decoder) (_ map[uint16]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[uint16]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv uint64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16UintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]uintptr) - v, changed := fastpathTV.DecMapUint16UintptrV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16UintptrV(rv2i(rv).(map[uint16]uintptr), false, d) - } -} -func (f fastpathT) DecMapUint16UintptrX(vp *map[uint16]uintptr, d *Decoder) { - v, changed := f.DecMapUint16UintptrV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, canChange bool, - d *Decoder) (_ map[uint16]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[uint16]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv uintptr - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16IntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]int) - v, changed := fastpathTV.DecMapUint16IntV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16IntV(rv2i(rv).(map[uint16]int), false, d) - } -} -func (f fastpathT) DecMapUint16IntX(vp *map[uint16]int, d *Decoder) { - v, changed := f.DecMapUint16IntV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, canChange bool, - d *Decoder) (_ map[uint16]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[uint16]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv int - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16Int8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]int8) - v, changed := fastpathTV.DecMapUint16Int8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16Int8V(rv2i(rv).(map[uint16]int8), false, d) - } -} -func (f fastpathT) DecMapUint16Int8X(vp *map[uint16]int8, d *Decoder) { - v, changed := f.DecMapUint16Int8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, canChange bool, - d *Decoder) (_ map[uint16]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) - v = make(map[uint16]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv int8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16Int16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]int16) - v, changed := fastpathTV.DecMapUint16Int16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16Int16V(rv2i(rv).(map[uint16]int16), false, d) - } -} -func (f fastpathT) DecMapUint16Int16X(vp *map[uint16]int16, d *Decoder) { - v, changed := f.DecMapUint16Int16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, canChange bool, - d *Decoder) (_ map[uint16]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 4) - v = make(map[uint16]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv int16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16Int32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]int32) - v, changed := fastpathTV.DecMapUint16Int32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16Int32V(rv2i(rv).(map[uint16]int32), false, d) - } -} -func (f fastpathT) DecMapUint16Int32X(vp *map[uint16]int32, d *Decoder) { - v, changed := f.DecMapUint16Int32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, canChange bool, - d *Decoder) (_ map[uint16]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) - v = make(map[uint16]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv int32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16Int64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]int64) - v, changed := fastpathTV.DecMapUint16Int64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16Int64V(rv2i(rv).(map[uint16]int64), false, d) - } -} -func (f fastpathT) DecMapUint16Int64X(vp *map[uint16]int64, d *Decoder) { - v, changed := f.DecMapUint16Int64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, canChange bool, - d *Decoder) (_ map[uint16]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[uint16]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv int64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16Float32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]float32) - v, changed := fastpathTV.DecMapUint16Float32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16Float32V(rv2i(rv).(map[uint16]float32), false, d) - } -} -func (f fastpathT) DecMapUint16Float32X(vp *map[uint16]float32, d *Decoder) { - v, changed := f.DecMapUint16Float32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, canChange bool, - d *Decoder) (_ map[uint16]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) - v = make(map[uint16]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv float32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16Float64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]float64) - v, changed := fastpathTV.DecMapUint16Float64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16Float64V(rv2i(rv).(map[uint16]float64), false, d) - } -} -func (f fastpathT) DecMapUint16Float64X(vp *map[uint16]float64, d *Decoder) { - v, changed := f.DecMapUint16Float64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, canChange bool, - d *Decoder) (_ map[uint16]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[uint16]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv float64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint16BoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint16]bool) - v, changed := fastpathTV.DecMapUint16BoolV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint16BoolV(rv2i(rv).(map[uint16]bool), false, d) - } -} -func (f fastpathT) DecMapUint16BoolX(vp *map[uint16]bool, d *Decoder) { - v, changed := f.DecMapUint16BoolV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, canChange bool, - d *Decoder) (_ map[uint16]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) - v = make(map[uint16]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint16 - var mv bool - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32IntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]interface{}) - v, changed := fastpathTV.DecMapUint32IntfV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32IntfV(rv2i(rv).(map[uint32]interface{}), false, d) - } -} -func (f fastpathT) DecMapUint32IntfX(vp *map[uint32]interface{}, d *Decoder) { - v, changed := f.DecMapUint32IntfV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, canChange bool, - d *Decoder) (_ map[uint32]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) - v = make(map[uint32]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk uint32 - var mv interface{} - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32StringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]string) - v, changed := fastpathTV.DecMapUint32StringV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32StringV(rv2i(rv).(map[uint32]string), false, d) - } -} -func (f fastpathT) DecMapUint32StringX(vp *map[uint32]string, d *Decoder) { - v, changed := f.DecMapUint32StringV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, canChange bool, - d *Decoder) (_ map[uint32]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) - v = make(map[uint32]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv string - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32UintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]uint) - v, changed := fastpathTV.DecMapUint32UintV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32UintV(rv2i(rv).(map[uint32]uint), false, d) - } -} -func (f fastpathT) DecMapUint32UintX(vp *map[uint32]uint, d *Decoder) { - v, changed := f.DecMapUint32UintV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, canChange bool, - d *Decoder) (_ map[uint32]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uint32]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv uint - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32Uint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]uint8) - v, changed := fastpathTV.DecMapUint32Uint8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32Uint8V(rv2i(rv).(map[uint32]uint8), false, d) - } -} -func (f fastpathT) DecMapUint32Uint8X(vp *map[uint32]uint8, d *Decoder) { - v, changed := f.DecMapUint32Uint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, canChange bool, - d *Decoder) (_ map[uint32]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[uint32]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv uint8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32Uint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]uint16) - v, changed := fastpathTV.DecMapUint32Uint16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32Uint16V(rv2i(rv).(map[uint32]uint16), false, d) - } -} -func (f fastpathT) DecMapUint32Uint16X(vp *map[uint32]uint16, d *Decoder) { - v, changed := f.DecMapUint32Uint16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, canChange bool, - d *Decoder) (_ map[uint32]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) - v = make(map[uint32]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv uint16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32Uint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]uint32) - v, changed := fastpathTV.DecMapUint32Uint32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32Uint32V(rv2i(rv).(map[uint32]uint32), false, d) - } -} -func (f fastpathT) DecMapUint32Uint32X(vp *map[uint32]uint32, d *Decoder) { - v, changed := f.DecMapUint32Uint32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, canChange bool, - d *Decoder) (_ map[uint32]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) - v = make(map[uint32]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv uint32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32Uint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]uint64) - v, changed := fastpathTV.DecMapUint32Uint64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32Uint64V(rv2i(rv).(map[uint32]uint64), false, d) - } -} -func (f fastpathT) DecMapUint32Uint64X(vp *map[uint32]uint64, d *Decoder) { - v, changed := f.DecMapUint32Uint64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, canChange bool, - d *Decoder) (_ map[uint32]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uint32]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv uint64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32UintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]uintptr) - v, changed := fastpathTV.DecMapUint32UintptrV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32UintptrV(rv2i(rv).(map[uint32]uintptr), false, d) - } -} -func (f fastpathT) DecMapUint32UintptrX(vp *map[uint32]uintptr, d *Decoder) { - v, changed := f.DecMapUint32UintptrV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, canChange bool, - d *Decoder) (_ map[uint32]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uint32]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv uintptr - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32IntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]int) - v, changed := fastpathTV.DecMapUint32IntV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32IntV(rv2i(rv).(map[uint32]int), false, d) - } -} -func (f fastpathT) DecMapUint32IntX(vp *map[uint32]int, d *Decoder) { - v, changed := f.DecMapUint32IntV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, canChange bool, - d *Decoder) (_ map[uint32]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uint32]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv int - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32Int8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]int8) - v, changed := fastpathTV.DecMapUint32Int8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32Int8V(rv2i(rv).(map[uint32]int8), false, d) - } -} -func (f fastpathT) DecMapUint32Int8X(vp *map[uint32]int8, d *Decoder) { - v, changed := f.DecMapUint32Int8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, canChange bool, - d *Decoder) (_ map[uint32]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[uint32]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv int8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32Int16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]int16) - v, changed := fastpathTV.DecMapUint32Int16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32Int16V(rv2i(rv).(map[uint32]int16), false, d) - } -} -func (f fastpathT) DecMapUint32Int16X(vp *map[uint32]int16, d *Decoder) { - v, changed := f.DecMapUint32Int16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, canChange bool, - d *Decoder) (_ map[uint32]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) - v = make(map[uint32]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv int16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32Int32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]int32) - v, changed := fastpathTV.DecMapUint32Int32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32Int32V(rv2i(rv).(map[uint32]int32), false, d) - } -} -func (f fastpathT) DecMapUint32Int32X(vp *map[uint32]int32, d *Decoder) { - v, changed := f.DecMapUint32Int32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, canChange bool, - d *Decoder) (_ map[uint32]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) - v = make(map[uint32]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv int32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32Int64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]int64) - v, changed := fastpathTV.DecMapUint32Int64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32Int64V(rv2i(rv).(map[uint32]int64), false, d) - } -} -func (f fastpathT) DecMapUint32Int64X(vp *map[uint32]int64, d *Decoder) { - v, changed := f.DecMapUint32Int64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, canChange bool, - d *Decoder) (_ map[uint32]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uint32]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv int64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32Float32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]float32) - v, changed := fastpathTV.DecMapUint32Float32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32Float32V(rv2i(rv).(map[uint32]float32), false, d) - } -} -func (f fastpathT) DecMapUint32Float32X(vp *map[uint32]float32, d *Decoder) { - v, changed := f.DecMapUint32Float32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, canChange bool, - d *Decoder) (_ map[uint32]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) - v = make(map[uint32]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv float32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32Float64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]float64) - v, changed := fastpathTV.DecMapUint32Float64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32Float64V(rv2i(rv).(map[uint32]float64), false, d) - } -} -func (f fastpathT) DecMapUint32Float64X(vp *map[uint32]float64, d *Decoder) { - v, changed := f.DecMapUint32Float64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, canChange bool, - d *Decoder) (_ map[uint32]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uint32]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv float64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint32BoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint32]bool) - v, changed := fastpathTV.DecMapUint32BoolV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint32BoolV(rv2i(rv).(map[uint32]bool), false, d) - } -} -func (f fastpathT) DecMapUint32BoolX(vp *map[uint32]bool, d *Decoder) { - v, changed := f.DecMapUint32BoolV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, canChange bool, - d *Decoder) (_ map[uint32]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[uint32]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint32 - var mv bool - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64IntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]interface{}) - v, changed := fastpathTV.DecMapUint64IntfV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64IntfV(rv2i(rv).(map[uint64]interface{}), false, d) - } -} -func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, d *Decoder) { - v, changed := f.DecMapUint64IntfV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, canChange bool, - d *Decoder) (_ map[uint64]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[uint64]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk uint64 - var mv interface{} - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64StringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]string) - v, changed := fastpathTV.DecMapUint64StringV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64StringV(rv2i(rv).(map[uint64]string), false, d) - } -} -func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, d *Decoder) { - v, changed := f.DecMapUint64StringV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, canChange bool, - d *Decoder) (_ map[uint64]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[uint64]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv string - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64UintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]uint) - v, changed := fastpathTV.DecMapUint64UintV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64UintV(rv2i(rv).(map[uint64]uint), false, d) - } -} -func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, d *Decoder) { - v, changed := f.DecMapUint64UintV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, canChange bool, - d *Decoder) (_ map[uint64]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uint64]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv uint - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64Uint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]uint8) - v, changed := fastpathTV.DecMapUint64Uint8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64Uint8V(rv2i(rv).(map[uint64]uint8), false, d) - } -} -func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, d *Decoder) { - v, changed := f.DecMapUint64Uint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, canChange bool, - d *Decoder) (_ map[uint64]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uint64]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv uint8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64Uint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]uint16) - v, changed := fastpathTV.DecMapUint64Uint16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64Uint16V(rv2i(rv).(map[uint64]uint16), false, d) - } -} -func (f fastpathT) DecMapUint64Uint16X(vp *map[uint64]uint16, d *Decoder) { - v, changed := f.DecMapUint64Uint16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, canChange bool, - d *Decoder) (_ map[uint64]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[uint64]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv uint16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64Uint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]uint32) - v, changed := fastpathTV.DecMapUint64Uint32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64Uint32V(rv2i(rv).(map[uint64]uint32), false, d) - } -} -func (f fastpathT) DecMapUint64Uint32X(vp *map[uint64]uint32, d *Decoder) { - v, changed := f.DecMapUint64Uint32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, canChange bool, - d *Decoder) (_ map[uint64]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uint64]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv uint32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64Uint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]uint64) - v, changed := fastpathTV.DecMapUint64Uint64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64Uint64V(rv2i(rv).(map[uint64]uint64), false, d) - } -} -func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, d *Decoder) { - v, changed := f.DecMapUint64Uint64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, canChange bool, - d *Decoder) (_ map[uint64]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uint64]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv uint64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64UintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]uintptr) - v, changed := fastpathTV.DecMapUint64UintptrV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64UintptrV(rv2i(rv).(map[uint64]uintptr), false, d) - } -} -func (f fastpathT) DecMapUint64UintptrX(vp *map[uint64]uintptr, d *Decoder) { - v, changed := f.DecMapUint64UintptrV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, canChange bool, - d *Decoder) (_ map[uint64]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uint64]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv uintptr - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64IntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]int) - v, changed := fastpathTV.DecMapUint64IntV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64IntV(rv2i(rv).(map[uint64]int), false, d) - } -} -func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, d *Decoder) { - v, changed := f.DecMapUint64IntV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, canChange bool, - d *Decoder) (_ map[uint64]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uint64]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv int - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64Int8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]int8) - v, changed := fastpathTV.DecMapUint64Int8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64Int8V(rv2i(rv).(map[uint64]int8), false, d) - } -} -func (f fastpathT) DecMapUint64Int8X(vp *map[uint64]int8, d *Decoder) { - v, changed := f.DecMapUint64Int8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, canChange bool, - d *Decoder) (_ map[uint64]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uint64]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv int8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64Int16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]int16) - v, changed := fastpathTV.DecMapUint64Int16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64Int16V(rv2i(rv).(map[uint64]int16), false, d) - } -} -func (f fastpathT) DecMapUint64Int16X(vp *map[uint64]int16, d *Decoder) { - v, changed := f.DecMapUint64Int16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, canChange bool, - d *Decoder) (_ map[uint64]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[uint64]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv int16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64Int32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]int32) - v, changed := fastpathTV.DecMapUint64Int32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64Int32V(rv2i(rv).(map[uint64]int32), false, d) - } -} -func (f fastpathT) DecMapUint64Int32X(vp *map[uint64]int32, d *Decoder) { - v, changed := f.DecMapUint64Int32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, canChange bool, - d *Decoder) (_ map[uint64]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uint64]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv int32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64Int64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]int64) - v, changed := fastpathTV.DecMapUint64Int64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64Int64V(rv2i(rv).(map[uint64]int64), false, d) - } -} -func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, d *Decoder) { - v, changed := f.DecMapUint64Int64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, canChange bool, - d *Decoder) (_ map[uint64]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uint64]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv int64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64Float32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]float32) - v, changed := fastpathTV.DecMapUint64Float32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64Float32V(rv2i(rv).(map[uint64]float32), false, d) - } -} -func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, d *Decoder) { - v, changed := f.DecMapUint64Float32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, canChange bool, - d *Decoder) (_ map[uint64]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uint64]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv float32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64Float64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]float64) - v, changed := fastpathTV.DecMapUint64Float64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64Float64V(rv2i(rv).(map[uint64]float64), false, d) - } -} -func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, d *Decoder) { - v, changed := f.DecMapUint64Float64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, canChange bool, - d *Decoder) (_ map[uint64]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uint64]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv float64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUint64BoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uint64]bool) - v, changed := fastpathTV.DecMapUint64BoolV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUint64BoolV(rv2i(rv).(map[uint64]bool), false, d) - } -} -func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, d *Decoder) { - v, changed := f.DecMapUint64BoolV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, canChange bool, - d *Decoder) (_ map[uint64]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uint64]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uint64 - var mv bool - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeUint64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrIntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]interface{}) - v, changed := fastpathTV.DecMapUintptrIntfV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrIntfV(rv2i(rv).(map[uintptr]interface{}), false, d) - } -} -func (f fastpathT) DecMapUintptrIntfX(vp *map[uintptr]interface{}, d *Decoder) { - v, changed := f.DecMapUintptrIntfV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, canChange bool, - d *Decoder) (_ map[uintptr]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[uintptr]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk uintptr - var mv interface{} - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrStringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]string) - v, changed := fastpathTV.DecMapUintptrStringV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrStringV(rv2i(rv).(map[uintptr]string), false, d) - } -} -func (f fastpathT) DecMapUintptrStringX(vp *map[uintptr]string, d *Decoder) { - v, changed := f.DecMapUintptrStringV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, canChange bool, - d *Decoder) (_ map[uintptr]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[uintptr]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv string - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrUintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]uint) - v, changed := fastpathTV.DecMapUintptrUintV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrUintV(rv2i(rv).(map[uintptr]uint), false, d) - } -} -func (f fastpathT) DecMapUintptrUintX(vp *map[uintptr]uint, d *Decoder) { - v, changed := f.DecMapUintptrUintV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, canChange bool, - d *Decoder) (_ map[uintptr]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uintptr]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv uint - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrUint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]uint8) - v, changed := fastpathTV.DecMapUintptrUint8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrUint8V(rv2i(rv).(map[uintptr]uint8), false, d) - } -} -func (f fastpathT) DecMapUintptrUint8X(vp *map[uintptr]uint8, d *Decoder) { - v, changed := f.DecMapUintptrUint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, canChange bool, - d *Decoder) (_ map[uintptr]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uintptr]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv uint8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrUint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]uint16) - v, changed := fastpathTV.DecMapUintptrUint16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrUint16V(rv2i(rv).(map[uintptr]uint16), false, d) - } -} -func (f fastpathT) DecMapUintptrUint16X(vp *map[uintptr]uint16, d *Decoder) { - v, changed := f.DecMapUintptrUint16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, canChange bool, - d *Decoder) (_ map[uintptr]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[uintptr]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv uint16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrUint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]uint32) - v, changed := fastpathTV.DecMapUintptrUint32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrUint32V(rv2i(rv).(map[uintptr]uint32), false, d) - } -} -func (f fastpathT) DecMapUintptrUint32X(vp *map[uintptr]uint32, d *Decoder) { - v, changed := f.DecMapUintptrUint32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, canChange bool, - d *Decoder) (_ map[uintptr]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uintptr]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv uint32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrUint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]uint64) - v, changed := fastpathTV.DecMapUintptrUint64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrUint64V(rv2i(rv).(map[uintptr]uint64), false, d) - } -} -func (f fastpathT) DecMapUintptrUint64X(vp *map[uintptr]uint64, d *Decoder) { - v, changed := f.DecMapUintptrUint64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, canChange bool, - d *Decoder) (_ map[uintptr]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uintptr]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv uint64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrUintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]uintptr) - v, changed := fastpathTV.DecMapUintptrUintptrV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrUintptrV(rv2i(rv).(map[uintptr]uintptr), false, d) - } -} -func (f fastpathT) DecMapUintptrUintptrX(vp *map[uintptr]uintptr, d *Decoder) { - v, changed := f.DecMapUintptrUintptrV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, canChange bool, - d *Decoder) (_ map[uintptr]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uintptr]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv uintptr - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrIntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]int) - v, changed := fastpathTV.DecMapUintptrIntV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrIntV(rv2i(rv).(map[uintptr]int), false, d) - } -} -func (f fastpathT) DecMapUintptrIntX(vp *map[uintptr]int, d *Decoder) { - v, changed := f.DecMapUintptrIntV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, canChange bool, - d *Decoder) (_ map[uintptr]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uintptr]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv int - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrInt8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]int8) - v, changed := fastpathTV.DecMapUintptrInt8V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrInt8V(rv2i(rv).(map[uintptr]int8), false, d) - } -} -func (f fastpathT) DecMapUintptrInt8X(vp *map[uintptr]int8, d *Decoder) { - v, changed := f.DecMapUintptrInt8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, canChange bool, - d *Decoder) (_ map[uintptr]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uintptr]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv int8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrInt16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]int16) - v, changed := fastpathTV.DecMapUintptrInt16V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrInt16V(rv2i(rv).(map[uintptr]int16), false, d) - } -} -func (f fastpathT) DecMapUintptrInt16X(vp *map[uintptr]int16, d *Decoder) { - v, changed := f.DecMapUintptrInt16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, canChange bool, - d *Decoder) (_ map[uintptr]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[uintptr]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv int16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrInt32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]int32) - v, changed := fastpathTV.DecMapUintptrInt32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrInt32V(rv2i(rv).(map[uintptr]int32), false, d) - } -} -func (f fastpathT) DecMapUintptrInt32X(vp *map[uintptr]int32, d *Decoder) { - v, changed := f.DecMapUintptrInt32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, canChange bool, - d *Decoder) (_ map[uintptr]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uintptr]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv int32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrInt64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]int64) - v, changed := fastpathTV.DecMapUintptrInt64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrInt64V(rv2i(rv).(map[uintptr]int64), false, d) - } -} -func (f fastpathT) DecMapUintptrInt64X(vp *map[uintptr]int64, d *Decoder) { - v, changed := f.DecMapUintptrInt64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, canChange bool, - d *Decoder) (_ map[uintptr]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uintptr]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv int64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrFloat32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]float32) - v, changed := fastpathTV.DecMapUintptrFloat32V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrFloat32V(rv2i(rv).(map[uintptr]float32), false, d) - } -} -func (f fastpathT) DecMapUintptrFloat32X(vp *map[uintptr]float32, d *Decoder) { - v, changed := f.DecMapUintptrFloat32V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, canChange bool, - d *Decoder) (_ map[uintptr]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[uintptr]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv float32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapUintptrFloat64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]float64) - v, changed := fastpathTV.DecMapUintptrFloat64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrFloat64V(rv2i(rv).(map[uintptr]float64), false, d) - } -} -func (f fastpathT) DecMapUintptrFloat64X(vp *map[uintptr]float64, d *Decoder) { - v, changed := f.DecMapUintptrFloat64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, canChange bool, - d *Decoder) (_ map[uintptr]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[uintptr]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv float64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} +func fastpathDecodeSetZeroTypeSwitch(iv interface{}) bool { + switch v := iv.(type) { + case *[]interface{}: + *v = nil + case *[]string: + *v = nil + case *[][]byte: + *v = nil + case *[]float32: + *v = nil + case *[]float64: + *v = nil + case *[]uint: + *v = nil + case *[]uint16: + *v = nil + case *[]uint32: + *v = nil + case *[]uint64: + *v = nil + case *[]int: + *v = nil + case *[]int8: + *v = nil + case *[]int16: + *v = nil + case *[]int32: + *v = nil + case *[]int64: + *v = nil + case *[]bool: + *v = nil -func (d *Decoder) fastpathDecMapUintptrBoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[uintptr]bool) - v, changed := fastpathTV.DecMapUintptrBoolV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapUintptrBoolV(rv2i(rv).(map[uintptr]bool), false, d) - } -} -func (f fastpathT) DecMapUintptrBoolX(vp *map[uintptr]bool, d *Decoder) { - v, changed := f.DecMapUintptrBoolV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, canChange bool, - d *Decoder) (_ map[uintptr]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[uintptr]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk uintptr - var mv bool - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} + case *map[string]interface{}: + *v = nil + case *map[string]string: + *v = nil + case *map[string][]byte: + *v = nil + case *map[string]uint: + *v = nil + case *map[string]uint8: + *v = nil + case *map[string]uint64: + *v = nil + case *map[string]int: + *v = nil + case *map[string]int64: + *v = nil + case *map[string]float32: + *v = nil + case *map[string]float64: + *v = nil + case *map[string]bool: + *v = nil + case *map[uint]interface{}: + *v = nil + case *map[uint]string: + *v = nil + case *map[uint][]byte: + *v = nil + case *map[uint]uint: + *v = nil + case *map[uint]uint8: + *v = nil + case *map[uint]uint64: + *v = nil + case *map[uint]int: + *v = nil + case *map[uint]int64: + *v = nil + case *map[uint]float32: + *v = nil + case *map[uint]float64: + *v = nil + case *map[uint]bool: + *v = nil + case *map[uint8]interface{}: + *v = nil + case *map[uint8]string: + *v = nil + case *map[uint8][]byte: + *v = nil + case *map[uint8]uint: + *v = nil + case *map[uint8]uint8: + *v = nil + case *map[uint8]uint64: + *v = nil + case *map[uint8]int: + *v = nil + case *map[uint8]int64: + *v = nil + case *map[uint8]float32: + *v = nil + case *map[uint8]float64: + *v = nil + case *map[uint8]bool: + *v = nil + case *map[uint64]interface{}: + *v = nil + case *map[uint64]string: + *v = nil + case *map[uint64][]byte: + *v = nil + case *map[uint64]uint: + *v = nil + case *map[uint64]uint8: + *v = nil + case *map[uint64]uint64: + *v = nil + case *map[uint64]int: + *v = nil + case *map[uint64]int64: + *v = nil + case *map[uint64]float32: + *v = nil + case *map[uint64]float64: + *v = nil + case *map[uint64]bool: + *v = nil + case *map[int]interface{}: + *v = nil + case *map[int]string: + *v = nil + case *map[int][]byte: + *v = nil + case *map[int]uint: + *v = nil + case *map[int]uint8: + *v = nil + case *map[int]uint64: + *v = nil + case *map[int]int: + *v = nil + case *map[int]int64: + *v = nil + case *map[int]float32: + *v = nil + case *map[int]float64: + *v = nil + case *map[int]bool: + *v = nil + case *map[int64]interface{}: + *v = nil + case *map[int64]string: + *v = nil + case *map[int64][]byte: + *v = nil + case *map[int64]uint: + *v = nil + case *map[int64]uint8: + *v = nil + case *map[int64]uint64: + *v = nil + case *map[int64]int: + *v = nil + case *map[int64]int64: + *v = nil + case *map[int64]float32: + *v = nil + case *map[int64]float64: + *v = nil + case *map[int64]bool: + *v = nil -func (d *Decoder) fastpathDecMapIntIntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]interface{}) - v, changed := fastpathTV.DecMapIntIntfV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntIntfV(rv2i(rv).(map[int]interface{}), false, d) - } -} -func (f fastpathT) DecMapIntIntfX(vp *map[int]interface{}, d *Decoder) { - v, changed := f.DecMapIntIntfV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, canChange bool, - d *Decoder) (_ map[int]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[int]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk int - var mv interface{} - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) - if v != nil { - v[mk] = mv - } + default: + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 + return false } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + return true } -func (d *Decoder) fastpathDecMapIntStringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]string) - v, changed := fastpathTV.DecMapIntStringV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntStringV(rv2i(rv).(map[int]string), false, d) - } -} -func (f fastpathT) DecMapIntStringX(vp *map[int]string, d *Decoder) { - v, changed := f.DecMapIntStringV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntStringV(v map[int]string, canChange bool, - d *Decoder) (_ map[int]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[int]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int - var mv string - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} +// -- -- fast path functions -func (d *Decoder) fastpathDecMapIntUintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]uint) - v, changed := fastpathTV.DecMapIntUintV(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceIntfR(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]interface{}) + if v, changed := fastpathTV.DecSliceIntfY(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapIntUintV(rv2i(rv).(map[int]uint), false, d) + fastpathTV.DecSliceIntfN(rv2i(rv).([]interface{}), d) } } -func (f fastpathT) DecMapIntUintX(vp *map[int]uint, d *Decoder) { - v, changed := f.DecMapIntUintV(*vp, true, d) - if changed { +func (f fastpathT) DecSliceIntfX(vp *[]interface{}, d *Decoder) { + if v, changed := f.DecSliceIntfY(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntUintV(v map[int]uint, canChange bool, - d *Decoder) (_ map[int]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[int]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int - var mv uint - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv +func (fastpathT) DecSliceIntfY(v []interface{}, d *Decoder) (_ []interface{}, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return } + return nil, true } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntUint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]uint8) - v, changed := fastpathTV.DecMapIntUint8V(*vp, true, d) - if changed { - *vp = v + if containerLenS == 0 { + if v == nil { + v = []interface{}{} + } else if len(v) != 0 { + v = v[:0] } - } else { - fastpathTV.DecMapIntUint8V(rv2i(rv).(map[int]uint8), false, d) - } -} -func (f fastpathT) DecMapIntUint8X(vp *map[int]uint8, d *Decoder) { - v, changed := f.DecMapIntUint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, canChange bool, - d *Decoder) (_ map[int]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[int]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + slh.End() + return v, true } - d.depthIncr() - var mk int - var mv uint8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = 0 + v = make([]interface{}, uint(xlen)) } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntUint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]uint16) - v, changed := fastpathTV.DecMapIntUint16V(*vp, true, d) - if changed { - *vp = v + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } - } else { - fastpathTV.DecMapIntUint16V(rv2i(rv).(map[int]uint16), false, d) - } -} -func (f fastpathT) DecMapIntUint16X(vp *map[int]uint16, d *Decoder) { - v, changed := f.DecMapIntUint16V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, canChange bool, - d *Decoder) (_ map[int]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[int]uint16, xlen) - changed = true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int - var mv uint16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) } else { - v[mk] = 0 + xlen = 8 } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if v != nil { - v[mk] = mv + v = make([]interface{}, uint(xlen)) + changed = true } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntUint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]uint32) - v, changed := fastpathTV.DecMapIntUint32V(*vp, true, d) - if changed { - *vp = v + if j >= len(v) { + v = append(v, nil) + changed = true } - } else { - fastpathTV.DecMapIntUint32V(rv2i(rv).(map[int]uint32), false, d) - } -} -func (f fastpathT) DecMapIntUint32X(vp *map[int]uint32, d *Decoder) { - v, changed := f.DecMapIntUint32V(*vp, true, d) - if changed { - *vp = v + slh.ElemContainerState(j) + d.decode(&v[uint(j)]) } -} -func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, canChange bool, - d *Decoder) (_ map[int]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[int]uint32, xlen) + if j < len(v) { + v = v[:uint(j)] changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int - var mv uint32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntUint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]uint64) - v, changed := fastpathTV.DecMapIntUint64V(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntUint64V(rv2i(rv).(map[int]uint64), false, d) - } -} -func (f fastpathT) DecMapIntUint64X(vp *map[int]uint64, d *Decoder) { - v, changed := f.DecMapIntUint64V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, canChange bool, - d *Decoder) (_ map[int]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[int]uint64, xlen) + } else if j == 0 && v == nil { + v = []interface{}{} changed = true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int - var mv uint64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() - if v != nil { - v[mk] = mv - } - } - dd.ReadMapEnd() - d.depthDecr() + slh.End() return v, changed } - -func (d *Decoder) fastpathDecMapIntUintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]uintptr) - v, changed := fastpathTV.DecMapIntUintptrV(*vp, true, d) - if changed { - *vp = v - } - } else { - fastpathTV.DecMapIntUintptrV(rv2i(rv).(map[int]uintptr), false, d) - } -} -func (f fastpathT) DecMapIntUintptrX(vp *map[int]uintptr, d *Decoder) { - v, changed := f.DecMapIntUintptrV(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, canChange bool, - d *Decoder) (_ map[int]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[int]uintptr, xlen) - changed = true +func (fastpathT) DecSliceIntfN(v []interface{}, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + slh.End() + return } - d.depthIncr() - var mk int - var mv uintptr - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } + slh.ElemContainerState(j) + d.decode(&v[uint(j)]) } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + slh.End() } -func (d *Decoder) fastpathDecMapIntIntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]int) - v, changed := fastpathTV.DecMapIntIntV(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceStringR(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]string) + if v, changed := fastpathTV.DecSliceStringY(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapIntIntV(rv2i(rv).(map[int]int), false, d) + fastpathTV.DecSliceStringN(rv2i(rv).([]string), d) } } -func (f fastpathT) DecMapIntIntX(vp *map[int]int, d *Decoder) { - v, changed := f.DecMapIntIntV(*vp, true, d) - if changed { +func (f fastpathT) DecSliceStringX(vp *[]string, d *Decoder) { + if v, changed := f.DecSliceStringY(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntIntV(v map[int]int, canChange bool, - d *Decoder) (_ map[int]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[int]int, xlen) - changed = true +func (fastpathT) DecSliceStringY(v []string, d *Decoder) (_ []string, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []string{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int - var mv int - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = 0 + v = make([]string, uint(xlen)) } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if v != nil { - v[mk] = mv + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntInt8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]int8) - v, changed := fastpathTV.DecMapIntInt8V(*vp, true, d) - if changed { - *vp = v + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) + } else { + xlen = 8 + } + v = make([]string, uint(xlen)) + changed = true } - } else { - fastpathTV.DecMapIntInt8V(rv2i(rv).(map[int]int8), false, d) + if j >= len(v) { + v = append(v, "") + changed = true + } + slh.ElemContainerState(j) + v[uint(j)] = string(d.d.DecodeStringAsBytes()) } -} -func (f fastpathT) DecMapIntInt8X(vp *map[int]int8, d *Decoder) { - v, changed := f.DecMapIntInt8V(*vp, true, d) - if changed { - *vp = v + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []string{} + changed = true } + slh.End() + return v, changed } -func (_ fastpathT) DecMapIntInt8V(v map[int]int8, canChange bool, - d *Decoder) (_ map[int]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[int]int8, xlen) - changed = true +func (fastpathT) DecSliceStringN(v []string, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + slh.End() + return } - d.depthIncr() - var mk int - var mv int8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if v != nil { - v[mk] = mv + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } + slh.ElemContainerState(j) + v[uint(j)] = string(d.d.DecodeStringAsBytes()) } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + slh.End() } -func (d *Decoder) fastpathDecMapIntInt16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]int16) - v, changed := fastpathTV.DecMapIntInt16V(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceBytesR(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[][]byte) + if v, changed := fastpathTV.DecSliceBytesY(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapIntInt16V(rv2i(rv).(map[int]int16), false, d) + fastpathTV.DecSliceBytesN(rv2i(rv).([][]byte), d) } } -func (f fastpathT) DecMapIntInt16X(vp *map[int]int16, d *Decoder) { - v, changed := f.DecMapIntInt16V(*vp, true, d) - if changed { +func (f fastpathT) DecSliceBytesX(vp *[][]byte, d *Decoder) { + if v, changed := f.DecSliceBytesY(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntInt16V(v map[int]int16, canChange bool, - d *Decoder) (_ map[int]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[int]int16, xlen) - changed = true +func (fastpathT) DecSliceBytesY(v [][]byte, d *Decoder) (_ [][]byte, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = [][]byte{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int - var mv int16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 24) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = 0 + v = make([][]byte, uint(xlen)) } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if v != nil { - v[mk] = mv + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntInt32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]int32) - v, changed := fastpathTV.DecMapIntInt32V(*vp, true, d) - if changed { - *vp = v + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 24) + } else { + xlen = 8 + } + v = make([][]byte, uint(xlen)) + changed = true } - } else { - fastpathTV.DecMapIntInt32V(rv2i(rv).(map[int]int32), false, d) + if j >= len(v) { + v = append(v, nil) + changed = true + } + slh.ElemContainerState(j) + v[uint(j)] = d.d.DecodeBytes(nil, false) } -} -func (f fastpathT) DecMapIntInt32X(vp *map[int]int32, d *Decoder) { - v, changed := f.DecMapIntInt32V(*vp, true, d) - if changed { - *vp = v + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = [][]byte{} + changed = true } + slh.End() + return v, changed } -func (_ fastpathT) DecMapIntInt32V(v map[int]int32, canChange bool, - d *Decoder) (_ map[int]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[int]int32, xlen) - changed = true +func (fastpathT) DecSliceBytesN(v [][]byte, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + slh.End() + return } - d.depthIncr() - var mk int - var mv int32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if v != nil { - v[mk] = mv + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } + slh.ElemContainerState(j) + v[uint(j)] = d.d.DecodeBytes(nil, false) } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + slh.End() } -func (d *Decoder) fastpathDecMapIntInt64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]int64) - v, changed := fastpathTV.DecMapIntInt64V(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceFloat32R(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]float32) + if v, changed := fastpathTV.DecSliceFloat32Y(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapIntInt64V(rv2i(rv).(map[int]int64), false, d) + fastpathTV.DecSliceFloat32N(rv2i(rv).([]float32), d) } } -func (f fastpathT) DecMapIntInt64X(vp *map[int]int64, d *Decoder) { - v, changed := f.DecMapIntInt64V(*vp, true, d) - if changed { +func (f fastpathT) DecSliceFloat32X(vp *[]float32, d *Decoder) { + if v, changed := f.DecSliceFloat32Y(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntInt64V(v map[int]int64, canChange bool, - d *Decoder) (_ map[int]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[int]int64, xlen) - changed = true +func (fastpathT) DecSliceFloat32Y(v []float32, d *Decoder) (_ []float32, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []float32{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int - var mv int64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = 0 + v = make([]float32, uint(xlen)) } - continue - } - mv = dd.DecodeInt64() - if v != nil { - v[mk] = mv + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapIntFloat32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]float32) - v, changed := fastpathTV.DecMapIntFloat32V(*vp, true, d) - if changed { - *vp = v + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) + } else { + xlen = 8 + } + v = make([]float32, uint(xlen)) + changed = true } - } else { - fastpathTV.DecMapIntFloat32V(rv2i(rv).(map[int]float32), false, d) + if j >= len(v) { + v = append(v, 0) + changed = true + } + slh.ElemContainerState(j) + v[uint(j)] = float32(d.decodeFloat32()) } -} -func (f fastpathT) DecMapIntFloat32X(vp *map[int]float32, d *Decoder) { - v, changed := f.DecMapIntFloat32V(*vp, true, d) - if changed { - *vp = v + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []float32{} + changed = true } + slh.End() + return v, changed } -func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, canChange bool, - d *Decoder) (_ map[int]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[int]float32, xlen) - changed = true +func (fastpathT) DecSliceFloat32N(v []float32, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + slh.End() + return } - d.depthIncr() - var mk int - var mv float32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if v != nil { - v[mk] = mv + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } + slh.ElemContainerState(j) + v[uint(j)] = float32(d.decodeFloat32()) } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + slh.End() } -func (d *Decoder) fastpathDecMapIntFloat64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]float64) - v, changed := fastpathTV.DecMapIntFloat64V(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceFloat64R(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]float64) + if v, changed := fastpathTV.DecSliceFloat64Y(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapIntFloat64V(rv2i(rv).(map[int]float64), false, d) + fastpathTV.DecSliceFloat64N(rv2i(rv).([]float64), d) } } -func (f fastpathT) DecMapIntFloat64X(vp *map[int]float64, d *Decoder) { - v, changed := f.DecMapIntFloat64V(*vp, true, d) - if changed { +func (f fastpathT) DecSliceFloat64X(vp *[]float64, d *Decoder) { + if v, changed := f.DecSliceFloat64Y(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, canChange bool, - d *Decoder) (_ map[int]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[int]float64, xlen) - changed = true +func (fastpathT) DecSliceFloat64Y(v []float64, d *Decoder) (_ []float64, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []float64{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int - var mv float64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xlen <= cap(v) { + v = v[:uint(xlen)] + } else { + v = make([]float64, uint(xlen)) + } + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + } + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) } else { - v[mk] = 0 + xlen = 8 } - continue + v = make([]float64, uint(xlen)) + changed = true } - mv = dd.DecodeFloat64() - if v != nil { - v[mk] = mv + if j >= len(v) { + v = append(v, 0) + changed = true + } + slh.ElemContainerState(j) + v[uint(j)] = d.d.DecodeFloat64() + } + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []float64{} + changed = true + } + slh.End() + return v, changed +} +func (fastpathT) DecSliceFloat64N(v []float64, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return + } + if containerLenS == 0 { + slh.End() + return + } + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } + slh.ElemContainerState(j) + v[uint(j)] = d.d.DecodeFloat64() } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + slh.End() } -func (d *Decoder) fastpathDecMapIntBoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int]bool) - v, changed := fastpathTV.DecMapIntBoolV(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceUintR(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]uint) + if v, changed := fastpathTV.DecSliceUintY(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapIntBoolV(rv2i(rv).(map[int]bool), false, d) + fastpathTV.DecSliceUintN(rv2i(rv).([]uint), d) } } -func (f fastpathT) DecMapIntBoolX(vp *map[int]bool, d *Decoder) { - v, changed := f.DecMapIntBoolV(*vp, true, d) - if changed { +func (f fastpathT) DecSliceUintX(vp *[]uint, d *Decoder) { + if v, changed := f.DecSliceUintY(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntBoolV(v map[int]bool, canChange bool, - d *Decoder) (_ map[int]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[int]bool, xlen) - changed = true +func (fastpathT) DecSliceUintY(v []uint, d *Decoder) (_ []uint, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []uint{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int - var mv bool - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = false + v = make([]uint, uint(xlen)) } - continue + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } - mv = dd.DecodeBool() - if v != nil { - v[mk] = mv + } + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) + } else { + xlen = 8 + } + v = make([]uint, uint(xlen)) + changed = true + } + if j >= len(v) { + v = append(v, 0) + changed = true } + slh.ElemContainerState(j) + v[uint(j)] = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + } + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []uint{} + changed = true } - dd.ReadMapEnd() - d.depthDecr() + slh.End() return v, changed } +func (fastpathT) DecSliceUintN(v []uint, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return + } + if containerLenS == 0 { + slh.End() + return + } + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return + } + slh.ElemContainerState(j) + v[uint(j)] = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + } + slh.End() +} -func (d *Decoder) fastpathDecMapInt8IntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]interface{}) - v, changed := fastpathTV.DecMapInt8IntfV(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceUint16R(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]uint16) + if v, changed := fastpathTV.DecSliceUint16Y(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapInt8IntfV(rv2i(rv).(map[int8]interface{}), false, d) + fastpathTV.DecSliceUint16N(rv2i(rv).([]uint16), d) } } -func (f fastpathT) DecMapInt8IntfX(vp *map[int8]interface{}, d *Decoder) { - v, changed := f.DecMapInt8IntfV(*vp, true, d) - if changed { +func (f fastpathT) DecSliceUint16X(vp *[]uint16, d *Decoder) { + if v, changed := f.DecSliceUint16Y(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, canChange bool, - d *Decoder) (_ map[int8]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) - v = make(map[int8]interface{}, xlen) - changed = true +func (fastpathT) DecSliceUint16Y(v []uint16, d *Decoder) (_ []uint16, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []uint16{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk int8 - var mv interface{} - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = nil + v = make([]uint16, uint(xlen)) } - continue + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } - if mapGet { - mv = v[mk] - } else { - mv = nil + } + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2) + } else { + xlen = 8 + } + v = make([]uint16, uint(xlen)) + changed = true } - d.decode(&mv) - if v != nil { - v[mk] = mv + if j >= len(v) { + v = append(v, 0) + changed = true } + slh.ElemContainerState(j) + v[uint(j)] = uint16(chkOvf.UintV(d.d.DecodeUint64(), 16)) + } + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []uint16{} + changed = true } - dd.ReadMapEnd() - d.depthDecr() + slh.End() return v, changed } +func (fastpathT) DecSliceUint16N(v []uint16, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return + } + if containerLenS == 0 { + slh.End() + return + } + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return + } + slh.ElemContainerState(j) + v[uint(j)] = uint16(chkOvf.UintV(d.d.DecodeUint64(), 16)) + } + slh.End() +} -func (d *Decoder) fastpathDecMapInt8StringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]string) - v, changed := fastpathTV.DecMapInt8StringV(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceUint32R(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]uint32) + if v, changed := fastpathTV.DecSliceUint32Y(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapInt8StringV(rv2i(rv).(map[int8]string), false, d) + fastpathTV.DecSliceUint32N(rv2i(rv).([]uint32), d) } } -func (f fastpathT) DecMapInt8StringX(vp *map[int8]string, d *Decoder) { - v, changed := f.DecMapInt8StringV(*vp, true, d) - if changed { +func (f fastpathT) DecSliceUint32X(vp *[]uint32, d *Decoder) { + if v, changed := f.DecSliceUint32Y(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8StringV(v map[int8]string, canChange bool, - d *Decoder) (_ map[int8]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) - v = make(map[int8]string, xlen) - changed = true +func (fastpathT) DecSliceUint32Y(v []uint32, d *Decoder) (_ []uint32, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []uint32{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int8 - var mv string - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = "" + v = make([]uint32, uint(xlen)) } - continue - } - mv = dd.DecodeString() - if v != nil { - v[mk] = mv + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapInt8UintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]uint) - v, changed := fastpathTV.DecMapInt8UintV(*vp, true, d) - if changed { - *vp = v + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) + } else { + xlen = 8 + } + v = make([]uint32, uint(xlen)) + changed = true } - } else { - fastpathTV.DecMapInt8UintV(rv2i(rv).(map[int8]uint), false, d) + if j >= len(v) { + v = append(v, 0) + changed = true + } + slh.ElemContainerState(j) + v[uint(j)] = uint32(chkOvf.UintV(d.d.DecodeUint64(), 32)) } -} -func (f fastpathT) DecMapInt8UintX(vp *map[int8]uint, d *Decoder) { - v, changed := f.DecMapInt8UintV(*vp, true, d) - if changed { - *vp = v + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []uint32{} + changed = true } + slh.End() + return v, changed } -func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, canChange bool, - d *Decoder) (_ map[int8]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[int8]uint, xlen) - changed = true +func (fastpathT) DecSliceUint32N(v []uint32, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + slh.End() + return } - d.depthIncr() - var mk int8 - var mv uint - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } + slh.ElemContainerState(j) + v[uint(j)] = uint32(chkOvf.UintV(d.d.DecodeUint64(), 32)) } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + slh.End() } -func (d *Decoder) fastpathDecMapInt8Uint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]uint8) - v, changed := fastpathTV.DecMapInt8Uint8V(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceUint64R(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]uint64) + if v, changed := fastpathTV.DecSliceUint64Y(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapInt8Uint8V(rv2i(rv).(map[int8]uint8), false, d) + fastpathTV.DecSliceUint64N(rv2i(rv).([]uint64), d) } } -func (f fastpathT) DecMapInt8Uint8X(vp *map[int8]uint8, d *Decoder) { - v, changed := f.DecMapInt8Uint8V(*vp, true, d) - if changed { +func (f fastpathT) DecSliceUint64X(vp *[]uint64, d *Decoder) { + if v, changed := f.DecSliceUint64Y(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, canChange bool, - d *Decoder) (_ map[int8]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) - v = make(map[int8]uint8, xlen) - changed = true +func (fastpathT) DecSliceUint64Y(v []uint64, d *Decoder) (_ []uint64, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []uint64{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int8 - var mv uint8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = 0 + v = make([]uint64, uint(xlen)) } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) - if v != nil { - v[mk] = mv + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapInt8Uint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]uint16) - v, changed := fastpathTV.DecMapInt8Uint16V(*vp, true, d) - if changed { - *vp = v + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) + } else { + xlen = 8 + } + v = make([]uint64, uint(xlen)) + changed = true } - } else { - fastpathTV.DecMapInt8Uint16V(rv2i(rv).(map[int8]uint16), false, d) + if j >= len(v) { + v = append(v, 0) + changed = true + } + slh.ElemContainerState(j) + v[uint(j)] = d.d.DecodeUint64() } -} -func (f fastpathT) DecMapInt8Uint16X(vp *map[int8]uint16, d *Decoder) { - v, changed := f.DecMapInt8Uint16V(*vp, true, d) - if changed { - *vp = v + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []uint64{} + changed = true } + slh.End() + return v, changed } -func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, canChange bool, - d *Decoder) (_ map[int8]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) - v = make(map[int8]uint16, xlen) - changed = true +func (fastpathT) DecSliceUint64N(v []uint64, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + slh.End() + return } - d.depthIncr() - var mk int8 - var mv uint16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) - if v != nil { - v[mk] = mv + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } + slh.ElemContainerState(j) + v[uint(j)] = d.d.DecodeUint64() } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + slh.End() } -func (d *Decoder) fastpathDecMapInt8Uint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]uint32) - v, changed := fastpathTV.DecMapInt8Uint32V(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceIntR(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]int) + if v, changed := fastpathTV.DecSliceIntY(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapInt8Uint32V(rv2i(rv).(map[int8]uint32), false, d) + fastpathTV.DecSliceIntN(rv2i(rv).([]int), d) } } -func (f fastpathT) DecMapInt8Uint32X(vp *map[int8]uint32, d *Decoder) { - v, changed := f.DecMapInt8Uint32V(*vp, true, d) - if changed { +func (f fastpathT) DecSliceIntX(vp *[]int, d *Decoder) { + if v, changed := f.DecSliceIntY(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, canChange bool, - d *Decoder) (_ map[int8]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[int8]uint32, xlen) - changed = true +func (fastpathT) DecSliceIntY(v []int, d *Decoder) (_ []int, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []int{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int8 - var mv uint32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = 0 + v = make([]int, uint(xlen)) } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) - if v != nil { - v[mk] = mv + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapInt8Uint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]uint64) - v, changed := fastpathTV.DecMapInt8Uint64V(*vp, true, d) - if changed { - *vp = v + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) + } else { + xlen = 8 + } + v = make([]int, uint(xlen)) + changed = true } - } else { - fastpathTV.DecMapInt8Uint64V(rv2i(rv).(map[int8]uint64), false, d) + if j >= len(v) { + v = append(v, 0) + changed = true + } + slh.ElemContainerState(j) + v[uint(j)] = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) } -} -func (f fastpathT) DecMapInt8Uint64X(vp *map[int8]uint64, d *Decoder) { - v, changed := f.DecMapInt8Uint64V(*vp, true, d) - if changed { - *vp = v + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []int{} + changed = true } + slh.End() + return v, changed } -func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, canChange bool, - d *Decoder) (_ map[int8]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[int8]uint64, xlen) - changed = true +func (fastpathT) DecSliceIntN(v []int, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + slh.End() + return } - d.depthIncr() - var mk int8 - var mv uint64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() - if v != nil { - v[mk] = mv + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } + slh.ElemContainerState(j) + v[uint(j)] = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + slh.End() } -func (d *Decoder) fastpathDecMapInt8UintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]uintptr) - v, changed := fastpathTV.DecMapInt8UintptrV(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceInt8R(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]int8) + if v, changed := fastpathTV.DecSliceInt8Y(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapInt8UintptrV(rv2i(rv).(map[int8]uintptr), false, d) + fastpathTV.DecSliceInt8N(rv2i(rv).([]int8), d) } } -func (f fastpathT) DecMapInt8UintptrX(vp *map[int8]uintptr, d *Decoder) { - v, changed := f.DecMapInt8UintptrV(*vp, true, d) - if changed { +func (f fastpathT) DecSliceInt8X(vp *[]int8, d *Decoder) { + if v, changed := f.DecSliceInt8Y(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, canChange bool, - d *Decoder) (_ map[int8]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[int8]uintptr, xlen) - changed = true +func (fastpathT) DecSliceInt8Y(v []int8, d *Decoder) (_ []int8, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []int8{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int8 - var mv uintptr - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = 0 + v = make([]int8, uint(xlen)) } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) - if v != nil { - v[mk] = mv + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapInt8IntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]int) - v, changed := fastpathTV.DecMapInt8IntV(*vp, true, d) - if changed { - *vp = v + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) + } else { + xlen = 8 + } + v = make([]int8, uint(xlen)) + changed = true } - } else { - fastpathTV.DecMapInt8IntV(rv2i(rv).(map[int8]int), false, d) + if j >= len(v) { + v = append(v, 0) + changed = true + } + slh.ElemContainerState(j) + v[uint(j)] = int8(chkOvf.IntV(d.d.DecodeInt64(), 8)) } -} -func (f fastpathT) DecMapInt8IntX(vp *map[int8]int, d *Decoder) { - v, changed := f.DecMapInt8IntV(*vp, true, d) - if changed { - *vp = v + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []int8{} + changed = true } + slh.End() + return v, changed } -func (_ fastpathT) DecMapInt8IntV(v map[int8]int, canChange bool, - d *Decoder) (_ map[int8]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[int8]int, xlen) - changed = true +func (fastpathT) DecSliceInt8N(v []int8, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + slh.End() + return } - d.depthIncr() - var mk int8 - var mv int - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) - if v != nil { - v[mk] = mv + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } + slh.ElemContainerState(j) + v[uint(j)] = int8(chkOvf.IntV(d.d.DecodeInt64(), 8)) } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + slh.End() } -func (d *Decoder) fastpathDecMapInt8Int8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]int8) - v, changed := fastpathTV.DecMapInt8Int8V(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceInt16R(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]int16) + if v, changed := fastpathTV.DecSliceInt16Y(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapInt8Int8V(rv2i(rv).(map[int8]int8), false, d) + fastpathTV.DecSliceInt16N(rv2i(rv).([]int16), d) } } -func (f fastpathT) DecMapInt8Int8X(vp *map[int8]int8, d *Decoder) { - v, changed := f.DecMapInt8Int8V(*vp, true, d) - if changed { +func (f fastpathT) DecSliceInt16X(vp *[]int16, d *Decoder) { + if v, changed := f.DecSliceInt16Y(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, canChange bool, - d *Decoder) (_ map[int8]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) - v = make(map[int8]int8, xlen) - changed = true +func (fastpathT) DecSliceInt16Y(v []int16, d *Decoder) (_ []int16, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []int16{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int8 - var mv int8 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = 0 + v = make([]int16, uint(xlen)) } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if v != nil { - v[mk] = mv + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapInt8Int16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]int16) - v, changed := fastpathTV.DecMapInt8Int16V(*vp, true, d) - if changed { - *vp = v + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2) + } else { + xlen = 8 + } + v = make([]int16, uint(xlen)) + changed = true } - } else { - fastpathTV.DecMapInt8Int16V(rv2i(rv).(map[int8]int16), false, d) + if j >= len(v) { + v = append(v, 0) + changed = true + } + slh.ElemContainerState(j) + v[uint(j)] = int16(chkOvf.IntV(d.d.DecodeInt64(), 16)) } -} -func (f fastpathT) DecMapInt8Int16X(vp *map[int8]int16, d *Decoder) { - v, changed := f.DecMapInt8Int16V(*vp, true, d) - if changed { - *vp = v + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []int16{} + changed = true } + slh.End() + return v, changed } -func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, canChange bool, - d *Decoder) (_ map[int8]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) - v = make(map[int8]int16, xlen) - changed = true +func (fastpathT) DecSliceInt16N(v []int16, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + slh.End() + return } - d.depthIncr() - var mk int8 - var mv int16 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if v != nil { - v[mk] = mv + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } + slh.ElemContainerState(j) + v[uint(j)] = int16(chkOvf.IntV(d.d.DecodeInt64(), 16)) } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + slh.End() } -func (d *Decoder) fastpathDecMapInt8Int32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]int32) - v, changed := fastpathTV.DecMapInt8Int32V(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceInt32R(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]int32) + if v, changed := fastpathTV.DecSliceInt32Y(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapInt8Int32V(rv2i(rv).(map[int8]int32), false, d) + fastpathTV.DecSliceInt32N(rv2i(rv).([]int32), d) } } -func (f fastpathT) DecMapInt8Int32X(vp *map[int8]int32, d *Decoder) { - v, changed := f.DecMapInt8Int32V(*vp, true, d) - if changed { +func (f fastpathT) DecSliceInt32X(vp *[]int32, d *Decoder) { + if v, changed := f.DecSliceInt32Y(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, canChange bool, - d *Decoder) (_ map[int8]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[int8]int32, xlen) - changed = true +func (fastpathT) DecSliceInt32Y(v []int32, d *Decoder) (_ []int32, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []int32{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int8 - var mv int32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = 0 + v = make([]int32, uint(xlen)) } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if v != nil { - v[mk] = mv + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapInt8Int64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]int64) - v, changed := fastpathTV.DecMapInt8Int64V(*vp, true, d) - if changed { - *vp = v + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) + } else { + xlen = 8 + } + v = make([]int32, uint(xlen)) + changed = true } - } else { - fastpathTV.DecMapInt8Int64V(rv2i(rv).(map[int8]int64), false, d) + if j >= len(v) { + v = append(v, 0) + changed = true + } + slh.ElemContainerState(j) + v[uint(j)] = int32(chkOvf.IntV(d.d.DecodeInt64(), 32)) } -} -func (f fastpathT) DecMapInt8Int64X(vp *map[int8]int64, d *Decoder) { - v, changed := f.DecMapInt8Int64V(*vp, true, d) - if changed { - *vp = v + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []int32{} + changed = true } + slh.End() + return v, changed } -func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, canChange bool, - d *Decoder) (_ map[int8]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[int8]int64, xlen) - changed = true +func (fastpathT) DecSliceInt32N(v []int32, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + slh.End() + return } - d.depthIncr() - var mk int8 - var mv int64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() - if v != nil { - v[mk] = mv + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } + slh.ElemContainerState(j) + v[uint(j)] = int32(chkOvf.IntV(d.d.DecodeInt64(), 32)) } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + slh.End() } -func (d *Decoder) fastpathDecMapInt8Float32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]float32) - v, changed := fastpathTV.DecMapInt8Float32V(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceInt64R(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]int64) + if v, changed := fastpathTV.DecSliceInt64Y(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapInt8Float32V(rv2i(rv).(map[int8]float32), false, d) + fastpathTV.DecSliceInt64N(rv2i(rv).([]int64), d) } } -func (f fastpathT) DecMapInt8Float32X(vp *map[int8]float32, d *Decoder) { - v, changed := f.DecMapInt8Float32V(*vp, true, d) - if changed { +func (f fastpathT) DecSliceInt64X(vp *[]int64, d *Decoder) { + if v, changed := f.DecSliceInt64Y(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, canChange bool, - d *Decoder) (_ map[int8]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[int8]float32, xlen) - changed = true +func (fastpathT) DecSliceInt64Y(v []int64, d *Decoder) (_ []int64, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []int64{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int8 - var mv float32 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = 0 + v = make([]int64, uint(xlen)) } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) - if v != nil { - v[mk] = mv + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed -} - -func (d *Decoder) fastpathDecMapInt8Float64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]float64) - v, changed := fastpathTV.DecMapInt8Float64V(*vp, true, d) - if changed { - *vp = v + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) + } else { + xlen = 8 + } + v = make([]int64, uint(xlen)) + changed = true } - } else { - fastpathTV.DecMapInt8Float64V(rv2i(rv).(map[int8]float64), false, d) + if j >= len(v) { + v = append(v, 0) + changed = true + } + slh.ElemContainerState(j) + v[uint(j)] = d.d.DecodeInt64() } -} -func (f fastpathT) DecMapInt8Float64X(vp *map[int8]float64, d *Decoder) { - v, changed := f.DecMapInt8Float64V(*vp, true, d) - if changed { - *vp = v + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []int64{} + changed = true } + slh.End() + return v, changed } -func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, canChange bool, - d *Decoder) (_ map[int8]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[int8]float64, xlen) - changed = true +func (fastpathT) DecSliceInt64N(v []int64, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + slh.End() + return } - d.depthIncr() - var mk int8 - var mv float64 - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() - if v != nil { - v[mk] = mv + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } + slh.ElemContainerState(j) + v[uint(j)] = d.d.DecodeInt64() } - dd.ReadMapEnd() - d.depthDecr() - return v, changed + slh.End() } -func (d *Decoder) fastpathDecMapInt8BoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int8]bool) - v, changed := fastpathTV.DecMapInt8BoolV(*vp, true, d) - if changed { +func (d *Decoder) fastpathDecSliceBoolR(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]bool) + if v, changed := fastpathTV.DecSliceBoolY(*vp, d); changed { *vp = v } } else { - fastpathTV.DecMapInt8BoolV(rv2i(rv).(map[int8]bool), false, d) + fastpathTV.DecSliceBoolN(rv2i(rv).([]bool), d) } } -func (f fastpathT) DecMapInt8BoolX(vp *map[int8]bool, d *Decoder) { - v, changed := f.DecMapInt8BoolV(*vp, true, d) - if changed { +func (f fastpathT) DecSliceBoolX(vp *[]bool, d *Decoder) { + if v, changed := f.DecSliceBoolY(*vp, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, canChange bool, - d *Decoder) (_ map[int8]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) - v = make(map[int8]bool, xlen) - changed = true +func (fastpathT) DecSliceBoolY(v []bool, d *Decoder) (_ []bool, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { + return + } + return nil, true } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed + if containerLenS == 0 { + if v == nil { + v = []bool{} + } else if len(v) != 0 { + v = v[:0] + } + slh.End() + return v, true } - d.depthIncr() - var mk int8 - var mv bool - hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) + if xlen <= cap(v) { + v = v[:uint(xlen)] } else { - v[mk] = false + v = make([]bool, uint(xlen)) } - continue + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true } - mv = dd.DecodeBool() - if v != nil { - v[mk] = mv + } + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) + } else { + xlen = 8 + } + v = make([]bool, uint(xlen)) + changed = true + } + if j >= len(v) { + v = append(v, false) + changed = true } + slh.ElemContainerState(j) + v[uint(j)] = d.d.DecodeBool() + } + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []bool{} + changed = true } - dd.ReadMapEnd() - d.depthDecr() + slh.End() return v, changed } - -func (d *Decoder) fastpathDecMapInt16IntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]interface{}) - v, changed := fastpathTV.DecMapInt16IntfV(*vp, true, d) - if changed { - *vp = v +func (fastpathT) DecSliceBoolN(v []bool, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return + } + if containerLenS == 0 { + slh.End() + return + } + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return } - } else { - fastpathTV.DecMapInt16IntfV(rv2i(rv).(map[int16]interface{}), false, d) + slh.ElemContainerState(j) + v[uint(j)] = d.d.DecodeBool() } + slh.End() } -func (f fastpathT) DecMapInt16IntfX(vp *map[int16]interface{}, d *Decoder) { - v, changed := f.DecMapInt16IntfV(*vp, true, d) - if changed { - *vp = v +func fastpathDecArrayCannotExpand(slh decSliceHelper, hasLen bool, lenv, j, containerLenS int) { + slh.d.arrayCannotExpand(lenv, j+1) + slh.ElemContainerState(j) + slh.d.swallow() + j++ + for ; (hasLen && j < containerLenS) || !(hasLen || slh.d.checkBreak()); j++ { + slh.ElemContainerState(j) + slh.d.swallow() } + slh.End() } -func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, canChange bool, - d *Decoder) (_ map[int16]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) - v = make(map[int16]interface{}, xlen) - changed = true + +func (d *Decoder) fastpathDecMapStringIntfR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[string]interface{})) = nil + } + } else { + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[string]interface{}) + if *vp == nil { + *vp = make(map[string]interface{}, decInferLen(containerLen, d.h.MaxInitLen, 32)) + } + if containerLen != 0 { + fastpathTV.DecMapStringIntfL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapStringIntfL(rv2i(rv).(map[string]interface{}), containerLen, d) + } + d.mapEnd() } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed +} +func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[string]interface{}, decInferLen(containerLen, d.h.MaxInitLen, 32)) + } + if containerLen != 0 { + f.DecMapStringIntfL(*vp, containerLen, d) + } + d.mapEnd() } - d.depthIncr() +} +func (fastpathT) DecMapStringIntfL(v map[string]interface{}, containerLen int, d *Decoder) { mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk int16 + var mk string var mv interface{} hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = string(d.d.DecodeStringAsBytes()) + d.mapElemValue() if mapGet { mv = v[mk] } else { @@ -29801,1960 +5696,1649 @@ func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, canChange bool, v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16StringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]string) - v, changed := fastpathTV.DecMapInt16StringV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapStringStringR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[string]string)) = nil } } else { - fastpathTV.DecMapInt16StringV(rv2i(rv).(map[int16]string), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[string]string) + if *vp == nil { + *vp = make(map[string]string, decInferLen(containerLen, d.h.MaxInitLen, 32)) + } + if containerLen != 0 { + fastpathTV.DecMapStringStringL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapStringStringL(rv2i(rv).(map[string]string), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16StringX(vp *map[int16]string, d *Decoder) { - v, changed := f.DecMapInt16StringV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapStringStringX(vp *map[string]string, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[string]string, decInferLen(containerLen, d.h.MaxInitLen, 32)) + } + if containerLen != 0 { + f.DecMapStringStringL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16StringV(v map[int16]string, canChange bool, - d *Decoder) (_ map[int16]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) - v = make(map[int16]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 +func (fastpathT) DecMapStringStringL(v map[string]string, containerLen int, d *Decoder) { + var mk string var mv string hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = string(d.d.DecodeStringAsBytes()) + d.mapElemValue() + mv = string(d.d.DecodeStringAsBytes()) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16UintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]uint) - v, changed := fastpathTV.DecMapInt16UintV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapStringBytesR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[string][]byte)) = nil } } else { - fastpathTV.DecMapInt16UintV(rv2i(rv).(map[int16]uint), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[string][]byte) + if *vp == nil { + *vp = make(map[string][]byte, decInferLen(containerLen, d.h.MaxInitLen, 40)) + } + if containerLen != 0 { + fastpathTV.DecMapStringBytesL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapStringBytesL(rv2i(rv).(map[string][]byte), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16UintX(vp *map[int16]uint, d *Decoder) { - v, changed := f.DecMapInt16UintV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapStringBytesX(vp *map[string][]byte, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[string][]byte, decInferLen(containerLen, d.h.MaxInitLen, 40)) + } + if containerLen != 0 { + f.DecMapStringBytesL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, canChange bool, - d *Decoder) (_ map[int16]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[int16]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv uint +func (fastpathT) DecMapStringBytesL(v map[string][]byte, containerLen int, d *Decoder) { + mapGet := v != nil && !d.h.MapValueReset + var mk string + var mv []byte hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = string(d.d.DecodeStringAsBytes()) + d.mapElemValue() + if mapGet { + mv = v[mk] + } else { + mv = nil } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) + mv = d.d.DecodeBytes(mv, false) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16Uint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]uint8) - v, changed := fastpathTV.DecMapInt16Uint8V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapStringUintR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[string]uint)) = nil } } else { - fastpathTV.DecMapInt16Uint8V(rv2i(rv).(map[int16]uint8), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[string]uint) + if *vp == nil { + *vp = make(map[string]uint, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapStringUintL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapStringUintL(rv2i(rv).(map[string]uint), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16Uint8X(vp *map[int16]uint8, d *Decoder) { - v, changed := f.DecMapInt16Uint8V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapStringUintX(vp *map[string]uint, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[string]uint, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapStringUintL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, canChange bool, - d *Decoder) (_ map[int16]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) - v = make(map[int16]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv uint8 +func (fastpathT) DecMapStringUintL(v map[string]uint, containerLen int, d *Decoder) { + var mk string + var mv uint hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = string(d.d.DecodeStringAsBytes()) + d.mapElemValue() + mv = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16Uint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]uint16) - v, changed := fastpathTV.DecMapInt16Uint16V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapStringUint8R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[string]uint8)) = nil } } else { - fastpathTV.DecMapInt16Uint16V(rv2i(rv).(map[int16]uint16), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[string]uint8) + if *vp == nil { + *vp = make(map[string]uint8, decInferLen(containerLen, d.h.MaxInitLen, 17)) + } + if containerLen != 0 { + fastpathTV.DecMapStringUint8L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapStringUint8L(rv2i(rv).(map[string]uint8), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16Uint16X(vp *map[int16]uint16, d *Decoder) { - v, changed := f.DecMapInt16Uint16V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[string]uint8, decInferLen(containerLen, d.h.MaxInitLen, 17)) + } + if containerLen != 0 { + f.DecMapStringUint8L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, canChange bool, - d *Decoder) (_ map[int16]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 4) - v = make(map[int16]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv uint16 +func (fastpathT) DecMapStringUint8L(v map[string]uint8, containerLen int, d *Decoder) { + var mk string + var mv uint8 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = string(d.d.DecodeStringAsBytes()) + d.mapElemValue() + mv = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16Uint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]uint32) - v, changed := fastpathTV.DecMapInt16Uint32V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapStringUint64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[string]uint64)) = nil } } else { - fastpathTV.DecMapInt16Uint32V(rv2i(rv).(map[int16]uint32), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[string]uint64) + if *vp == nil { + *vp = make(map[string]uint64, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapStringUint64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapStringUint64L(rv2i(rv).(map[string]uint64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16Uint32X(vp *map[int16]uint32, d *Decoder) { - v, changed := f.DecMapInt16Uint32V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[string]uint64, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapStringUint64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, canChange bool, - d *Decoder) (_ map[int16]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) - v = make(map[int16]uint32, xlen) - changed = true +func (fastpathT) DecMapStringUint64L(v map[string]uint64, containerLen int, d *Decoder) { + var mk string + var mv uint64 + hasLen := containerLen > 0 + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = string(d.d.DecodeStringAsBytes()) + d.mapElemValue() + mv = d.d.DecodeUint64() + if v != nil { + v[mk] = mv + } + } +} +func (d *Decoder) fastpathDecMapStringIntR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[string]int)) = nil + } + } else { + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[string]int) + if *vp == nil { + *vp = make(map[string]int, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapStringIntL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapStringIntL(rv2i(rv).(map[string]int), containerLen, d) + } + d.mapEnd() } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed +} +func (f fastpathT) DecMapStringIntX(vp *map[string]int, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[string]int, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapStringIntL(*vp, containerLen, d) + } + d.mapEnd() } - d.depthIncr() - var mk int16 - var mv uint32 +} +func (fastpathT) DecMapStringIntL(v map[string]int, containerLen int, d *Decoder) { + var mk string + var mv int hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = string(d.d.DecodeStringAsBytes()) + d.mapElemValue() + mv = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16Uint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]uint64) - v, changed := fastpathTV.DecMapInt16Uint64V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapStringInt64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[string]int64)) = nil } } else { - fastpathTV.DecMapInt16Uint64V(rv2i(rv).(map[int16]uint64), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[string]int64) + if *vp == nil { + *vp = make(map[string]int64, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapStringInt64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapStringInt64L(rv2i(rv).(map[string]int64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16Uint64X(vp *map[int16]uint64, d *Decoder) { - v, changed := f.DecMapInt16Uint64V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[string]int64, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapStringInt64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, canChange bool, - d *Decoder) (_ map[int16]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[int16]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv uint64 +func (fastpathT) DecMapStringInt64L(v map[string]int64, containerLen int, d *Decoder) { + var mk string + var mv int64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = string(d.d.DecodeStringAsBytes()) + d.mapElemValue() + mv = d.d.DecodeInt64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16UintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]uintptr) - v, changed := fastpathTV.DecMapInt16UintptrV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapStringFloat32R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[string]float32)) = nil } } else { - fastpathTV.DecMapInt16UintptrV(rv2i(rv).(map[int16]uintptr), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[string]float32) + if *vp == nil { + *vp = make(map[string]float32, decInferLen(containerLen, d.h.MaxInitLen, 20)) + } + if containerLen != 0 { + fastpathTV.DecMapStringFloat32L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapStringFloat32L(rv2i(rv).(map[string]float32), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16UintptrX(vp *map[int16]uintptr, d *Decoder) { - v, changed := f.DecMapInt16UintptrV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[string]float32, decInferLen(containerLen, d.h.MaxInitLen, 20)) + } + if containerLen != 0 { + f.DecMapStringFloat32L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, canChange bool, - d *Decoder) (_ map[int16]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[int16]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv uintptr +func (fastpathT) DecMapStringFloat32L(v map[string]float32, containerLen int, d *Decoder) { + var mk string + var mv float32 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = string(d.d.DecodeStringAsBytes()) + d.mapElemValue() + mv = float32(d.decodeFloat32()) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16IntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]int) - v, changed := fastpathTV.DecMapInt16IntV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapStringFloat64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[string]float64)) = nil } } else { - fastpathTV.DecMapInt16IntV(rv2i(rv).(map[int16]int), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[string]float64) + if *vp == nil { + *vp = make(map[string]float64, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapStringFloat64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapStringFloat64L(rv2i(rv).(map[string]float64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16IntX(vp *map[int16]int, d *Decoder) { - v, changed := f.DecMapInt16IntV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[string]float64, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapStringFloat64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16IntV(v map[int16]int, canChange bool, - d *Decoder) (_ map[int16]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[int16]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv int +func (fastpathT) DecMapStringFloat64L(v map[string]float64, containerLen int, d *Decoder) { + var mk string + var mv float64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = string(d.d.DecodeStringAsBytes()) + d.mapElemValue() + mv = d.d.DecodeFloat64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16Int8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]int8) - v, changed := fastpathTV.DecMapInt16Int8V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapStringBoolR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[string]bool)) = nil } } else { - fastpathTV.DecMapInt16Int8V(rv2i(rv).(map[int16]int8), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[string]bool) + if *vp == nil { + *vp = make(map[string]bool, decInferLen(containerLen, d.h.MaxInitLen, 17)) + } + if containerLen != 0 { + fastpathTV.DecMapStringBoolL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapStringBoolL(rv2i(rv).(map[string]bool), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16Int8X(vp *map[int16]int8, d *Decoder) { - v, changed := f.DecMapInt16Int8V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[string]bool, decInferLen(containerLen, d.h.MaxInitLen, 17)) + } + if containerLen != 0 { + f.DecMapStringBoolL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, canChange bool, - d *Decoder) (_ map[int16]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) - v = make(map[int16]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv int8 +func (fastpathT) DecMapStringBoolL(v map[string]bool, containerLen int, d *Decoder) { + var mk string + var mv bool hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = string(d.d.DecodeStringAsBytes()) + d.mapElemValue() + mv = d.d.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16Int16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]int16) - v, changed := fastpathTV.DecMapInt16Int16V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUintIntfR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint]interface{})) = nil } } else { - fastpathTV.DecMapInt16Int16V(rv2i(rv).(map[int16]int16), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint]interface{}) + if *vp == nil { + *vp = make(map[uint]interface{}, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapUintIntfL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUintIntfL(rv2i(rv).(map[uint]interface{}), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16Int16X(vp *map[int16]int16, d *Decoder) { - v, changed := f.DecMapInt16Int16V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint]interface{}, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapUintIntfL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, canChange bool, - d *Decoder) (_ map[int16]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 4) - v = make(map[int16]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv int16 +func (fastpathT) DecMapUintIntfL(v map[uint]interface{}, containerLen int, d *Decoder) { + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint + var mv interface{} hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + d.mapElemValue() + if mapGet { + mv = v[mk] + } else { + mv = nil } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) + d.decode(&mv) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16Int32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]int32) - v, changed := fastpathTV.DecMapInt16Int32V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUintStringR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint]string)) = nil } } else { - fastpathTV.DecMapInt16Int32V(rv2i(rv).(map[int16]int32), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint]string) + if *vp == nil { + *vp = make(map[uint]string, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapUintStringL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUintStringL(rv2i(rv).(map[uint]string), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16Int32X(vp *map[int16]int32, d *Decoder) { - v, changed := f.DecMapInt16Int32V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUintStringX(vp *map[uint]string, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint]string, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapUintStringL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, canChange bool, - d *Decoder) (_ map[int16]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) - v = make(map[int16]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv int32 +func (fastpathT) DecMapUintStringL(v map[uint]string, containerLen int, d *Decoder) { + var mk uint + var mv string hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + d.mapElemValue() + mv = string(d.d.DecodeStringAsBytes()) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16Int64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]int64) - v, changed := fastpathTV.DecMapInt16Int64V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUintBytesR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint][]byte)) = nil } } else { - fastpathTV.DecMapInt16Int64V(rv2i(rv).(map[int16]int64), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint][]byte) + if *vp == nil { + *vp = make(map[uint][]byte, decInferLen(containerLen, d.h.MaxInitLen, 32)) + } + if containerLen != 0 { + fastpathTV.DecMapUintBytesL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUintBytesL(rv2i(rv).(map[uint][]byte), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16Int64X(vp *map[int16]int64, d *Decoder) { - v, changed := f.DecMapInt16Int64V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUintBytesX(vp *map[uint][]byte, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint][]byte, decInferLen(containerLen, d.h.MaxInitLen, 32)) + } + if containerLen != 0 { + f.DecMapUintBytesL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, canChange bool, - d *Decoder) (_ map[int16]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[int16]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv int64 +func (fastpathT) DecMapUintBytesL(v map[uint][]byte, containerLen int, d *Decoder) { + mapGet := v != nil && !d.h.MapValueReset + var mk uint + var mv []byte hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + d.mapElemValue() + if mapGet { + mv = v[mk] + } else { + mv = nil } - mv = dd.DecodeInt64() + mv = d.d.DecodeBytes(mv, false) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16Float32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]float32) - v, changed := fastpathTV.DecMapInt16Float32V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUintUintR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint]uint)) = nil } } else { - fastpathTV.DecMapInt16Float32V(rv2i(rv).(map[int16]float32), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint]uint) + if *vp == nil { + *vp = make(map[uint]uint, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapUintUintL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUintUintL(rv2i(rv).(map[uint]uint), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16Float32X(vp *map[int16]float32, d *Decoder) { - v, changed := f.DecMapInt16Float32V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint]uint, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapUintUintL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, canChange bool, - d *Decoder) (_ map[int16]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) - v = make(map[int16]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv float32 +func (fastpathT) DecMapUintUintL(v map[uint]uint, containerLen int, d *Decoder) { + var mk uint + var mv uint hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + d.mapElemValue() + mv = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16Float64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]float64) - v, changed := fastpathTV.DecMapInt16Float64V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUintUint8R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint]uint8)) = nil } } else { - fastpathTV.DecMapInt16Float64V(rv2i(rv).(map[int16]float64), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint]uint8) + if *vp == nil { + *vp = make(map[uint]uint8, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapUintUint8L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUintUint8L(rv2i(rv).(map[uint]uint8), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16Float64X(vp *map[int16]float64, d *Decoder) { - v, changed := f.DecMapInt16Float64V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint]uint8, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapUintUint8L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, canChange bool, - d *Decoder) (_ map[int16]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[int16]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv float64 +func (fastpathT) DecMapUintUint8L(v map[uint]uint8, containerLen int, d *Decoder) { + var mk uint + var mv uint8 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + d.mapElemValue() + mv = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt16BoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int16]bool) - v, changed := fastpathTV.DecMapInt16BoolV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUintUint64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint]uint64)) = nil } } else { - fastpathTV.DecMapInt16BoolV(rv2i(rv).(map[int16]bool), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint]uint64) + if *vp == nil { + *vp = make(map[uint]uint64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapUintUint64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUintUint64L(rv2i(rv).(map[uint]uint64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt16BoolX(vp *map[int16]bool, d *Decoder) { - v, changed := f.DecMapInt16BoolV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint]uint64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapUintUint64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, canChange bool, - d *Decoder) (_ map[int16]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) - v = make(map[int16]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int16 - var mv bool +func (fastpathT) DecMapUintUint64L(v map[uint]uint64, containerLen int, d *Decoder) { + var mk uint + var mv uint64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + d.mapElemValue() + mv = d.d.DecodeUint64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32IntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]interface{}) - v, changed := fastpathTV.DecMapInt32IntfV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUintIntR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint]int)) = nil } } else { - fastpathTV.DecMapInt32IntfV(rv2i(rv).(map[int32]interface{}), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint]int) + if *vp == nil { + *vp = make(map[uint]int, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapUintIntL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUintIntL(rv2i(rv).(map[uint]int), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32IntfX(vp *map[int32]interface{}, d *Decoder) { - v, changed := f.DecMapInt32IntfV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUintIntX(vp *map[uint]int, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint]int, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapUintIntL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, canChange bool, - d *Decoder) (_ map[int32]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) - v = make(map[int32]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk int32 - var mv interface{} +func (fastpathT) DecMapUintIntL(v map[uint]int, containerLen int, d *Decoder) { + var mk uint + var mv int hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + d.mapElemValue() + mv = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32StringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]string) - v, changed := fastpathTV.DecMapInt32StringV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUintInt64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint]int64)) = nil } } else { - fastpathTV.DecMapInt32StringV(rv2i(rv).(map[int32]string), false, d) - } -} -func (f fastpathT) DecMapInt32StringX(vp *map[int32]string, d *Decoder) { - v, changed := f.DecMapInt32StringV(*vp, true, d) - if changed { - *vp = v + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint]int64) + if *vp == nil { + *vp = make(map[uint]int64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapUintInt64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUintInt64L(rv2i(rv).(map[uint]int64), containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32StringV(v map[int32]string, canChange bool, - d *Decoder) (_ map[int32]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) - v = make(map[int32]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed +func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint]int64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapUintInt64L(*vp, containerLen, d) + } + d.mapEnd() } - d.depthIncr() - var mk int32 - var mv string +} +func (fastpathT) DecMapUintInt64L(v map[uint]int64, containerLen int, d *Decoder) { + var mk uint + var mv int64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + d.mapElemValue() + mv = d.d.DecodeInt64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32UintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]uint) - v, changed := fastpathTV.DecMapInt32UintV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUintFloat32R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint]float32)) = nil } } else { - fastpathTV.DecMapInt32UintV(rv2i(rv).(map[int32]uint), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint]float32) + if *vp == nil { + *vp = make(map[uint]float32, decInferLen(containerLen, d.h.MaxInitLen, 12)) + } + if containerLen != 0 { + fastpathTV.DecMapUintFloat32L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUintFloat32L(rv2i(rv).(map[uint]float32), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32UintX(vp *map[int32]uint, d *Decoder) { - v, changed := f.DecMapInt32UintV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint]float32, decInferLen(containerLen, d.h.MaxInitLen, 12)) + } + if containerLen != 0 { + f.DecMapUintFloat32L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, canChange bool, - d *Decoder) (_ map[int32]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[int32]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 - var mv uint +func (fastpathT) DecMapUintFloat32L(v map[uint]float32, containerLen int, d *Decoder) { + var mk uint + var mv float32 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + d.mapElemValue() + mv = float32(d.decodeFloat32()) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32Uint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]uint8) - v, changed := fastpathTV.DecMapInt32Uint8V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUintFloat64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint]float64)) = nil } } else { - fastpathTV.DecMapInt32Uint8V(rv2i(rv).(map[int32]uint8), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint]float64) + if *vp == nil { + *vp = make(map[uint]float64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapUintFloat64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUintFloat64L(rv2i(rv).(map[uint]float64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32Uint8X(vp *map[int32]uint8, d *Decoder) { - v, changed := f.DecMapInt32Uint8V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint]float64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapUintFloat64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, canChange bool, - d *Decoder) (_ map[int32]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[int32]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 - var mv uint8 +func (fastpathT) DecMapUintFloat64L(v map[uint]float64, containerLen int, d *Decoder) { + var mk uint + var mv float64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + d.mapElemValue() + mv = d.d.DecodeFloat64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32Uint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]uint16) - v, changed := fastpathTV.DecMapInt32Uint16V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUintBoolR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint]bool)) = nil } } else { - fastpathTV.DecMapInt32Uint16V(rv2i(rv).(map[int32]uint16), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint]bool) + if *vp == nil { + *vp = make(map[uint]bool, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapUintBoolL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUintBoolL(rv2i(rv).(map[uint]bool), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32Uint16X(vp *map[int32]uint16, d *Decoder) { - v, changed := f.DecMapInt32Uint16V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint]bool, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapUintBoolL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, canChange bool, - d *Decoder) (_ map[int32]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) - v = make(map[int32]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 - var mv uint16 +func (fastpathT) DecMapUintBoolL(v map[uint]bool, containerLen int, d *Decoder) { + var mk uint + var mv bool hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + d.mapElemValue() + mv = d.d.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32Uint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]uint32) - v, changed := fastpathTV.DecMapInt32Uint32V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint8IntfR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint8]interface{})) = nil } } else { - fastpathTV.DecMapInt32Uint32V(rv2i(rv).(map[int32]uint32), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint8]interface{}) + if *vp == nil { + *vp = make(map[uint8]interface{}, decInferLen(containerLen, d.h.MaxInitLen, 17)) + } + if containerLen != 0 { + fastpathTV.DecMapUint8IntfL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint8IntfL(rv2i(rv).(map[uint8]interface{}), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32Uint32X(vp *map[int32]uint32, d *Decoder) { - v, changed := f.DecMapInt32Uint32V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint8]interface{}, decInferLen(containerLen, d.h.MaxInitLen, 17)) + } + if containerLen != 0 { + f.DecMapUint8IntfL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, canChange bool, - d *Decoder) (_ map[int32]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) - v = make(map[int32]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 - var mv uint32 +func (fastpathT) DecMapUint8IntfL(v map[uint8]interface{}, containerLen int, d *Decoder) { + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint8 + var mv interface{} hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) + d.mapElemValue() + if mapGet { + mv = v[mk] + } else { + mv = nil } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) + d.decode(&mv) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32Uint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]uint64) - v, changed := fastpathTV.DecMapInt32Uint64V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint8StringR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint8]string)) = nil } } else { - fastpathTV.DecMapInt32Uint64V(rv2i(rv).(map[int32]uint64), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint8]string) + if *vp == nil { + *vp = make(map[uint8]string, decInferLen(containerLen, d.h.MaxInitLen, 17)) + } + if containerLen != 0 { + fastpathTV.DecMapUint8StringL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint8StringL(rv2i(rv).(map[uint8]string), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32Uint64X(vp *map[int32]uint64, d *Decoder) { - v, changed := f.DecMapInt32Uint64V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint8]string, decInferLen(containerLen, d.h.MaxInitLen, 17)) + } + if containerLen != 0 { + f.DecMapUint8StringL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, canChange bool, - d *Decoder) (_ map[int32]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[int32]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 - var mv uint64 +func (fastpathT) DecMapUint8StringL(v map[uint8]string, containerLen int, d *Decoder) { + var mk uint8 + var mv string hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) + d.mapElemValue() + mv = string(d.d.DecodeStringAsBytes()) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32UintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]uintptr) - v, changed := fastpathTV.DecMapInt32UintptrV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint8BytesR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint8][]byte)) = nil } } else { - fastpathTV.DecMapInt32UintptrV(rv2i(rv).(map[int32]uintptr), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint8][]byte) + if *vp == nil { + *vp = make(map[uint8][]byte, decInferLen(containerLen, d.h.MaxInitLen, 25)) + } + if containerLen != 0 { + fastpathTV.DecMapUint8BytesL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint8BytesL(rv2i(rv).(map[uint8][]byte), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32UintptrX(vp *map[int32]uintptr, d *Decoder) { - v, changed := f.DecMapInt32UintptrV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint8BytesX(vp *map[uint8][]byte, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint8][]byte, decInferLen(containerLen, d.h.MaxInitLen, 25)) + } + if containerLen != 0 { + f.DecMapUint8BytesL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, canChange bool, - d *Decoder) (_ map[int32]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[int32]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 - var mv uintptr +func (fastpathT) DecMapUint8BytesL(v map[uint8][]byte, containerLen int, d *Decoder) { + mapGet := v != nil && !d.h.MapValueReset + var mk uint8 + var mv []byte hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) + d.mapElemValue() + if mapGet { + mv = v[mk] + } else { + mv = nil } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) + mv = d.d.DecodeBytes(mv, false) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32IntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]int) - v, changed := fastpathTV.DecMapInt32IntV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint8UintR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint8]uint)) = nil } } else { - fastpathTV.DecMapInt32IntV(rv2i(rv).(map[int32]int), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint8]uint) + if *vp == nil { + *vp = make(map[uint8]uint, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapUint8UintL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint8UintL(rv2i(rv).(map[uint8]uint), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32IntX(vp *map[int32]int, d *Decoder) { - v, changed := f.DecMapInt32IntV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint8]uint, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapUint8UintL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32IntV(v map[int32]int, canChange bool, - d *Decoder) (_ map[int32]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[int32]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 - var mv int +func (fastpathT) DecMapUint8UintL(v map[uint8]uint, containerLen int, d *Decoder) { + var mk uint8 + var mv uint hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) + d.mapElemValue() + mv = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32Int8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]int8) - v, changed := fastpathTV.DecMapInt32Int8V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint8Uint8R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint8]uint8)) = nil } } else { - fastpathTV.DecMapInt32Int8V(rv2i(rv).(map[int32]int8), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint8]uint8) + if *vp == nil { + *vp = make(map[uint8]uint8, decInferLen(containerLen, d.h.MaxInitLen, 2)) + } + if containerLen != 0 { + fastpathTV.DecMapUint8Uint8L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint8Uint8L(rv2i(rv).(map[uint8]uint8), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32Int8X(vp *map[int32]int8, d *Decoder) { - v, changed := f.DecMapInt32Int8V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint8]uint8, decInferLen(containerLen, d.h.MaxInitLen, 2)) + } + if containerLen != 0 { + f.DecMapUint8Uint8L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, canChange bool, - d *Decoder) (_ map[int32]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[int32]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 - var mv int8 +func (fastpathT) DecMapUint8Uint8L(v map[uint8]uint8, containerLen int, d *Decoder) { + var mk uint8 + var mv uint8 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) + d.mapElemValue() + mv = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32Int16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]int16) - v, changed := fastpathTV.DecMapInt32Int16V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint8Uint64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint8]uint64)) = nil } } else { - fastpathTV.DecMapInt32Int16V(rv2i(rv).(map[int32]int16), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint8]uint64) + if *vp == nil { + *vp = make(map[uint8]uint64, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapUint8Uint64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint8Uint64L(rv2i(rv).(map[uint8]uint64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32Int16X(vp *map[int32]int16, d *Decoder) { - v, changed := f.DecMapInt32Int16V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint8]uint64, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapUint8Uint64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, canChange bool, - d *Decoder) (_ map[int32]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) - v = make(map[int32]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 - var mv int16 +func (fastpathT) DecMapUint8Uint64L(v map[uint8]uint64, containerLen int, d *Decoder) { + var mk uint8 + var mv uint64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) + d.mapElemValue() + mv = d.d.DecodeUint64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32Int32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]int32) - v, changed := fastpathTV.DecMapInt32Int32V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint8IntR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint8]int)) = nil } } else { - fastpathTV.DecMapInt32Int32V(rv2i(rv).(map[int32]int32), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint8]int) + if *vp == nil { + *vp = make(map[uint8]int, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapUint8IntL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint8IntL(rv2i(rv).(map[uint8]int), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32Int32X(vp *map[int32]int32, d *Decoder) { - v, changed := f.DecMapInt32Int32V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint8]int, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapUint8IntL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, canChange bool, - d *Decoder) (_ map[int32]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) - v = make(map[int32]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 - var mv int32 +func (fastpathT) DecMapUint8IntL(v map[uint8]int, containerLen int, d *Decoder) { + var mk uint8 + var mv int hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) + d.mapElemValue() + mv = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32Int64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]int64) - v, changed := fastpathTV.DecMapInt32Int64V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint8Int64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint8]int64)) = nil } } else { - fastpathTV.DecMapInt32Int64V(rv2i(rv).(map[int32]int64), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint8]int64) + if *vp == nil { + *vp = make(map[uint8]int64, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapUint8Int64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint8Int64L(rv2i(rv).(map[uint8]int64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32Int64X(vp *map[int32]int64, d *Decoder) { - v, changed := f.DecMapInt32Int64V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint8]int64, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapUint8Int64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, canChange bool, - d *Decoder) (_ map[int32]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[int32]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 +func (fastpathT) DecMapUint8Int64L(v map[uint8]int64, containerLen int, d *Decoder) { + var mk uint8 var mv int64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) + d.mapElemValue() + mv = d.d.DecodeInt64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32Float32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]float32) - v, changed := fastpathTV.DecMapInt32Float32V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint8Float32R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint8]float32)) = nil } } else { - fastpathTV.DecMapInt32Float32V(rv2i(rv).(map[int32]float32), false, d) - } -} -func (f fastpathT) DecMapInt32Float32X(vp *map[int32]float32, d *Decoder) { - v, changed := f.DecMapInt32Float32V(*vp, true, d) - if changed { - *vp = v + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint8]float32) + if *vp == nil { + *vp = make(map[uint8]float32, decInferLen(containerLen, d.h.MaxInitLen, 5)) + } + if containerLen != 0 { + fastpathTV.DecMapUint8Float32L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint8Float32L(rv2i(rv).(map[uint8]float32), containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, canChange bool, - d *Decoder) (_ map[int32]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) - v = make(map[int32]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed +func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint8]float32, decInferLen(containerLen, d.h.MaxInitLen, 5)) + } + if containerLen != 0 { + f.DecMapUint8Float32L(*vp, containerLen, d) + } + d.mapEnd() } - d.depthIncr() - var mk int32 +} +func (fastpathT) DecMapUint8Float32L(v map[uint8]float32, containerLen int, d *Decoder) { + var mk uint8 var mv float32 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) + d.mapElemValue() + mv = float32(d.decodeFloat32()) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32Float64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]float64) - v, changed := fastpathTV.DecMapInt32Float64V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint8Float64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint8]float64)) = nil } } else { - fastpathTV.DecMapInt32Float64V(rv2i(rv).(map[int32]float64), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint8]float64) + if *vp == nil { + *vp = make(map[uint8]float64, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapUint8Float64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint8Float64L(rv2i(rv).(map[uint8]float64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32Float64X(vp *map[int32]float64, d *Decoder) { - v, changed := f.DecMapInt32Float64V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint8]float64, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapUint8Float64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, canChange bool, - d *Decoder) (_ map[int32]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[int32]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 +func (fastpathT) DecMapUint8Float64L(v map[uint8]float64, containerLen int, d *Decoder) { + var mk uint8 var mv float64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) + d.mapElemValue() + mv = d.d.DecodeFloat64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt32BoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int32]bool) - v, changed := fastpathTV.DecMapInt32BoolV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint8BoolR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint8]bool)) = nil } } else { - fastpathTV.DecMapInt32BoolV(rv2i(rv).(map[int32]bool), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint8]bool) + if *vp == nil { + *vp = make(map[uint8]bool, decInferLen(containerLen, d.h.MaxInitLen, 2)) + } + if containerLen != 0 { + fastpathTV.DecMapUint8BoolL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint8BoolL(rv2i(rv).(map[uint8]bool), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt32BoolX(vp *map[int32]bool, d *Decoder) { - v, changed := f.DecMapInt32BoolV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint8]bool, decInferLen(containerLen, d.h.MaxInitLen, 2)) + } + if containerLen != 0 { + f.DecMapUint8BoolL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, canChange bool, - d *Decoder) (_ map[int32]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[int32]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int32 +func (fastpathT) DecMapUint8BoolL(v map[uint8]bool, containerLen int, d *Decoder) { + var mk uint8 var mv bool hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) + d.mapElemValue() + mv = d.d.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64IntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]interface{}) - v, changed := fastpathTV.DecMapInt64IntfV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint64IntfR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint64]interface{})) = nil } } else { - fastpathTV.DecMapInt64IntfV(rv2i(rv).(map[int64]interface{}), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint64]interface{}) + if *vp == nil { + *vp = make(map[uint64]interface{}, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapUint64IntfL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint64IntfL(rv2i(rv).(map[uint64]interface{}), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64IntfX(vp *map[int64]interface{}, d *Decoder) { - v, changed := f.DecMapInt64IntfV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint64]interface{}, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapUint64IntfL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, canChange bool, - d *Decoder) (_ map[int64]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[int64]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() +func (fastpathT) DecMapUint64IntfL(v map[uint64]interface{}, containerLen int, d *Decoder) { mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk int64 + var mk uint64 var mv interface{} hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeUint64() + d.mapElemValue() if mapGet { mv = v[mk] } else { @@ -31765,1904 +7349,1602 @@ func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, canChange bool, v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64StringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]string) - v, changed := fastpathTV.DecMapInt64StringV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint64StringR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint64]string)) = nil } } else { - fastpathTV.DecMapInt64StringV(rv2i(rv).(map[int64]string), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint64]string) + if *vp == nil { + *vp = make(map[uint64]string, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapUint64StringL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint64StringL(rv2i(rv).(map[uint64]string), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64StringX(vp *map[int64]string, d *Decoder) { - v, changed := f.DecMapInt64StringV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint64]string, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapUint64StringL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64StringV(v map[int64]string, canChange bool, - d *Decoder) (_ map[int64]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) - v = make(map[int64]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 +func (fastpathT) DecMapUint64StringL(v map[uint64]string, containerLen int, d *Decoder) { + var mk uint64 var mv string hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeUint64() + d.mapElemValue() + mv = string(d.d.DecodeStringAsBytes()) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64UintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]uint) - v, changed := fastpathTV.DecMapInt64UintV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint64BytesR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint64][]byte)) = nil } } else { - fastpathTV.DecMapInt64UintV(rv2i(rv).(map[int64]uint), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint64][]byte) + if *vp == nil { + *vp = make(map[uint64][]byte, decInferLen(containerLen, d.h.MaxInitLen, 32)) + } + if containerLen != 0 { + fastpathTV.DecMapUint64BytesL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint64BytesL(rv2i(rv).(map[uint64][]byte), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64UintX(vp *map[int64]uint, d *Decoder) { - v, changed := f.DecMapInt64UintV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint64BytesX(vp *map[uint64][]byte, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint64][]byte, decInferLen(containerLen, d.h.MaxInitLen, 32)) + } + if containerLen != 0 { + f.DecMapUint64BytesL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, canChange bool, - d *Decoder) (_ map[int64]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[int64]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv uint +func (fastpathT) DecMapUint64BytesL(v map[uint64][]byte, containerLen int, d *Decoder) { + mapGet := v != nil && !d.h.MapValueReset + var mk uint64 + var mv []byte hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeUint64() + d.mapElemValue() + if mapGet { + mv = v[mk] + } else { + mv = nil } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) + mv = d.d.DecodeBytes(mv, false) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64Uint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]uint8) - v, changed := fastpathTV.DecMapInt64Uint8V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint64UintR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint64]uint)) = nil } } else { - fastpathTV.DecMapInt64Uint8V(rv2i(rv).(map[int64]uint8), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint64]uint) + if *vp == nil { + *vp = make(map[uint64]uint, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapUint64UintL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint64UintL(rv2i(rv).(map[uint64]uint), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64Uint8X(vp *map[int64]uint8, d *Decoder) { - v, changed := f.DecMapInt64Uint8V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint64]uint, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapUint64UintL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, canChange bool, - d *Decoder) (_ map[int64]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[int64]uint8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv uint8 +func (fastpathT) DecMapUint64UintL(v map[uint64]uint, containerLen int, d *Decoder) { + var mk uint64 + var mv uint hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeUint64() + d.mapElemValue() + mv = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64Uint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]uint16) - v, changed := fastpathTV.DecMapInt64Uint16V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint64Uint8R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint64]uint8)) = nil } } else { - fastpathTV.DecMapInt64Uint16V(rv2i(rv).(map[int64]uint16), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint64]uint8) + if *vp == nil { + *vp = make(map[uint64]uint8, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapUint64Uint8L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint64Uint8L(rv2i(rv).(map[uint64]uint8), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64Uint16X(vp *map[int64]uint16, d *Decoder) { - v, changed := f.DecMapInt64Uint16V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint64]uint8, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapUint64Uint8L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, canChange bool, - d *Decoder) (_ map[int64]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[int64]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv uint16 +func (fastpathT) DecMapUint64Uint8L(v map[uint64]uint8, containerLen int, d *Decoder) { + var mk uint64 + var mv uint8 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeUint64() + d.mapElemValue() + mv = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64Uint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]uint32) - v, changed := fastpathTV.DecMapInt64Uint32V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint64Uint64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint64]uint64)) = nil } } else { - fastpathTV.DecMapInt64Uint32V(rv2i(rv).(map[int64]uint32), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint64]uint64) + if *vp == nil { + *vp = make(map[uint64]uint64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapUint64Uint64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint64Uint64L(rv2i(rv).(map[uint64]uint64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64Uint32X(vp *map[int64]uint32, d *Decoder) { - v, changed := f.DecMapInt64Uint32V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint64]uint64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapUint64Uint64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, canChange bool, - d *Decoder) (_ map[int64]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[int64]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv uint32 +func (fastpathT) DecMapUint64Uint64L(v map[uint64]uint64, containerLen int, d *Decoder) { + var mk uint64 + var mv uint64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeUint64() + d.mapElemValue() + mv = d.d.DecodeUint64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64Uint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]uint64) - v, changed := fastpathTV.DecMapInt64Uint64V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint64IntR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint64]int)) = nil } } else { - fastpathTV.DecMapInt64Uint64V(rv2i(rv).(map[int64]uint64), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint64]int) + if *vp == nil { + *vp = make(map[uint64]int, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapUint64IntL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint64IntL(rv2i(rv).(map[uint64]int), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64Uint64X(vp *map[int64]uint64, d *Decoder) { - v, changed := f.DecMapInt64Uint64V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint64]int, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapUint64IntL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, canChange bool, - d *Decoder) (_ map[int64]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[int64]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv uint64 +func (fastpathT) DecMapUint64IntL(v map[uint64]int, containerLen int, d *Decoder) { + var mk uint64 + var mv int hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeUint64() + d.mapElemValue() + mv = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64UintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]uintptr) - v, changed := fastpathTV.DecMapInt64UintptrV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint64Int64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint64]int64)) = nil } } else { - fastpathTV.DecMapInt64UintptrV(rv2i(rv).(map[int64]uintptr), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint64]int64) + if *vp == nil { + *vp = make(map[uint64]int64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapUint64Int64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint64Int64L(rv2i(rv).(map[uint64]int64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64UintptrX(vp *map[int64]uintptr, d *Decoder) { - v, changed := f.DecMapInt64UintptrV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint64]int64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapUint64Int64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, canChange bool, - d *Decoder) (_ map[int64]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[int64]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv uintptr +func (fastpathT) DecMapUint64Int64L(v map[uint64]int64, containerLen int, d *Decoder) { + var mk uint64 + var mv int64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeUint64() + d.mapElemValue() + mv = d.d.DecodeInt64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64IntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]int) - v, changed := fastpathTV.DecMapInt64IntV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint64Float32R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint64]float32)) = nil } } else { - fastpathTV.DecMapInt64IntV(rv2i(rv).(map[int64]int), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint64]float32) + if *vp == nil { + *vp = make(map[uint64]float32, decInferLen(containerLen, d.h.MaxInitLen, 12)) + } + if containerLen != 0 { + fastpathTV.DecMapUint64Float32L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint64Float32L(rv2i(rv).(map[uint64]float32), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64IntX(vp *map[int64]int, d *Decoder) { - v, changed := f.DecMapInt64IntV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint64]float32, decInferLen(containerLen, d.h.MaxInitLen, 12)) + } + if containerLen != 0 { + f.DecMapUint64Float32L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64IntV(v map[int64]int, canChange bool, - d *Decoder) (_ map[int64]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[int64]int, xlen) - changed = true +func (fastpathT) DecMapUint64Float32L(v map[uint64]float32, containerLen int, d *Decoder) { + var mk uint64 + var mv float32 + hasLen := containerLen > 0 + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeUint64() + d.mapElemValue() + mv = float32(d.decodeFloat32()) + if v != nil { + v[mk] = mv + } + } +} +func (d *Decoder) fastpathDecMapUint64Float64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint64]float64)) = nil + } + } else { + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint64]float64) + if *vp == nil { + *vp = make(map[uint64]float64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapUint64Float64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint64Float64L(rv2i(rv).(map[uint64]float64), containerLen, d) + } + d.mapEnd() } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed +} +func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint64]float64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapUint64Float64L(*vp, containerLen, d) + } + d.mapEnd() } - d.depthIncr() - var mk int64 - var mv int +} +func (fastpathT) DecMapUint64Float64L(v map[uint64]float64, containerLen int, d *Decoder) { + var mk uint64 + var mv float64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeUint64() + d.mapElemValue() + mv = d.d.DecodeFloat64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64Int8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]int8) - v, changed := fastpathTV.DecMapInt64Int8V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapUint64BoolR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[uint64]bool)) = nil } } else { - fastpathTV.DecMapInt64Int8V(rv2i(rv).(map[int64]int8), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[uint64]bool) + if *vp == nil { + *vp = make(map[uint64]bool, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapUint64BoolL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapUint64BoolL(rv2i(rv).(map[uint64]bool), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64Int8X(vp *map[int64]int8, d *Decoder) { - v, changed := f.DecMapInt64Int8V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[uint64]bool, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapUint64BoolL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, canChange bool, - d *Decoder) (_ map[int64]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[int64]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv int8 +func (fastpathT) DecMapUint64BoolL(v map[uint64]bool, containerLen int, d *Decoder) { + var mk uint64 + var mv bool hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeUint64() + d.mapElemValue() + mv = d.d.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64Int16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]int16) - v, changed := fastpathTV.DecMapInt64Int16V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapIntIntfR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int]interface{})) = nil } } else { - fastpathTV.DecMapInt64Int16V(rv2i(rv).(map[int64]int16), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int]interface{}) + if *vp == nil { + *vp = make(map[int]interface{}, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapIntIntfL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapIntIntfL(rv2i(rv).(map[int]interface{}), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64Int16X(vp *map[int64]int16, d *Decoder) { - v, changed := f.DecMapInt64Int16V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapIntIntfX(vp *map[int]interface{}, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int]interface{}, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapIntIntfL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, canChange bool, - d *Decoder) (_ map[int64]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) - v = make(map[int64]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv int16 +func (fastpathT) DecMapIntIntfL(v map[int]interface{}, containerLen int, d *Decoder) { + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset + var mk int + var mv interface{} hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) + d.mapElemValue() + if mapGet { + mv = v[mk] + } else { + mv = nil } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) + d.decode(&mv) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64Int32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]int32) - v, changed := fastpathTV.DecMapInt64Int32V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapIntStringR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int]string)) = nil } } else { - fastpathTV.DecMapInt64Int32V(rv2i(rv).(map[int64]int32), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int]string) + if *vp == nil { + *vp = make(map[int]string, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapIntStringL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapIntStringL(rv2i(rv).(map[int]string), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64Int32X(vp *map[int64]int32, d *Decoder) { - v, changed := f.DecMapInt64Int32V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapIntStringX(vp *map[int]string, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int]string, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapIntStringL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, canChange bool, - d *Decoder) (_ map[int64]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[int64]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv int32 +func (fastpathT) DecMapIntStringL(v map[int]string, containerLen int, d *Decoder) { + var mk int + var mv string hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) + d.mapElemValue() + mv = string(d.d.DecodeStringAsBytes()) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64Int64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]int64) - v, changed := fastpathTV.DecMapInt64Int64V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapIntBytesR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int][]byte)) = nil } } else { - fastpathTV.DecMapInt64Int64V(rv2i(rv).(map[int64]int64), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int][]byte) + if *vp == nil { + *vp = make(map[int][]byte, decInferLen(containerLen, d.h.MaxInitLen, 32)) + } + if containerLen != 0 { + fastpathTV.DecMapIntBytesL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapIntBytesL(rv2i(rv).(map[int][]byte), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64Int64X(vp *map[int64]int64, d *Decoder) { - v, changed := f.DecMapInt64Int64V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapIntBytesX(vp *map[int][]byte, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int][]byte, decInferLen(containerLen, d.h.MaxInitLen, 32)) + } + if containerLen != 0 { + f.DecMapIntBytesL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, canChange bool, - d *Decoder) (_ map[int64]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[int64]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv int64 +func (fastpathT) DecMapIntBytesL(v map[int][]byte, containerLen int, d *Decoder) { + mapGet := v != nil && !d.h.MapValueReset + var mk int + var mv []byte hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) + d.mapElemValue() + if mapGet { + mv = v[mk] + } else { + mv = nil } - mv = dd.DecodeInt64() + mv = d.d.DecodeBytes(mv, false) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64Float32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]float32) - v, changed := fastpathTV.DecMapInt64Float32V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapIntUintR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int]uint)) = nil } } else { - fastpathTV.DecMapInt64Float32V(rv2i(rv).(map[int64]float32), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int]uint) + if *vp == nil { + *vp = make(map[int]uint, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapIntUintL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapIntUintL(rv2i(rv).(map[int]uint), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64Float32X(vp *map[int64]float32, d *Decoder) { - v, changed := f.DecMapInt64Float32V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapIntUintX(vp *map[int]uint, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int]uint, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapIntUintL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, canChange bool, - d *Decoder) (_ map[int64]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) - v = make(map[int64]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv float32 +func (fastpathT) DecMapIntUintL(v map[int]uint, containerLen int, d *Decoder) { + var mk int + var mv uint hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) + d.mapElemValue() + mv = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64Float64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]float64) - v, changed := fastpathTV.DecMapInt64Float64V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapIntUint8R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int]uint8)) = nil } } else { - fastpathTV.DecMapInt64Float64V(rv2i(rv).(map[int64]float64), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int]uint8) + if *vp == nil { + *vp = make(map[int]uint8, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapIntUint8L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapIntUint8L(rv2i(rv).(map[int]uint8), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64Float64X(vp *map[int64]float64, d *Decoder) { - v, changed := f.DecMapInt64Float64V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapIntUint8X(vp *map[int]uint8, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int]uint8, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapIntUint8L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, canChange bool, - d *Decoder) (_ map[int64]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) - v = make(map[int64]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv float64 +func (fastpathT) DecMapIntUint8L(v map[int]uint8, containerLen int, d *Decoder) { + var mk int + var mv uint8 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) + d.mapElemValue() + mv = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapInt64BoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[int64]bool) - v, changed := fastpathTV.DecMapInt64BoolV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapIntUint64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int]uint64)) = nil } } else { - fastpathTV.DecMapInt64BoolV(rv2i(rv).(map[int64]bool), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int]uint64) + if *vp == nil { + *vp = make(map[int]uint64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapIntUint64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapIntUint64L(rv2i(rv).(map[int]uint64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapInt64BoolX(vp *map[int64]bool, d *Decoder) { - v, changed := f.DecMapInt64BoolV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapIntUint64X(vp *map[int]uint64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int]uint64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapIntUint64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, canChange bool, - d *Decoder) (_ map[int64]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[int64]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk int64 - var mv bool +func (fastpathT) DecMapIntUint64L(v map[int]uint64, containerLen int, d *Decoder) { + var mk int + var mv uint64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeInt64() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) + d.mapElemValue() + mv = d.d.DecodeUint64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolIntfR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]interface{}) - v, changed := fastpathTV.DecMapBoolIntfV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapIntIntR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int]int)) = nil } } else { - fastpathTV.DecMapBoolIntfV(rv2i(rv).(map[bool]interface{}), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int]int) + if *vp == nil { + *vp = make(map[int]int, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapIntIntL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapIntIntL(rv2i(rv).(map[int]int), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolIntfX(vp *map[bool]interface{}, d *Decoder) { - v, changed := f.DecMapBoolIntfV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapIntIntX(vp *map[int]int, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int]int, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapIntIntL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, canChange bool, - d *Decoder) (_ map[bool]interface{}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) - v = make(map[bool]interface{}, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset - var mk bool - var mv interface{} +func (fastpathT) DecMapIntIntL(v map[int]int, containerLen int, d *Decoder) { + var mk int + var mv int hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = nil - } - continue - } - if mapGet { - mv = v[mk] - } else { - mv = nil - } - d.decode(&mv) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) + d.mapElemValue() + mv = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolStringR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]string) - v, changed := fastpathTV.DecMapBoolStringV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapIntInt64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int]int64)) = nil } } else { - fastpathTV.DecMapBoolStringV(rv2i(rv).(map[bool]string), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int]int64) + if *vp == nil { + *vp = make(map[int]int64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapIntInt64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapIntInt64L(rv2i(rv).(map[int]int64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolStringX(vp *map[bool]string, d *Decoder) { - v, changed := f.DecMapBoolStringV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapIntInt64X(vp *map[int]int64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int]int64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapIntInt64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolStringV(v map[bool]string, canChange bool, - d *Decoder) (_ map[bool]string, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) - v = make(map[bool]string, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool - var mv string +func (fastpathT) DecMapIntInt64L(v map[int]int64, containerLen int, d *Decoder) { + var mk int + var mv int64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = "" - } - continue - } - mv = dd.DecodeString() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) + d.mapElemValue() + mv = d.d.DecodeInt64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolUintR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]uint) - v, changed := fastpathTV.DecMapBoolUintV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapIntFloat32R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int]float32)) = nil } } else { - fastpathTV.DecMapBoolUintV(rv2i(rv).(map[bool]uint), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int]float32) + if *vp == nil { + *vp = make(map[int]float32, decInferLen(containerLen, d.h.MaxInitLen, 12)) + } + if containerLen != 0 { + fastpathTV.DecMapIntFloat32L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapIntFloat32L(rv2i(rv).(map[int]float32), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolUintX(vp *map[bool]uint, d *Decoder) { - v, changed := f.DecMapBoolUintV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapIntFloat32X(vp *map[int]float32, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int]float32, decInferLen(containerLen, d.h.MaxInitLen, 12)) + } + if containerLen != 0 { + f.DecMapIntFloat32L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, canChange bool, - d *Decoder) (_ map[bool]uint, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[bool]uint, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool - var mv uint +func (fastpathT) DecMapIntFloat32L(v map[int]float32, containerLen int, d *Decoder) { + var mk int + var mv float32 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) + d.mapElemValue() + mv = float32(d.decodeFloat32()) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolUint8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]uint8) - v, changed := fastpathTV.DecMapBoolUint8V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapIntFloat64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int]float64)) = nil } } else { - fastpathTV.DecMapBoolUint8V(rv2i(rv).(map[bool]uint8), false, d) - } -} -func (f fastpathT) DecMapBoolUint8X(vp *map[bool]uint8, d *Decoder) { - v, changed := f.DecMapBoolUint8V(*vp, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, canChange bool, - d *Decoder) (_ map[bool]uint8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) - v = make(map[bool]uint8, xlen) - changed = true + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int]float64) + if *vp == nil { + *vp = make(map[int]float64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapIntFloat64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapIntFloat64L(rv2i(rv).(map[int]float64), containerLen, d) + } + d.mapEnd() } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed +} +func (f fastpathT) DecMapIntFloat64X(vp *map[int]float64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int]float64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapIntFloat64L(*vp, containerLen, d) + } + d.mapEnd() } - d.depthIncr() - var mk bool - var mv uint8 +} +func (fastpathT) DecMapIntFloat64L(v map[int]float64, containerLen int, d *Decoder) { + var mk int + var mv float64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) + d.mapElemValue() + mv = d.d.DecodeFloat64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolUint16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]uint16) - v, changed := fastpathTV.DecMapBoolUint16V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapIntBoolR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int]bool)) = nil } } else { - fastpathTV.DecMapBoolUint16V(rv2i(rv).(map[bool]uint16), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int]bool) + if *vp == nil { + *vp = make(map[int]bool, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapIntBoolL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapIntBoolL(rv2i(rv).(map[int]bool), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolUint16X(vp *map[bool]uint16, d *Decoder) { - v, changed := f.DecMapBoolUint16V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapIntBoolX(vp *map[int]bool, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int]bool, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapIntBoolL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, canChange bool, - d *Decoder) (_ map[bool]uint16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) - v = make(map[bool]uint16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool - var mv uint16 +func (fastpathT) DecMapIntBoolL(v map[int]bool, containerLen int, d *Decoder) { + var mk int + var mv bool hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) + d.mapElemValue() + mv = d.d.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolUint32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]uint32) - v, changed := fastpathTV.DecMapBoolUint32V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapInt64IntfR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int64]interface{})) = nil } } else { - fastpathTV.DecMapBoolUint32V(rv2i(rv).(map[bool]uint32), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int64]interface{}) + if *vp == nil { + *vp = make(map[int64]interface{}, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapInt64IntfL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapInt64IntfL(rv2i(rv).(map[int64]interface{}), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolUint32X(vp *map[bool]uint32, d *Decoder) { - v, changed := f.DecMapBoolUint32V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapInt64IntfX(vp *map[int64]interface{}, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int64]interface{}, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapInt64IntfL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, canChange bool, - d *Decoder) (_ map[bool]uint32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[bool]uint32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool - var mv uint32 +func (fastpathT) DecMapInt64IntfL(v map[int64]interface{}, containerLen int, d *Decoder) { + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset + var mk int64 + var mv interface{} hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeInt64() + d.mapElemValue() + if mapGet { + mv = v[mk] + } else { + mv = nil } - mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) + d.decode(&mv) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolUint64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]uint64) - v, changed := fastpathTV.DecMapBoolUint64V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapInt64StringR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int64]string)) = nil } } else { - fastpathTV.DecMapBoolUint64V(rv2i(rv).(map[bool]uint64), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int64]string) + if *vp == nil { + *vp = make(map[int64]string, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + fastpathTV.DecMapInt64StringL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapInt64StringL(rv2i(rv).(map[int64]string), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolUint64X(vp *map[bool]uint64, d *Decoder) { - v, changed := f.DecMapBoolUint64V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapInt64StringX(vp *map[int64]string, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int64]string, decInferLen(containerLen, d.h.MaxInitLen, 24)) + } + if containerLen != 0 { + f.DecMapInt64StringL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, canChange bool, - d *Decoder) (_ map[bool]uint64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[bool]uint64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool - var mv uint64 +func (fastpathT) DecMapInt64StringL(v map[int64]string, containerLen int, d *Decoder) { + var mk int64 + var mv string hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeUint64() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeInt64() + d.mapElemValue() + mv = string(d.d.DecodeStringAsBytes()) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolUintptrR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]uintptr) - v, changed := fastpathTV.DecMapBoolUintptrV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapInt64BytesR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int64][]byte)) = nil } } else { - fastpathTV.DecMapBoolUintptrV(rv2i(rv).(map[bool]uintptr), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int64][]byte) + if *vp == nil { + *vp = make(map[int64][]byte, decInferLen(containerLen, d.h.MaxInitLen, 32)) + } + if containerLen != 0 { + fastpathTV.DecMapInt64BytesL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapInt64BytesL(rv2i(rv).(map[int64][]byte), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolUintptrX(vp *map[bool]uintptr, d *Decoder) { - v, changed := f.DecMapBoolUintptrV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapInt64BytesX(vp *map[int64][]byte, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int64][]byte, decInferLen(containerLen, d.h.MaxInitLen, 32)) + } + if containerLen != 0 { + f.DecMapInt64BytesL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, canChange bool, - d *Decoder) (_ map[bool]uintptr, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[bool]uintptr, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool - var mv uintptr +func (fastpathT) DecMapInt64BytesL(v map[int64][]byte, containerLen int, d *Decoder) { + mapGet := v != nil && !d.h.MapValueReset + var mk int64 + var mv []byte hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeInt64() + d.mapElemValue() + if mapGet { + mv = v[mk] + } else { + mv = nil } - mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) + mv = d.d.DecodeBytes(mv, false) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolIntR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]int) - v, changed := fastpathTV.DecMapBoolIntV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapInt64UintR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int64]uint)) = nil } } else { - fastpathTV.DecMapBoolIntV(rv2i(rv).(map[bool]int), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int64]uint) + if *vp == nil { + *vp = make(map[int64]uint, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapInt64UintL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapInt64UintL(rv2i(rv).(map[int64]uint), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolIntX(vp *map[bool]int, d *Decoder) { - v, changed := f.DecMapBoolIntV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapInt64UintX(vp *map[int64]uint, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int64]uint, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapInt64UintL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolIntV(v map[bool]int, canChange bool, - d *Decoder) (_ map[bool]int, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[bool]int, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool - var mv int +func (fastpathT) DecMapInt64UintL(v map[int64]uint, containerLen int, d *Decoder) { + var mk int64 + var mv uint hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeInt64() + d.mapElemValue() + mv = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolInt8R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]int8) - v, changed := fastpathTV.DecMapBoolInt8V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapInt64Uint8R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int64]uint8)) = nil } } else { - fastpathTV.DecMapBoolInt8V(rv2i(rv).(map[bool]int8), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int64]uint8) + if *vp == nil { + *vp = make(map[int64]uint8, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapInt64Uint8L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapInt64Uint8L(rv2i(rv).(map[int64]uint8), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolInt8X(vp *map[bool]int8, d *Decoder) { - v, changed := f.DecMapBoolInt8V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapInt64Uint8X(vp *map[int64]uint8, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int64]uint8, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapInt64Uint8L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, canChange bool, - d *Decoder) (_ map[bool]int8, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) - v = make(map[bool]int8, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool - var mv int8 +func (fastpathT) DecMapInt64Uint8L(v map[int64]uint8, containerLen int, d *Decoder) { + var mk int64 + var mv uint8 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeInt64() + d.mapElemValue() + mv = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolInt16R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]int16) - v, changed := fastpathTV.DecMapBoolInt16V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapInt64Uint64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int64]uint64)) = nil } } else { - fastpathTV.DecMapBoolInt16V(rv2i(rv).(map[bool]int16), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int64]uint64) + if *vp == nil { + *vp = make(map[int64]uint64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapInt64Uint64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapInt64Uint64L(rv2i(rv).(map[int64]uint64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolInt16X(vp *map[bool]int16, d *Decoder) { - v, changed := f.DecMapBoolInt16V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapInt64Uint64X(vp *map[int64]uint64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int64]uint64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapInt64Uint64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, canChange bool, - d *Decoder) (_ map[bool]int16, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) - v = make(map[bool]int16, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool - var mv int16 +func (fastpathT) DecMapInt64Uint64L(v map[int64]uint64, containerLen int, d *Decoder) { + var mk int64 + var mv uint64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeInt64() + d.mapElemValue() + mv = d.d.DecodeUint64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolInt32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]int32) - v, changed := fastpathTV.DecMapBoolInt32V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapInt64IntR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int64]int)) = nil } } else { - fastpathTV.DecMapBoolInt32V(rv2i(rv).(map[bool]int32), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int64]int) + if *vp == nil { + *vp = make(map[int64]int, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapInt64IntL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapInt64IntL(rv2i(rv).(map[int64]int), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolInt32X(vp *map[bool]int32, d *Decoder) { - v, changed := f.DecMapBoolInt32V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapInt64IntX(vp *map[int64]int, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int64]int, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapInt64IntL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, canChange bool, - d *Decoder) (_ map[bool]int32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[bool]int32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool - var mv int32 +func (fastpathT) DecMapInt64IntL(v map[int64]int, containerLen int, d *Decoder) { + var mk int64 + var mv int hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeInt64() + d.mapElemValue() + mv = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolInt64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]int64) - v, changed := fastpathTV.DecMapBoolInt64V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapInt64Int64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int64]int64)) = nil } } else { - fastpathTV.DecMapBoolInt64V(rv2i(rv).(map[bool]int64), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int64]int64) + if *vp == nil { + *vp = make(map[int64]int64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapInt64Int64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapInt64Int64L(rv2i(rv).(map[int64]int64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolInt64X(vp *map[bool]int64, d *Decoder) { - v, changed := f.DecMapBoolInt64V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapInt64Int64X(vp *map[int64]int64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int64]int64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapInt64Int64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, canChange bool, - d *Decoder) (_ map[bool]int64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[bool]int64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool +func (fastpathT) DecMapInt64Int64L(v map[int64]int64, containerLen int, d *Decoder) { + var mk int64 var mv int64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeInt64() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeInt64() + d.mapElemValue() + mv = d.d.DecodeInt64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolFloat32R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]float32) - v, changed := fastpathTV.DecMapBoolFloat32V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapInt64Float32R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int64]float32)) = nil } } else { - fastpathTV.DecMapBoolFloat32V(rv2i(rv).(map[bool]float32), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int64]float32) + if *vp == nil { + *vp = make(map[int64]float32, decInferLen(containerLen, d.h.MaxInitLen, 12)) + } + if containerLen != 0 { + fastpathTV.DecMapInt64Float32L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapInt64Float32L(rv2i(rv).(map[int64]float32), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolFloat32X(vp *map[bool]float32, d *Decoder) { - v, changed := f.DecMapBoolFloat32V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapInt64Float32X(vp *map[int64]float32, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int64]float32, decInferLen(containerLen, d.h.MaxInitLen, 12)) + } + if containerLen != 0 { + f.DecMapInt64Float32L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, canChange bool, - d *Decoder) (_ map[bool]float32, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) - v = make(map[bool]float32, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool +func (fastpathT) DecMapInt64Float32L(v map[int64]float32, containerLen int, d *Decoder) { + var mk int64 var mv float32 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeInt64() + d.mapElemValue() + mv = float32(d.decodeFloat32()) if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolFloat64R(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]float64) - v, changed := fastpathTV.DecMapBoolFloat64V(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapInt64Float64R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int64]float64)) = nil } } else { - fastpathTV.DecMapBoolFloat64V(rv2i(rv).(map[bool]float64), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int64]float64) + if *vp == nil { + *vp = make(map[int64]float64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + fastpathTV.DecMapInt64Float64L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapInt64Float64L(rv2i(rv).(map[int64]float64), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolFloat64X(vp *map[bool]float64, d *Decoder) { - v, changed := f.DecMapBoolFloat64V(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapInt64Float64X(vp *map[int64]float64, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int64]float64, decInferLen(containerLen, d.h.MaxInitLen, 16)) + } + if containerLen != 0 { + f.DecMapInt64Float64L(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, canChange bool, - d *Decoder) (_ map[bool]float64, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) - v = make(map[bool]float64, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool +func (fastpathT) DecMapInt64Float64L(v map[int64]float64, containerLen int, d *Decoder) { + var mk int64 var mv float64 hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = 0 - } - continue - } - mv = dd.DecodeFloat64() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeInt64() + d.mapElemValue() + mv = d.d.DecodeFloat64() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } - -func (d *Decoder) fastpathDecMapBoolBoolR(f *codecFnInfo, rv reflect.Value) { - if rv.Kind() == reflect.Ptr { - vp := rv2i(rv).(*map[bool]bool) - v, changed := fastpathTV.DecMapBoolBoolV(*vp, true, d) - if changed { - *vp = v +func (d *Decoder) fastpathDecMapInt64BoolR(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[int64]bool)) = nil } } else { - fastpathTV.DecMapBoolBoolV(rv2i(rv).(map[bool]bool), false, d) + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[int64]bool) + if *vp == nil { + *vp = make(map[int64]bool, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + fastpathTV.DecMapInt64BoolL(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.DecMapInt64BoolL(rv2i(rv).(map[int64]bool), containerLen, d) + } + d.mapEnd() } } -func (f fastpathT) DecMapBoolBoolX(vp *map[bool]bool, d *Decoder) { - v, changed := f.DecMapBoolBoolV(*vp, true, d) - if changed { - *vp = v +func (f fastpathT) DecMapInt64BoolX(vp *map[int64]bool, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[int64]bool, decInferLen(containerLen, d.h.MaxInitLen, 9)) + } + if containerLen != 0 { + f.DecMapInt64BoolL(*vp, containerLen, d) + } + d.mapEnd() } } -func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, canChange bool, - d *Decoder) (_ map[bool]bool, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() - if canChange && v == nil { - xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) - v = make(map[bool]bool, xlen) - changed = true - } - if containerLen == 0 { - dd.ReadMapEnd() - return v, changed - } - d.depthIncr() - var mk bool +func (fastpathT) DecMapInt64BoolL(v map[int64]bool, containerLen int, d *Decoder) { + var mk int64 var mv bool hasLen := containerLen > 0 - for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if esep { - dd.ReadMapElemKey() - } - mk = dd.DecodeBool() - if esep { - dd.ReadMapElemValue() - } - if dd.TryDecodeAsNil() { - if v == nil { - } else if d.h.DeleteOnNilMapValue { - delete(v, mk) - } else { - v[mk] = false - } - continue - } - mv = dd.DecodeBool() + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + mk = d.d.DecodeInt64() + d.mapElemValue() + mv = d.d.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadMapEnd() - d.depthDecr() - return v, changed } diff --git a/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl b/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl new file mode 100644 index 00000000..537f069d --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl @@ -0,0 +1,503 @@ +// +build !notfastpath + +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// Code generated from fast-path.go.tmpl - DO NOT EDIT. + +package codec + +// Fast path functions try to create a fast path encode or decode implementation +// for common maps and slices. +// +// We define the functions and register them in this single file +// so as not to pollute the encode.go and decode.go, and create a dependency in there. +// This file can be omitted without causing a build failure. +// +// The advantage of fast paths is: +// - Many calls bypass reflection altogether +// +// Currently support +// - slice of all builtin types (numeric, bool, string, []byte) +// - maps of builtin types to builtin or interface{} type, EXCEPT FOR +// keys of type uintptr, int8/16/32, uint16/32, float32/64, bool, interface{} +// AND values of type type int8/16/32, uint16/32 +// This should provide adequate "typical" implementations. +// +// Note that fast track decode functions must handle values for which an address cannot be obtained. +// For example: +// m2 := map[string]int{} +// p2 := []interface{}{m2} +// // decoding into p2 will bomb if fast track functions do not treat like unaddressable. +// + +{{/* +fastpathEncMapStringUint64R (called by fastpath...switch) +EncMapStringUint64V (called by codecgen) + +fastpathEncSliceBoolR: (called by fastpath...switch) (checks f.ti.mbs and calls one of them below) +EncSliceBoolV (also called by codecgen) +EncAsMapSliceBoolV (delegate when mapbyslice=true) + +fastpathDecSliceIntfR (called by fastpath...switch) (calls Y or N below depending on if it can be updated) +DecSliceIntfX (called by codecgen) (calls Y below) +DecSliceIntfY (delegate when slice CAN be updated) +DecSliceIntfN (delegate when slice CANNOT be updated e.g. from array or non-addressable slice) + +fastpathDecMap...R (called by fastpath...switch) (calls L or X? below) +DecMap...X (called by codecgen) +DecMap...L (delegated to by both above) +*/ -}} + +import ( + "reflect" + "sort" +) + +const fastpathEnabled = true + +const fastpathMapBySliceErrMsg = "mapBySlice requires even slice length, but got %v" + +type fastpathT struct {} + +var fastpathTV fastpathT + +type fastpathE struct { + rtid uintptr + rt reflect.Type + encfn func(*Encoder, *codecFnInfo, reflect.Value) + decfn func(*Decoder, *codecFnInfo, reflect.Value) +} + +type fastpathA [{{ .FastpathLen }}]fastpathE + +func (x *fastpathA) index(rtid uintptr) int { + // use binary search to grab the index (adapted from sort/search.go) + // Note: we use goto (instead of for loop) so this can be inlined. + // h, i, j := 0, 0, len(x) + var h, i uint + var j = uint(len(x)) +LOOP: + if i < j { + h = i + (j-i)/2 + if x[h].rtid < rtid { + i = h + 1 + } else { + j = h + } + goto LOOP + } + if i < uint(len(x)) && x[i].rtid == rtid { + return int(i) + } + return -1 +} + +type fastpathAslice []fastpathE + +func (x fastpathAslice) Len() int { return len(x) } +func (x fastpathAslice) Less(i, j int) bool { return x[uint(i)].rtid < x[uint(j)].rtid } +func (x fastpathAslice) Swap(i, j int) { x[uint(i)], x[uint(j)] = x[uint(j)], x[uint(i)] } + +var fastpathAV fastpathA + +// due to possible initialization loop error, make fastpath in an init() +func init() { + var i uint = 0 + fn := func(v interface{}, + fe func(*Encoder, *codecFnInfo, reflect.Value), + fd func(*Decoder, *codecFnInfo, reflect.Value)) { + xrt := reflect.TypeOf(v) + xptr := rt2id(xrt) + fastpathAV[i] = fastpathE{xptr, xrt, fe, fd} + i++ + } + {{/* do not register []uint8 in fast-path */}} + {{range .Values}}{{if not .Primitive}}{{if not .MapKey }}{{if ne .Elem "uint8" -}} + fn([]{{ .Elem }}(nil), (*Encoder).{{ .MethodNamePfx "fastpathEnc" false }}R, (*Decoder).{{ .MethodNamePfx "fastpathDec" false }}R) + {{end}}{{end}}{{end}}{{end}} + + {{range .Values}}{{if not .Primitive}}{{if .MapKey -}} + fn(map[{{ .MapKey }}]{{ .Elem }}(nil), (*Encoder).{{ .MethodNamePfx "fastpathEnc" false }}R, (*Decoder).{{ .MethodNamePfx "fastpathDec" false }}R) + {{end}}{{end}}{{end}} + + sort.Sort(fastpathAslice(fastpathAV[:])) +} + +// -- encode + +// -- -- fast path type switch +func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }}{{if ne .Elem "uint8" -}} + case []{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, e) + case *[]{{ .Elem }}: + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, e) + } +{{end}}{{end}}{{end}}{{end -}} + +{{range .Values}}{{if not .Primitive}}{{if .MapKey -}} + case map[{{ .MapKey }}]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, e) + case *map[{{ .MapKey }}]{{ .Elem }}: + if *v == nil { + e.e.EncodeNil() + } else { + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, e) + } +{{end}}{{end}}{{end -}} + + default: + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 + return false + } + return true +} + +// -- -- fast path functions +{{range .Values}}{{if not .Primitive}}{{if not .MapKey -}} +func (e *Encoder) {{ .MethodNamePfx "fastpathEnc" false }}R(f *codecFnInfo, rv reflect.Value) { + if f.ti.mbs { + fastpathTV.{{ .MethodNamePfx "EncAsMap" false }}V(rv2i(rv).([]{{ .Elem }}), e) + } else { + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv2i(rv).([]{{ .Elem }}), e) + } +} +func (fastpathT) {{ .MethodNamePfx "Enc" false }}V(v []{{ .Elem }}, e *Encoder) { + {{/* if v == nil { e.e.EncodeNil(); return } */ -}} + e.arrayStart(len(v)) + for j := range v { + e.arrayElem() + {{ encmd .Elem "v[j]"}} + } + e.arrayEnd() +} +func (fastpathT) {{ .MethodNamePfx "EncAsMap" false }}V(v []{{ .Elem }}, e *Encoder) { + {{/* if v == nil { e.e.EncodeNil() } else */ -}} + if len(v)%2 == 1 { + e.errorf(fastpathMapBySliceErrMsg, len(v)) + } else { + e.mapStart(len(v) / 2) + for j := range v { + if j%2 == 0 { + e.mapElemKey() + } else { + e.mapElemValue() + } + {{ encmd .Elem "v[j]"}} + } + e.mapEnd() + } +} +{{end}}{{end}}{{end -}} + +{{range .Values}}{{if not .Primitive}}{{if .MapKey -}} +func (e *Encoder) {{ .MethodNamePfx "fastpathEnc" false }}R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv2i(rv).(map[{{ .MapKey }}]{{ .Elem }}), e) +} +func (fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, e *Encoder) { + {{/* if v == nil { e.e.EncodeNil(); return } */ -}} + e.mapStart(len(v)) + if e.h.Canonical { {{/* need to figure out .NoCanonical */}} + {{if eq .MapKey "interface{}"}}{{/* out of band */ -}} + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesIntf, len(v)) + var i, l uint {{/* put loop variables outside. seems currently needed for better perf */}} + var vp *bytesIntf + for k2 := range v { + l = uint(len(mksv)) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesIntfSlice(v2)) + for j := range v2 { + e.mapElemKey() + e.asis(v2[j].v) + e.mapElemValue() + e.encode(v[v2[j].i]) + } {{else}}{{ $x := sorttype .MapKey true}}v2 := make([]{{ $x }}, len(v)) + var i uint + for k := range v { + v2[i] = {{if eq $x .MapKey}}k{{else}}{{ $x }}(k){{end}} + i++ + } + sort.Sort({{ sorttype .MapKey false}}(v2)) + for _, k2 := range v2 { + e.mapElemKey() + {{if eq .MapKey "string"}} e.e.EncodeString(k2) {{else}}{{ $y := printf "%s(k2)" .MapKey }}{{if eq $x .MapKey }}{{ $y = "k2" }}{{end}}{{ encmd .MapKey $y }}{{end}} + e.mapElemValue() + {{ $y := printf "v[%s(k2)]" .MapKey }}{{if eq $x .MapKey }}{{ $y = "v[k2]" }}{{end}}{{ encmd .Elem $y }} + } {{end}} + } else { + for k2, v2 := range v { + e.mapElemKey() + {{if eq .MapKey "string"}} e.e.EncodeString(k2) {{else}}{{ encmd .MapKey "k2"}}{{end}} + e.mapElemValue() + {{ encmd .Elem "v2"}} + } + } + e.mapEnd() +} +{{end}}{{end}}{{end -}} + +// -- decode + +// -- -- fast path type switch +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { + var changed bool + var containerLen int + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }}{{if ne .Elem "uint8" -}} + case []{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Dec" false }}N(v, d) + case *[]{{ .Elem }}: + var v2 []{{ .Elem }} + if v2, changed = fastpathTV.{{ .MethodNamePfx "Dec" false }}Y(*v, d); changed { + *v = v2 + } +{{end}}{{end}}{{end}}{{end -}} +{{range .Values}}{{if not .Primitive}}{{if .MapKey }}{{/* +// maps only change if nil, and in that case, there's no point copying +*/ -}} + case map[{{ .MapKey }}]{{ .Elem }}: + containerLen = d.mapStart() + if containerLen != decContainerLenNil { + if containerLen != 0 { + fastpathTV.{{ .MethodNamePfx "Dec" false }}L(v, containerLen, d) + } + d.mapEnd() + } + case *map[{{ .MapKey }}]{{ .Elem }}: + {{/* + containerLen = d.mapStart() + if containerLen == 0 { + d.mapEnd() + } else if containerLen == decContainerLenNil { + *v = nil + } else { + if *v == nil { + *v = make(map[{{ .MapKey }}]{{ .Elem }}, decInferLen(containerLen, d.h.MaxInitLen, {{ .Size }})) + } + fastpathTV.{{ .MethodNamePfx "Dec" false }}L(*v, containerLen, d) + } + // consider delegating fully to X - encoding *map is uncommon, so ok to pay small function call cost + */ -}} + fastpathTV.{{ .MethodNamePfx "Dec" false }}X(v, d) +{{end}}{{end}}{{end -}} + default: + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 + return false + } + return true +} + +func fastpathDecodeSetZeroTypeSwitch(iv interface{}) bool { + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if not .MapKey -}} + case *[]{{ .Elem }}: + *v = nil +{{end}}{{end}}{{end}} +{{range .Values}}{{if not .Primitive}}{{if .MapKey -}} + case *map[{{ .MapKey }}]{{ .Elem }}: + *v = nil +{{end}}{{end}}{{end}} + default: + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 + return false + } + return true +} + +// -- -- fast path functions +{{range .Values}}{{if not .Primitive}}{{if not .MapKey -}} +{{/* +Slices can change if they +- did not come from an array +- are addressable (from a ptr) +- are settable (e.g. contained in an interface{}) +*/}} +func (d *Decoder) {{ .MethodNamePfx "fastpathDec" false }}R(f *codecFnInfo, rv reflect.Value) { + if f.seq != seqTypeArray && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]{{ .Elem }}) + if v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}Y(*vp, d); changed { *vp = v } + } else { + fastpathTV.{{ .MethodNamePfx "Dec" false }}N(rv2i(rv).([]{{ .Elem }}), d) + } +} +func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *[]{{ .Elem }}, d *Decoder) { + if v, changed := f.{{ .MethodNamePfx "Dec" false }}Y(*vp, d); changed { *vp = v } +} +func (fastpathT) {{ .MethodNamePfx "Dec" false }}Y(v []{{ .Elem }}, d *Decoder) (_ []{{ .Elem }}, changed bool) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + if v == nil { return } + return nil, true + } + if containerLenS == 0 { + if v == nil { v = []{{ .Elem }}{} } else if len(v) != 0 { v = v[:0] } + slh.End() + return v, true + } + hasLen := containerLenS > 0 + var xlen int + if hasLen { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, {{ .Size }}) + if xlen <= cap(v) { + v = v[:uint(xlen)] + } else { + v = make([]{{ .Elem }}, uint(xlen)) + } + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + } + var j int + for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + if j == 0 && len(v) == 0 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, {{ .Size }}) + } else { + xlen = 8 + } + v = make([]{{ .Elem }}, uint(xlen)) + changed = true + } + {{/* // if indefinite, etc, then expand the slice if necessary */ -}} + if j >= len(v) { + v = append(v, {{ zerocmd .Elem }}) + changed = true + } + slh.ElemContainerState(j) + {{ if eq .Elem "interface{}" }}d.decode(&v[uint(j)]){{ else }}v[uint(j)] = {{ decmd .Elem }}{{ end }} + } + if j < len(v) { + v = v[:uint(j)] + changed = true + } else if j == 0 && v == nil { + v = []{{ .Elem }}{} + changed = true + } + slh.End() + return v, changed +} +func (fastpathT) {{ .MethodNamePfx "Dec" false }}N(v []{{ .Elem }}, d *Decoder) { + slh, containerLenS := d.decSliceHelperStart() + if slh.IsNil { + return + } + if containerLenS == 0 { + slh.End() + return + } + hasLen := containerLenS > 0 + for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ { + {{/* // if indefinite, etc, then expand the slice if necessary */ -}} + if j >= len(v) { + fastpathDecArrayCannotExpand(slh, hasLen, len(v), j, containerLenS) + return + } + slh.ElemContainerState(j) + {{ if eq .Elem "interface{}" -}} + d.decode(&v[uint(j)]) + {{- else -}} + v[uint(j)] = {{ decmd .Elem }} + {{- end }} + } + slh.End() +} +{{end}}{{end}}{{end -}} + +func fastpathDecArrayCannotExpand(slh decSliceHelper, hasLen bool, lenv, j, containerLenS int) { + slh.d.arrayCannotExpand(lenv, j+1) + slh.ElemContainerState(j) + slh.d.swallow() + j++ + for ; (hasLen && j < containerLenS) || !(hasLen || slh.d.checkBreak()); j++ { + slh.ElemContainerState(j) + slh.d.swallow() + } + slh.End() +} + +{{range .Values}}{{if not .Primitive}}{{if .MapKey -}} +{{/* +Maps can change if they are +- addressable (from a ptr) +- settable (e.g. contained in an interface{}) +*/ -}} +func (d *Decoder) {{ .MethodNamePfx "fastpathDec" false }}R(f *codecFnInfo, rv reflect.Value) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + if rv.Kind() == reflect.Ptr { + *(rv2i(rv).(*map[{{ .MapKey }}]{{ .Elem }})) = nil + } + } else { + if rv.Kind() == reflect.Ptr { + vp, _ := rv2i(rv).(*map[{{ .MapKey }}]{{ .Elem }}) + if *vp == nil { + *vp = make(map[{{ .MapKey }}]{{ .Elem }}, decInferLen(containerLen, d.h.MaxInitLen, {{ .Size }})) + } + if containerLen != 0 { + fastpathTV.{{ .MethodNamePfx "Dec" false }}L(*vp, containerLen, d) + } + } else if containerLen != 0 { + fastpathTV.{{ .MethodNamePfx "Dec" false }}L(rv2i(rv).(map[{{ .MapKey }}]{{ .Elem }}), containerLen, d) + } + d.mapEnd() + } +} +func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *map[{{ .MapKey }}]{{ .Elem }}, d *Decoder) { + containerLen := d.mapStart() + if containerLen == decContainerLenNil { + *vp = nil + } else { + if *vp == nil { + *vp = make(map[{{ .MapKey }}]{{ .Elem }}, decInferLen(containerLen, d.h.MaxInitLen, {{ .Size }})) + } + if containerLen != 0 { + f.{{ .MethodNamePfx "Dec" false }}L(*vp, containerLen, d) + } + d.mapEnd() + } +} +func (fastpathT) {{ .MethodNamePfx "Dec" false }}L(v map[{{ .MapKey }}]{{ .Elem }}, containerLen int, d *Decoder) { + {{/* No need to check if containerLen == decContainerLenNil, as that is checked by R and L above */ -}} + {{if eq .Elem "interface{}" }}mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset + {{else if eq .Elem "bytes" "[]byte" }}mapGet := v != nil && !d.h.MapValueReset + {{end -}} + var mk {{ .MapKey }} + var mv {{ .Elem }} + hasLen := containerLen > 0 + for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ { + d.mapElemKey() + {{ if eq .MapKey "interface{}" }}mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) {{/* // maps cannot have []byte as key. switch to string. */}} + }{{ else }}mk = {{ decmd .MapKey }}{{ end }} + d.mapElemValue() + {{ if eq .Elem "interface{}" "[]byte" "bytes" -}} + if mapGet { mv = v[mk] } else { mv = nil } + {{ end -}} + {{ if eq .Elem "interface{}" -}} + d.decode(&mv) + {{ else if eq .Elem "[]byte" "bytes" -}} + mv = d.d.DecodeBytes(mv, false) + {{ else -}} + mv = {{ decmd .Elem }} + {{ end -}} + if v != nil { v[mk] = mv } + } +} +{{end}}{{end}}{{end}} diff --git a/vendor/github.com/ugorji/go/codec/fast-path.not.go b/vendor/github.com/ugorji/go/codec/fast-path.not.go index cf97db0f..6b6ac1ff 100644 --- a/vendor/github.com/ugorji/go/codec/fast-path.not.go +++ b/vendor/github.com/ugorji/go/codec/fast-path.not.go @@ -34,12 +34,6 @@ type fastpathA [0]fastpathE func (x fastpathA) index(rtid uintptr) int { return -1 } -func (_ fastpathT) DecSliceUint8V(v []uint8, canChange bool, d *Decoder) (_ []uint8, changed bool) { - fn := d.h.fn(uint8SliceTyp, true, true) - d.kSlice(&fn.i, reflect.ValueOf(&v).Elem()) - return v, true -} - var fastpathAV fastpathA var fastpathTV fastpathT diff --git a/vendor/github.com/ugorji/go/codec/float.go b/vendor/github.com/ugorji/go/codec/float.go new file mode 100644 index 00000000..cfe3a9ec --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/float.go @@ -0,0 +1,313 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import "strconv" + +// func parseFloat(b []byte, bitsize int) (f float64, err error) { +// if bitsize == 32 { +// return parseFloat32(b) +// } else { +// return parseFloat64(b) +// } +// } + +func parseFloat32(b []byte) (f float32, err error) { + return parseFloat32_custom(b) + // return parseFloat32_strconv(b) +} + +func parseFloat64(b []byte) (f float64, err error) { + return parseFloat64_custom(b) + // return parseFloat64_strconv(b) +} + +func parseFloat32_strconv(b []byte) (f float32, err error) { + f64, err := strconv.ParseFloat(stringView(b), 32) + f = float32(f64) + return +} + +func parseFloat64_strconv(b []byte) (f float64, err error) { + return strconv.ParseFloat(stringView(b), 64) +} + +// ------ parseFloat custom below -------- + +// We assume that a lot of floating point numbers in json files will be +// those that are handwritten, and with defined precision (in terms of number +// of digits after decimal point), etc. +// +// We further assume that this ones can be written in exact format. +// +// strconv.ParseFloat has some unnecessary overhead which we can do without +// for the common case: +// +// - expensive char-by-char check to see if underscores are in right place +// - testing for and skipping underscores +// - check if the string matches ignorecase +/- inf, +/- infinity, nan +// - support for base 16 (0xFFFF...) +// +// The functions below will try a fast-path for floats which can be decoded +// without any loss of precision, meaning they: +// +// - fits within the significand bits of the 32-bits or 64-bits +// - exponent fits within the exponent value +// - there is no truncation (any extra numbers are all trailing zeros) +// +// To figure out what the values are for maxMantDigits, use this idea below: +// +// 2^23 = 838 8608 (between 10^ 6 and 10^ 7) (significand bits of uint32) +// 2^32 = 42 9496 7296 (between 10^ 9 and 10^10) (full uint32) +// 2^52 = 4503 5996 2737 0496 (between 10^15 and 10^16) (significand bits of uint64) +// 2^64 = 1844 6744 0737 0955 1616 (between 10^19 and 10^20) (full uint64) +// +// Since we only allow for up to what can comfortably fit into the significand +// ignoring the exponent, and we only try to parse iff significand fits into the + +// Exact powers of 10. +var float64pow10 = [...]float64{ + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, + 1e20, 1e21, 1e22, +} +var float32pow10 = [...]float32{1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10} + +type floatinfo struct { + mantbits uint8 + expbits uint8 + bias int16 + + exactPow10 int8 // Exact powers of ten are <= 10^N (32: 10, 64: 22) + exactInts int8 // Exact integers are <= 10^N + + maxMantDigits int8 // 10^19 fits in uint64, while 10^9 fits in uint32 +} + +var fi32 = floatinfo{23, 8, -127, 10, 7, 9} // maxMantDigits = 9 +var fi64 = floatinfo{52, 11, -1023, 22, 15, 19} // maxMantDigits = 19 + +const fMax64 = 1e15 +const fMax32 = 1e7 + +const fBase = 10 + +func parseFloatErr(b []byte) error { + return &strconv.NumError{ + Func: "ParseFloat", + Err: strconv.ErrSyntax, + Num: string(b), + } +} + +func parseFloat32_custom(b []byte) (f float32, err error) { + mantissa, exp, neg, trunc, bad, ok := readFloat(b, fi32) + _ = trunc + if bad { + return 0, parseFloatErr(b) + } + if ok { + // parseFloatDebug(b, 32, false, exp, trunc, ok) + f = float32(mantissa) + if neg { + f = -f + } + if exp != 0 { + indx := fExpIndx(exp) + if exp < 0 { // int / 10^k + f /= float32pow10[indx] + } else { // exp > 0 + if exp > fi32.exactPow10 { + f *= float32pow10[exp-fi32.exactPow10] + if f < -fMax32 || f > fMax32 { // exponent too large - outside range + goto FALLBACK + } + indx = uint8(fi32.exactPow10) + } + f *= float32pow10[indx] + } + } + return + } +FALLBACK: + // parseFloatDebug(b, 32, true, exp, trunc, ok) + return parseFloat32_strconv(b) +} + +func parseFloat64_custom(b []byte) (f float64, err error) { + mantissa, exp, neg, trunc, bad, ok := readFloat(b, fi64) + _ = trunc + if bad { + return 0, parseFloatErr(b) + } + if ok { + f = float64(mantissa) + if neg { + f = -f + } + if exp != 0 { + indx := fExpIndx(exp) + if exp < 0 { // int / 10^k + f /= float64pow10[indx] + } else { // exp > 0 + if exp > fi64.exactPow10 { + f *= float64pow10[exp-fi64.exactPow10] + if f < -fMax64 || f > fMax64 { // exponent too large - outside range + goto FALLBACK + } + indx = uint8(fi64.exactPow10) + } + f *= float64pow10[indx] + } + } + return + } +FALLBACK: + return parseFloat64_strconv(b) +} + +func fExpIndx(v int8) uint8 { + if v < 0 { + return uint8(-v) + } + return uint8(v) +} + +func readFloat(s []byte, y floatinfo) (mantissa uint64, exp int8, neg, trunc, bad, ok bool) { + var i uint // make it uint, so that we eliminate bounds checking + var slen = uint(len(s)) + if slen == 0 { + bad = true + return + } + switch s[0] { + case '+': + i++ + case '-': + neg = true + i++ + } + + // we considered punting early if string has length > maxMantDigits, but this doesn't account + // for trailing 0's e.g. 700000000000000000000 can be encoded exactly as it is 7e20 + + // var sawdot, sawdigits, sawexp bool + var sawdot, sawexp bool + var nd, ndMant, dp int8 +L: + for ; i < slen; i++ { + switch s[i] { + case '.': + if sawdot { + bad = true + return + } + sawdot = true + dp = nd + case '0': + if nd == 0 { // ignore leading zeros + dp-- + continue + } + nd++ + if ndMant < y.maxMantDigits { + // mantissa = (mantissa << 1) + (mantissa << 3) + mantissa *= fBase + ndMant++ + } + case '1', '2', '3', '4', '5', '6', '7', '8', '9': + // sawdigits = true + nd++ + if ndMant < y.maxMantDigits { + // mantissa = (mantissa << 1) + (mantissa << 3) + uint64(s[i]-'0') + mantissa = mantissa*fBase + uint64(s[i]-'0') + // mantissa *= fBase + // mantissa += uint64(s[i] - '0') + ndMant++ + } else { + trunc = true + return // break L + } + case 'e', 'E': + sawexp = true + break L + default: + bad = true + return + } + } + // if !sawdigits { + // bad = true + // return + // } + if !sawdot { + dp = nd + } + + if sawexp { + i++ + if i < slen { + var eneg bool + if s[i] == '+' { + i++ + } else if s[i] == '-' { + i++ + eneg = true + } + if i < slen { + // for exact match, exponent is 1 or 2 digits (float64: -22 to 37, float32: -1 to 17). + // exit quick if exponent is more than 2 digits. + if i+2 < slen { + return + } + + var e int8 + + if s[i] < '0' || s[i] > '9' { + bad = true + return + } + e = e*fBase + int8(s[i]-'0') // (e << 1) + (e << 3) + int8(s[i]-'0') + i++ + + if i < slen { + if s[i] < '0' || s[i] > '9' { + bad = true + return + } + e = e*fBase + int8(s[i]-'0') // (e << 1) + (e << 3) + int8(s[i]-'0') + i++ + } + + if eneg { + dp -= e + } else { + dp += e + } + } + } + } + + if mantissa != 0 { + if mantissa>>y.mantbits != 0 { + return + } + exp = dp - ndMant + if exp < -y.exactPow10 || exp > y.exactInts+y.exactPow10 { // cannot handle it + return + } + } + ok = true // && !trunc // if trunc=true, we return early (so here trunc=false) + return +} + +// fMul10ShiftU64 + +// func parseFloatDebug(b []byte, bitsize int, strconv bool, exp int8, trunc, ok bool) { +// if strconv { +// xdebugf("parseFloat%d: delegating: %s, exp: %d, trunc: %v, ok: %v", bitsize, b, exp, trunc, ok) +// } else { +// xdebug2f("parseFloat%d: attempting: %s, exp: %d, trunc: %v, ok: %v", bitsize, b, exp, trunc, ok) +// } +// } diff --git a/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl b/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl new file mode 100644 index 00000000..d2caa0b6 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl @@ -0,0 +1,90 @@ +{{var "v"}} := {{if not isArray}}*{{end}}{{ .Varname }} +{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() {{/* // helper, containerLenS */}} +{{if not isArray -}} +var {{var "c"}} bool {{/* // changed */}} +_ = {{var "c"}} +if {{var "h"}}.IsNil { + if {{var "v"}} != nil { + {{var "v"}} = nil + {{var "c"}} = true + } +} else {{end -}} +if {{var "l"}} == 0 { + {{if isSlice -}} + if {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + } else if len({{var "v"}}) != 0 { + {{var "v"}} = {{var "v"}}[:0] + {{var "c"}} = true + } {{else if isChan }}if {{var "v"}} == nil { + {{var "v"}} = make({{ .CTyp }}, 0) + {{var "c"}} = true + } + {{end -}} +} else { + {{var "hl"}} := {{var "l"}} > 0 + var {{var "rl"}} int + _ = {{var "rl"}} + {{if isSlice }} if {{var "hl"}} { + if {{var "l"}} > cap({{var "v"}}) { + {{var "rl"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + if {{var "rl"}} <= cap({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "rl"}}] + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) + } + {{var "c"}} = true + } else if {{var "l"}} != len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "l"}}] + {{var "c"}} = true + } + } + {{end -}} + var {{var "j"}} int + {{/* // var {{var "dn"}} bool */ -}} + for {{var "j"}} = 0; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || z.DecCheckBreak()); {{var "j"}}++ { // bounds-check-elimination + {{if not isArray}} if {{var "j"}} == 0 && {{var "v"}} == nil { + if {{var "hl"}} { + {{var "rl"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + } else { + {{var "rl"}} = {{if isSlice}}8{{else if isChan}}64{{end}} + } + {{var "v"}} = make({{if isSlice}}[]{{ .Typ }}{{else if isChan}}{{.CTyp}}{{end}}, {{var "rl"}}) + {{var "c"}} = true + } + {{end -}} + {{var "h"}}.ElemContainerState({{var "j"}}) + {{/* {{var "dn"}} = r.TryDecodeAsNil() */}}{{/* commented out, as decLineVar handles this already each time */ -}} + {{if isChan}}{{ $x := printf "%[1]vvcx%[2]v" .TempVar .Rand }}var {{$x}} {{ .Typ }} + {{ decLineVar $x -}} + {{var "v"}} <- {{ $x }} + {{else}}{{/* // if indefinite, etc, then expand the slice if necessary */ -}} + var {{var "db"}} bool + if {{var "j"}} >= len({{var "v"}}) { + {{if isSlice }} {{var "v"}} = append({{var "v"}}, {{ zero }}) + {{var "c"}} = true + {{else}} z.DecArrayCannotExpand(len(v), {{var "j"}}+1); {{var "db"}} = true + {{end -}} + } + if {{var "db"}} { + z.DecSwallow() + } else { + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x -}} + } + {{end -}} + } + {{if isSlice}} if {{var "j"}} < len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "j"}}] + {{var "c"}} = true + } else if {{var "j"}} == 0 && {{var "v"}} == nil { + {{var "v"}} = make([]{{ .Typ }}, 0) + {{var "c"}} = true + } + {{end -}} +} +{{var "h"}}.End() +{{if not isArray }}if {{var "c"}} { + *{{ .Varname }} = {{var "v"}} +} +{{end -}} diff --git a/vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl b/vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl new file mode 100644 index 00000000..35bda4a1 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl @@ -0,0 +1,53 @@ +{{var "v"}} := *{{ .Varname }} +{{var "l"}} := z.DecReadMapStart() +if {{var "l"}} == codecSelferDecContainerLenNil{{xs}} { + *{{ .Varname }} = nil +} else { +if {{var "v"}} == nil { + {{var "rl"}} := z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "rl"}}) + *{{ .Varname }} = {{var "v"}} +} +var {{var "mk"}} {{ .KTyp }} +var {{var "mv"}} {{ .Typ }} +var {{var "mg"}}, {{var "mdn"}} {{if decElemKindPtr}}, {{var "ms"}}, {{var "mok"}}{{end}} bool +if z.DecBasicHandle().MapValueReset { + {{if decElemKindPtr}}{{var "mg"}} = true + {{else if decElemKindIntf}}if !z.DecBasicHandle().InterfaceReset { {{var "mg"}} = true } + {{else if not decElemKindImmutable}}{{var "mg"}} = true + {{end}} } +if {{var "l"}} != 0 { + {{var "hl"}} := {{var "l"}} > 0 + for {{var "j"}} := 0; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || z.DecCheckBreak()); {{var "j"}}++ { + z.DecReadMapElemKey() + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x -}} + {{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */ -}} + if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + } + {{ end -}} + {{if decElemKindPtr -}} + {{var "ms"}} = true + {{end -}} + if {{var "mg"}} { + {{if decElemKindPtr -}} + {{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } + {{else -}} + {{var "mv"}} = {{var "v"}}[{{var "mk"}}] + {{end -}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecReadMapElemValue() + {{var "mdn"}} = false + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ $y := printf "%vmdn%v" .TempVar .Rand }}{{ decLineVar $x $y -}} + if {{var "mdn"}} { + if z.DecBasicHandle().DeleteOnNilMapValue { delete({{var "v"}}, {{var "mk"}}) } else { {{var "v"}}[{{var "mk"}}] = {{decElemZero}} } + } else if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +} // else len==0: TODO: Should we clear map entries? +z.DecReadMapEnd() +} diff --git a/vendor/github.com/ugorji/go/codec/gen-enc-chan.go.tmpl b/vendor/github.com/ugorji/go/codec/gen-enc-chan.go.tmpl new file mode 100644 index 00000000..4249588a --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/gen-enc-chan.go.tmpl @@ -0,0 +1,27 @@ +{{.Label}}: +switch timeout{{.Sfx}} := z.EncBasicHandle().ChanRecvTimeout; { +case timeout{{.Sfx}} == 0: // only consume available + for { + select { + case b{{.Sfx}} := <-{{.Chan}}: + {{ .Slice }} = append({{.Slice}}, b{{.Sfx}}) + default: + break {{.Label}} + } + } +case timeout{{.Sfx}} > 0: // consume until timeout + tt{{.Sfx}} := time.NewTimer(timeout{{.Sfx}}) + for { + select { + case b{{.Sfx}} := <-{{.Chan}}: + {{.Slice}} = append({{.Slice}}, b{{.Sfx}}) + case <-tt{{.Sfx}}.C: + // close(tt.C) + break {{.Label}} + } + } +default: // consume until close + for b{{.Sfx}} := range {{.Chan}} { + {{.Slice}} = append({{.Slice}}, b{{.Sfx}}) + } +} diff --git a/vendor/github.com/ugorji/go/codec/gen-helper.generated.go b/vendor/github.com/ugorji/go/codec/gen-helper.generated.go index 2a7d1aab..d86d3af4 100644 --- a/vendor/github.com/ugorji/go/codec/gen-helper.generated.go +++ b/vendor/github.com/ugorji/go/codec/gen-helper.generated.go @@ -7,23 +7,14 @@ package codec -import ( - "encoding" - "reflect" -) +import "encoding" // GenVersion is the current version of codecgen. -const GenVersion = 10 +const GenVersion = 16 // This file is used to generate helper code for codecgen. // The values here i.e. genHelper(En|De)coder are not to be used directly by // library users. They WILL change continuously and without notice. -// -// To help enforce this, we create an unexported type with exported members. -// The only way to get the type is via the one exported type that we control (somewhat). -// -// When static codecs are created for types, they will use this value -// to perform encoding or decoding of primitives or known slice or map types. // GenHelperEncoder is exported so that it can be used externally by codecgen. // @@ -47,56 +38,22 @@ type genHelperEncDriver struct { encDriver } -func (x genHelperEncDriver) EncodeBuiltin(rt uintptr, v interface{}) {} -func (x genHelperEncDriver) EncStructFieldKey(keyType valueType, s string) { - encStructFieldKey(s, x.encDriver, nil, keyType, false, false) -} -func (x genHelperEncDriver) EncodeSymbol(s string) { - x.encDriver.EncodeStringEnc(cUTF8, s) -} - type genHelperDecDriver struct { decDriver - C checkOverflow -} - -func (x genHelperDecDriver) DecodeBuiltin(rt uintptr, v interface{}) {} -func (x genHelperDecDriver) DecStructFieldKey(keyType valueType, buf *[decScratchByteArrayLen]byte) []byte { - return decStructFieldKey(x.decDriver, keyType, buf) -} -func (x genHelperDecDriver) DecodeInt(bitsize uint8) (i int64) { - return x.C.IntV(x.decDriver.DecodeInt64(), bitsize) -} -func (x genHelperDecDriver) DecodeUint(bitsize uint8) (ui uint64) { - return x.C.UintV(x.decDriver.DecodeUint64(), bitsize) -} -func (x genHelperDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { - f = x.DecodeFloat64() - if chkOverflow32 && chkOvf.Float32(f) { - panicv.errorf("float32 overflow: %v", f) - } - return -} -func (x genHelperDecDriver) DecodeFloat32As64() (f float64) { - f = x.DecodeFloat64() - if chkOvf.Float32(f) { - panicv.errorf("float32 overflow: %v", f) - } - return } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* type genHelperEncoder struct { M must - e *Encoder F fastpathT + e *Encoder } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* type genHelperDecoder struct { C checkOverflow - d *Decoder F fastpathT + d *Decoder } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* @@ -116,9 +73,8 @@ func (f genHelperEncoder) IsJSONHandle() bool { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncFallback(iv interface{}) { - // println(">>>>>>>>> EncFallback") // f.e.encodeI(iv, false, false) - f.e.encodeValue(reflect.ValueOf(iv), nil, false) + f.e.encodeValue(rv4i(iv), nil) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* @@ -142,18 +98,6 @@ func (f genHelperEncoder) EncBinaryMarshal(iv encoding.BinaryMarshaler) { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncRaw(iv Raw) { f.e.rawBytes(iv) } -// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -// -// Deprecated: builtin no longer supported - so we make this method a no-op, -// but leave in-place so that old generated files continue to work without regeneration. -func (f genHelperEncoder) TimeRtidIfBinc() (v uintptr) { return } - -// func (f genHelperEncoder) TimeRtidIfBinc() uintptr { -// if _, ok := f.e.hh.(*BincHandle); ok { -// return timeTypId -// } -// } - // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) I2Rtid(v interface{}) uintptr { return i2rtid(v) @@ -161,41 +105,42 @@ func (f genHelperEncoder) I2Rtid(v interface{}) uintptr { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) Extension(rtid uintptr) (xfn *extTypeTagFn) { - return f.e.h.getExt(rtid) + return f.e.h.getExt(rtid, true) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncExtension(v interface{}, xfFn *extTypeTagFn) { - f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e) + f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) WriteStr(s string) { - f.e.w.writestr(s) + f.e.w().writestr(s) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) BytesView(v string) []byte { return bytesView(v) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -// -// Deprecated: No longer used, -// but leave in-place so that old generated files continue to work without regeneration. -func (f genHelperEncoder) HasExtensions() bool { - return len(f.e.h.extHandle) != 0 -} +func (f genHelperEncoder) EncWriteMapStart(length int) { f.e.mapStart(length) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -// -// Deprecated: No longer used, -// but leave in-place so that old generated files continue to work without regeneration. -func (f genHelperEncoder) EncExt(v interface{}) (r bool) { - if xfFn := f.e.h.getExt(i2rtid(v)); xfFn != nil { - f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e) - return true - } - return false -} +func (f genHelperEncoder) EncWriteMapEnd() { f.e.mapEnd() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncWriteArrayStart(length int) { f.e.arrayStart(length) } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncWriteArrayEnd() { f.e.arrayEnd() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncWriteArrayElem() { f.e.arrayElem() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncWriteMapElemKey() { f.e.mapElemKey() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncWriteMapElemValue() { f.e.mapElemValue() } // ---------------- DECODER FOLLOWS ----------------- @@ -224,13 +169,11 @@ func (f genHelperDecoder) DecScratchArrayBuffer() *[decScratchByteArrayLen]byte // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { - // println(">>>>>>>>> DecFallback") - rv := reflect.ValueOf(iv) + rv := rv4i(iv) if chkPtr { - rv = f.d.ensureDecodeable(rv) + f.d.ensureDecodeable(rv) } - f.d.decodeValue(rv, nil, false) - // f.d.decodeValueFallback(rv) + f.d.decodeValue(rv, nil) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* @@ -250,8 +193,7 @@ func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecTextUnmarshal(tm encoding.TextUnmarshaler) { - fnerr := tm.UnmarshalText(f.d.d.DecodeStringAsBytes()) - if fnerr != nil { + if fnerr := tm.UnmarshalText(f.d.d.DecodeStringAsBytes()); fnerr != nil { panic(fnerr) } } @@ -260,16 +202,14 @@ func (f genHelperDecoder) DecTextUnmarshal(tm encoding.TextUnmarshaler) { func (f genHelperDecoder) DecJSONUnmarshal(tm jsonUnmarshaler) { // bs := f.dd.DecodeStringAsBytes() // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. - fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()) - if fnerr != nil { + if fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()); fnerr != nil { panic(fnerr) } } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecBinaryUnmarshal(bm encoding.BinaryUnmarshaler) { - fnerr := bm.UnmarshalBinary(f.d.d.DecodeBytes(nil, true)) - if fnerr != nil { + if fnerr := bm.UnmarshalBinary(f.d.d.DecodeBytes(nil, true)); fnerr != nil { panic(fnerr) } } @@ -277,20 +217,6 @@ func (f genHelperDecoder) DecBinaryUnmarshal(bm encoding.BinaryUnmarshaler) { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecRaw() []byte { return f.d.rawBytes() } -// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -// -// Deprecated: builtin no longer supported - so we make this method a no-op, -// but leave in-place so that old generated files continue to work without regeneration. -func (f genHelperDecoder) TimeRtidIfBinc() (v uintptr) { return } - -// func (f genHelperDecoder) TimeRtidIfBinc() uintptr { -// // Note: builtin is no longer supported - so make this a no-op -// if _, ok := f.d.hh.(*BincHandle); ok { -// return timeTypId -// } -// return 0 -// } - // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) IsJSONHandle() bool { return f.d.js @@ -303,7 +229,7 @@ func (f genHelperDecoder) I2Rtid(v interface{}) uintptr { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) Extension(rtid uintptr) (xfn *extTypeTagFn) { - return f.d.h.getExt(rtid) + return f.d.h.getExt(rtid, true) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* @@ -312,32 +238,36 @@ func (f genHelperDecoder) DecExtension(v interface{}, xfFn *extTypeTagFn) { } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -// -// Deprecated: No longer used, -// but leave in-place so that old generated files continue to work without regeneration. -func (f genHelperDecoder) HasExtensions() bool { - return len(f.d.h.extHandle) != 0 +func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int) { + return decInferLen(clen, maxlen, unit) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -// -// Deprecated: No longer used, -// but leave in-place so that old generated files continue to work without regeneration. -func (f genHelperDecoder) DecExt(v interface{}) (r bool) { - if xfFn := f.d.h.getExt(i2rtid(v)); xfFn != nil { - f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext) - return true - } - return false -} +func (f genHelperDecoder) StringView(v []byte) string { return stringView(v) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int) { - return decInferLen(clen, maxlen, unit) -} +func (f genHelperDecoder) DecReadMapStart() int { return f.d.mapStart() } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -// -// Deprecated: no longer used, -// but leave in-place so that old generated files continue to work without regeneration. -func (f genHelperDecoder) StringView(v []byte) string { return stringView(v) } +func (f genHelperDecoder) DecReadMapEnd() { f.d.mapEnd() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecReadArrayStart() int { return f.d.arrayStart() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecReadArrayEnd() { f.d.arrayEnd() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecReadArrayElem() { f.d.arrayElem() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecReadMapElemKey() { f.d.mapElemKey() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecReadMapElemValue() { f.d.mapElemValue() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecDecodeFloat32() float32 { return f.d.decodeFloat32() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecCheckBreak() bool { return f.d.checkBreak() } diff --git a/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl b/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl new file mode 100644 index 00000000..44652331 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl @@ -0,0 +1,241 @@ +// comment this out // + build ignore + +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// Code generated from gen-helper.go.tmpl - DO NOT EDIT. + +package codec + +import "encoding" + +// GenVersion is the current version of codecgen. +const GenVersion = {{ .Version }} + +// This file is used to generate helper code for codecgen. +// The values here i.e. genHelper(En|De)coder are not to be used directly by +// library users. They WILL change continuously and without notice. + +{{/* +// To help enforce this, we create an unexported type with exported members. +// The only way to get the type is via the one exported type that we control (somewhat). +// +// When static codecs are created for types, they will use this value +// to perform encoding or decoding of primitives or known slice or map types. +*/ -}} + +// GenHelperEncoder is exported so that it can be used externally by codecgen. +// +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperEncoder(e *Encoder) (ge genHelperEncoder, ee genHelperEncDriver) { + ge = genHelperEncoder{e: e} + ee = genHelperEncDriver{encDriver: e.e} + return +} + +// GenHelperDecoder is exported so that it can be used externally by codecgen. +// +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperDecoder(d *Decoder) (gd genHelperDecoder, dd genHelperDecDriver) { + gd = genHelperDecoder{d: d} + dd = genHelperDecDriver{decDriver: d.d} + return +} + +type genHelperEncDriver struct { + encDriver +} + +type genHelperDecDriver struct { + decDriver +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperEncoder struct { + M must + F fastpathT + e *Encoder +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperDecoder struct { + C checkOverflow + F fastpathT + d *Decoder +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBasicHandle() *BasicHandle { + return f.e.h +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinary() bool { + return f.e.be // f.e.hh.isBinaryEncoding() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) IsJSONHandle() bool { + return f.e.js +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncFallback(iv interface{}) { + // f.e.encodeI(iv, false, false) + f.e.encodeValue(rv4i(iv), nil) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncTextMarshal(iv encoding.TextMarshaler) { + bs, fnerr := iv.MarshalText() + f.e.marshalUtf8(bs, fnerr) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncJSONMarshal(iv jsonMarshaler) { + bs, fnerr := iv.MarshalJSON() + f.e.marshalAsis(bs, fnerr) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinaryMarshal(iv encoding.BinaryMarshaler) { + bs, fnerr := iv.MarshalBinary() + f.e.marshalRaw(bs, fnerr) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncRaw(iv Raw) { f.e.rawBytes(iv) } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) I2Rtid(v interface{}) uintptr { + return i2rtid(v) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) Extension(rtid uintptr) (xfn *extTypeTagFn) { + return f.e.h.getExt(rtid, true) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncExtension(v interface{}, xfFn *extTypeTagFn) { + f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) WriteStr(s string) { + f.e.w().writestr(s) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) BytesView(v string) []byte { return bytesView(v) } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncWriteMapStart(length int) { f.e.mapStart(length) } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncWriteMapEnd() { f.e.mapEnd() } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncWriteArrayStart(length int) { f.e.arrayStart(length) } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncWriteArrayEnd() { f.e.arrayEnd() } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncWriteArrayElem() { f.e.arrayElem() } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncWriteMapElemKey() { f.e.mapElemKey() } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncWriteMapElemValue() { f.e.mapElemValue() } + +// ---------------- DECODER FOLLOWS ----------------- + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBasicHandle() *BasicHandle { + return f.d.h +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinary() bool { + return f.d.be // f.d.hh.isBinaryEncoding() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSwallow() { f.d.swallow() } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecScratchBuffer() []byte { + return f.d.b[:] +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecScratchArrayBuffer() *[decScratchByteArrayLen]byte { + return &f.d.b +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { + rv := rv4i(iv) + if chkPtr { + f.d.ensureDecodeable(rv) + } + f.d.decodeValue(rv, nil) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSliceHelperStart() (decSliceHelper, int) { + return f.d.decSliceHelperStart() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecStructFieldNotFound(index int, name string) { + f.d.structFieldNotFound(index, name) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) { + f.d.arrayCannotExpand(sliceLen, streamLen) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecTextUnmarshal(tm encoding.TextUnmarshaler) { + if fnerr := tm.UnmarshalText(f.d.d.DecodeStringAsBytes()); fnerr != nil { + panic(fnerr) + } +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecJSONUnmarshal(tm jsonUnmarshaler) { + // bs := f.dd.DecodeStringAsBytes() + // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. + if fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()); fnerr != nil { + panic(fnerr) + } +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinaryUnmarshal(bm encoding.BinaryUnmarshaler) { + if fnerr := bm.UnmarshalBinary(f.d.d.DecodeBytes(nil, true)); fnerr != nil { + panic(fnerr) + } +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecRaw() []byte { return f.d.rawBytes() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) IsJSONHandle() bool { + return f.d.js +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) I2Rtid(v interface{}) uintptr { + return i2rtid(v) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) Extension(rtid uintptr) (xfn *extTypeTagFn) { + return f.d.h.getExt(rtid, true) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecExtension(v interface{}, xfFn *extTypeTagFn) { + f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int) { + return decInferLen(clen, maxlen, unit) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) StringView(v []byte) string { return stringView(v) } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecReadMapStart() int { return f.d.mapStart() } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecReadMapEnd() { f.d.mapEnd() } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecReadArrayStart() int { return f.d.arrayStart() } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecReadArrayEnd() { f.d.arrayEnd() } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecReadArrayElem() { f.d.arrayElem() } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecReadMapElemKey() { f.d.mapElemKey() } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecReadMapElemValue() { f.d.mapElemValue() } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecDecodeFloat32() float32 { return f.d.decodeFloat32() } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecCheckBreak() bool { return f.d.checkBreak() } + diff --git a/vendor/github.com/ugorji/go/codec/gen.generated.go b/vendor/github.com/ugorji/go/codec/gen.generated.go index 8b00090a..5aca5a48 100644 --- a/vendor/github.com/ugorji/go/codec/gen.generated.go +++ b/vendor/github.com/ugorji/go/codec/gen.generated.go @@ -9,56 +9,75 @@ package codec const genDecMapTmpl = ` {{var "v"}} := *{{ .Varname }} -{{var "l"}} := r.ReadMapStart() -{{var "bh"}} := z.DecBasicHandle() +{{var "l"}} := z.DecReadMapStart() +if {{var "l"}} == codecSelferDecContainerLenNil{{xs}} { + *{{ .Varname }} = nil +} else { if {{var "v"}} == nil { - {{var "rl"}} := z.DecInferLen({{var "l"}}, {{var "bh"}}.MaxInitLen, {{ .Size }}) + {{var "rl"}} := z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "rl"}}) *{{ .Varname }} = {{var "v"}} } var {{var "mk"}} {{ .KTyp }} var {{var "mv"}} {{ .Typ }} var {{var "mg"}}, {{var "mdn"}} {{if decElemKindPtr}}, {{var "ms"}}, {{var "mok"}}{{end}} bool -if {{var "bh"}}.MapValueReset { +if z.DecBasicHandle().MapValueReset { {{if decElemKindPtr}}{{var "mg"}} = true - {{else if decElemKindIntf}}if !{{var "bh"}}.InterfaceReset { {{var "mg"}} = true } + {{else if decElemKindIntf}}if !z.DecBasicHandle().InterfaceReset { {{var "mg"}} = true } {{else if not decElemKindImmutable}}{{var "mg"}} = true {{end}} } if {{var "l"}} != 0 { -{{var "hl"}} := {{var "l"}} > 0 - for {{var "j"}} := 0; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || r.CheckBreak()); {{var "j"}}++ { - r.ReadMapElemKey() {{/* z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) */}} - {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} -{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "hl"}} := {{var "l"}} > 0 + for {{var "j"}} := 0; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || z.DecCheckBreak()); {{var "j"}}++ { + z.DecReadMapElemKey() + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x -}} + {{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */ -}} + if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { {{var "mk"}} = string({{var "bv"}}) - }{{ end }}{{if decElemKindPtr}} - {{var "ms"}} = true{{end}} + } + {{ end -}} + {{if decElemKindPtr -}} + {{var "ms"}} = true + {{end -}} if {{var "mg"}} { - {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + {{if decElemKindPtr -}} + {{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] if {{var "mok"}} { {{var "ms"}} = false - } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } + {{else -}} + {{var "mv"}} = {{var "v"}}[{{var "mk"}}] + {{end -}} } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} - r.ReadMapElemValue() {{/* z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) */}} + z.DecReadMapElemValue() {{var "mdn"}} = false - {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ $y := printf "%vmdn%v" .TempVar .Rand }}{{ decLineVar $x $y }} + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ $y := printf "%vmdn%v" .TempVar .Rand }}{{ decLineVar $x $y -}} if {{var "mdn"}} { - if {{ var "bh" }}.DeleteOnNilMapValue { delete({{var "v"}}, {{var "mk"}}) } else { {{var "v"}}[{{var "mk"}}] = {{decElemZero}} } + if z.DecBasicHandle().DeleteOnNilMapValue { delete({{var "v"}}, {{var "mk"}}) } else { {{var "v"}}[{{var "mk"}}] = {{decElemZero}} } } else if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { {{var "v"}}[{{var "mk"}}] = {{var "mv"}} } } } // else len==0: TODO: Should we clear map entries? -r.ReadMapEnd() {{/* z.DecSendContainerState(codecSelfer_containerMapEnd{{ .Sfx }}) */}} +z.DecReadMapEnd() +} ` const genDecListTmpl = ` {{var "v"}} := {{if not isArray}}*{{end}}{{ .Varname }} -{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() {{/* // helper, containerLenS */}}{{if not isArray}} +{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() {{/* // helper, containerLenS */}} +{{if not isArray -}} var {{var "c"}} bool {{/* // changed */}} -_ = {{var "c"}}{{end}} +_ = {{var "c"}} +if {{var "h"}}.IsNil { + if {{var "v"}} != nil { + {{var "v"}} = nil + {{var "c"}} = true + } +} else {{end -}} if {{var "l"}} == 0 { - {{if isSlice }}if {{var "v"}} == nil { + {{if isSlice -}} + if {{var "v"}} == nil { {{var "v"}} = []{{ .Typ }}{} {{var "c"}} = true } else if len({{var "v"}}) != 0 { @@ -67,7 +86,8 @@ if {{var "l"}} == 0 { } {{else if isChan }}if {{var "v"}} == nil { {{var "v"}} = make({{ .CTyp }}, 0) {{var "c"}} = true - } {{end}} + } + {{end -}} } else { {{var "hl"}} := {{var "l"}} > 0 var {{var "rl"}} int @@ -85,10 +105,11 @@ if {{var "l"}} == 0 { {{var "v"}} = {{var "v"}}[:{{var "l"}}] {{var "c"}} = true } - } {{end}} + } + {{end -}} var {{var "j"}} int - // var {{var "dn"}} bool - for {{var "j"}} = 0; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || r.CheckBreak()); {{var "j"}}++ { // bounds-check-elimination + {{/* // var {{var "dn"}} bool */ -}} + for {{var "j"}} = 0; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || z.DecCheckBreak()); {{var "j"}}++ { // bounds-check-elimination {{if not isArray}} if {{var "j"}} == 0 && {{var "v"}} == nil { if {{var "hl"}} { {{var "rl"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) @@ -97,27 +118,27 @@ if {{var "l"}} == 0 { } {{var "v"}} = make({{if isSlice}}[]{{ .Typ }}{{else if isChan}}{{.CTyp}}{{end}}, {{var "rl"}}) {{var "c"}} = true - }{{end}} + } + {{end -}} {{var "h"}}.ElemContainerState({{var "j"}}) - {{/* {{var "dn"}} = r.TryDecodeAsNil() */}}{{/* commented out, as decLineVar handles this already each time */}} + {{/* {{var "dn"}} = r.TryDecodeAsNil() */}}{{/* commented out, as decLineVar handles this already each time */ -}} {{if isChan}}{{ $x := printf "%[1]vvcx%[2]v" .TempVar .Rand }}var {{$x}} {{ .Typ }} - {{ decLineVar $x }} + {{ decLineVar $x -}} {{var "v"}} <- {{ $x }} - // println(">>>> sending ", {{ $x }}, " into ", {{var "v"}}) // TODO: remove this - {{else}}{{/* // if indefinite, etc, then expand the slice if necessary */}} + {{else}}{{/* // if indefinite, etc, then expand the slice if necessary */ -}} var {{var "db"}} bool if {{var "j"}} >= len({{var "v"}}) { {{if isSlice }} {{var "v"}} = append({{var "v"}}, {{ zero }}) {{var "c"}} = true {{else}} z.DecArrayCannotExpand(len(v), {{var "j"}}+1); {{var "db"}} = true - {{end}} + {{end -}} } if {{var "db"}} { z.DecSwallow() } else { - {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x -}} } - {{end}} + {{end -}} } {{if isSlice}} if {{var "j"}} < len({{var "v"}}) { {{var "v"}} = {{var "v"}}[:{{var "j"}}] @@ -125,12 +146,14 @@ if {{var "l"}} == 0 { } else if {{var "j"}} == 0 && {{var "v"}} == nil { {{var "v"}} = make([]{{ .Typ }}, 0) {{var "c"}} = true - } {{end}} + } + {{end -}} } {{var "h"}}.End() {{if not isArray }}if {{var "c"}} { *{{ .Varname }} = {{var "v"}} -}{{end}} +} +{{end -}} ` const genEncChanTmpl = ` diff --git a/vendor/github.com/ugorji/go/codec/gen.go b/vendor/github.com/ugorji/go/codec/gen.go index 74c4aa86..3573bc32 100644 --- a/vendor/github.com/ugorji/go/codec/gen.go +++ b/vendor/github.com/ugorji/go/codec/gen.go @@ -105,8 +105,14 @@ import ( // v7: // v8: current - we now maintain compatibility with old generated code. // v9: skipped -// v10: modified encDriver and decDriver interfaces. Remove deprecated methods after Jan 1, 2019 -const genVersion = 10 +// v10: modified encDriver and decDriver interfaces. +// v11: remove deprecated methods of encDriver and decDriver. +// v12: removed deprecated methods from genHelper and changed container tracking logic +// v13: 20190603 removed DecodeString - use DecodeStringAsBytes instead +// v14: 20190611 refactored nil handling: TryDecodeAsNil -> selective TryNil, etc +// v15: 20190626 encDriver.EncodeString handles StringToRaw flag inside handle +// v16: 20190629 refactoring for v1.1.6 +const genVersion = 16 const ( genCodecPkg = "codec1978" @@ -123,6 +129,21 @@ const ( // // From testing, it didn't make much difference in runtime, so keep as true (one function only) genUseOneFunctionForDecStructMap = true + + // genFastpathCanonical configures whether we support Canonical in fast path. + // The savings is not much. + // + // NOTE: This MUST ALWAYS BE TRUE. fast-path.go.tmp doesn't handle it being false. + genFastpathCanonical = true // MUST be true + + // genFastpathTrimTypes configures whether we trim uncommon fastpath types. + genFastpathTrimTypes = true + + // genDecStructArrayInlineLoopCheck configures whether we create a next function + // for each iteration in the loop and call it, or just inline it. + // + // with inlining, we get better performance but about 10% larger files. + genDecStructArrayInlineLoopCheck = true ) type genStructMapStyle uint8 @@ -157,10 +178,11 @@ func (x *genBuf) reset() { // genRunner holds some state used during a Gen run. type genRunner struct { - w io.Writer // output - c uint64 // counter used for generating varsfx - t []reflect.Type // list of types to run selfer on + w io.Writer // output + c uint64 // counter used for generating varsfx + f uint64 // counter used for saying false + t []reflect.Type // list of types to run selfer on tc reflect.Type // currently running selfer on this type te map[uintptr]bool // types for which the encoder has been created td map[uintptr]bool // types for which the decoder has been created @@ -187,6 +209,30 @@ type genRunner struct { nx bool // no extensions } +type genIfClause struct { + hasIf bool +} + +func (g *genIfClause) end(x *genRunner) { + if g.hasIf { + x.line("}") + } +} + +func (g *genIfClause) c(last bool) (v string) { + if last { + if g.hasIf { + v = " } else { " + } + } else if g.hasIf { + v = " } else if " + } else { + v = "if " + g.hasIf = true + } + return +} + // Gen will write a complete go file containing Selfer implementations for each // type passed. All the types must be in the same package. // @@ -233,9 +279,9 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, noExtensions bool, } x.genRefPkgs(t) } + x.line("// +build go1.6") if buildTags != "" { x.line("// +build " + buildTags) - x.line("") } x.line(` @@ -278,50 +324,41 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, noExtensions bool, x.linef("// ----- value types used ----") for _, vt := range [...]valueType{ valueTypeArray, valueTypeMap, valueTypeString, - valueTypeInt, valueTypeUint, valueTypeFloat} { + valueTypeInt, valueTypeUint, valueTypeFloat, + valueTypeNil, + } { x.linef("codecSelferValueType%s%s = %v", vt.String(), x.xs, int64(vt)) } x.linef("codecSelferBitsize%s = uint8(32 << (^uint(0) >> 63))", x.xs) + x.linef("codecSelferDecContainerLenNil%s = %d", x.xs, int64(decContainerLenNil)) x.line(")") x.line("var (") - x.line("errCodecSelferOnlyMapOrArrayEncodeToStruct" + x.xs + " = errors.New(`only encoded map or array can be decoded into a struct`)") + x.line("errCodecSelferOnlyMapOrArrayEncodeToStruct" + x.xs + " = " + "\nerrors.New(`only encoded map or array can be decoded into a struct`)") x.line(")") x.line("") x.hn = "codecSelfer" + x.xs x.line("type " + x.hn + " struct{}") x.line("") - + x.linef("func %sFalse() bool { return false }", x.hn) + x.line("") x.varsfxreset() x.line("func init() {") x.linef("if %sGenVersion != %v {", x.cpfx, genVersion) x.line("_, file, _, _ := runtime.Caller(0)") - x.outf(`panic("codecgen version mismatch: current: %v, need " + strconv.FormatInt(int64(%sGenVersion), 10) + ". Re-generate file: " + file)`, genVersion, x.cpfx) - // x.out(`panic(fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", `) - // x.linef(`%v, %sGenVersion, file))`, genVersion, x.cpfx) + x.linef("ver := strconv.FormatInt(int64(%sGenVersion), 10)", x.cpfx) + x.outf(`panic("codecgen version mismatch: current: %v, need " + ver + ". Re-generate file: " + file)`, genVersion) x.linef("}") - x.line("if false { var _ byte = 0; // reference the types, but skip this branch at build/run time") - // x.line("_ = strconv.ParseInt") - var n int - // for k, t := range x.im { - for _, k := range imKeys { - t := x.im[k] - x.linef("var v%v %s.%s", n, x.imn[k], t.Name()) - n++ - } - if n > 0 { - x.out("_") - for i := 1; i < n; i++ { - x.out(", _") - } - x.out(" = v0") - for i := 1; i < n; i++ { - x.outf(", v%v", i) + if len(imKeys) > 0 { + x.line("if false { // reference the types, but skip this branch at build/run time") + for _, k := range imKeys { + t := x.im[k] + x.linef("var _ %s.%s", x.imn[k], t.Name()) } + x.line("} ") // close if false } - x.line("} ") // close if false - x.line("}") // close init + x.line("}") // close init x.line("") // generate rest of type info @@ -422,6 +459,15 @@ func (x *genRunner) genRefPkgs(t reflect.Type) { } } +// sayFalse will either say "false" or use a function call that returns false. +func (x *genRunner) sayFalse() string { + x.f++ + if x.f%2 == 0 { + return x.hn + "False()" + } + return "false" +} + func (x *genRunner) varsfx() string { x.c++ return strconv.FormatUint(x.c, 10) @@ -452,6 +498,12 @@ func (x *genRunner) line(s string) { } } +func (x *genRunner) lineIf(s string) { + if s != "" { + x.line(s) + } +} + func (x *genRunner) linef(s string, params ...interface{}) { x.outf(s, params...) if len(s) == 0 || s[len(s)-1] != '\n' { @@ -460,7 +512,7 @@ func (x *genRunner) linef(s string, params ...interface{}) { } func (x *genRunner) genTypeName(t reflect.Type) (n string) { - // defer func() { fmt.Printf(">>>> ####: genTypeName: t: %v, name: '%s'\n", t, n) }() + // defer func() { xdebugf(">>>> ####: genTypeName: t: %v, name: '%s'\n", t, n) }() // if the type has a PkgPath, which doesn't match the current package, // then include it. @@ -638,14 +690,19 @@ func (x *genRunner) registerXtraT(t reflect.Type) { // encVar will encode a variable. // The parameter, t, is the reflect.Type of the variable itself func (x *genRunner) encVar(varname string, t reflect.Type) { - // fmt.Printf(">>>>>> varname: %s, t: %v\n", varname, t) var checkNil bool + // case reflect.Ptr, reflect.Interface, reflect.Slice, reflect.Map, reflect.Chan: + // do not include checkNil for slice and maps, as we already checkNil below it switch t.Kind() { - case reflect.Ptr, reflect.Interface, reflect.Slice, reflect.Map, reflect.Chan: + case reflect.Ptr, reflect.Interface, reflect.Chan: checkNil = true } + x.encVarChkNil(varname, t, checkNil) +} + +func (x *genRunner) encVarChkNil(varname string, t reflect.Type, checkNil bool) { if checkNil { - x.linef("if %s == nil { r.EncodeNil() } else { ", varname) + x.linef("if %s == nil { r.EncodeNil() } else {", varname) } switch t.Kind() { @@ -674,7 +731,6 @@ func (x *genRunner) encVar(varname string, t reflect.Type) { if checkNil { x.line("}") } - } // enc will encode a variable (varname) of type t, where t represents T. @@ -693,17 +749,18 @@ func (x *genRunner) enc(varname string, t reflect.Type) { // tptr := reflect.PtrTo(t) tk := t.Kind() if x.checkForSelfer(t, varname) { - if tk == reflect.Array || (tk == reflect.Struct && rtid != timeTypId) { // varname is of type *T + if tk == reflect.Array || + (tk == reflect.Struct && rtid != timeTypId) { // varname is of type *T // if tptr.Implements(selferTyp) || t.Implements(selferTyp) { - if ti2.isFlag(typeInfoFlagIsZeroerPtr) || ti2.isFlag(typeInfoFlagIsZeroer) { + if ti2.isFlag(tiflagSelfer) || ti2.isFlag(tiflagSelferPtr) { x.line(varname + ".CodecEncodeSelf(e)") return } } else { // varname is of type T - if ti2.cs { // t.Implements(selferTyp) { + if ti2.isFlag(tiflagSelfer) { x.line(varname + ".CodecEncodeSelf(e)") return - } else if ti2.csp { // tptr.Implements(selferTyp) { + } else if ti2.isFlag(tiflagSelferPtr) { x.linef("%ssf%s := &%s", genTempVarPfx, mi, varname) x.linef("%ssf%s.CodecEncodeSelf(e)", genTempVarPfx, mi) return @@ -738,53 +795,56 @@ func (x *genRunner) enc(varname string, t reflect.Type) { // - type is time.Time, RawExt, Raw // - the type implements (Text|JSON|Binary)(Unm|M)arshal - x.line("if false {") //start if block - defer func() { x.line("}") }() //end if block + var hasIf genIfClause + defer hasIf.end(x) // end if block (if necessary) if t == timeTyp { - x.linef("} else if !z.EncBasicHandle().TimeNotBuiltin { r.EncodeTime(%s)", varname) + x.linef("%s !z.EncBasicHandle().TimeNotBuiltin { r.EncodeTime(%s)", hasIf.c(false), varname) // return } if t == rawTyp { - x.linef("} else { z.EncRaw(%s)", varname) + x.linef("%s z.EncRaw(%s)", hasIf.c(true), varname) return } if t == rawExtTyp { - x.linef("} else { r.EncodeRawExt(%s, e)", varname) + x.linef("%s r.EncodeRawExt(%s)", hasIf.c(true), varname) return } - // only check for extensions if the type is named, and has a packagePath. + // only check for extensions if extensions are configured, + // and the type is named, and has a packagePath, + // and this is not the CodecEncodeSelf or CodecDecodeSelf method (i.e. it is not a Selfer) var arrayOrStruct = tk == reflect.Array || tk == reflect.Struct // meaning varname if of type *T - if !x.nx && genImportPath(t) != "" && t.Name() != "" { + if !x.nx && varname != genTopLevelVarName && genImportPath(t) != "" && t.Name() != "" { yy := fmt.Sprintf("%sxt%s", genTempVarPfx, mi) - x.linef("} else if %s := z.Extension(z.I2Rtid(%s)); %s != nil { z.EncExtension(%s, %s) ", yy, varname, yy, varname, yy) + x.linef("%s %s := z.Extension(z.I2Rtid(%s)); %s != nil { z.EncExtension(%s, %s) ", + hasIf.c(false), yy, varname, yy, varname, yy) } if arrayOrStruct { // varname is of type *T - if ti2.bm || ti2.bmp { // t.Implements(binaryMarshalerTyp) || tptr.Implements(binaryMarshalerTyp) { - x.linef("} else if z.EncBinary() { z.EncBinaryMarshal(%v) ", varname) + if ti2.isFlag(tiflagBinaryMarshaler) || ti2.isFlag(tiflagBinaryMarshalerPtr) { + x.linef("%s z.EncBinary() { z.EncBinaryMarshal(%v) ", hasIf.c(false), varname) } - if ti2.jm || ti2.jmp { // t.Implements(jsonMarshalerTyp) || tptr.Implements(jsonMarshalerTyp) { - x.linef("} else if !z.EncBinary() && z.IsJSONHandle() { z.EncJSONMarshal(%v) ", varname) - } else if ti2.tm || ti2.tmp { // t.Implements(textMarshalerTyp) || tptr.Implements(textMarshalerTyp) { - x.linef("} else if !z.EncBinary() { z.EncTextMarshal(%v) ", varname) + if ti2.isFlag(tiflagJsonMarshaler) || ti2.isFlag(tiflagJsonMarshalerPtr) { + x.linef("%s !z.EncBinary() && z.IsJSONHandle() { z.EncJSONMarshal(%v) ", hasIf.c(false), varname) + } else if ti2.isFlag(tiflagTextUnmarshaler) || ti2.isFlag(tiflagTextUnmarshalerPtr) { + x.linef("%s !z.EncBinary() { z.EncTextMarshal(%v) ", hasIf.c(false), varname) } } else { // varname is of type T - if ti2.bm { // t.Implements(binaryMarshalerTyp) { - x.linef("} else if z.EncBinary() { z.EncBinaryMarshal(%v) ", varname) - } else if ti2.bmp { // tptr.Implements(binaryMarshalerTyp) { - x.linef("} else if z.EncBinary() { z.EncBinaryMarshal(&%v) ", varname) + if ti2.isFlag(tiflagBinaryMarshaler) { + x.linef("%s z.EncBinary() { z.EncBinaryMarshal(%v) ", hasIf.c(false), varname) + } else if ti2.isFlag(tiflagBinaryMarshalerPtr) { + x.linef("%s z.EncBinary() { z.EncBinaryMarshal(&%v) ", hasIf.c(false), varname) } - if ti2.jm { // t.Implements(jsonMarshalerTyp) { - x.linef("} else if !z.EncBinary() && z.IsJSONHandle() { z.EncJSONMarshal(%v) ", varname) - } else if ti2.jmp { // tptr.Implements(jsonMarshalerTyp) { - x.linef("} else if !z.EncBinary() && z.IsJSONHandle() { z.EncJSONMarshal(&%v) ", varname) - } else if ti2.tm { // t.Implements(textMarshalerTyp) { - x.linef("} else if !z.EncBinary() { z.EncTextMarshal(%v) ", varname) - } else if ti2.tmp { // tptr.Implements(textMarshalerTyp) { - x.linef("} else if !z.EncBinary() { z.EncTextMarshal(&%v) ", varname) + if ti2.isFlag(tiflagJsonMarshaler) { + x.linef("%s !z.EncBinary() && z.IsJSONHandle() { z.EncJSONMarshal(%v) ", hasIf.c(false), varname) + } else if ti2.isFlag(tiflagJsonMarshalerPtr) { + x.linef("%s !z.EncBinary() && z.IsJSONHandle() { z.EncJSONMarshal(&%v) ", hasIf.c(false), varname) + } else if ti2.isFlag(tiflagTextMarshaler) { + x.linef("%s !z.EncBinary() { z.EncTextMarshal(%v) ", hasIf.c(false), varname) + } else if ti2.isFlag(tiflagTextMarshalerPtr) { + x.linef("%s !z.EncBinary() { z.EncTextMarshal(&%v) ", hasIf.c(false), varname) } } - x.line("} else {") + x.lineIf(hasIf.c(true)) switch t.Kind() { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: @@ -798,7 +858,7 @@ func (x *genRunner) enc(varname string, t reflect.Type) { case reflect.Bool: x.line("r.EncodeBool(bool(" + varname + "))") case reflect.String: - x.linef("if z.EncBasicHandle().StringToRaw { r.EncodeStringBytesRaw(z.BytesView(string(%s))) } else { r.EncodeStringEnc(codecSelferCcUTF8%s, string(%s)) }", varname, x.xs, varname) + x.linef("r.EncodeString(string(%s))", varname) case reflect.Chan: x.xtraSM(varname, t, true, false) // x.encListFallback(varname, rtid, t) @@ -811,29 +871,30 @@ func (x *genRunner) enc(varname string, t reflect.Type) { // else write encode function in-line. // - if elements are primitives or Selfers, call dedicated function on each member. // - else call Encoder.encode(XXX) on it. + x.linef("if %s == nil { r.EncodeNil() } else {", varname) if rtid == uint8SliceTypId { x.line("r.EncodeStringBytesRaw([]byte(" + varname + "))") } else if fastpathAV.index(rtid) != -1 { - g := x.newGenV(t) + g := x.newFastpathGenV(t) x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", e)") } else { x.xtraSM(varname, t, true, false) - // x.encListFallback(varname, rtid, t) } + x.linef("} // end block: if %s slice == nil", varname) case reflect.Map: // if nil, call dedicated function // if a known fastpath map, call dedicated function // else write encode function in-line. // - if elements are primitives or Selfers, call dedicated function on each member. // - else call Encoder.encode(XXX) on it. - // x.line("if " + varname + " == nil { \nr.EncodeNil()\n } else { ") + x.linef("if %s == nil { r.EncodeNil() } else {", varname) if fastpathAV.index(rtid) != -1 { - g := x.newGenV(t) + g := x.newFastpathGenV(t) x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", e)") } else { x.xtraSM(varname, t, true, false) - // x.encMapFallback(varname, rtid, t) } + x.linef("} // end block: if %s map == nil", varname) case reflect.Struct: if !inlist { delete(x.te, rtid) @@ -862,12 +923,17 @@ func (x *genRunner) encZero(t reflect.Type) { case reflect.Bool: x.line("r.EncodeBool(false)") case reflect.String: - x.linef(`if z.EncBasicHandle().StringToRaw { r.EncodeStringBytesRaw([]byte{}) } else { r.EncodeStringEnc(codecSelferCcUTF8%s, "") }`, x.xs) + x.linef(`r.EncodeString("")`) default: x.line("r.EncodeNil()") } } +func (x *genRunner) doEncOmitEmptyLine(t2 reflect.StructField, varname string, buf *genBuf) { + x.f = 0 + x.encOmitEmptyLine(t2, varname, buf) +} + func (x *genRunner) encOmitEmptyLine(t2 reflect.StructField, varname string, buf *genBuf) { // smartly check omitEmpty on a struct type, as it may contain uncomparable map/slice/etc. // also, for maps/slices/arrays, check if len ! 0 (not if == zero value) @@ -881,16 +947,16 @@ func (x *genRunner) encOmitEmptyLine(t2 reflect.StructField, varname string, buf buf.s("!(").s(varname2).s(".IsZero())") break } - if ti2.isFlag(typeInfoFlagIsZeroerPtr) || ti2.isFlag(typeInfoFlagIsZeroer) { + if ti2.isFlag(tiflagIsZeroerPtr) || ti2.isFlag(tiflagIsZeroer) { buf.s("!(").s(varname2).s(".IsZero())") break } - if ti2.isFlag(typeInfoFlagComparable) { + if ti2.isFlag(tiflagComparable) { buf.s(varname2).s(" != ").s(x.genZeroValueR(t2.Type)) break } // buf.s("(") - buf.s("false") + buf.s(x.sayFalse()) // buf.s("false") for i, n := 0, t2.Type.NumField(); i < n; i++ { f := t2.Type.Field(i) if f.PkgPath != "" { // unexported @@ -939,9 +1005,7 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { for j, si := range tisfi { _ = j if !si.omitEmpty() { - // x.linef("%s[%v] = true // %s", numfieldsvar, j, si.fieldName) x.linef("true, // %s", si.fieldName) - // nn++ continue } var t2 reflect.StructField @@ -968,36 +1032,31 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { } } } - x.encOmitEmptyLine(t2, varname, &omitline) + x.doEncOmitEmptyLine(t2, varname, &omitline) x.linef("%s, // %s", omitline.v(), si.fieldName) } x.line("}") x.linef("_ = %s", numfieldsvar) } - // x.linef("var %snn%s int", genTempVarPfx, i) - x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { - x.linef("r.WriteArrayStart(%d)", len(tisfi)) - x.linef("} else {") // if not ti.toArray - if ti.anyOmitEmpty { - // nn = 0 - // x.linef("var %snn%s = %v", genTempVarPfx, i, nn) - x.linef("var %snn%s int", genTempVarPfx, i) - x.linef("for _, b := range %s { if b { %snn%s++ } }", numfieldsvar, genTempVarPfx, i) - x.linef("r.WriteMapStart(%snn%s)", genTempVarPfx, i) - x.linef("%snn%s = %v", genTempVarPfx, i, 0) - } else { - x.linef("r.WriteMapStart(%d)", len(tisfi)) + + type genFQN struct { + i string + fqname string + nilLine genBuf + nilVar string + canNil bool + sf reflect.StructField } - x.line("}") // close if not StructToArray + genFQNs := make([]genFQN, len(tisfi)) for j, si := range tisfi { - i := x.varsfx() - isNilVarName := genTempVarPfx + "n" + i - var labelUsed bool - var t2 reflect.StructField + q := &genFQNs[j] + q.i = x.varsfx() + q.nilVar = genTempVarPfx + "n" + q.i + q.canNil = false + q.fqname = varname { t2typ := t - varname3 := varname for ij, ix := range si.is { if uint8(ij) == si.nis { break @@ -1005,51 +1064,69 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { for t2typ.Kind() == reflect.Ptr { t2typ = t2typ.Elem() } - t2 = t2typ.Field(int(ix)) - t2typ = t2.Type - varname3 = varname3 + "." + t2.Name + q.sf = t2typ.Field(int(ix)) + t2typ = q.sf.Type + q.fqname += "." + q.sf.Name if t2typ.Kind() == reflect.Ptr { - if !labelUsed { - x.line("var " + isNilVarName + " bool") + if !q.canNil { + q.nilLine.f("%s == nil", q.fqname) + q.canNil = true + } else { + q.nilLine.f(" || %s == nil", q.fqname) } - x.line("if " + varname3 + " == nil { " + isNilVarName + " = true ") - x.line("goto LABEL" + i) - x.line("}") - labelUsed = true - // "varname3 = new(" + x.genTypeName(t3.Elem()) + ") }") } } - // t2 = t.FieldByIndex(si.is) } - if labelUsed { - x.line("LABEL" + i + ":") + } + + for j := range genFQNs { + q := &genFQNs[j] + if q.canNil { + x.linef("var %s bool = %s", q.nilVar, q.nilLine.v()) } - // if the type of the field is a Selfer, or one of the ones + } + + x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray + x.linef("z.EncWriteArrayStart(%d)", len(tisfi)) - x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray - if labelUsed { - x.linef("if %s { r.WriteArrayElem(); r.EncodeNil() } else { ", isNilVarName) + for j, si := range tisfi { + q := &genFQNs[j] + // if the type of the field is a Selfer, or one of the ones + if q.canNil { + x.linef("if %s { z.EncWriteArrayElem(); r.EncodeNil() } else { ", q.nilVar) } - x.line("r.WriteArrayElem()") + x.linef("z.EncWriteArrayElem()") if si.omitEmpty() { x.linef("if %s[%v] {", numfieldsvar, j) } - x.encVar(varname+"."+t2.Name, t2.Type) + x.encVarChkNil(q.fqname, q.sf.Type, false) if si.omitEmpty() { x.linef("} else {") - x.encZero(t2.Type) + x.encZero(q.sf.Type) x.linef("}") } - if labelUsed { + if q.canNil { x.line("}") } + } - x.linef("} else {") // if not ti.toArray + x.line("z.EncWriteArrayEnd()") + x.linef("} else {") // if not ti.toArray + if ti.anyOmitEmpty { + x.linef("var %snn%s int", genTempVarPfx, i) + x.linef("for _, b := range %s { if b { %snn%s++ } }", numfieldsvar, genTempVarPfx, i) + x.linef("z.EncWriteMapStart(%snn%s)", genTempVarPfx, i) + x.linef("%snn%s = %v", genTempVarPfx, i, 0) + } else { + x.linef("z.EncWriteMapStart(%d)", len(tisfi)) + } + for j, si := range tisfi { + q := &genFQNs[j] if si.omitEmpty() { x.linef("if %s[%v] {", numfieldsvar, j) } - x.line("r.WriteMapElemKey()") + x.linef("z.EncWriteMapElemKey()") // emulate EncStructFieldKey switch ti.keyType { @@ -1063,34 +1140,29 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { if si.encNameAsciiAlphaNum { x.linef(`if z.IsJSONHandle() { z.WriteStr("\"%s\"") } else { `, si.encName) } - x.linef("r.EncodeStringEnc(codecSelferCcUTF8%s, `%s`)", x.xs, si.encName) + x.linef("r.EncodeString(`%s`)", si.encName) if si.encNameAsciiAlphaNum { x.linef("}") } } - // x.linef("r.EncStructFieldKey(codecSelferValueType%s%s, `%s`)", ti.keyType.String(), x.xs, si.encName) - x.line("r.WriteMapElemValue()") - if labelUsed { - x.line("if " + isNilVarName + " { r.EncodeNil() } else { ") - x.encVar(varname+"."+t2.Name, t2.Type) + x.line("z.EncWriteMapElemValue()") + if q.canNil { + x.line("if " + q.nilVar + " { r.EncodeNil() } else { ") + x.encVarChkNil(q.fqname, q.sf.Type, false) x.line("}") } else { - x.encVar(varname+"."+t2.Name, t2.Type) + x.encVarChkNil(q.fqname, q.sf.Type, false) } if si.omitEmpty() { x.line("}") } - x.linef("} ") // end if/else ti.toArray } - x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { - x.line("r.WriteArrayEnd()") - x.line("} else {") - x.line("r.WriteMapEnd()") - x.line("}") - + x.line("z.EncWriteMapEnd()") + x.linef("} ") // end if/else ti.toArray } func (x *genRunner) encListFallback(varname string, t reflect.Type) { + x.linef("if %s == nil { r.EncodeNil(); return }", varname) elemBytes := t.Elem().Kind() == reflect.Uint8 if t.AssignableTo(uint8SliceTyp) { x.linef("r.EncodeStringBytesRaw([]byte(%s))", varname) @@ -1115,7 +1187,6 @@ func (x *genRunner) encListFallback(varname string, t reflect.Type) { if err != nil { panic(err) } - // x.linef("%s = sch%s", varname, i) if elemBytes { x.linef("r.EncodeStringBytesRaw([]byte(%s))", "sch"+i) x.line("}") @@ -1124,37 +1195,38 @@ func (x *genRunner) encListFallback(varname string, t reflect.Type) { varname = "sch" + i } - x.line("r.WriteArrayStart(len(" + varname + "))") + x.line("z.EncWriteArrayStart(len(" + varname + "))") x.linef("for _, %sv%s := range %s {", genTempVarPfx, i, varname) - x.line("r.WriteArrayElem()") + x.linef("z.EncWriteArrayElem()") x.encVar(genTempVarPfx+"v"+i, t.Elem()) x.line("}") - x.line("r.WriteArrayEnd()") + x.line("z.EncWriteArrayEnd()") if t.Kind() == reflect.Chan { x.line("}") } } func (x *genRunner) encMapFallback(varname string, t reflect.Type) { - // TODO: expand this to handle canonical. + x.linef("if %s == nil { r.EncodeNil(); return }", varname) + // NOTE: Canonical Option is not honored i := x.varsfx() - x.line("r.WriteMapStart(len(" + varname + "))") + x.line("z.EncWriteMapStart(len(" + varname + "))") x.linef("for %sk%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) - x.line("r.WriteMapElemKey()") + x.linef("z.EncWriteMapElemKey()") x.encVar(genTempVarPfx+"k"+i, t.Key()) - x.line("r.WriteMapElemValue()") + x.line("z.EncWriteMapElemValue()") x.encVar(genTempVarPfx+"v"+i, t.Elem()) x.line("}") - x.line("r.WriteMapEnd()") + x.line("z.EncWriteMapEnd()") } func (x *genRunner) decVarInitPtr(varname, nilvar string, t reflect.Type, si *structFieldInfo, - newbuf, nilbuf *genBuf) (t2 reflect.StructField) { + newbuf, nilbuf *genBuf) (varname3 string, t2 reflect.StructField) { //we must accommodate anonymous fields, where the embedded field is a nil pointer in the value. // t2 = t.FieldByIndex(si.is) + varname3 = varname t2typ := t - varname3 := varname t2kind := t2typ.Kind() var nilbufed bool if si != nil { @@ -1162,7 +1234,8 @@ func (x *genRunner) decVarInitPtr(varname, nilvar string, t reflect.Type, si *st if uint8(ij) == si.nis { break } - for t2typ.Kind() == reflect.Ptr { + // only one-level pointers can be seen in a type + if t2typ.Kind() == reflect.Ptr { t2typ = t2typ.Elem() } t2 = t2typ.Field(int(ix)) @@ -1173,23 +1246,24 @@ func (x *genRunner) decVarInitPtr(varname, nilvar string, t reflect.Type, si *st continue } if newbuf != nil { - newbuf.f("if %s == nil { %s = new(%s) }\n", varname3, varname3, x.genTypeName(t2typ.Elem())) + if len(newbuf.buf) > 0 { + newbuf.s("\n") + } + newbuf.f("if %s == nil { %s = new(%s) }", varname3, varname3, x.genTypeName(t2typ.Elem())) } if nilbuf != nil { if !nilbufed { - nilbuf.s("if true") + nilbuf.s("if ").s(varname3).s(" != nil") nilbufed = true + } else { + nilbuf.s(" && ").s(varname3).s(" != nil") } - nilbuf.s(" && ").s(varname3).s(" != nil") } } } - // if t2typ.Kind() == reflect.Ptr { - // varname3 = varname3 + t2.Name - // } if nilbuf != nil { if nilbufed { - nilbuf.s(" { ") + nilbuf.s(" { ").s("// remove the if-true\n") } if nilvar != "" { nilbuf.s(nilvar).s(" = true") @@ -1206,7 +1280,7 @@ func (x *genRunner) decVarInitPtr(varname, nilvar string, t reflect.Type, si *st nilbuf.s("}") } } - return t2 + return } // decVar takes a variable called varname, of type t @@ -1232,8 +1306,7 @@ func (x *genRunner) decVarMain(varname, rand string, t reflect.Type, checkNotNil for t = t.Elem(); t.Kind() == reflect.Ptr; t = t.Elem() { ptrPfx += "*" if checkNotNil { - x.linef("if %s%s == nil { %s%s = new(%s)}", - ptrPfx, varname, ptrPfx, varname, x.genTypeName(t)) + x.linef("if %s%s == nil { %s%s = new(%s)}", ptrPfx, varname, ptrPfx, varname, x.genTypeName(t)) } } // Should we create temp var if a slice/map indexing? No. dec(...) can now handle it. @@ -1250,7 +1323,6 @@ func (x *genRunner) decVarMain(varname, rand string, t reflect.Type, checkNotNil // decVar takes a variable called varname, of type t func (x *genRunner) decVar(varname, nilvar string, t reflect.Type, canBeNil, checkNotNil bool) { - i := x.varsfx() // We only encode as nil if a nillable value. // This removes some of the wasted checks for TryDecodeAsNil. @@ -1259,22 +1331,15 @@ func (x *genRunner) decVar(varname, nilvar string, t reflect.Type, canBeNil, che // This could happen when decoding from a struct encoded as an array. // For that, decVar should be called with canNil=true, to force true as its value. - if !canBeNil { - canBeNil = genAnythingCanBeNil || !genIsImmutable(t) - } - - if canBeNil { + i := x.varsfx() + if t.Kind() == reflect.Ptr { var buf genBuf x.decVarInitPtr(varname, nilvar, t, nil, nil, &buf) - x.linef("if r.TryDecodeAsNil() { %s } else {", buf.buf) - } else { - x.line("// cannot be nil") - } - - x.decVarMain(varname, i, t, checkNotNil) - - if canBeNil { + x.linef("if r.TryNil() { %s } else {", buf.buf) + x.decVarMain(varname, i, t, checkNotNil) x.line("} ") + } else { + x.decVarMain(varname, i, t, checkNotNil) } } @@ -1286,9 +1351,8 @@ func (x *genRunner) dec(varname string, t reflect.Type, isptr bool) { // - t is always a baseType T (not a *T, etc). rtid := rt2id(t) ti2 := x.ti.get(rtid, t) - // tptr := reflect.PtrTo(t) if x.checkForSelfer(t, varname) { - if ti2.cs || ti2.csp { // t.Implements(selferTyp) || tptr.Implements(selferTyp) { + if ti2.isFlag(tiflagSelfer) || ti2.isFlag(tiflagSelferPtr) { x.line(varname + ".CodecDecodeSelf(d)") return } @@ -1321,10 +1385,9 @@ func (x *genRunner) dec(varname string, t reflect.Type, isptr bool) { // - the type implements (Text|JSON|Binary)(Unm|M)arshal mi := x.varsfx() - // x.linef("%sm%s := z.DecBinary()", genTempVarPfx, mi) - // x.linef("_ = %sm%s", genTempVarPfx, mi) - x.line("if false {") //start if block - defer func() { x.line("}") }() //end if block + + var hasIf genIfClause + defer hasIf.end(x) var ptrPfx, addrPfx string if isptr { @@ -1333,37 +1396,38 @@ func (x *genRunner) dec(varname string, t reflect.Type, isptr bool) { addrPfx = "&" } if t == timeTyp { - x.linef("} else if !z.DecBasicHandle().TimeNotBuiltin { %s%v = r.DecodeTime()", ptrPfx, varname) + x.linef("%s !z.DecBasicHandle().TimeNotBuiltin { %s%v = r.DecodeTime()", hasIf.c(false), ptrPfx, varname) // return } if t == rawTyp { - x.linef("} else { %s%v = z.DecRaw()", ptrPfx, varname) + x.linef("%s %s%v = z.DecRaw()", hasIf.c(true), ptrPfx, varname) return } if t == rawExtTyp { - x.linef("} else { r.DecodeExt(%s%v, 0, nil)", addrPfx, varname) + x.linef("%s r.DecodeExt(%s%v, 0, nil)", hasIf.c(true), addrPfx, varname) return } - // only check for extensions if the type is named, and has a packagePath. - if !x.nx && genImportPath(t) != "" && t.Name() != "" { + // only check for extensions if extensions are configured, + // and the type is named, and has a packagePath, + // and this is not the CodecEncodeSelf or CodecDecodeSelf method (i.e. it is not a Selfer) + if !x.nx && varname != genTopLevelVarName && genImportPath(t) != "" && t.Name() != "" { // first check if extensions are configued, before doing the interface conversion - // x.linef("} else if z.HasExtensions() && z.DecExt(%s) {", varname) yy := fmt.Sprintf("%sxt%s", genTempVarPfx, mi) - x.linef("} else if %s := z.Extension(z.I2Rtid(%s)); %s != nil { z.DecExtension(%s, %s) ", yy, varname, yy, varname, yy) + x.linef("%s %s := z.Extension(z.I2Rtid(%s)); %s != nil { z.DecExtension(%s, %s) ", hasIf.c(false), yy, varname, yy, varname, yy) } - if ti2.bu || ti2.bup { // t.Implements(binaryUnmarshalerTyp) || tptr.Implements(binaryUnmarshalerTyp) { - x.linef("} else if z.DecBinary() { z.DecBinaryUnmarshal(%s%v) ", addrPfx, varname) + if ti2.isFlag(tiflagBinaryUnmarshaler) || ti2.isFlag(tiflagBinaryUnmarshalerPtr) { + x.linef("%s z.DecBinary() { z.DecBinaryUnmarshal(%s%v) ", hasIf.c(false), addrPfx, varname) } - if ti2.ju || ti2.jup { // t.Implements(jsonUnmarshalerTyp) || tptr.Implements(jsonUnmarshalerTyp) { - x.linef("} else if !z.DecBinary() && z.IsJSONHandle() { z.DecJSONUnmarshal(%s%v)", addrPfx, varname) - } else if ti2.tu || ti2.tup { // t.Implements(textUnmarshalerTyp) || tptr.Implements(textUnmarshalerTyp) { - x.linef("} else if !z.DecBinary() { z.DecTextUnmarshal(%s%v)", addrPfx, varname) + if ti2.isFlag(tiflagJsonUnmarshaler) || ti2.isFlag(tiflagJsonUnmarshalerPtr) { + x.linef("%s !z.DecBinary() && z.IsJSONHandle() { z.DecJSONUnmarshal(%s%v)", hasIf.c(false), addrPfx, varname) + } else if ti2.isFlag(tiflagTextUnmarshaler) || ti2.isFlag(tiflagTextUnmarshalerPtr) { + x.linef("%s !z.DecBinary() { z.DecTextUnmarshal(%s%v)", hasIf.c(false), addrPfx, varname) } - x.line("} else {") + x.lineIf(hasIf.c(true)) if x.decTryAssignPrimitive(varname, t, isptr) { return @@ -1382,7 +1446,7 @@ func (x *genRunner) dec(varname string, t reflect.Type, isptr bool) { x.linef("%s%s = r.DecodeBytes(%s(%s[]byte)(%s), false)", ptrPfx, varname, ptrPfx, ptrPfx, varname) } else if fastpathAV.index(rtid) != -1 { - g := x.newGenV(t) + g := x.newFastpathGenV(t) x.linef("z.F.%sX(%s%s, d)", g.MethodNamePfx("Dec", false), addrPfx, varname) } else { x.xtraSM(varname, t, false, isptr) @@ -1394,11 +1458,10 @@ func (x *genRunner) dec(varname string, t reflect.Type, isptr bool) { // - if elements are primitives or Selfers, call dedicated function on each member. // - else call Encoder.encode(XXX) on it. if fastpathAV.index(rtid) != -1 { - g := x.newGenV(t) + g := x.newFastpathGenV(t) x.linef("z.F.%sX(%s%s, d)", g.MethodNamePfx("Dec", false), addrPfx, varname) } else { x.xtraSM(varname, t, false, isptr) - // x.decMapFallback(varname, rtid, t) } case reflect.Struct: if inlist { @@ -1457,14 +1520,14 @@ func (x *genRunner) decTryAssignPrimitive(varname string, t reflect.Type, isptr x.linef("%s%s = (%s)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize%s))", ptr, varname, x.genTypeName(t), x.xs) case reflect.Float32: - x.linef("%s%s = (%s)(r.DecodeFloat32As64())", ptr, varname, x.genTypeName(t)) + x.linef("%s%s = (%s)(z.DecDecodeFloat32())", ptr, varname, x.genTypeName(t)) case reflect.Float64: x.linef("%s%s = (%s)(r.DecodeFloat64())", ptr, varname, x.genTypeName(t)) case reflect.Bool: x.linef("%s%s = (%s)(r.DecodeBool())", ptr, varname, x.genTypeName(t)) case reflect.String: - x.linef("%s%s = (%s)(r.DecodeString())", ptr, varname, x.genTypeName(t)) + x.linef("%s%s = (%s)(string(r.DecodeStringAsBytes()))", ptr, varname, x.genTypeName(t)) default: return false } @@ -1482,6 +1545,7 @@ func (x *genRunner) decListFallback(varname string, rtid uintptr, t reflect.Type } type tstruc struct { TempVar string + Sfx string Rand string Varname string CTyp string @@ -1490,7 +1554,7 @@ func (x *genRunner) decListFallback(varname string, rtid uintptr, t reflect.Type Size int } telem := t.Elem() - ts := tstruc{genTempVarPfx, x.varsfx(), varname, x.genTypeName(t), x.genTypeName(telem), genIsImmutable(telem), int(telem.Size())} + ts := tstruc{genTempVarPfx, x.xs, x.varsfx(), varname, x.genTypeName(t), x.genTypeName(telem), genIsImmutable(telem), int(telem.Size())} funcs := make(template.FuncMap) @@ -1501,6 +1565,9 @@ func (x *genRunner) decListFallback(varname string, rtid uintptr, t reflect.Type funcs["var"] = func(s string) string { return ts.TempVar + s + ts.Rand } + funcs["xs"] = func() string { + return ts.Sfx + } funcs["zero"] = func() string { return x.genZeroValueR(telem) } @@ -1563,6 +1630,9 @@ func (x *genRunner) decMapFallback(varname string, rtid uintptr, t reflect.Type) funcs["var"] = func(s string) string { return ts.TempVar + s + ts.Rand } + funcs["xs"] = func() string { + return ts.Sfx + } tm, err := template.New("").Funcs(funcs).Parse(genDecMapTmpl) if err != nil { @@ -1582,10 +1652,14 @@ func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintpt x.line("case \"" + si.encName + "\":") newbuf.reset() nilbuf.reset() - t2 := x.decVarInitPtr(varname, "", t, si, &newbuf, &nilbuf) - x.linef("if r.TryDecodeAsNil() { %s } else { %s", nilbuf.buf, newbuf.buf) - x.decVarMain(varname+"."+t2.Name, x.varsfx(), t2.Type, false) - x.line("}") + varname3, t2 := x.decVarInitPtr(varname, "", t, si, &newbuf, &nilbuf) + if len(newbuf.buf) > 0 { + x.linef("if r.TryNil() { %s } else { %s", nilbuf.buf, newbuf.buf) + } + x.decVarMain(varname3, x.varsfx(), t2.Type, false) + if len(newbuf.buf) > 0 { + x.line("}") + } } x.line("default:") // pass the slice here, so that the string will not escape, and maybe save allocation @@ -1603,14 +1677,14 @@ func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t ref case genStructMapStyleLenPrefix: x.linef("for %sj%s := 0; %sj%s < %s; %sj%s++ {", tpfx, i, tpfx, i, lenvarname, tpfx, i) case genStructMapStyleCheckBreak: - x.linef("for %sj%s := 0; !r.CheckBreak(); %sj%s++ {", tpfx, i, tpfx, i) + x.linef("for %sj%s := 0; !z.DecCheckBreak(); %sj%s++ {", tpfx, i, tpfx, i) default: // 0, otherwise. x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length x.linef("for %sj%s := 0; ; %sj%s++ {", tpfx, i, tpfx, i) x.linef("if %shl%s { if %sj%s >= %s { break }", tpfx, i, tpfx, i, lenvarname) - x.line("} else { if r.CheckBreak() { break }; }") + x.line("} else { if z.DecCheckBreak() { break }; }") } - x.line("r.ReadMapElemKey()") + x.line("z.DecReadMapElemKey()") // emulate decstructfieldkey switch ti.keyType { @@ -1623,13 +1697,11 @@ func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t ref default: // string x.linef("%s := z.StringView(r.DecodeStringAsBytes())", kName) } - // x.linef("%s := z.StringView(r.DecStructFieldKey(codecSelferValueType%s%s, z.DecScratchArrayBuffer()))", kName, ti.keyType.String(), x.xs) - x.line("r.ReadMapElemValue()") + x.line("z.DecReadMapElemValue()") x.decStructMapSwitch(kName, varname, rtid, t) x.line("} // end for " + tpfx + "j" + i) - x.line("r.ReadMapEnd()") } func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid uintptr, t reflect.Type) { @@ -1640,40 +1712,56 @@ func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid x.linef("var %sj%s int", tpfx, i) x.linef("var %sb%s bool", tpfx, i) // break x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length - var newbuf, nilbuf genBuf - for _, si := range tisfi { - x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }", + if !genDecStructArrayInlineLoopCheck { + x.linef("var %sfn%s = func() bool { ", tpfx, i) + x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = z.DecCheckBreak() };", tpfx, i, tpfx, i, tpfx, i, tpfx, i, lenvarname, tpfx, i) - x.linef("if %sb%s { r.ReadArrayEnd(); %s }", tpfx, i, breakString) - x.line("r.ReadArrayElem()") + x.linef("if %sb%s { z.DecReadArrayEnd(); return true }; return false", tpfx, i) + x.linef("} // end func %sfn%s", tpfx, i) + } + var newbuf, nilbuf genBuf + for _, si := range tisfi { + if genDecStructArrayInlineLoopCheck { + x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = z.DecCheckBreak() }", + tpfx, i, tpfx, i, tpfx, i, + tpfx, i, lenvarname, tpfx, i) + x.linef("if %sb%s { z.DecReadArrayEnd(); %s }", tpfx, i, breakString) + } else { + x.linef("if %sfn%s() { %s }", tpfx, i, breakString) + } + x.line("z.DecReadArrayElem()") newbuf.reset() nilbuf.reset() - t2 := x.decVarInitPtr(varname, "", t, si, &newbuf, &nilbuf) - x.linef("if r.TryDecodeAsNil() { %s } else { %s", nilbuf.buf, newbuf.buf) - x.decVarMain(varname+"."+t2.Name, x.varsfx(), t2.Type, false) - x.line("}") + varname3, t2 := x.decVarInitPtr(varname, "", t, si, &newbuf, &nilbuf) + if len(newbuf.buf) > 0 { + x.linef("if r.TryNil() { %s } else { %s", nilbuf.buf, newbuf.buf) + } + x.decVarMain(varname3, x.varsfx(), t2.Type, false) + if len(newbuf.buf) > 0 { + x.line("}") + } } // read remaining values and throw away. x.line("for {") - x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }", + x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = z.DecCheckBreak() }", tpfx, i, tpfx, i, tpfx, i, tpfx, i, lenvarname, tpfx, i) x.linef("if %sb%s { break }", tpfx, i) - x.line("r.ReadArrayElem()") + x.line("z.DecReadArrayElem()") x.linef(`z.DecStructFieldNotFound(%sj%s - 1, "")`, tpfx, i) x.line("}") - x.line("r.ReadArrayEnd()") } func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { // varname MUST be a ptr, or a struct field or a slice element. i := x.varsfx() x.linef("%sct%s := r.ContainerType()", genTempVarPfx, i) - x.linef("if %sct%s == codecSelferValueTypeMap%s {", genTempVarPfx, i, x.xs) - x.line(genTempVarPfx + "l" + i + " := r.ReadMapStart()") + x.linef("if %sct%s == codecSelferValueTypeNil%s {", genTempVarPfx, i, x.xs) + x.linef("*(%s) = %s{}", varname, x.genTypeName(t)) + x.linef("} else if %sct%s == codecSelferValueTypeMap%s {", genTempVarPfx, i, x.xs) + x.line(genTempVarPfx + "l" + i + " := z.DecReadMapStart()") x.linef("if %sl%s == 0 {", genTempVarPfx, i) - x.line("r.ReadMapEnd()") if genUseOneFunctionForDecStructMap { x.line("} else { ") x.linef("%s.codecDecodeSelfFromMap(%sl%s, d)", varname, genTempVarPfx, i) @@ -1684,15 +1772,15 @@ func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { x.line(varname + ".codecDecodeSelfFromMapCheckBreak(" + genTempVarPfx + "l" + i + ", d)") } x.line("}") + x.line("z.DecReadMapEnd()") // else if container is array x.linef("} else if %sct%s == codecSelferValueTypeArray%s {", genTempVarPfx, i, x.xs) - x.line(genTempVarPfx + "l" + i + " := r.ReadArrayStart()") - x.linef("if %sl%s == 0 {", genTempVarPfx, i) - x.line("r.ReadArrayEnd()") - x.line("} else { ") + x.line(genTempVarPfx + "l" + i + " := z.DecReadArrayStart()") + x.linef("if %sl%s != 0 {", genTempVarPfx, i) x.linef("%s.codecDecodeSelfFromArray(%sl%s, d)", varname, genTempVarPfx, i) x.line("}") + x.line("z.DecReadArrayEnd()") // else panic x.line("} else { ") x.line("panic(errCodecSelferOnlyMapOrArrayEncodeToStruct" + x.xs + ")") @@ -1701,15 +1789,17 @@ func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { // -------- -type genV struct { - // genV is either a primitive (Primitive != "") or a map (MapKey != "") or a slice - MapKey string - Elem string - Primitive string - Size int +type fastpathGenV struct { + // fastpathGenV is either a primitive (Primitive != "") or a map (MapKey != "") or a slice + MapKey string + Elem string + Primitive string + Size int + NoCanonical bool } -func (x *genRunner) newGenV(t reflect.Type) (v genV) { +func (x *genRunner) newFastpathGenV(t reflect.Type) (v fastpathGenV) { + v.NoCanonical = !genFastpathCanonical switch t.Kind() { case reflect.Slice, reflect.Array: te := t.Elem() @@ -1721,12 +1811,12 @@ func (x *genRunner) newGenV(t reflect.Type) (v genV) { v.MapKey = x.genTypeName(tk) v.Size = int(te.Size() + tk.Size()) default: - panic("unexpected type for newGenV. Requires map or slice type") + panic("unexpected type for newFastpathGenV. Requires map or slice type") } return } -func (x *genV) MethodNamePfx(prefix string, prim bool) string { +func (x *fastpathGenV) MethodNamePfx(prefix string, prim bool) string { var name []byte if prefix != "" { name = append(name, prefix...) @@ -1743,7 +1833,6 @@ func (x *genV) MethodNamePfx(prefix string, prim bool) string { name = append(name, genTitleCaseName(x.Elem)...) } return string(name) - } // genImportPath returns import path of a non-predeclared named typed, or an empty string otherwise. @@ -1791,6 +1880,8 @@ func genTitleCaseName(s string) string { switch s { case "interface{}", "interface {}": return "Intf" + case "[]byte", "[]uint8", "bytes": + return "Bytes" default: return strings.ToUpper(s[0:1]) + s[1:] } @@ -1878,7 +1969,7 @@ func genIsImmutable(t reflect.Type) (v bool) { type genInternal struct { Version int - Values []genV + Values []fastpathGenV } func (x genInternal) FastpathLen() (l int) { @@ -1894,6 +1985,8 @@ func genInternalZeroValue(s string) string { switch s { case "interface{}", "interface {}": return "nil" + case "[]byte", "[]uint8", "bytes": + return "nil" case "bool": return "false" case "string": @@ -1903,49 +1996,59 @@ func genInternalZeroValue(s string) string { } } -var genInternalNonZeroValueIdx [5]uint64 -var genInternalNonZeroValueStrs = [2][5]string{ - {`"string-is-an-interface"`, "true", `"some-string"`, "11.1", "33"}, - {`"string-is-an-interface-2"`, "true", `"some-string-2"`, "22.2", "44"}, +var genInternalNonZeroValueIdx [6]uint64 +var genInternalNonZeroValueStrs = [...][6]string{ + {`"string-is-an-interface-1"`, "true", `"some-string-1"`, `[]byte("some-string-1")`, "11.1", "111"}, + {`"string-is-an-interface-2"`, "false", `"some-string-2"`, `[]byte("some-string-2")`, "22.2", "77"}, + {`"string-is-an-interface-3"`, "true", `"some-string-3"`, `[]byte("some-string-3")`, "33.3e3", "127"}, } +// Note: last numbers must be in range: 0-127 (as they may be put into a int8, uint8, etc) + func genInternalNonZeroValue(s string) string { + var i int switch s { case "interface{}", "interface {}": - genInternalNonZeroValueIdx[0]++ - return genInternalNonZeroValueStrs[genInternalNonZeroValueIdx[0]%2][0] // return string, to remove ambiguity + i = 0 case "bool": - genInternalNonZeroValueIdx[1]++ - return genInternalNonZeroValueStrs[genInternalNonZeroValueIdx[1]%2][1] + i = 1 case "string": - genInternalNonZeroValueIdx[2]++ - return genInternalNonZeroValueStrs[genInternalNonZeroValueIdx[2]%2][2] + i = 2 + case "bytes", "[]byte", "[]uint8": + i = 3 case "float32", "float64", "float", "double": - genInternalNonZeroValueIdx[3]++ - return genInternalNonZeroValueStrs[genInternalNonZeroValueIdx[3]%2][3] + i = 4 default: - genInternalNonZeroValueIdx[4]++ - return genInternalNonZeroValueStrs[genInternalNonZeroValueIdx[4]%2][4] + i = 5 } + genInternalNonZeroValueIdx[i]++ + idx := genInternalNonZeroValueIdx[i] + slen := uint64(len(genInternalNonZeroValueStrs)) + return genInternalNonZeroValueStrs[idx%slen][i] // return string, to remove ambiguity } func genInternalEncCommandAsString(s string, vname string) string { switch s { - case "uint", "uint8", "uint16", "uint32", "uint64": - return "ee.EncodeUint(uint64(" + vname + "))" - case "int", "int8", "int16", "int32", "int64": - return "ee.EncodeInt(int64(" + vname + "))" + case "uint64": + return "e.e.EncodeUint(" + vname + ")" + case "uint", "uint8", "uint16", "uint32": + return "e.e.EncodeUint(uint64(" + vname + "))" + case "int64": + return "e.e.EncodeInt(" + vname + ")" + case "int", "int8", "int16", "int32": + return "e.e.EncodeInt(int64(" + vname + "))" + case "[]byte", "[]uint8", "bytes": + return "e.e.EncodeStringBytesRaw(" + vname + ")" case "string": - return "if e.h.StringToRaw { ee.EncodeStringBytesRaw(bytesView(" + vname + ")) " + - "} else { ee.EncodeStringEnc(cUTF8, " + vname + ") }" + return "e.e.EncodeString(" + vname + ")" case "float32": - return "ee.EncodeFloat32(" + vname + ")" + return "e.e.EncodeFloat32(" + vname + ")" case "float64": - return "ee.EncodeFloat64(" + vname + ")" + return "e.e.EncodeFloat64(" + vname + ")" case "bool": - return "ee.EncodeBool(" + vname + ")" + return "e.e.EncodeBool(" + vname + ")" // case "symbol": - // return "ee.EncodeSymbol(" + vname + ")" + // return "e.e.EncodeSymbol(" + vname + ")" default: return "e.encode(" + vname + ")" } @@ -1954,50 +2057,61 @@ func genInternalEncCommandAsString(s string, vname string) string { func genInternalDecCommandAsString(s string) string { switch s { case "uint": - return "uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize))" + return "uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize))" case "uint8": - return "uint8(chkOvf.UintV(dd.DecodeUint64(), 8))" + return "uint8(chkOvf.UintV(d.d.DecodeUint64(), 8))" case "uint16": - return "uint16(chkOvf.UintV(dd.DecodeUint64(), 16))" + return "uint16(chkOvf.UintV(d.d.DecodeUint64(), 16))" case "uint32": - return "uint32(chkOvf.UintV(dd.DecodeUint64(), 32))" + return "uint32(chkOvf.UintV(d.d.DecodeUint64(), 32))" case "uint64": - return "dd.DecodeUint64()" + return "d.d.DecodeUint64()" case "uintptr": - return "uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize))" + return "uintptr(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize))" case "int": - return "int(chkOvf.IntV(dd.DecodeInt64(), intBitsize))" + return "int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize))" case "int8": - return "int8(chkOvf.IntV(dd.DecodeInt64(), 8))" + return "int8(chkOvf.IntV(d.d.DecodeInt64(), 8))" case "int16": - return "int16(chkOvf.IntV(dd.DecodeInt64(), 16))" + return "int16(chkOvf.IntV(d.d.DecodeInt64(), 16))" case "int32": - return "int32(chkOvf.IntV(dd.DecodeInt64(), 32))" + return "int32(chkOvf.IntV(d.d.DecodeInt64(), 32))" case "int64": - return "dd.DecodeInt64()" + return "d.d.DecodeInt64()" case "string": - return "dd.DecodeString()" + return "string(d.d.DecodeStringAsBytes())" + case "[]byte", "[]uint8", "bytes": + return "d.d.DecodeBytes(nil, false)" case "float32": - return "float32(chkOvf.Float32V(dd.DecodeFloat64()))" + return "float32(d.decodeFloat32())" case "float64": - return "dd.DecodeFloat64()" + return "d.d.DecodeFloat64()" case "bool": - return "dd.DecodeBool()" + return "d.d.DecodeBool()" default: panic(errors.New("gen internal: unknown type for decode: " + s)) } } func genInternalSortType(s string, elem bool) string { - for _, v := range [...]string{"int", "uint", "float", "bool", "string"} { + for _, v := range [...]string{ + "int", + "uint", + "float", + "bool", + "string", + "bytes", "[]uint8", "[]byte", + } { + if v == "[]byte" || v == "[]uint8" { + v = "bytes" + } if strings.HasPrefix(s, v) { + if v == "int" || v == "uint" || v == "float" { + v += "64" + } if elem { - if v == "int" || v == "uint" || v == "float" { - return v + "64" - } else { - return v - } + return v } return v + "Slice" } @@ -2024,49 +2138,12 @@ var genInternalTmplFuncs template.FuncMap var genInternalOnce sync.Once func genInternalInit() { - types := [...]string{ - "interface{}", - "string", - "float32", - "float64", - "uint", - "uint8", - "uint16", - "uint32", - "uint64", - "uintptr", - "int", - "int8", - "int16", - "int32", - "int64", - "bool", - } - // keep as slice, so it is in specific iteration order. - // Initial order was uint64, string, interface{}, int, int64 - mapvaltypes := [...]string{ - "interface{}", - "string", - "uint", - "uint8", - "uint16", - "uint32", - "uint64", - "uintptr", - "int", - "int8", - "int16", - "int32", - "int64", - "float32", - "float64", - "bool", - } wordSizeBytes := int(intBitsize) / 8 - mapvaltypes2 := map[string]int{ + typesizes := map[string]int{ "interface{}": 2 * wordSizeBytes, "string": 2 * wordSizeBytes, + "[]byte": 3 * wordSizeBytes, "uint": 1 * wordSizeBytes, "uint8": 1, "uint16": 2, @@ -2082,20 +2159,133 @@ func genInternalInit() { "float64": 8, "bool": 1, } + + // keep as slice, so it is in specific iteration order. + // Initial order was uint64, string, interface{}, int, int64, ... + + var types = [...]string{ + "interface{}", + "string", + "[]byte", + "float32", + "float64", + "uint", + "uint8", + "uint16", + "uint32", + "uint64", + "uintptr", + "int", + "int8", + "int16", + "int32", + "int64", + "bool", + } + + var primitivetypes, slicetypes, mapkeytypes, mapvaltypes []string + + primitivetypes = types[:] + slicetypes = types[:] + mapkeytypes = types[:] + mapvaltypes = types[:] + + if genFastpathTrimTypes { + slicetypes = []string{ + "interface{}", + "string", + "[]byte", + "float32", + "float64", + "uint", + // "uint8", // no need for fastpath of []uint8, as it is handled specially + "uint16", + "uint32", + "uint64", + // "uintptr", + "int", + "int8", + "int16", + "int32", + "int64", + "bool", + } + + mapkeytypes = []string{ + //"interface{}", + "string", + //"[]byte", + //"float32", + //"float64", + "uint", + "uint8", + //"uint16", + //"uint32", + "uint64", + //"uintptr", + "int", + //"int8", + //"int16", + //"int32", + "int64", + // "bool", + } + + mapvaltypes = []string{ + "interface{}", + "string", + "[]byte", + "uint", + "uint8", + //"uint16", + //"uint32", + "uint64", + // "uintptr", + "int", + //"int8", + //"int16", + //"int32", + "int64", + "float32", + "float64", + "bool", + } + } + + // var mapkeytypes [len(&types) - 1]string // skip bool + // copy(mapkeytypes[:], types[:]) + + // var mb []byte + // mb = append(mb, '|') + // for _, s := range mapkeytypes { + // mb = append(mb, s...) + // mb = append(mb, '|') + // } + // var mapkeytypestr = string(mb) + var gt = genInternal{Version: genVersion} // For each slice or map type, there must be a (symmetrical) Encode and Decode fast-path function - for _, s := range types { - gt.Values = append(gt.Values, genV{Primitive: s, Size: mapvaltypes2[s]}) + + for _, s := range primitivetypes { + gt.Values = append(gt.Values, + fastpathGenV{Primitive: s, Size: typesizes[s], NoCanonical: !genFastpathCanonical}) + } + for _, s := range slicetypes { // if s != "uint8" { // do not generate fast path for slice of bytes. Treat specially already. - // gt.Values = append(gt.Values, genV{Elem: s, Size: mapvaltypes2[s]}) + // gt.Values = append(gt.Values, fastpathGenV{Elem: s, Size: typesizes[s]}) + // } + gt.Values = append(gt.Values, + fastpathGenV{Elem: s, Size: typesizes[s], NoCanonical: !genFastpathCanonical}) + } + for _, s := range mapkeytypes { + // if _, ok := typesizes[s]; !ok { + // if strings.Contains(mapkeytypestr, "|"+s+"|") { + // gt.Values = append(gt.Values, fastpathGenV{MapKey: s, Elem: s, Size: 2 * typesizes[s]}) // } - gt.Values = append(gt.Values, genV{Elem: s, Size: mapvaltypes2[s]}) - if _, ok := mapvaltypes2[s]; !ok { - gt.Values = append(gt.Values, genV{MapKey: s, Elem: s, Size: 2 * mapvaltypes2[s]}) - } for _, ms := range mapvaltypes { - gt.Values = append(gt.Values, genV{MapKey: s, Elem: ms, Size: mapvaltypes2[s] + mapvaltypes2[ms]}) + gt.Values = append(gt.Values, + fastpathGenV{MapKey: s, Elem: ms, Size: typesizes[s] + typesizes[ms], NoCanonical: !genFastpathCanonical}) } } diff --git a/vendor/github.com/ugorji/go/codec/go.mod b/vendor/github.com/ugorji/go/codec/go.mod new file mode 100644 index 00000000..b4760da4 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/go.mod @@ -0,0 +1,5 @@ +module github.com/ugorji/go/codec + +require ( +github.com/ugorji/go v1.1.7 +) diff --git a/vendor/github.com/ugorji/go/codec/goversion_fmt_time_gte_go15.go b/vendor/github.com/ugorji/go/codec/goversion_fmt_time_gte_go15.go new file mode 100644 index 00000000..a3535988 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/goversion_fmt_time_gte_go15.go @@ -0,0 +1,12 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// +build go1.5 + +package codec + +import "time" + +func fmtTime(t time.Time, b []byte) []byte { + return t.AppendFormat(b, time.RFC3339Nano) +} diff --git a/vendor/github.com/ugorji/go/codec/goversion_fmt_time_lt_go15.go b/vendor/github.com/ugorji/go/codec/goversion_fmt_time_lt_go15.go new file mode 100644 index 00000000..41700c32 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/goversion_fmt_time_lt_go15.go @@ -0,0 +1,15 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// +build !go1.5 + +package codec + +import "time" + +func fmtTime(t time.Time, b []byte) []byte { + s := t.Format(time.RFC3339Nano) + b = b[:len(s)] + copy(b, s) + return b +} diff --git a/vendor/github.com/ugorji/go/codec/goversion_maprange_gte_go112.go b/vendor/github.com/ugorji/go/codec/goversion_maprange_gte_go112.go new file mode 100644 index 00000000..9931cb6e --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/goversion_maprange_gte_go112.go @@ -0,0 +1,44 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// +build go1.12 +// +build safe + +package codec + +import "reflect" + +type mapIter struct { + t *reflect.MapIter + m reflect.Value + values bool +} + +func (t *mapIter) ValidKV() (r bool) { + return true +} + +func (t *mapIter) Next() (r bool) { + return t.t.Next() +} + +func (t *mapIter) Key() reflect.Value { + return t.t.Key() +} + +func (t *mapIter) Value() (r reflect.Value) { + if t.values { + return t.t.Value() + } + return +} + +func (t *mapIter) Done() {} + +func mapRange(t *mapIter, m, k, v reflect.Value, values bool) { + *t = mapIter{ + m: m, + t: m.MapRange(), + values: values, + } +} diff --git a/vendor/github.com/ugorji/go/codec/goversion_maprange_lt_go112.go b/vendor/github.com/ugorji/go/codec/goversion_maprange_lt_go112.go new file mode 100644 index 00000000..1f020bde --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/goversion_maprange_lt_go112.go @@ -0,0 +1,47 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// +build !go1.12 +// +build !go1.7 safe + +package codec + +import "reflect" + +type mapIter struct { + m reflect.Value + keys []reflect.Value + j int + values bool +} + +func (t *mapIter) ValidKV() (r bool) { + return true +} + +func (t *mapIter) Next() (r bool) { + t.j++ + return t.j < len(t.keys) +} + +func (t *mapIter) Key() reflect.Value { + return t.keys[t.j] +} + +func (t *mapIter) Value() (r reflect.Value) { + if t.values { + return t.m.MapIndex(t.keys[t.j]) + } + return +} + +func (t *mapIter) Done() {} + +func mapRange(t *mapIter, m, k, v reflect.Value, values bool) { + *t = mapIter{ + m: m, + keys: m.MapKeys(), + values: values, + j: -1, + } +} diff --git a/vendor/github.com/ugorji/go/codec/helper.go b/vendor/github.com/ugorji/go/codec/helper.go index 8ada846b..8f7626bc 100644 --- a/vendor/github.com/ugorji/go/codec/helper.go +++ b/vendor/github.com/ugorji/go/codec/helper.go @@ -28,16 +28,6 @@ package codec // Some streams also are text-based, and use explicit separators to denote the // end/beginning of different values. // -// During encode, we use a high-level condition to determine how to iterate through -// the container. That decision is based on whether the container is text-based (with -// separators) or binary (without separators). If binary, we do not even call the -// encoding of separators. -// -// During decode, we use a different high-level condition to determine how to iterate -// through the containers. That decision is based on whether the stream contained -// a length prefix, or if it used explicit breaks. If length-prefixed, we assume that -// it has to be binary, and we do not even try to read separators. -// // Philosophy // ------------ // On decode, this codec will update containers appropriately: @@ -85,16 +75,59 @@ package codec // and we don't have to keep sending the error value along with each call // or storing it in the En|Decoder and checking it constantly along the way. // -// The disadvantage is that small functions which use panics cannot be inlined. -// The code accounts for that by only using panics behind an interface; -// since interface calls cannot be inlined, this is irrelevant. -// // We considered storing the error is En|Decoder. // - once it has its err field set, it cannot be used again. // - panicing will be optional, controlled by const flag. // - code should always check error first and return early. +// // We eventually decided against it as it makes the code clumsier to always // check for these error conditions. +// +// ------------------------------------------ +// We use sync.Pool only for the aid of long-lived objects shared across multiple goroutines. +// Encoder, Decoder, enc|decDriver, reader|writer, etc do not fall into this bucket. +// +// Also, GC is much better now, eliminating some of the reasons to use a shared pool structure. +// Instead, the short-lived objects use free-lists that live as long as the object exists. +// +// ------------------------------------------ +// Performance is affected by the following: +// - Bounds Checking +// - Inlining +// - Pointer chasing +// This package tries hard to manage the performance impact of these. +// +// ------------------------------------------ +// To alleviate performance due to pointer-chasing: +// - Prefer non-pointer values in a struct field +// - Refer to these directly within helper classes +// e.g. json.go refers directly to d.d.decRd +// +// We made the changes to embed En/Decoder in en/decDriver, +// but we had to explicitly reference the fields as opposed to using a function +// to get the better performance that we were looking for. +// For example, we explicitly call d.d.decRd.fn() instead of d.d.r().fn(). +// +// ------------------------------------------ +// Bounds Checking +// - Allow bytesDecReader to incur "bounds check error", and +// recover that as an io.EOF. +// This allows the bounds check branch to always be taken by the branch predictor, +// giving better performance (in theory), while ensuring that the code is shorter. +// +// ------------------------------------------ +// Escape Analysis +// - Prefer to return non-pointers if the value is used right away. +// Newly allocated values returned as pointers will be heap-allocated as they escape. +// +// Prefer functions and methods that +// - take no parameters and +// - return no results and +// - do not allocate. +// These are optimized by the runtime. +// For example, in json, we have dedicated functions for ReadMapElemKey, etc +// which do not delegate to readDelim, as readDelim takes a parameter. +// The difference in runtime was as much as 5%. import ( "bytes" @@ -114,7 +147,10 @@ import ( ) const ( - scratchByteArrayLen = 32 + // rvNLen is the length of the array for readn or writen calls + rwNLen = 7 + + // scratchByteArrayLen = 64 // initCollectionCap = 16 // 32 is defensive. 16 is preferred. // Support encoding.(Binary|Text)(Unm|M)arshaler. @@ -139,51 +175,81 @@ const ( // so structFieldInfo fits into 8 bytes maxLevelsEmbedding = 14 - // useFinalizers=true configures finalizers to release pool'ed resources - // acquired by Encoder/Decoder during their GC. - // - // Note that calling SetFinalizer is always expensive, - // as code must be run on the systemstack even for SetFinalizer(t, nil). - // - // We document that folks SHOULD call Release() when done, or they can - // explicitly call SetFinalizer themselves e.g. - // runtime.SetFinalizer(e, (*Encoder).Release) - // runtime.SetFinalizer(d, (*Decoder).Release) - useFinalizers = false + // xdebug controls whether xdebugf prints any output + xdebug = true ) -var oneByteArr [1]byte -var zeroByteSlice = oneByteArr[:0:0] +var ( + oneByteArr [1]byte + zeroByteSlice = oneByteArr[:0:0] + + codecgen bool + + panicv panicHdl -var codecgen bool + refBitset bitset32 + isnilBitset bitset32 + scalarBitset bitset32 +) -var refBitset bitset256 -var pool pooler -var panicv panicHdl +var ( + errMapTypeNotMapKind = errors.New("MapType MUST be of Map Kind") + errSliceTypeNotSliceKind = errors.New("SliceType MUST be of Slice Kind") +) + +var pool4tiload = sync.Pool{New: func() interface{} { return new(typeInfoLoadArray) }} func init() { - pool.init() + refBitset = refBitset. + set(byte(reflect.Map)). + set(byte(reflect.Ptr)). + set(byte(reflect.Func)). + set(byte(reflect.Chan)). + set(byte(reflect.UnsafePointer)) + + isnilBitset = isnilBitset. + set(byte(reflect.Map)). + set(byte(reflect.Ptr)). + set(byte(reflect.Func)). + set(byte(reflect.Chan)). + set(byte(reflect.UnsafePointer)). + set(byte(reflect.Interface)). + set(byte(reflect.Slice)) + + scalarBitset = scalarBitset. + set(byte(reflect.Bool)). + set(byte(reflect.Int)). + set(byte(reflect.Int8)). + set(byte(reflect.Int16)). + set(byte(reflect.Int32)). + set(byte(reflect.Int64)). + set(byte(reflect.Uint)). + set(byte(reflect.Uint8)). + set(byte(reflect.Uint16)). + set(byte(reflect.Uint32)). + set(byte(reflect.Uint64)). + set(byte(reflect.Uintptr)). + set(byte(reflect.Float32)). + set(byte(reflect.Float64)). + set(byte(reflect.Complex64)). + set(byte(reflect.Complex128)). + set(byte(reflect.String)) + +} + +type handleFlag uint8 - refBitset.set(byte(reflect.Map)) - refBitset.set(byte(reflect.Ptr)) - refBitset.set(byte(reflect.Func)) - refBitset.set(byte(reflect.Chan)) -} +const ( + initedHandleFlag handleFlag = 1 << iota + binaryHandleFlag + jsonHandleFlag +) type clsErr struct { closed bool // is it closed? errClosed error // error on closing } -// type entryType uint8 - -// const ( -// entryTypeBytes entryType = iota // make this 0, so a comparison is cheap -// entryTypeIo -// entryTypeBufio -// entryTypeUnset = 255 -// ) - type charEncoding uint8 const ( @@ -257,21 +323,15 @@ type containerState uint8 const ( _ containerState = iota - containerMapStart // slot left open, since Driver method already covers it + containerMapStart containerMapKey containerMapValue containerMapEnd - containerArrayStart // slot left open, since Driver methods already cover it + containerArrayStart containerArrayElem containerArrayEnd ) -// // sfiIdx used for tracking where a (field/enc)Name is seen in a []*structFieldInfo -// type sfiIdx struct { -// name string -// index int -// } - // do not recurse if a containing type refers to an embedded type // which refers back to its containing type (via a pointer). // The second time this back-reference happens, break out, @@ -293,16 +353,15 @@ const ( typeInfoLoadArrayBLen = 8 * 4 ) +// typeInfoLoad is a transient object used while loading up a typeInfo. type typeInfoLoad struct { - // fNames []string - // encNames []string etypes []uintptr sfis []structFieldInfo } +// typeInfoLoadArray is a cache object used to efficiently load up a typeInfo without +// much allocation. type typeInfoLoadArray struct { - // fNames [typeInfoLoadArrayLen]string - // encNames [typeInfoLoadArrayLen]string sfis [typeInfoLoadArraySfisLen]structFieldInfo sfiidx [typeInfoLoadArraySfiidxLen]byte etypes [typeInfoLoadArrayEtypesLen]uintptr @@ -347,8 +406,6 @@ func (e codecError) Error() string { return fmt.Sprintf("%s error: %v", e.name, e.err) } -// type byteAccepter func(byte) bool - var ( bigen = binary.BigEndian structInfoFieldName = "_struct" @@ -441,6 +498,15 @@ var immutableKindsSet = [32]bool{ // reflect.UnsafePointer } +// SelfExt is a sentinel extension signifying that types +// registered with it SHOULD be encoded and decoded +// based on the native mode of the format. +// +// This allows users to define a tag for an extension, +// but signify that the types should be encoded/decoded as the native encoding. +// This way, users need not also define how to encode or decode the extension. +var SelfExt = &extFailWrapper{} + // Selfer defines methods by which a value can encode or decode itself. // // Any type which implements Selfer will be able to encode or decode itself. @@ -520,13 +586,22 @@ type BasicHandle struct { extHandle - intf2impls + rtidFns atomicRtidFnSlice + rtidFnsNoExt atomicRtidFnSlice - inited uint32 - _ uint32 // padding + // ---- cache line + + DecodeOptions // ---- cache line + EncodeOptions + + intf2impls + + mu sync.Mutex + inited uint32 // holds if inited, and also handle flags (binary encoding, json handler, etc) + RPCOptions // TimeNotBuiltin configures whether time.Time should be treated as a builtin type. @@ -537,8 +612,14 @@ type BasicHandle struct { // However, users can elect to handle time.Time as a custom extension, or via the // standard library's encoding.Binary(M|Unm)arshaler or Text(M|Unm)arshaler interface. // To elect this behavior, users can set TimeNotBuiltin=true. + // // Note: Setting TimeNotBuiltin=true can be used to enable the legacy behavior // (for Cbor and Msgpack), where time.Time was not a builtin supported type. + // + // Note: DO NOT CHANGE AFTER FIRST USE. + // + // Once a Handle has been used, do not modify this option. + // It will lead to unexpected behaviour during encoding and decoding. TimeNotBuiltin bool // ExplicitRelease configures whether Release() is implicitly called after an encode or @@ -557,39 +638,67 @@ type BasicHandle struct { // are returned to the shared pool before it is garbage-collected. Do it as below: // runtime.SetFinalizer(e, (*Encoder).Release) // runtime.SetFinalizer(d, (*Decoder).Release) + // + // Deprecated: This is not longer used as pools are only used for long-lived objects + // which are shared across goroutines. + // Setting this value has no effect. It is maintained for backward compatibility. ExplicitRelease bool - be bool // is handle a binary encoding? - js bool // is handle javascript handler? - n byte // first letter of handle name - _ uint16 // padding - - // ---- cache line - - DecodeOptions - // ---- cache line - - EncodeOptions - - // noBuiltInTypeChecker - - rtidFns atomicRtidFnSlice - mu sync.Mutex - // r []uintptr // rtids mapped to s above } // basicHandle returns an initialized BasicHandle from the Handle. func basicHandle(hh Handle) (x *BasicHandle) { x = hh.getBasicHandle() - if atomic.CompareAndSwapUint32(&x.inited, 0, 1) { - x.be = hh.isBinary() - _, x.js = hh.(*JsonHandle) - x.n = hh.Name()[0] + // ** We need to simulate once.Do, to ensure no data race within the block. + // ** Consequently, below would not work. + // if atomic.CompareAndSwapUint32(&x.inited, 0, 1) { + // x.be = hh.isBinary() + // _, x.js = hh.(*JsonHandle) + // x.n = hh.Name()[0] + // } + + // simulate once.Do using our own stored flag and mutex as a CompareAndSwap + // is not sufficient, since a race condition can occur within init(Handle) function. + // init is made noinline, so that this function can be inlined by its caller. + if atomic.LoadUint32(&x.inited) == 0 { + x.init(hh) } return } +func (x *BasicHandle) isJs() bool { + return handleFlag(x.inited)&jsonHandleFlag != 0 +} + +func (x *BasicHandle) isBe() bool { + return handleFlag(x.inited)&binaryHandleFlag != 0 +} + +//go:noinline +func (x *BasicHandle) init(hh Handle) { + // make it uninlineable, as it is called at most once + x.mu.Lock() + if x.inited == 0 { + var f = initedHandleFlag + if hh.isBinary() { + f |= binaryHandleFlag + } + if _, b := hh.(*JsonHandle); b { + f |= jsonHandleFlag + } + atomic.StoreUint32(&x.inited, uint32(f)) + // ensure MapType and SliceType are of correct type + if x.MapType != nil && x.MapType.Kind() != reflect.Map { + panic(errMapTypeNotMapKind) + } + if x.SliceType != nil && x.SliceType.Kind() != reflect.Slice { + panic(errSliceTypeNotSliceKind) + } + } + x.mu.Unlock() +} + func (x *BasicHandle) getBasicHandle() *BasicHandle { return x } @@ -624,31 +733,54 @@ LOOP: return } -func (x *BasicHandle) fn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *codecFn) { +func (x *BasicHandle) fn(rt reflect.Type) (fn *codecFn) { + return x.fnVia(rt, &x.rtidFns, true) +} + +func (x *BasicHandle) fnNoExt(rt reflect.Type) (fn *codecFn) { + return x.fnVia(rt, &x.rtidFnsNoExt, false) +} + +func (x *BasicHandle) fnVia(rt reflect.Type, fs *atomicRtidFnSlice, checkExt bool) (fn *codecFn) { rtid := rt2id(rt) - sp := x.rtidFns.load() + sp := fs.load() if sp != nil { if _, fn = findFn(sp, rtid); fn != nil { - // xdebugf("<<<< %c: found fn for %v in rtidfns of size: %v", c.n, rt, len(sp)) return } } - c := x - // xdebugf("#### for %c: load fn for %v in rtidfns of size: %v", c.n, rt, len(sp)) + fn = x.fnLoad(rt, rtid, checkExt) + x.mu.Lock() + var sp2 []codecRtidFn + sp = fs.load() + if sp == nil { + sp2 = []codecRtidFn{{rtid, fn}} + fs.store(sp2) + } else { + idx, fn2 := findFn(sp, rtid) + if fn2 == nil { + sp2 = make([]codecRtidFn, len(sp)+1) + copy(sp2, sp[:idx]) + copy(sp2[idx+1:], sp[idx:]) + sp2[idx] = codecRtidFn{rtid, fn} + fs.store(sp2) + } + } + x.mu.Unlock() + return +} + +func (x *BasicHandle) fnLoad(rt reflect.Type, rtid uintptr, checkExt bool) (fn *codecFn) { fn = new(codecFn) fi := &(fn.i) - ti := c.getTypeInfo(rtid, rt) + ti := x.getTypeInfo(rtid, rt) fi.ti = ti rk := reflect.Kind(ti.kind) - if checkCodecSelfer && (ti.cs || ti.csp) { - fn.fe = (*Encoder).selferMarshal - fn.fd = (*Decoder).selferUnmarshal - fi.addrF = true - fi.addrD = ti.csp - fi.addrE = ti.csp - } else if rtid == timeTypId && !c.TimeNotBuiltin { + // anything can be an extension except the built-in ones: time, raw and rawext + + if rtid == timeTypId && !x.TimeNotBuiltin { fn.fe = (*Encoder).kTime fn.fd = (*Decoder).kTime } else if rtid == rawTypId { @@ -660,7 +792,7 @@ func (x *BasicHandle) fn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) fi.addrF = true fi.addrD = true fi.addrE = true - } else if xfFn := c.getExt(rtid); xfFn != nil { + } else if xfFn := x.getExt(rtid, checkExt); xfFn != nil { fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext fn.fe = (*Encoder).ext fn.fd = (*Decoder).ext @@ -669,27 +801,39 @@ func (x *BasicHandle) fn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) if rk == reflect.Struct || rk == reflect.Array { fi.addrE = true } - } else if supportMarshalInterfaces && c.be && (ti.bm || ti.bmp) && (ti.bu || ti.bup) { + } else if ti.isFlag(tiflagSelfer) || ti.isFlag(tiflagSelferPtr) { + fn.fe = (*Encoder).selferMarshal + fn.fd = (*Decoder).selferUnmarshal + fi.addrF = true + fi.addrD = ti.isFlag(tiflagSelferPtr) + fi.addrE = ti.isFlag(tiflagSelferPtr) + } else if supportMarshalInterfaces && x.isBe() && + (ti.isFlag(tiflagBinaryMarshaler) || ti.isFlag(tiflagBinaryMarshalerPtr)) && + (ti.isFlag(tiflagBinaryUnmarshaler) || ti.isFlag(tiflagBinaryUnmarshalerPtr)) { fn.fe = (*Encoder).binaryMarshal fn.fd = (*Decoder).binaryUnmarshal fi.addrF = true - fi.addrD = ti.bup - fi.addrE = ti.bmp - } else if supportMarshalInterfaces && !c.be && c.js && (ti.jm || ti.jmp) && (ti.ju || ti.jup) { + fi.addrD = ti.isFlag(tiflagBinaryUnmarshalerPtr) + fi.addrE = ti.isFlag(tiflagBinaryMarshalerPtr) + } else if supportMarshalInterfaces && !x.isBe() && x.isJs() && + (ti.isFlag(tiflagJsonMarshaler) || ti.isFlag(tiflagJsonMarshalerPtr)) && + (ti.isFlag(tiflagJsonUnmarshaler) || ti.isFlag(tiflagJsonUnmarshalerPtr)) { //If JSON, we should check JSONMarshal before textMarshal fn.fe = (*Encoder).jsonMarshal fn.fd = (*Decoder).jsonUnmarshal fi.addrF = true - fi.addrD = ti.jup - fi.addrE = ti.jmp - } else if supportMarshalInterfaces && !c.be && (ti.tm || ti.tmp) && (ti.tu || ti.tup) { + fi.addrD = ti.isFlag(tiflagJsonUnmarshalerPtr) + fi.addrE = ti.isFlag(tiflagJsonMarshalerPtr) + } else if supportMarshalInterfaces && !x.isBe() && + (ti.isFlag(tiflagTextMarshaler) || ti.isFlag(tiflagTextMarshalerPtr)) && + (ti.isFlag(tiflagTextUnmarshaler) || ti.isFlag(tiflagTextUnmarshalerPtr)) { fn.fe = (*Encoder).textMarshal fn.fd = (*Decoder).textUnmarshal fi.addrF = true - fi.addrD = ti.tup - fi.addrE = ti.tmp + fi.addrD = ti.isFlag(tiflagTextUnmarshalerPtr) + fi.addrE = ti.isFlag(tiflagTextMarshalerPtr) } else { - if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { + if fastpathEnabled && (rk == reflect.Map || rk == reflect.Slice) { if ti.pkgpath == "" { // un-named slice or map if idx := fastpathAV.index(rtid); idx != -1 { fn.fe = fastpathAV[idx].encfn @@ -710,16 +854,17 @@ func (x *BasicHandle) fn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) xfnf := fastpathAV[idx].encfn xrt := fastpathAV[idx].rt fn.fe = func(e *Encoder, xf *codecFnInfo, xrv reflect.Value) { - xfnf(e, xf, xrv.Convert(xrt)) + xfnf(e, xf, rvConvert(xrv, xrt)) } fi.addrD = true fi.addrF = false // meaning it can be an address(ptr) or a value xfnf2 := fastpathAV[idx].decfn + xptr2rt := reflect.PtrTo(xrt) fn.fd = func(d *Decoder, xf *codecFnInfo, xrv reflect.Value) { if xrv.Kind() == reflect.Ptr { - xfnf2(d, xf, xrv.Convert(reflect.PtrTo(xrt))) + xfnf2(d, xf, rvConvert(xrv, xptr2rt)) } else { - xfnf2(d, xf, xrv.Convert(xrt)) + xfnf2(d, xf, rvConvert(xrv, xrt)) } } } @@ -731,6 +876,16 @@ func (x *BasicHandle) fn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) fn.fe = (*Encoder).kBool fn.fd = (*Decoder).kBool case reflect.String: + // Do not use different functions based on StringToRaw option, + // as that will statically set the function for a string type, + // and if the Handle is modified thereafter, behaviour is non-deterministic. + // i.e. DO NOT DO: + // if x.StringToRaw { + // fn.fe = (*Encoder).kStringToRaw + // } else { + // fn.fe = (*Encoder).kStringEnc + // } + fn.fe = (*Encoder).kString fn.fd = (*Decoder).kString case reflect.Int: @@ -777,24 +932,26 @@ func (x *BasicHandle) fn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) fn.fd = (*Decoder).kErr case reflect.Chan: fi.seq = seqTypeChan - fn.fe = (*Encoder).kSlice - fn.fd = (*Decoder).kSlice + fn.fe = (*Encoder).kChan + fn.fd = (*Decoder).kSliceForChan case reflect.Slice: fi.seq = seqTypeSlice fn.fe = (*Encoder).kSlice fn.fd = (*Decoder).kSlice case reflect.Array: fi.seq = seqTypeArray - fn.fe = (*Encoder).kSlice + fn.fe = (*Encoder).kArray fi.addrF = false fi.addrD = false rt2 := reflect.SliceOf(ti.elem) fn.fd = func(d *Decoder, xf *codecFnInfo, xrv reflect.Value) { - d.h.fn(rt2, true, false).fd(d, xf, xrv.Slice(0, xrv.Len())) + // call fnVia directly, so fn(...) is not recursive, and can be inlined + d.h.fnVia(rt2, &x.rtidFns, true).fd(d, xf, rvGetSlice4Array(xrv, rt2)) } - // fn.fd = (*Decoder).kArray case reflect.Struct: - if ti.anyOmitEmpty || ti.mf || ti.mfp { + if ti.anyOmitEmpty || + ti.isFlag(tiflagMissingFielder) || + ti.isFlag(tiflagMissingFielderPtr) { fn.fe = (*Encoder).kStruct } else { fn.fe = (*Encoder).kStructNoOmitempty @@ -814,28 +971,6 @@ func (x *BasicHandle) fn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) } } } - - c.mu.Lock() - var sp2 []codecRtidFn - sp = c.rtidFns.load() - if sp == nil { - sp2 = []codecRtidFn{{rtid, fn}} - c.rtidFns.store(sp2) - // xdebugf(">>>> adding rt: %v to rtidfns of size: %v", rt, len(sp2)) - // xdebugf(">>>> loading stored rtidfns of size: %v", len(c.rtidFns.load())) - } else { - idx, fn2 := findFn(sp, rtid) - if fn2 == nil { - sp2 = make([]codecRtidFn, len(sp)+1) - copy(sp2, sp[:idx]) - copy(sp2[idx+1:], sp[idx:]) - sp2[idx] = codecRtidFn{rtid, fn} - c.rtidFns.store(sp2) - // xdebugf(">>>> adding rt: %v to rtidfns of size: %v", rt, len(sp2)) - - } - } - c.mu.Unlock() return } @@ -845,8 +980,11 @@ func (x *BasicHandle) fn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) // Once a handle is configured, it can be shared across multiple Encoders and Decoders. // // Note that a Handle is NOT safe for concurrent modification. -// Consequently, do not modify it after it is configured if shared among -// multiple Encoders and Decoders in different goroutines. +// +// A Handle also should not be modified after it is configured and has +// been used at least once. This is because stored state may be out of sync with the +// new configuration, and a data race can occur when multiple goroutines access it. +// i.e. multiple Encoders or Decoders in different goroutines. // // Consequently, the typical usage model is that a Handle is pre-configured // before first time use, and not modified while in use. @@ -856,12 +994,9 @@ type Handle interface { // return the basic handle. It may not have been inited. // Prefer to use basicHandle() helper function that ensures it has been inited. getBasicHandle() *BasicHandle - recreateEncDriver(encDriver) bool - newEncDriver(w *Encoder) encDriver - newDecDriver(r *Decoder) decDriver + newEncDriver() encDriver + newDecDriver() decDriver isBinary() bool - hasElemSeparators() bool - // IsBuiltinType(rtid uintptr) bool } // Raw represents raw formatted bytes. @@ -932,7 +1067,7 @@ type addExtWrapper struct { } func (x addExtWrapper) WriteExt(v interface{}) []byte { - bs, err := x.encFn(reflect.ValueOf(v)) + bs, err := x.encFn(rv4i(v)) if err != nil { panic(err) } @@ -940,7 +1075,7 @@ func (x addExtWrapper) WriteExt(v interface{}) []byte { } func (x addExtWrapper) ReadExt(v interface{}, bs []byte) { - if err := x.decFn(reflect.ValueOf(v), bs); err != nil { + if err := x.decFn(rv4i(v), bs); err != nil { panic(err) } } @@ -953,11 +1088,6 @@ func (x addExtWrapper) UpdateExt(dest interface{}, v interface{}) { x.ReadExt(dest, v.([]byte)) } -type extWrapper struct { - BytesExt - InterfaceExt -} - type bytesExtFailer struct{} func (bytesExtFailer) WriteExt(v interface{}) []byte { @@ -978,6 +1108,21 @@ func (interfaceExtFailer) UpdateExt(dest interface{}, v interface{}) { panicv.errorstr("InterfaceExt.UpdateExt is not supported") } +type bytesExtWrapper struct { + interfaceExtFailer + BytesExt +} + +type interfaceExtWrapper struct { + bytesExtFailer + InterfaceExt +} + +type extFailWrapper struct { + bytesExtFailer + interfaceExtFailer +} + type binaryEncodingType struct{} func (binaryEncodingType) isBinary() bool { return true } @@ -989,29 +1134,16 @@ func (textEncodingType) isBinary() bool { return false } // noBuiltInTypes is embedded into many types which do not support builtins // e.g. msgpack, simple, cbor. -// type noBuiltInTypeChecker struct{} -// func (noBuiltInTypeChecker) IsBuiltinType(rt uintptr) bool { return false } -// type noBuiltInTypes struct{ noBuiltInTypeChecker } - type noBuiltInTypes struct{} func (noBuiltInTypes) EncodeBuiltin(rt uintptr, v interface{}) {} func (noBuiltInTypes) DecodeBuiltin(rt uintptr, v interface{}) {} -// type noStreamingCodec struct{} -// func (noStreamingCodec) CheckBreak() bool { return false } -// func (noStreamingCodec) hasElemSeparators() bool { return false } - -type noElemSeparators struct{} - -func (noElemSeparators) hasElemSeparators() (v bool) { return } -func (noElemSeparators) recreateEncDriver(e encDriver) (v bool) { return } - // bigenHelper. // Users must already slice the x completely, because we will not reslice. type bigenHelper struct { x []byte // must be correctly sliced to appropriate len. slicing is a cost. - w *encWriterSwitch + w *encWr } func (z bigenHelper) writeUint16(v uint16) { @@ -1035,7 +1167,7 @@ type extTypeTagFn struct { rt reflect.Type tag uint64 ext Ext - _ [1]uint64 // padding + // _ [1]uint64 // padding } type extHandle []extTypeTagFn @@ -1061,6 +1193,8 @@ func (o *extHandle) AddExt(rt reflect.Type, tag byte, // Deprecated: Use SetBytesExt or SetInterfaceExt on the Handle instead. func (o *extHandle) SetExt(rt reflect.Type, tag uint64, ext Ext) (err error) { // o is a pointer, because we may need to initialize it + // We EXPECT *o is a pointer to a non-nil extHandle. + rk := rt.Kind() for rk == reflect.Ptr { rt = rt.Elem() @@ -1074,16 +1208,12 @@ func (o *extHandle) SetExt(rt reflect.Type, tag uint64, ext Ext) (err error) { rtid := rt2id(rt) switch rtid { case timeTypId, rawTypId, rawExtTypId: - // all natively supported type, so cannot have an extension - return // TODO: should we silently ignore, or return an error??? + // all natively supported type, so cannot have an extension. + // However, we do not return an error for these, as we do not document that. + // Instead, we silently treat as a no-op, and return. + return } - // if o == nil { - // return errors.New("codec.Handle.SetExt: extHandle not initialized") - // } o2 := *o - // if o2 == nil { - // return errors.New("codec.Handle.SetExt: extHandle not initialized") - // } for i := range o2 { v := &o2[i] if v.rtid == rtid { @@ -1092,11 +1222,14 @@ func (o *extHandle) SetExt(rt reflect.Type, tag uint64, ext Ext) (err error) { } } rtidptr := rt2id(reflect.PtrTo(rt)) - *o = append(o2, extTypeTagFn{rtid, rtidptr, rt, tag, ext, [1]uint64{}}) + *o = append(o2, extTypeTagFn{rtid, rtidptr, rt, tag, ext}) // , [1]uint64{}}) return } -func (o extHandle) getExt(rtid uintptr) (v *extTypeTagFn) { +func (o extHandle) getExt(rtid uintptr, check bool) (v *extTypeTagFn) { + if !check { + return + } for i := range o { v = &o[i] if v.rtid == rtid || v.rtidptr == rtid { @@ -1154,10 +1287,11 @@ func (o intf2impls) intf2impl(rtid uintptr) (rv reflect.Value) { if v.impl == nil { return } - if v.impl.Kind() == reflect.Ptr { + vkind := v.impl.Kind() + if vkind == reflect.Ptr { return reflect.New(v.impl.Elem()) } - return reflect.New(v.impl).Elem() + return rvZeroAddrK(v.impl, vkind) } } return @@ -1200,14 +1334,14 @@ type structFieldInfo struct { encNameAsciiAlphaNum bool // the encName only contains ascii alphabet and numbers structFieldInfoFlag - _ [1]byte // padding + // _ [1]byte // padding } -func (si *structFieldInfo) setToZeroValue(v reflect.Value) { - if v, valid := si.field(v, false); valid { - v.Set(reflect.Zero(v.Type())) - } -} +// func (si *structFieldInfo) setToZeroValue(v reflect.Value) { +// if v, valid := si.field(v, false); valid { +// v.Set(reflect.Zero(v.Type())) +// } +// } // rv returns the field of the struct. // If anonymous, it returns an Invalid @@ -1226,11 +1360,6 @@ func (si *structFieldInfo) field(v reflect.Value, update bool) (rv2 reflect.Valu return v, true } -// func (si *structFieldInfo) fieldval(v reflect.Value, update bool) reflect.Value { -// v, _ = si.field(v, update) -// return v -// } - func parseStructInfo(stag string) (toArray, omitEmpty bool, keytype valueType) { keytype = valueTypeString // default if stag == "" { @@ -1277,9 +1406,6 @@ func (si *structFieldInfo) parseTag(stag string) { switch s { case "omitempty": si.flagSet(structFieldInfoFlagOmitEmpty) - // si.omitEmpty = true - // case "toarray": - // si.toArray = true } } } @@ -1329,6 +1455,7 @@ type structFieldNode struct { func (x *structFieldNode) field(si *structFieldInfo) (fv reflect.Value) { // return si.fieldval(x.v, x.update) + // Note: we only cache if nis=2 or nis=3 i.e. up to 2 levels of embedding // This mostly saves us time on the repeated calls to v.Elem, v.Field, etc. var valid bool @@ -1370,26 +1497,54 @@ func (x *structFieldNode) field(si *structFieldInfo) (fv reflect.Value) { func baseStructRv(v reflect.Value, update bool) (v2 reflect.Value, valid bool) { for v.Kind() == reflect.Ptr { - if v.IsNil() { + if rvIsNil(v) { if !update { return } - v.Set(reflect.New(v.Type().Elem())) + rvSetDirect(v, reflect.New(v.Type().Elem())) } v = v.Elem() } return v, true } -type typeInfoFlag uint8 +type tiflag uint32 const ( - typeInfoFlagComparable = 1 << iota - typeInfoFlagIsZeroer - typeInfoFlagIsZeroerPtr + _ tiflag = 1 << iota + + tiflagComparable + + tiflagIsZeroer + tiflagIsZeroerPtr + + tiflagBinaryMarshaler + tiflagBinaryMarshalerPtr + + tiflagBinaryUnmarshaler + tiflagBinaryUnmarshalerPtr + + tiflagTextMarshaler + tiflagTextMarshalerPtr + + tiflagTextUnmarshaler + tiflagTextUnmarshalerPtr + + tiflagJsonMarshaler + tiflagJsonMarshalerPtr + + tiflagJsonUnmarshaler + tiflagJsonUnmarshalerPtr + + tiflagSelfer + tiflagSelferPtr + + tiflagMissingFielder + tiflagMissingFielderPtr ) -// typeInfo keeps information about each (non-ptr) type referenced in the encode/decode sequence. +// typeInfo keeps static (non-changing readonly)information +// about each (non-ptr) type referenced in the encode/decode sequence. // // During an encode/decode sequence, we work as below: // - If base is a built in type, en/decode base value @@ -1403,7 +1558,6 @@ type typeInfo struct { pkgpath string rtid uintptr - // rv0 reflect.Value // saved zero value, used if immutableKind numMeth uint16 // number of methods kind uint8 @@ -1424,38 +1578,35 @@ type typeInfo struct { // sfis []structFieldInfo // all sfi, in src order, as created. sfiNamesSort []byte // all names, with indexes into the sfiSort - // format of marshal type fields below: [btj][mu]p? OR csp? - - bm bool // T is a binaryMarshaler - bmp bool // *T is a binaryMarshaler - bu bool // T is a binaryUnmarshaler - bup bool // *T is a binaryUnmarshaler - tm bool // T is a textMarshaler - tmp bool // *T is a textMarshaler - tu bool // T is a textUnmarshaler - tup bool // *T is a textUnmarshaler - - jm bool // T is a jsonMarshaler - jmp bool // *T is a jsonMarshaler - ju bool // T is a jsonUnmarshaler - jup bool // *T is a jsonUnmarshaler - cs bool // T is a Selfer - csp bool // *T is a Selfer - mf bool // T is a MissingFielder - mfp bool // *T is a MissingFielder + // rv0 is the zero value for the type. + // It is mostly beneficial for all non-reference kinds + // i.e. all but map/chan/func/ptr/unsafe.pointer + // so beneficial for intXX, bool, slices, structs, etc + rv0 reflect.Value + + elemsize uintptr // other flags, with individual bits representing if set. - flags typeInfoFlag + flags tiflag + infoFieldOmitempty bool - _ [6]byte // padding - _ [2]uint64 // padding + elemkind uint8 + _ [2]byte // padding + // _ [1]uint64 // padding } -func (ti *typeInfo) isFlag(f typeInfoFlag) bool { +func (ti *typeInfo) isFlag(f tiflag) bool { return ti.flags&f != 0 } +func (ti *typeInfo) flag(when bool, f tiflag) *typeInfo { + if when { + ti.flags |= f + } + return ti +} + func (ti *typeInfo) indexForEncName(name []byte) (index int16) { var sn []byte if len(name)+2 <= 32 { @@ -1487,8 +1638,9 @@ type TypeInfos struct { // infos: formerly map[uintptr]*typeInfo, now *[]rtid2ti, 2 words expected infos atomicTypeInfoSlice mu sync.Mutex + _ uint64 // padding (cache-aligned) tags []string - _ [2]uint64 // padding + _ uint64 // padding (cache-aligned) } // NewTypeInfos creates a TypeInfos given a set of struct tags keys. @@ -1515,11 +1667,6 @@ func findTypeInfo(s []rtid2ti, rtid uintptr) (i uint, ti *typeInfo) { // binary search. adapted from sort/search.go. // Note: we use goto (instead of for loop) so this can be inlined. - // if sp == nil { - // return -1, nil - // } - // s := *sp - // h, i, j := 0, 0, len(s) var h uint // var h, i uint var j = uint(len(s)) @@ -1563,30 +1710,31 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { pkgpath: rt.PkgPath(), keyType: valueTypeString, // default it - so it's never 0 } - // ti.rv0 = reflect.Zero(rt) + ti.rv0 = reflect.Zero(rt) - // ti.comparable = rt.Comparable() ti.numMeth = uint16(rt.NumMethod()) - ti.bm, ti.bmp = implIntf(rt, binaryMarshalerTyp) - ti.bu, ti.bup = implIntf(rt, binaryUnmarshalerTyp) - ti.tm, ti.tmp = implIntf(rt, textMarshalerTyp) - ti.tu, ti.tup = implIntf(rt, textUnmarshalerTyp) - ti.jm, ti.jmp = implIntf(rt, jsonMarshalerTyp) - ti.ju, ti.jup = implIntf(rt, jsonUnmarshalerTyp) - ti.cs, ti.csp = implIntf(rt, selferTyp) - ti.mf, ti.mfp = implIntf(rt, missingFielderTyp) - - b1, b2 := implIntf(rt, iszeroTyp) - if b1 { - ti.flags |= typeInfoFlagIsZeroer - } - if b2 { - ti.flags |= typeInfoFlagIsZeroerPtr - } - if rt.Comparable() { - ti.flags |= typeInfoFlagComparable - } + var b1, b2 bool + b1, b2 = implIntf(rt, binaryMarshalerTyp) + ti.flag(b1, tiflagBinaryMarshaler).flag(b2, tiflagBinaryMarshalerPtr) + b1, b2 = implIntf(rt, binaryUnmarshalerTyp) + ti.flag(b1, tiflagBinaryUnmarshaler).flag(b2, tiflagBinaryUnmarshalerPtr) + b1, b2 = implIntf(rt, textMarshalerTyp) + ti.flag(b1, tiflagTextMarshaler).flag(b2, tiflagTextMarshalerPtr) + b1, b2 = implIntf(rt, textUnmarshalerTyp) + ti.flag(b1, tiflagTextUnmarshaler).flag(b2, tiflagTextUnmarshalerPtr) + b1, b2 = implIntf(rt, jsonMarshalerTyp) + ti.flag(b1, tiflagJsonMarshaler).flag(b2, tiflagJsonMarshalerPtr) + b1, b2 = implIntf(rt, jsonUnmarshalerTyp) + ti.flag(b1, tiflagJsonUnmarshaler).flag(b2, tiflagJsonUnmarshalerPtr) + b1, b2 = implIntf(rt, selferTyp) + ti.flag(b1, tiflagSelfer).flag(b2, tiflagSelferPtr) + b1, b2 = implIntf(rt, missingFielderTyp) + ti.flag(b1, tiflagMissingFielder).flag(b2, tiflagMissingFielderPtr) + b1, b2 = implIntf(rt, iszeroTyp) + ti.flag(b1, tiflagIsZeroer).flag(b2, tiflagIsZeroerPtr) + b1 = rt.Comparable() + ti.flag(b1, tiflagComparable) switch rk { case reflect.Struct: @@ -1597,13 +1745,12 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { } else { ti.keyType = valueTypeString } - pp, pi := &pool.tiload, pool.tiload.Get() // pool.tiLoad() + pp, pi := &pool4tiload, pool4tiload.Get() // pool.tiLoad() pv := pi.(*typeInfoLoadArray) pv.etypes[0] = ti.rtid // vv := typeInfoLoad{pv.fNames[:0], pv.encNames[:0], pv.etypes[:1], pv.sfis[:0]} vv := typeInfoLoad{pv.etypes[:1], pv.sfis[:0]} x.rget(rt, rtid, omitEmpty, nil, &vv) - // ti.sfis = vv.sfis ti.sfiSrc, ti.sfiSort, ti.sfiNamesSort, ti.anyOmitEmpty = rgetResolveSFI(rt, vv.sfis, pv) pp.Put(pi) case reflect.Map: @@ -1612,13 +1759,18 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { case reflect.Slice: ti.mbs, _ = implIntf(rt, mapBySliceTyp) ti.elem = rt.Elem() + ti.elemsize = ti.elem.Size() + ti.elemkind = uint8(ti.elem.Kind()) case reflect.Chan: ti.elem = rt.Elem() ti.chandir = uint8(rt.ChanDir()) - case reflect.Array, reflect.Ptr: + case reflect.Array: + ti.elem = rt.Elem() + ti.elemsize = ti.elem.Size() + ti.elemkind = uint8(ti.elem.Kind()) + case reflect.Ptr: ti.elem = rt.Elem() } - // sfi = sfiSrc x.mu.Lock() sp = x.infos.load() @@ -1765,9 +1917,6 @@ LOOP: si.fieldName = f.Name si.flagSet(structFieldInfoFlagReady) - // pv.encNames = append(pv.encNames, si.encName) - - // si.ikind = int(f.Type.Kind()) if len(indexstack) > maxLevelsEmbedding-1 { panicv.errorf("codec: only supports up to %v depth of embedding - type has %v depth", maxLevelsEmbedding-1, len(indexstack)) @@ -1785,10 +1934,12 @@ LOOP: func tiSep(name string) uint8 { // (xn[0]%64) // (between 192-255 - outside ascii BMP) - // return 0xfe - (name[0] & 63) - // return 0xfe - (name[0] & 63) - uint8(len(name)) - // return 0xfe - (name[0] & 63) - uint8(len(name)&63) - // return ((0xfe - (name[0] & 63)) & 0xf8) | (uint8(len(name) & 0x07)) + // Tried the following before settling on correct implementation: + // return 0xfe - (name[0] & 63) + // return 0xfe - (name[0] & 63) - uint8(len(name)) + // return 0xfe - (name[0] & 63) - uint8(len(name)&63) + // return ((0xfe - (name[0] & 63)) & 0xf8) | (uint8(len(name) & 0x07)) + return 0xfe - (name[0] & 63) - uint8(len(name)&63) } @@ -1811,7 +1962,7 @@ func rgetResolveSFI(rt reflect.Type, x []structFieldInfo, pv *typeInfoLoadArray) for i := range x { ui = uint16(i) xn = x[i].encName // fieldName or encName? use encName for now. - if len(xn)+2 > cap(pv.b) { + if len(xn)+2 > cap(sn) { sn = make([]byte, len(xn)+2) } else { sn = sn[:len(xn)+2] @@ -1828,24 +1979,22 @@ func rgetResolveSFI(rt reflect.Type, x []structFieldInfo, pv *typeInfoLoadArray) sa = append(sa, 0xff, byte(ui>>8), byte(ui)) } else { index := uint16(sa[j+len(sn)+1]) | uint16(sa[j+len(sn)])<<8 - // one of them must be reset to nil, - // and the index updated appropriately to the other one - if x[i].nis == x[index].nis { - } else if x[i].nis < x[index].nis { + // one of them must be cleared (reset to nil), + // and the index updated appropriately + i2clear := ui // index to be cleared + if x[i].nis < x[index].nis { // this one is shallower + // update the index to point to this later one. sa[j+len(sn)], sa[j+len(sn)+1] = byte(ui>>8), byte(ui) - if x[index].ready() { - x[index].flagClr(structFieldInfoFlagReady) - n-- - } - } else { - if x[i].ready() { - x[i].flagClr(structFieldInfoFlagReady) - n-- - } + // clear the earlier one, as this later one is shallower. + i2clear = index + } + if x[i2clear].ready() { + x[i2clear].flagClr(structFieldInfoFlagReady) + n-- } } - } + var w []structFieldInfo sharingArray := len(x) <= typeInfoLoadArraySfisLen // sharing array with typeInfoLoadArray if sharingArray { @@ -1921,13 +2070,13 @@ func isEmptyStruct(v reflect.Value, tinfos *TypeInfos, deref, checkStruct bool) if ti.rtid == timeTypId { return rv2i(v).(time.Time).IsZero() } - if ti.isFlag(typeInfoFlagIsZeroerPtr) && v.CanAddr() { + if ti.isFlag(tiflagIsZeroerPtr) && v.CanAddr() { return rv2i(v.Addr()).(isZeroer).IsZero() } - if ti.isFlag(typeInfoFlagIsZeroer) { + if ti.isFlag(tiflagIsZeroer) { return rv2i(v).(isZeroer).IsZero() } - if ti.isFlag(typeInfoFlagComparable) { + if ti.isFlag(tiflagComparable) { return rv2i(v) == rv2i(reflect.Zero(vt)) } if !checkStruct { @@ -1964,7 +2113,13 @@ func panicToErr(h errDecorator, err *error) { } } +func isSliceBoundsError(s string) bool { + return strings.Contains(s, "index out of range") || + strings.Contains(s, "slice bounds out of range") +} + func panicValToErr(h errDecorator, v interface{}, err *error) { + d, dok := h.(*Decoder) switch xerr := v.(type) { case nil: case error: @@ -1974,11 +2129,19 @@ func panicValToErr(h errDecorator, v interface{}, err *error) { // treat as special (bubble up) *err = xerr default: - h.wrapErr(xerr, err) + if dok && d.bytes && isSliceBoundsError(xerr.Error()) { + *err = io.EOF + } else { + h.wrapErr(xerr, err) + } } case string: if xerr != "" { - h.wrapErr(xerr, err) + if dok && d.bytes && isSliceBoundsError(xerr) { + *err = io.EOF + } else { + h.wrapErr(xerr, err) + } } case fmt.Stringer: if xerr != nil { @@ -1995,6 +2158,16 @@ func isImmutableKind(k reflect.Kind) (v bool) { return immutableKindsSet[k%reflect.Kind(len(immutableKindsSet))] // bounds-check-elimination } +func usableByteSlice(bs []byte, slen int) []byte { + if cap(bs) >= slen { + if bs == nil { + return []byte{} + } + return bs[:slen] + } + return make([]byte, slen) +} + // ---- type codecFnInfo struct { @@ -2015,7 +2188,7 @@ type codecFn struct { i codecFnInfo fe func(*Encoder, *codecFnInfo, reflect.Value) fd func(*Decoder, *codecFnInfo, reflect.Value) - _ [1]uint64 // padding + _ [1]uint64 // padding (cache-aligned) } type codecRtidFn struct { @@ -2023,6 +2196,29 @@ type codecRtidFn struct { fn *codecFn } +func makeExt(ext interface{}) Ext { + if ext == nil { + return &extFailWrapper{} + } + switch t := ext.(type) { + case nil: + return &extFailWrapper{} + case Ext: + return t + case BytesExt: + return &bytesExtWrapper{BytesExt: t} + case InterfaceExt: + return &interfaceExtWrapper{InterfaceExt: t} + } + return &extFailWrapper{} +} + +func baseRV(v interface{}) (rv reflect.Value) { + for rv = rv4i(v); rv.Kind() == reflect.Ptr; rv = rv.Elem() { + } + return +} + // ---- // these "checkOverflow" functions must be inlinable, and not call anybody. @@ -2105,9 +2301,52 @@ func (x checkOverflow) SignedIntV(v uint64) int64 { return int64(v) } -// ------------------ SORT ----------------- +// ------------------ FLOATING POINT ----------------- + +func isNaN64(f float64) bool { return f != f } +func isNaN32(f float32) bool { return f != f } +func abs32(f float32) float32 { + return math.Float32frombits(math.Float32bits(f) &^ (1 << 31)) +} + +// Per go spec, floats are represented in memory as +// IEEE single or double precision floating point values. +// +// We also looked at the source for stdlib math/modf.go, +// reviewed https://github.com/chewxy/math32 +// and read wikipedia documents describing the formats. +// +// It became clear that we could easily look at the bits to determine +// whether any fraction exists. +// +// This is all we need for now. + +func noFrac64(f float64) (v bool) { + x := math.Float64bits(f) + e := uint64(x>>52)&0x7FF - 1023 // uint(x>>shift)&mask - bias + // clear top 12+e bits, the integer part; if the rest is 0, then no fraction. + if e < 52 { + // return x&((1<<64-1)>>(12+e)) == 0 + return x<<(12+e) == 0 + } + return +} + +func noFrac32(f float32) (v bool) { + x := math.Float32bits(f) + e := uint32(x>>23)&0xFF - 127 // uint(x>>shift)&mask - bias + // clear top 9+e bits, the integer part; if the rest is 0, then no fraction. + if e < 23 { + // return x&((1<<32-1)>>(9+e)) == 0 + return x<<(9+e) == 0 + } + return +} -func isNaN(f float64) bool { return f != f } +// func noFrac(f float64) bool { +// _, frac := math.Modf(float64(f)) +// return frac == 0 +// } // ----------------------- @@ -2125,141 +2364,21 @@ type ioBuffered interface { // ----------------------- -type intSlice []int64 -type uintSlice []uint64 - -// type uintptrSlice []uintptr -type floatSlice []float64 -type boolSlice []bool -type stringSlice []string - -// type bytesSlice [][]byte - -func (p intSlice) Len() int { return len(p) } -func (p intSlice) Less(i, j int) bool { return p[uint(i)] < p[uint(j)] } -func (p intSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -func (p uintSlice) Len() int { return len(p) } -func (p uintSlice) Less(i, j int) bool { return p[uint(i)] < p[uint(j)] } -func (p uintSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -// func (p uintptrSlice) Len() int { return len(p) } -// func (p uintptrSlice) Less(i, j int) bool { return p[uint(i)] < p[uint(j)] } -// func (p uintptrSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -func (p floatSlice) Len() int { return len(p) } -func (p floatSlice) Less(i, j int) bool { - return p[uint(i)] < p[uint(j)] || isNaN(p[uint(i)]) && !isNaN(p[uint(j)]) -} -func (p floatSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -func (p stringSlice) Len() int { return len(p) } -func (p stringSlice) Less(i, j int) bool { return p[uint(i)] < p[uint(j)] } -func (p stringSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -// func (p bytesSlice) Len() int { return len(p) } -// func (p bytesSlice) Less(i, j int) bool { return bytes.Compare(p[uint(i)], p[uint(j)]) == -1 } -// func (p bytesSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -func (p boolSlice) Len() int { return len(p) } -func (p boolSlice) Less(i, j int) bool { return !p[uint(i)] && p[uint(j)] } -func (p boolSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -// --------------------- - type sfiRv struct { v *structFieldInfo r reflect.Value } -type intRv struct { - v int64 - r reflect.Value -} -type intRvSlice []intRv -type uintRv struct { - v uint64 - r reflect.Value -} -type uintRvSlice []uintRv -type floatRv struct { - v float64 - r reflect.Value -} -type floatRvSlice []floatRv -type boolRv struct { - v bool - r reflect.Value -} -type boolRvSlice []boolRv -type stringRv struct { - v string - r reflect.Value -} -type stringRvSlice []stringRv -type bytesRv struct { - v []byte - r reflect.Value -} -type bytesRvSlice []bytesRv -type timeRv struct { - v time.Time - r reflect.Value -} -type timeRvSlice []timeRv - -func (p intRvSlice) Len() int { return len(p) } -func (p intRvSlice) Less(i, j int) bool { return p[uint(i)].v < p[uint(j)].v } -func (p intRvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -func (p uintRvSlice) Len() int { return len(p) } -func (p uintRvSlice) Less(i, j int) bool { return p[uint(i)].v < p[uint(j)].v } -func (p uintRvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -func (p floatRvSlice) Len() int { return len(p) } -func (p floatRvSlice) Less(i, j int) bool { - return p[uint(i)].v < p[uint(j)].v || isNaN(p[uint(i)].v) && !isNaN(p[uint(j)].v) -} -func (p floatRvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -func (p stringRvSlice) Len() int { return len(p) } -func (p stringRvSlice) Less(i, j int) bool { return p[uint(i)].v < p[uint(j)].v } -func (p stringRvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -func (p bytesRvSlice) Len() int { return len(p) } -func (p bytesRvSlice) Less(i, j int) bool { return bytes.Compare(p[uint(i)].v, p[uint(j)].v) == -1 } -func (p bytesRvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -func (p boolRvSlice) Len() int { return len(p) } -func (p boolRvSlice) Less(i, j int) bool { return !p[uint(i)].v && p[uint(j)].v } -func (p boolRvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -func (p timeRvSlice) Len() int { return len(p) } -func (p timeRvSlice) Less(i, j int) bool { return p[uint(i)].v.Before(p[uint(j)].v) } -func (p timeRvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - -// ----------------- - -type bytesI struct { - v []byte - i interface{} -} - -type bytesISlice []bytesI - -func (p bytesISlice) Len() int { return len(p) } -func (p bytesISlice) Less(i, j int) bool { return bytes.Compare(p[uint(i)].v, p[uint(j)].v) == -1 } -func (p bytesISlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } - // ----------------- -type set []uintptr +type set []interface{} -func (s *set) add(v uintptr) (exists bool) { +func (s *set) add(v interface{}) (exists bool) { // e.ci is always nil, or len >= 1 x := *s + if x == nil { - x = make([]uintptr, 1, 8) + x = make([]interface{}, 1, 8) x[0] = v *s = x return @@ -2296,7 +2415,7 @@ func (s *set) add(v uintptr) (exists bool) { return } -func (s *set) remove(v uintptr) (exists bool) { +func (s *set) remove(v interface{}) (exists bool) { x := *s if len(x) == 0 { return @@ -2334,8 +2453,13 @@ func (s *set) remove(v uintptr) (exists bool) { type bitset256 [32]byte +func (x *bitset256) check(pos byte) uint8 { + return x[pos>>3] & (1 << (pos & 7)) +} + func (x *bitset256) isset(pos byte) bool { - return x[pos>>3]&(1<<(pos&7)) != 0 + return x.check(pos) != 0 + // return x[pos>>3]&(1<<(pos&7)) != 0 } // func (x *bitset256) issetv(pos byte) byte { @@ -2346,6 +2470,20 @@ func (x *bitset256) set(pos byte) { x[pos>>3] |= (1 << (pos & 7)) } +type bitset32 uint32 + +func (x bitset32) set(pos byte) bitset32 { + return x | (1 << pos) +} + +func (x bitset32) check(pos byte) uint32 { + return uint32(x) & (1 << pos) +} +func (x bitset32) isset(pos byte) bool { + return x.check(pos) != 0 + // return x&(1<>3] &^= (1 << (pos & 7)) // } @@ -2368,103 +2506,6 @@ func (x *bitset256) set(pos byte) { // ------------ -type pooler struct { - // function-scoped pooled resources - tiload sync.Pool // for type info loading - sfiRv8, sfiRv16, sfiRv32, sfiRv64, sfiRv128 sync.Pool // for struct encoding - - // lifetime-scoped pooled resources - // dn sync.Pool // for decNaked - buf1k, buf2k, buf4k, buf8k, buf16k, buf32k, buf64k sync.Pool // for [N]byte -} - -func (p *pooler) init() { - p.tiload.New = func() interface{} { return new(typeInfoLoadArray) } - - p.sfiRv8.New = func() interface{} { return new([8]sfiRv) } - p.sfiRv16.New = func() interface{} { return new([16]sfiRv) } - p.sfiRv32.New = func() interface{} { return new([32]sfiRv) } - p.sfiRv64.New = func() interface{} { return new([64]sfiRv) } - p.sfiRv128.New = func() interface{} { return new([128]sfiRv) } - - // p.dn.New = func() interface{} { x := new(decNaked); x.init(); return x } - - p.buf1k.New = func() interface{} { return new([1 * 1024]byte) } - p.buf2k.New = func() interface{} { return new([2 * 1024]byte) } - p.buf4k.New = func() interface{} { return new([4 * 1024]byte) } - p.buf8k.New = func() interface{} { return new([8 * 1024]byte) } - p.buf16k.New = func() interface{} { return new([16 * 1024]byte) } - p.buf32k.New = func() interface{} { return new([32 * 1024]byte) } - p.buf64k.New = func() interface{} { return new([64 * 1024]byte) } - -} - -// func (p *pooler) sfiRv8() (sp *sync.Pool, v interface{}) { -// return &p.strRv8, p.strRv8.Get() -// } -// func (p *pooler) sfiRv16() (sp *sync.Pool, v interface{}) { -// return &p.strRv16, p.strRv16.Get() -// } -// func (p *pooler) sfiRv32() (sp *sync.Pool, v interface{}) { -// return &p.strRv32, p.strRv32.Get() -// } -// func (p *pooler) sfiRv64() (sp *sync.Pool, v interface{}) { -// return &p.strRv64, p.strRv64.Get() -// } -// func (p *pooler) sfiRv128() (sp *sync.Pool, v interface{}) { -// return &p.strRv128, p.strRv128.Get() -// } - -// func (p *pooler) bytes1k() (sp *sync.Pool, v interface{}) { -// return &p.buf1k, p.buf1k.Get() -// } -// func (p *pooler) bytes2k() (sp *sync.Pool, v interface{}) { -// return &p.buf2k, p.buf2k.Get() -// } -// func (p *pooler) bytes4k() (sp *sync.Pool, v interface{}) { -// return &p.buf4k, p.buf4k.Get() -// } -// func (p *pooler) bytes8k() (sp *sync.Pool, v interface{}) { -// return &p.buf8k, p.buf8k.Get() -// } -// func (p *pooler) bytes16k() (sp *sync.Pool, v interface{}) { -// return &p.buf16k, p.buf16k.Get() -// } -// func (p *pooler) bytes32k() (sp *sync.Pool, v interface{}) { -// return &p.buf32k, p.buf32k.Get() -// } -// func (p *pooler) bytes64k() (sp *sync.Pool, v interface{}) { -// return &p.buf64k, p.buf64k.Get() -// } - -// func (p *pooler) tiLoad() (sp *sync.Pool, v interface{}) { -// return &p.tiload, p.tiload.Get() -// } - -// func (p *pooler) decNaked() (sp *sync.Pool, v interface{}) { -// return &p.dn, p.dn.Get() -// } - -// func (p *pooler) decNaked() (v *decNaked, f func(*decNaked) ) { -// sp := &(p.dn) -// vv := sp.Get() -// return vv.(*decNaked), func(x *decNaked) { sp.Put(vv) } -// } -// func (p *pooler) decNakedGet() (v interface{}) { -// return p.dn.Get() -// } -// func (p *pooler) tiLoadGet() (v interface{}) { -// return p.tiload.Get() -// } -// func (p *pooler) decNakedPut(v interface{}) { -// p.dn.Put(v) -// } -// func (p *pooler) tiLoadPut(v interface{}) { -// p.tiload.Put(v) -// } - -// ---------------------------------------------------- - type panicHdl struct{} func (panicHdl) errorv(err error) { @@ -2480,12 +2521,13 @@ func (panicHdl) errorstr(message string) { } func (panicHdl) errorf(format string, params ...interface{}) { - if format == "" { - } else if len(params) == 0 { - panic(format) - } else { + if len(params) != 0 { panic(fmt.Sprintf(format, params...)) } + if len(params) == 0 { + panic(format) + } + panic("undefined error") } // ---------------------------------------------------- @@ -2529,169 +2571,112 @@ func (must) Float(s float64, err error) float64 { // ------------------- -type bytesBufPooler struct { - pool *sync.Pool - poolbuf interface{} +func freelistCapacity(length int) (capacity int) { + for capacity = 8; capacity < length; capacity *= 2 { + } + return } -func (z *bytesBufPooler) end() { - if z.pool != nil { - z.pool.Put(z.poolbuf) - z.pool, z.poolbuf = nil, nil +type bytesFreelist [][]byte + +func (x *bytesFreelist) get(length int) (out []byte) { + var j int = -1 + for i := 0; i < len(*x); i++ { + if cap((*x)[i]) >= length && (j == -1 || cap((*x)[j]) > cap((*x)[i])) { + j = i + } + } + if j == -1 { + return make([]byte, length, freelistCapacity(length)) + } + out = (*x)[j][:length] + (*x)[j] = nil + for i := 0; i < len(out); i++ { + out[i] = 0 } + return } -func (z *bytesBufPooler) get(bufsize int) (buf []byte) { - // ensure an end is called first (if necessary) - if z.pool != nil { - z.pool.Put(z.poolbuf) - z.pool, z.poolbuf = nil, nil +func (x *bytesFreelist) put(v []byte) { + if len(v) == 0 { + return + } + for i := 0; i < len(*x); i++ { + if cap((*x)[i]) == 0 { + (*x)[i] = v + return + } } + *x = append(*x, v) +} - // // Try to use binary search. - // // This is not optimal, as most folks select 1k or 2k buffers - // // so a linear search is better (sequence of if/else blocks) - // if bufsize < 1 { - // bufsize = 0 - // } else { - // bufsize-- - // bufsize /= 1024 - // } - // switch bufsize { - // case 0: - // z.pool, z.poolbuf = pool.bytes1k() - // buf = z.poolbuf.(*[1 * 1024]byte)[:] - // case 1: - // z.pool, z.poolbuf = pool.bytes2k() - // buf = z.poolbuf.(*[2 * 1024]byte)[:] - // case 2, 3: - // z.pool, z.poolbuf = pool.bytes4k() - // buf = z.poolbuf.(*[4 * 1024]byte)[:] - // case 4, 5, 6, 7: - // z.pool, z.poolbuf = pool.bytes8k() - // buf = z.poolbuf.(*[8 * 1024]byte)[:] - // case 8, 9, 10, 11, 12, 13, 14, 15: - // z.pool, z.poolbuf = pool.bytes16k() - // buf = z.poolbuf.(*[16 * 1024]byte)[:] - // case 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31: - // z.pool, z.poolbuf = pool.bytes32k() - // buf = z.poolbuf.(*[32 * 1024]byte)[:] - // default: - // z.pool, z.poolbuf = pool.bytes64k() - // buf = z.poolbuf.(*[64 * 1024]byte)[:] - // } - // return - - if bufsize <= 1*1024 { - z.pool, z.poolbuf = &pool.buf1k, pool.buf1k.Get() // pool.bytes1k() - buf = z.poolbuf.(*[1 * 1024]byte)[:] - } else if bufsize <= 2*1024 { - z.pool, z.poolbuf = &pool.buf2k, pool.buf2k.Get() // pool.bytes2k() - buf = z.poolbuf.(*[2 * 1024]byte)[:] - } else if bufsize <= 4*1024 { - z.pool, z.poolbuf = &pool.buf4k, pool.buf4k.Get() // pool.bytes4k() - buf = z.poolbuf.(*[4 * 1024]byte)[:] - } else if bufsize <= 8*1024 { - z.pool, z.poolbuf = &pool.buf8k, pool.buf8k.Get() // pool.bytes8k() - buf = z.poolbuf.(*[8 * 1024]byte)[:] - } else if bufsize <= 16*1024 { - z.pool, z.poolbuf = &pool.buf16k, pool.buf16k.Get() // pool.bytes16k() - buf = z.poolbuf.(*[16 * 1024]byte)[:] - } else if bufsize <= 32*1024 { - z.pool, z.poolbuf = &pool.buf32k, pool.buf32k.Get() // pool.bytes32k() - buf = z.poolbuf.(*[32 * 1024]byte)[:] - } else { - z.pool, z.poolbuf = &pool.buf64k, pool.buf64k.Get() // pool.bytes64k() - buf = z.poolbuf.(*[64 * 1024]byte)[:] +func (x *bytesFreelist) check(v []byte, length int) (out []byte) { + if cap(v) < length { + x.put(v) + return x.get(length) } - return + return v[:length] } -// ---------------- +// ------------------------- -type sfiRvPooler struct { - pool *sync.Pool - poolv interface{} -} +type sfiRvFreelist [][]sfiRv -func (z *sfiRvPooler) end() { - if z.pool != nil { - z.pool.Put(z.poolv) - z.pool, z.poolv = nil, nil +func (x *sfiRvFreelist) get(length int) (out []sfiRv) { + var j int = -1 + for i := 0; i < len(*x); i++ { + if cap((*x)[i]) >= length && (j == -1 || cap((*x)[j]) > cap((*x)[i])) { + j = i + } + } + if j == -1 { + return make([]sfiRv, length, freelistCapacity(length)) + } + out = (*x)[j][:length] + (*x)[j] = nil + for i := 0; i < len(out); i++ { + out[i] = sfiRv{} } + return } -func (z *sfiRvPooler) get(newlen int) (fkvs []sfiRv) { - if newlen < 0 { // bounds-check-elimination - // cannot happen // here for bounds-check-elimination - } else if newlen <= 8 { - z.pool, z.poolv = &pool.sfiRv8, pool.sfiRv8.Get() // pool.sfiRv8() - fkvs = z.poolv.(*[8]sfiRv)[:newlen] - } else if newlen <= 16 { - z.pool, z.poolv = &pool.sfiRv16, pool.sfiRv16.Get() // pool.sfiRv16() - fkvs = z.poolv.(*[16]sfiRv)[:newlen] - } else if newlen <= 32 { - z.pool, z.poolv = &pool.sfiRv32, pool.sfiRv32.Get() // pool.sfiRv32() - fkvs = z.poolv.(*[32]sfiRv)[:newlen] - } else if newlen <= 64 { - z.pool, z.poolv = &pool.sfiRv64, pool.sfiRv64.Get() // pool.sfiRv64() - fkvs = z.poolv.(*[64]sfiRv)[:newlen] - } else if newlen <= 128 { - z.pool, z.poolv = &pool.sfiRv128, pool.sfiRv128.Get() // pool.sfiRv128() - fkvs = z.poolv.(*[128]sfiRv)[:newlen] - } else { - fkvs = make([]sfiRv, newlen) +func (x *sfiRvFreelist) put(v []sfiRv) { + for i := 0; i < len(*x); i++ { + if cap((*x)[i]) == 0 { + (*x)[i] = v + return + } } - return + *x = append(*x, v) } -// xdebugf prints the message in red on the terminal. +// ----------- + +// xdebugf printf. the message in red on the terminal. // Use it in place of fmt.Printf (which it calls internally) func xdebugf(pattern string, args ...interface{}) { + xdebugAnyf("31", pattern, args...) +} + +// xdebug2f printf. the message in blue on the terminal. +// Use it in place of fmt.Printf (which it calls internally) +func xdebug2f(pattern string, args ...interface{}) { + xdebugAnyf("34", pattern, args...) +} + +func xdebugAnyf(colorcode, pattern string, args ...interface{}) { + if !xdebug { + return + } var delim string if len(pattern) > 0 && pattern[len(pattern)-1] != '\n' { delim = "\n" } - fmt.Printf("\033[1;31m"+pattern+delim+"\033[0m", args...) -} - -// func isImmutableKind(k reflect.Kind) (v bool) { -// return false || -// k == reflect.Int || -// k == reflect.Int8 || -// k == reflect.Int16 || -// k == reflect.Int32 || -// k == reflect.Int64 || -// k == reflect.Uint || -// k == reflect.Uint8 || -// k == reflect.Uint16 || -// k == reflect.Uint32 || -// k == reflect.Uint64 || -// k == reflect.Uintptr || -// k == reflect.Float32 || -// k == reflect.Float64 || -// k == reflect.Bool || -// k == reflect.String -// } + fmt.Printf("\033[1;"+colorcode+"m"+pattern+delim+"\033[0m", args...) + // os.Stderr.Flush() +} -// func timeLocUTCName(tzint int16) string { -// if tzint == 0 { -// return "UTC" -// } -// var tzname = []byte("UTC+00:00") -// //tzname := fmt.Sprintf("UTC%s%02d:%02d", tzsign, tz/60, tz%60) //perf issue using Sprintf. inline below. -// //tzhr, tzmin := tz/60, tz%60 //faster if u convert to int first -// var tzhr, tzmin int16 -// if tzint < 0 { -// tzname[3] = '-' // (TODO: verify. this works here) -// tzhr, tzmin = -tzint/60, (-tzint)%60 -// } else { -// tzhr, tzmin = tzint/60, tzint%60 -// } -// tzname[4] = timeDigits[tzhr/10] -// tzname[5] = timeDigits[tzhr%10] -// tzname[7] = timeDigits[tzmin/10] -// tzname[8] = timeDigits[tzmin%10] -// return string(tzname) -// //return time.FixedZone(string(tzname), int(tzint)*60) -// } +// register these here, so that staticcheck stops barfing +var _ = xdebug2f +var _ = xdebugf +var _ = isNaN32 diff --git a/vendor/github.com/ugorji/go/codec/helper.s b/vendor/github.com/ugorji/go/codec/helper.s new file mode 100644 index 00000000..e69de29b diff --git a/vendor/github.com/ugorji/go/codec/helper_internal.go b/vendor/github.com/ugorji/go/codec/helper_internal.go index 0cbd665e..82d6e314 100644 --- a/vendor/github.com/ugorji/go/codec/helper_internal.go +++ b/vendor/github.com/ugorji/go/codec/helper_internal.go @@ -104,6 +104,9 @@ func growCap(oldCap, unit, num int) (newCap int) { if num > 0 { newCap += num } + if newCap <= oldCap { + newCap = oldCap + 1 + } // ensure newCap is a multiple of 64 (if it is > 64) or 16. if newCap > 64 { diff --git a/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go b/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go index 74987f9f..4572c6f4 100644 --- a/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go +++ b/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go @@ -33,26 +33,47 @@ func bytesView(v string) []byte { return []byte(v) } -func definitelyNil(v interface{}) bool { - // this is a best-effort option. - // We just return false, so we don't unnecessarily incur the cost of reflection this early. - return false +// isNil says whether the value v is nil. +// This applies to references like map/ptr/unsafepointer/chan/func, +// and non-reference values like interface/slice. +func isNil(v interface{}) (rv reflect.Value, isnil bool) { + rv = rv4i(v) + if isnilBitset.isset(byte(rv.Kind())) { + isnil = rv.IsNil() + } + return +} + +func rv4i(i interface{}) reflect.Value { + return reflect.ValueOf(i) } func rv2i(rv reflect.Value) interface{} { return rv.Interface() } -func rt2id(rt reflect.Type) uintptr { - return reflect.ValueOf(rt).Pointer() +func rvIsNil(rv reflect.Value) bool { + return rv.IsNil() } -// func rv2rtid(rv reflect.Value) uintptr { -// return reflect.ValueOf(rv.Type()).Pointer() -// } +func rvSetSliceLen(rv reflect.Value, length int) { + rv.SetLen(length) +} + +func rvZeroAddrK(t reflect.Type, k reflect.Kind) reflect.Value { + return reflect.New(t).Elem() +} + +func rvConvert(v reflect.Value, t reflect.Type) (rv reflect.Value) { + return v.Convert(t) +} + +func rt2id(rt reflect.Type) uintptr { + return rv4i(rt).Pointer() +} func i2rtid(i interface{}) uintptr { - return reflect.ValueOf(reflect.TypeOf(i)).Pointer() + return rv4i(reflect.TypeOf(i)).Pointer() } // -------------------------- @@ -85,14 +106,6 @@ func isEmptyValue(v reflect.Value, tinfos *TypeInfos, deref, checkStruct bool) b return false } -// -------------------------- -// type ptrToRvMap struct{} - -// func (*ptrToRvMap) init() {} -// func (*ptrToRvMap) get(i interface{}) reflect.Value { -// return reflect.ValueOf(i).Elem() -// } - // -------------------------- type atomicClsErr struct { v atomic.Value @@ -143,189 +156,254 @@ func (x *atomicRtidFnSlice) store(p []codecRtidFn) { // -------------------------- func (n *decNaked) ru() reflect.Value { - return reflect.ValueOf(&n.u).Elem() + return rv4i(&n.u).Elem() } func (n *decNaked) ri() reflect.Value { - return reflect.ValueOf(&n.i).Elem() + return rv4i(&n.i).Elem() } func (n *decNaked) rf() reflect.Value { - return reflect.ValueOf(&n.f).Elem() + return rv4i(&n.f).Elem() } func (n *decNaked) rl() reflect.Value { - return reflect.ValueOf(&n.l).Elem() + return rv4i(&n.l).Elem() } func (n *decNaked) rs() reflect.Value { - return reflect.ValueOf(&n.s).Elem() + return rv4i(&n.s).Elem() } func (n *decNaked) rt() reflect.Value { - return reflect.ValueOf(&n.t).Elem() + return rv4i(&n.t).Elem() } func (n *decNaked) rb() reflect.Value { - return reflect.ValueOf(&n.b).Elem() + return rv4i(&n.b).Elem() } // -------------------------- -func (d *Decoder) raw(f *codecFnInfo, rv reflect.Value) { - rv.SetBytes(d.rawBytes()) +func rvSetBytes(rv reflect.Value, v []byte) { + rv.SetBytes(v) } -func (d *Decoder) kString(f *codecFnInfo, rv reflect.Value) { - rv.SetString(d.d.DecodeString()) +func rvSetString(rv reflect.Value, v string) { + rv.SetString(v) } -func (d *Decoder) kBool(f *codecFnInfo, rv reflect.Value) { - rv.SetBool(d.d.DecodeBool()) +func rvSetBool(rv reflect.Value, v bool) { + rv.SetBool(v) } -func (d *Decoder) kTime(f *codecFnInfo, rv reflect.Value) { - rv.Set(reflect.ValueOf(d.d.DecodeTime())) +func rvSetTime(rv reflect.Value, v time.Time) { + rv.Set(rv4i(v)) } -func (d *Decoder) kFloat32(f *codecFnInfo, rv reflect.Value) { - fv := d.d.DecodeFloat64() - if chkOvf.Float32(fv) { - d.errorf("float32 overflow: %v", fv) - } - rv.SetFloat(fv) +func rvSetFloat32(rv reflect.Value, v float32) { + rv.SetFloat(float64(v)) } -func (d *Decoder) kFloat64(f *codecFnInfo, rv reflect.Value) { - rv.SetFloat(d.d.DecodeFloat64()) +func rvSetFloat64(rv reflect.Value, v float64) { + rv.SetFloat(v) } -func (d *Decoder) kInt(f *codecFnInfo, rv reflect.Value) { - rv.SetInt(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) +func rvSetInt(rv reflect.Value, v int) { + rv.SetInt(int64(v)) } -func (d *Decoder) kInt8(f *codecFnInfo, rv reflect.Value) { - rv.SetInt(chkOvf.IntV(d.d.DecodeInt64(), 8)) +func rvSetInt8(rv reflect.Value, v int8) { + rv.SetInt(int64(v)) } -func (d *Decoder) kInt16(f *codecFnInfo, rv reflect.Value) { - rv.SetInt(chkOvf.IntV(d.d.DecodeInt64(), 16)) +func rvSetInt16(rv reflect.Value, v int16) { + rv.SetInt(int64(v)) } -func (d *Decoder) kInt32(f *codecFnInfo, rv reflect.Value) { - rv.SetInt(chkOvf.IntV(d.d.DecodeInt64(), 32)) +func rvSetInt32(rv reflect.Value, v int32) { + rv.SetInt(int64(v)) } -func (d *Decoder) kInt64(f *codecFnInfo, rv reflect.Value) { - rv.SetInt(d.d.DecodeInt64()) +func rvSetInt64(rv reflect.Value, v int64) { + rv.SetInt(v) } -func (d *Decoder) kUint(f *codecFnInfo, rv reflect.Value) { - rv.SetUint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) +func rvSetUint(rv reflect.Value, v uint) { + rv.SetUint(uint64(v)) } -func (d *Decoder) kUintptr(f *codecFnInfo, rv reflect.Value) { - rv.SetUint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) +func rvSetUintptr(rv reflect.Value, v uintptr) { + rv.SetUint(uint64(v)) } -func (d *Decoder) kUint8(f *codecFnInfo, rv reflect.Value) { - rv.SetUint(chkOvf.UintV(d.d.DecodeUint64(), 8)) +func rvSetUint8(rv reflect.Value, v uint8) { + rv.SetUint(uint64(v)) } -func (d *Decoder) kUint16(f *codecFnInfo, rv reflect.Value) { - rv.SetUint(chkOvf.UintV(d.d.DecodeUint64(), 16)) +func rvSetUint16(rv reflect.Value, v uint16) { + rv.SetUint(uint64(v)) } -func (d *Decoder) kUint32(f *codecFnInfo, rv reflect.Value) { - rv.SetUint(chkOvf.UintV(d.d.DecodeUint64(), 32)) +func rvSetUint32(rv reflect.Value, v uint32) { + rv.SetUint(uint64(v)) } -func (d *Decoder) kUint64(f *codecFnInfo, rv reflect.Value) { - rv.SetUint(d.d.DecodeUint64()) +func rvSetUint64(rv reflect.Value, v uint64) { + rv.SetUint(v) } // ---------------- -func (e *Encoder) kBool(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeBool(rv.Bool()) +// rvSetDirect is rv.Set for all kinds except reflect.Interface +func rvSetDirect(rv reflect.Value, v reflect.Value) { + rv.Set(v) +} + +// rvSlice returns a slice of the slice of lenth +func rvSlice(rv reflect.Value, length int) reflect.Value { + return rv.Slice(0, length) } -func (e *Encoder) kTime(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeTime(rv2i(rv).(time.Time)) +// ---------------- + +func rvSliceIndex(rv reflect.Value, i int, ti *typeInfo) reflect.Value { + return rv.Index(i) } -func (e *Encoder) kString(f *codecFnInfo, rv reflect.Value) { - s := rv.String() - if e.h.StringToRaw { - e.e.EncodeStringBytesRaw(bytesView(s)) +func rvGetSliceLen(rv reflect.Value) int { + return rv.Len() +} + +func rvGetSliceCap(rv reflect.Value) int { + return rv.Cap() +} + +func rvGetArrayBytesRO(rv reflect.Value, scratch []byte) (bs []byte) { + l := rv.Len() + if rv.CanAddr() { + return rvGetBytes(rv.Slice(0, l)) + } + + if l <= cap(scratch) { + bs = scratch[:l] } else { - e.e.EncodeStringEnc(cUTF8, s) + bs = make([]byte, l) } + reflect.Copy(rv4i(bs), rv) + return +} + +func rvGetArray4Slice(rv reflect.Value) (v reflect.Value) { + v = rvZeroAddrK(reflectArrayOf(rvGetSliceLen(rv), rv.Type().Elem()), reflect.Array) + reflect.Copy(v, rv) + return +} + +func rvGetSlice4Array(rv reflect.Value, tslice reflect.Type) (v reflect.Value) { + return rv.Slice(0, rv.Len()) +} + +func rvCopySlice(dest, src reflect.Value) { + reflect.Copy(dest, src) +} + +// ------------ + +func rvGetBool(rv reflect.Value) bool { + return rv.Bool() +} + +func rvGetBytes(rv reflect.Value) []byte { + return rv.Bytes() +} + +func rvGetTime(rv reflect.Value) time.Time { + return rv2i(rv).(time.Time) +} + +func rvGetString(rv reflect.Value) string { + return rv.String() } -func (e *Encoder) kFloat64(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeFloat64(rv.Float()) +func rvGetFloat64(rv reflect.Value) float64 { + return rv.Float() } -func (e *Encoder) kFloat32(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeFloat32(float32(rv.Float())) +func rvGetFloat32(rv reflect.Value) float32 { + return float32(rv.Float()) } -func (e *Encoder) kInt(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeInt(rv.Int()) +func rvGetInt(rv reflect.Value) int { + return int(rv.Int()) } -func (e *Encoder) kInt8(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeInt(rv.Int()) +func rvGetInt8(rv reflect.Value) int8 { + return int8(rv.Int()) } -func (e *Encoder) kInt16(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeInt(rv.Int()) +func rvGetInt16(rv reflect.Value) int16 { + return int16(rv.Int()) } -func (e *Encoder) kInt32(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeInt(rv.Int()) +func rvGetInt32(rv reflect.Value) int32 { + return int32(rv.Int()) } -func (e *Encoder) kInt64(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeInt(rv.Int()) +func rvGetInt64(rv reflect.Value) int64 { + return rv.Int() } -func (e *Encoder) kUint(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeUint(rv.Uint()) +func rvGetUint(rv reflect.Value) uint { + return uint(rv.Uint()) } -func (e *Encoder) kUint8(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeUint(rv.Uint()) +func rvGetUint8(rv reflect.Value) uint8 { + return uint8(rv.Uint()) } -func (e *Encoder) kUint16(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeUint(rv.Uint()) +func rvGetUint16(rv reflect.Value) uint16 { + return uint16(rv.Uint()) } -func (e *Encoder) kUint32(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeUint(rv.Uint()) +func rvGetUint32(rv reflect.Value) uint32 { + return uint32(rv.Uint()) } -func (e *Encoder) kUint64(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeUint(rv.Uint()) +func rvGetUint64(rv reflect.Value) uint64 { + return rv.Uint() } -func (e *Encoder) kUintptr(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeUint(rv.Uint()) +func rvGetUintptr(rv reflect.Value) uintptr { + return uintptr(rv.Uint()) } -// // keepAlive4BytesView maintains a reference to the input parameter for bytesView. -// // -// // Usage: call this at point where done with the bytes view. -// func keepAlive4BytesView(v string) {} +// ------------ map range and map indexing ---------- -// // keepAlive4BytesView maintains a reference to the input parameter for stringView. -// // -// // Usage: call this at point where done with the string view. -// func keepAlive4StringView(v []byte) {} +func mapGet(m, k, v reflect.Value) (vv reflect.Value) { + return m.MapIndex(k) +} + +func mapSet(m, k, v reflect.Value) { + m.SetMapIndex(k, v) +} + +func mapDelete(m, k reflect.Value) { + m.SetMapIndex(k, reflect.Value{}) +} + +// return an addressable reflect value that can be used in mapRange and mapGet operations. +// +// all calls to mapGet or mapRange will call here to get an addressable reflect.Value. +func mapAddressableRV(t reflect.Type, k reflect.Kind) (r reflect.Value) { + return // reflect.New(t).Elem() +} -// func definitelyNil(v interface{}) bool { -// rv := reflect.ValueOf(v) -// switch rv.Kind() { -// case reflect.Invalid: -// return true -// case reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Slice, reflect.Map, reflect.Func: -// return rv.IsNil() -// default: -// return false -// } -// } +// ---------- ENCODER optimized --------------- + +func (e *Encoder) jsondriver() *jsonEncDriver { + return e.e.(*jsonEncDriver) +} + +// ---------- DECODER optimized --------------- + +func (d *Decoder) checkBreak() bool { + return d.d.CheckBreak() +} + +func (d *Decoder) jsondriver() *jsonDecDriver { + return d.d.(*jsonDecDriver) +} diff --git a/vendor/github.com/ugorji/go/codec/helper_unsafe.go b/vendor/github.com/ugorji/go/codec/helper_unsafe.go index 3bc34d90..9a22ccf5 100644 --- a/vendor/github.com/ugorji/go/codec/helper_unsafe.go +++ b/vendor/github.com/ugorji/go/codec/helper_unsafe.go @@ -17,10 +17,23 @@ import ( // This file has unsafe variants of some helper methods. // NOTE: See helper_not_unsafe.go for the usage information. -// var zeroRTv [4]uintptr +// For reflect.Value code, we decided to do the following: +// - if we know the kind, we can elide conditional checks for +// - SetXXX (Int, Uint, String, Bool, etc) +// - SetLen +// +// We can also optimize +// - IsNil const safeMode = false -const unsafeFlagIndir = 1 << 7 // keep in sync with GO_ROOT/src/reflect/value.go + +// keep in sync with GO_ROOT/src/reflect/value.go +const ( + unsafeFlagIndir = 1 << 7 + unsafeFlagAddr = 1 << 8 + unsafeFlagKindMask = (1 << 5) - 1 // 5 bits for 27 kinds (up to 31) + // unsafeTypeKindDirectIface = 1 << 5 +) type unsafeString struct { Data unsafe.Pointer @@ -60,47 +73,92 @@ func bytesView(v string) []byte { return *(*[]byte)(unsafe.Pointer(&unsafeSlice{sx.Data, sx.Len, sx.Len})) } -func definitelyNil(v interface{}) bool { - // There is no global way of checking if an interface is nil. - // For true references (map, ptr, func, chan), you can just look - // at the word of the interface. However, for slices, you have to dereference - // the word, and get a pointer to the 3-word interface value. - // - // However, the following are cheap calls - // - TypeOf(interface): cheap 2-line call. - // - ValueOf(interface{}): expensive - // - type.Kind: cheap call through an interface - // - Value.Type(): cheap call - // except it's a method value (e.g. r.Read, which implies that it is a Func) +// // isNilRef says whether the interface is a nil reference or not. +// // +// // A reference here is a pointer-sized reference i.e. map, ptr, chan, func, unsafepointer. +// // It is optional to extend this to also check if slices or interfaces are nil also. +// // +// // NOTE: There is no global way of checking if an interface is nil. +// // For true references (map, ptr, func, chan), you can just look +// // at the word of the interface. +// // However, for slices, you have to dereference +// // the word, and get a pointer to the 3-word interface value. +// func isNilRef(v interface{}) (rv reflect.Value, isnil bool) { +// isnil = ((*unsafeIntf)(unsafe.Pointer(&v))).word == nil +// return +// } - return ((*unsafeIntf)(unsafe.Pointer(&v))).word == nil +func isNil(v interface{}) (rv reflect.Value, isnil bool) { + var ui = (*unsafeIntf)(unsafe.Pointer(&v)) + if ui.word == nil { + isnil = true + return + } + rv = rv4i(v) // reflect.value is cheap and inline'able + tk := rv.Kind() + isnil = (tk == reflect.Interface || tk == reflect.Slice) && *(*unsafe.Pointer)(ui.word) == nil + return +} + +func rv2ptr(urv *unsafeReflectValue) (ptr unsafe.Pointer) { + // true references (map, func, chan, ptr - NOT slice) may be double-referenced? as flagIndir + if refBitset.isset(byte(urv.flag&unsafeFlagKindMask)) && urv.flag&unsafeFlagIndir != 0 { + ptr = *(*unsafe.Pointer)(urv.ptr) + } else { + ptr = urv.ptr + } + return +} + +func rv4i(i interface{}) (rv reflect.Value) { + // Unfortunately, we cannot get the "kind" of the interface directly here. + // We need the 'rtype', whose structure changes in different go versions. + // Finally, it's not clear that there is benefit to reimplementing it, + // as the "escapes(i)" is not clearly expensive since we want i to exist on the heap. + + return reflect.ValueOf(i) } func rv2i(rv reflect.Value) interface{} { - // TODO: consider a more generally-known optimization for reflect.Value ==> Interface - // - // Currently, we use this fragile method that taps into implememtation details from + // We tap into implememtation details from // the source go stdlib reflect/value.go, and trims the implementation. + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + return *(*interface{})(unsafe.Pointer(&unsafeIntf{typ: urv.typ, word: rv2ptr(urv)})) +} +func rvIsNil(rv reflect.Value) bool { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - // true references (map, func, chan, ptr - NOT slice) may be double-referenced as flagIndir - var ptr unsafe.Pointer - if refBitset.isset(byte(urv.flag&(1<<5-1))) && urv.flag&unsafeFlagIndir != 0 { - ptr = *(*unsafe.Pointer)(urv.ptr) - } else { - ptr = urv.ptr + if urv.flag&unsafeFlagIndir != 0 { + return *(*unsafe.Pointer)(urv.ptr) == nil } - return *(*interface{})(unsafe.Pointer(&unsafeIntf{typ: urv.typ, word: ptr})) + return urv.ptr == nil +} + +func rvSetSliceLen(rv reflect.Value, length int) { + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + (*unsafeString)(urv.ptr).Len = length +} + +func rvZeroAddrK(t reflect.Type, k reflect.Kind) (rv reflect.Value) { + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + urv.flag = uintptr(k) | unsafeFlagIndir | unsafeFlagAddr + urv.typ = ((*unsafeIntf)(unsafe.Pointer(&t))).word + urv.ptr = unsafe_New(urv.typ) + return +} + +func rvConvert(v reflect.Value, t reflect.Type) (rv reflect.Value) { + uv := (*unsafeReflectValue)(unsafe.Pointer(&v)) + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + *urv = *uv + urv.typ = ((*unsafeIntf)(unsafe.Pointer(&t))).word + return } func rt2id(rt reflect.Type) uintptr { return uintptr(((*unsafeIntf)(unsafe.Pointer(&rt))).word) } -// func rv2rtid(rv reflect.Value) uintptr { -// return uintptr((*unsafeReflectValue)(unsafe.Pointer(&rv)).typ) -// } - func i2rtid(i interface{}) uintptr { return uintptr(((*unsafeIntf)(unsafe.Pointer(&i))).typ) } @@ -157,7 +215,7 @@ func isEmptyValue(v reflect.Value, tinfos *TypeInfos, deref, checkStruct bool) b } return isnil case reflect.Ptr: - // isnil := urv.ptr == nil (not sufficient, as a pointer value encodes the type) + // isnil := urv.ptr == nil // (not sufficient, as a pointer value encodes the type) isnil := urv.ptr == nil || *(*unsafe.Pointer)(urv.ptr) == nil if deref { if isnil { @@ -186,7 +244,7 @@ func isEmptyValue(v reflect.Value, tinfos *TypeInfos, deref, checkStruct bool) b // ---------------------- type atomicTypeInfoSlice struct { v unsafe.Pointer // *[]rtid2ti - _ uintptr // padding (atomicXXX expected to be 2 words) + _ uint64 // padding (atomicXXX expected to be 2 words) } func (x *atomicTypeInfoSlice) load() (s []rtid2ti) { @@ -204,7 +262,7 @@ func (x *atomicTypeInfoSlice) store(p []rtid2ti) { // -------------------------- type atomicRtidFnSlice struct { v unsafe.Pointer // *[]codecRtidFn - _ uintptr // padding (atomicXXX expected to be 2 words) + _ uint64 // padding (atomicXXX expected to be 2 words) (make 1 word so JsonHandle fits) } func (x *atomicRtidFnSlice) load() (s []codecRtidFn) { @@ -222,7 +280,7 @@ func (x *atomicRtidFnSlice) store(p []codecRtidFn) { // -------------------------- type atomicClsErr struct { v unsafe.Pointer // *clsErr - _ uintptr // padding (atomicXXX expected to be 2 words) + _ uint64 // padding (atomicXXX expected to be 2 words) } func (x *atomicClsErr) load() (e clsErr) { @@ -252,14 +310,14 @@ type unsafeDecNakedWrapper struct { } func (n *unsafeDecNakedWrapper) init() { - n.ru = reflect.ValueOf(&n.u).Elem() - n.ri = reflect.ValueOf(&n.i).Elem() - n.rf = reflect.ValueOf(&n.f).Elem() - n.rl = reflect.ValueOf(&n.l).Elem() - n.rs = reflect.ValueOf(&n.s).Elem() - n.rt = reflect.ValueOf(&n.t).Elem() - n.rb = reflect.ValueOf(&n.b).Elem() - // n.rr[] = reflect.ValueOf(&n.) + n.ru = rv4i(&n.u).Elem() + n.ri = rv4i(&n.i).Elem() + n.rf = rv4i(&n.f).Elem() + n.rl = rv4i(&n.l).Elem() + n.rs = rv4i(&n.s).Elem() + n.rt = rv4i(&n.t).Elem() + n.rb = rv4i(&n.b).Elem() + // n.rr[] = rv4i(&n.) } var defUnsafeDecNakedWrapper unsafeDecNakedWrapper @@ -305,441 +363,505 @@ func (n *decNaked) rb() (v reflect.Value) { } // -------------------------- -func (d *Decoder) raw(f *codecFnInfo, rv reflect.Value) { +func rvSetBytes(rv reflect.Value, v []byte) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*[]byte)(urv.ptr) = d.rawBytes() + *(*[]byte)(urv.ptr) = v } -func (d *Decoder) kString(f *codecFnInfo, rv reflect.Value) { +func rvSetString(rv reflect.Value, v string) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*string)(urv.ptr) = d.d.DecodeString() + *(*string)(urv.ptr) = v } -func (d *Decoder) kBool(f *codecFnInfo, rv reflect.Value) { +func rvSetBool(rv reflect.Value, v bool) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*bool)(urv.ptr) = d.d.DecodeBool() + *(*bool)(urv.ptr) = v } -func (d *Decoder) kTime(f *codecFnInfo, rv reflect.Value) { +func rvSetTime(rv reflect.Value, v time.Time) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*time.Time)(urv.ptr) = d.d.DecodeTime() + *(*time.Time)(urv.ptr) = v } -func (d *Decoder) kFloat32(f *codecFnInfo, rv reflect.Value) { - fv := d.d.DecodeFloat64() - if chkOvf.Float32(fv) { - d.errorf("float32 overflow: %v", fv) - } +func rvSetFloat32(rv reflect.Value, v float32) { + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + *(*float32)(urv.ptr) = v +} + +func rvSetFloat64(rv reflect.Value, v float64) { + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + *(*float64)(urv.ptr) = v +} + +func rvSetInt(rv reflect.Value, v int) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*float32)(urv.ptr) = float32(fv) + *(*int)(urv.ptr) = v } -func (d *Decoder) kFloat64(f *codecFnInfo, rv reflect.Value) { +func rvSetInt8(rv reflect.Value, v int8) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*float64)(urv.ptr) = d.d.DecodeFloat64() + *(*int8)(urv.ptr) = v } -func (d *Decoder) kInt(f *codecFnInfo, rv reflect.Value) { +func rvSetInt16(rv reflect.Value, v int16) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int)(urv.ptr) = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) + *(*int16)(urv.ptr) = v } -func (d *Decoder) kInt8(f *codecFnInfo, rv reflect.Value) { +func rvSetInt32(rv reflect.Value, v int32) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int8)(urv.ptr) = int8(chkOvf.IntV(d.d.DecodeInt64(), 8)) + *(*int32)(urv.ptr) = v } -func (d *Decoder) kInt16(f *codecFnInfo, rv reflect.Value) { +func rvSetInt64(rv reflect.Value, v int64) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int16)(urv.ptr) = int16(chkOvf.IntV(d.d.DecodeInt64(), 16)) + *(*int64)(urv.ptr) = v } -func (d *Decoder) kInt32(f *codecFnInfo, rv reflect.Value) { +func rvSetUint(rv reflect.Value, v uint) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int32)(urv.ptr) = int32(chkOvf.IntV(d.d.DecodeInt64(), 32)) + *(*uint)(urv.ptr) = v } -func (d *Decoder) kInt64(f *codecFnInfo, rv reflect.Value) { +func rvSetUintptr(rv reflect.Value, v uintptr) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int64)(urv.ptr) = d.d.DecodeInt64() + *(*uintptr)(urv.ptr) = v } -func (d *Decoder) kUint(f *codecFnInfo, rv reflect.Value) { +func rvSetUint8(rv reflect.Value, v uint8) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint)(urv.ptr) = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + *(*uint8)(urv.ptr) = v } -func (d *Decoder) kUintptr(f *codecFnInfo, rv reflect.Value) { +func rvSetUint16(rv reflect.Value, v uint16) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uintptr)(urv.ptr) = uintptr(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) + *(*uint16)(urv.ptr) = v } -func (d *Decoder) kUint8(f *codecFnInfo, rv reflect.Value) { +func rvSetUint32(rv reflect.Value, v uint32) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint8)(urv.ptr) = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) + *(*uint32)(urv.ptr) = v } -func (d *Decoder) kUint16(f *codecFnInfo, rv reflect.Value) { +func rvSetUint64(rv reflect.Value, v uint64) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint16)(urv.ptr) = uint16(chkOvf.UintV(d.d.DecodeUint64(), 16)) + *(*uint64)(urv.ptr) = v } -func (d *Decoder) kUint32(f *codecFnInfo, rv reflect.Value) { +// ---------------- + +// rvSetDirect is rv.Set for all kinds except reflect.Interface +func rvSetDirect(rv reflect.Value, v reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint32)(urv.ptr) = uint32(chkOvf.UintV(d.d.DecodeUint64(), 32)) + uv := (*unsafeReflectValue)(unsafe.Pointer(&v)) + if uv.flag&unsafeFlagIndir == 0 { + *(*unsafe.Pointer)(urv.ptr) = uv.ptr + } else { + typedmemmove(urv.typ, urv.ptr, uv.ptr) + } } -func (d *Decoder) kUint64(f *codecFnInfo, rv reflect.Value) { +// rvSlice returns a slice of the slice of lenth +func rvSlice(rv reflect.Value, length int) (v reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint64)(urv.ptr) = d.d.DecodeUint64() + uv := (*unsafeReflectValue)(unsafe.Pointer(&v)) + *uv = *urv + var x []unsafe.Pointer + uv.ptr = unsafe.Pointer(&x) + *(*unsafeSlice)(uv.ptr) = *(*unsafeSlice)(urv.ptr) + (*unsafeSlice)(uv.ptr).Len = length + return } // ------------ -func (e *Encoder) kBool(f *codecFnInfo, rv reflect.Value) { +func rvSliceIndex(rv reflect.Value, i int, ti *typeInfo) (v reflect.Value) { + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + uv := (*unsafeReflectValue)(unsafe.Pointer(&v)) + uv.ptr = unsafe.Pointer(uintptr(((*unsafeSlice)(urv.ptr)).Data) + (ti.elemsize * uintptr(i))) + uv.typ = ((*unsafeIntf)(unsafe.Pointer(&ti.elem))).word + uv.flag = uintptr(ti.elemkind) | unsafeFlagIndir | unsafeFlagAddr + return +} + +func rvGetSliceLen(rv reflect.Value) int { + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + return (*unsafeSlice)(urv.ptr).Len +} + +func rvGetSliceCap(rv reflect.Value) int { + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + return (*unsafeSlice)(urv.ptr).Cap +} + +func rvGetArrayBytesRO(rv reflect.Value, scratch []byte) (bs []byte) { + l := rv.Len() + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + bx := (*unsafeSlice)(unsafe.Pointer(&bs)) + bx.Data = urv.ptr + bx.Len, bx.Cap = l, l + return +} + +func rvGetArray4Slice(rv reflect.Value) (v reflect.Value) { + // It is possible that this slice is based off an array with a larger + // len that we want (where array len == slice cap). + // However, it is ok to create an array type that is a subset of the full + // e.g. full slice is based off a *[16]byte, but we can create a *[4]byte + // off of it. That is ok. + // + // Consequently, we use rvGetSliceLen, not rvGetSliceCap. + + t := reflectArrayOf(rvGetSliceLen(rv), rv.Type().Elem()) + // v = rvZeroAddrK(t, reflect.Array) + + uv := (*unsafeReflectValue)(unsafe.Pointer(&v)) + uv.flag = uintptr(reflect.Array) | unsafeFlagIndir | unsafeFlagAddr + uv.typ = ((*unsafeIntf)(unsafe.Pointer(&t))).word + + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + uv.ptr = *(*unsafe.Pointer)(urv.ptr) // slice rv has a ptr to the slice. + + return +} + +func rvGetSlice4Array(rv reflect.Value, tslice reflect.Type) (v reflect.Value) { + uv := (*unsafeReflectValue)(unsafe.Pointer(&v)) + + var x []unsafe.Pointer + + uv.ptr = unsafe.Pointer(&x) + uv.typ = ((*unsafeIntf)(unsafe.Pointer(&tslice))).word + uv.flag = unsafeFlagIndir | uintptr(reflect.Slice) + + s := (*unsafeSlice)(uv.ptr) + s.Data = ((*unsafeReflectValue)(unsafe.Pointer(&rv))).ptr + s.Len = rv.Len() + s.Cap = s.Len + return +} + +func rvCopySlice(dest, src reflect.Value) { + t := dest.Type().Elem() + urv := (*unsafeReflectValue)(unsafe.Pointer(&dest)) + destPtr := urv.ptr + urv = (*unsafeReflectValue)(unsafe.Pointer(&src)) + typedslicecopy((*unsafeIntf)(unsafe.Pointer(&t)).word, + *(*unsafeSlice)(destPtr), *(*unsafeSlice)(urv.ptr)) +} + +// ------------ + +func rvGetBool(rv reflect.Value) bool { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeBool(*(*bool)(v.ptr)) + return *(*bool)(v.ptr) } -func (e *Encoder) kTime(f *codecFnInfo, rv reflect.Value) { +func rvGetBytes(rv reflect.Value) []byte { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeTime(*(*time.Time)(v.ptr)) + return *(*[]byte)(v.ptr) } -func (e *Encoder) kString(f *codecFnInfo, rv reflect.Value) { +func rvGetTime(rv reflect.Value) time.Time { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - s := *(*string)(v.ptr) - if e.h.StringToRaw { - e.e.EncodeStringBytesRaw(bytesView(s)) - } else { - e.e.EncodeStringEnc(cUTF8, s) - } + return *(*time.Time)(v.ptr) } -func (e *Encoder) kFloat64(f *codecFnInfo, rv reflect.Value) { +func rvGetString(rv reflect.Value) string { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeFloat64(*(*float64)(v.ptr)) + return *(*string)(v.ptr) } -func (e *Encoder) kFloat32(f *codecFnInfo, rv reflect.Value) { +func rvGetFloat64(rv reflect.Value) float64 { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeFloat32(*(*float32)(v.ptr)) + return *(*float64)(v.ptr) } -func (e *Encoder) kInt(f *codecFnInfo, rv reflect.Value) { +func rvGetFloat32(rv reflect.Value) float32 { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeInt(int64(*(*int)(v.ptr))) + return *(*float32)(v.ptr) } -func (e *Encoder) kInt8(f *codecFnInfo, rv reflect.Value) { +func rvGetInt(rv reflect.Value) int { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeInt(int64(*(*int8)(v.ptr))) + return *(*int)(v.ptr) } -func (e *Encoder) kInt16(f *codecFnInfo, rv reflect.Value) { +func rvGetInt8(rv reflect.Value) int8 { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeInt(int64(*(*int16)(v.ptr))) + return *(*int8)(v.ptr) } -func (e *Encoder) kInt32(f *codecFnInfo, rv reflect.Value) { +func rvGetInt16(rv reflect.Value) int16 { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeInt(int64(*(*int32)(v.ptr))) + return *(*int16)(v.ptr) } -func (e *Encoder) kInt64(f *codecFnInfo, rv reflect.Value) { +func rvGetInt32(rv reflect.Value) int32 { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeInt(int64(*(*int64)(v.ptr))) + return *(*int32)(v.ptr) } -func (e *Encoder) kUint(f *codecFnInfo, rv reflect.Value) { +func rvGetInt64(rv reflect.Value) int64 { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeUint(uint64(*(*uint)(v.ptr))) + return *(*int64)(v.ptr) } -func (e *Encoder) kUint8(f *codecFnInfo, rv reflect.Value) { +func rvGetUint(rv reflect.Value) uint { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeUint(uint64(*(*uint8)(v.ptr))) + return *(*uint)(v.ptr) } -func (e *Encoder) kUint16(f *codecFnInfo, rv reflect.Value) { +func rvGetUint8(rv reflect.Value) uint8 { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeUint(uint64(*(*uint16)(v.ptr))) + return *(*uint8)(v.ptr) } -func (e *Encoder) kUint32(f *codecFnInfo, rv reflect.Value) { +func rvGetUint16(rv reflect.Value) uint16 { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeUint(uint64(*(*uint32)(v.ptr))) + return *(*uint16)(v.ptr) } -func (e *Encoder) kUint64(f *codecFnInfo, rv reflect.Value) { +func rvGetUint32(rv reflect.Value) uint32 { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeUint(uint64(*(*uint64)(v.ptr))) + return *(*uint32)(v.ptr) } -func (e *Encoder) kUintptr(f *codecFnInfo, rv reflect.Value) { +func rvGetUint64(rv reflect.Value) uint64 { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeUint(uint64(*(*uintptr)(v.ptr))) + return *(*uint64)(v.ptr) } -// ------------ +func rvGetUintptr(rv reflect.Value) uintptr { + v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + return *(*uintptr)(v.ptr) +} -// func (d *Decoder) raw(f *codecFnInfo, rv reflect.Value) { -// urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) -// // if urv.flag&unsafeFlagIndir != 0 { -// // urv.ptr = *(*unsafe.Pointer)(urv.ptr) -// // } -// *(*[]byte)(urv.ptr) = d.rawBytes() -// } +// ------------ map range and map indexing ---------- -// func rv0t(rt reflect.Type) reflect.Value { -// ut := (*unsafeIntf)(unsafe.Pointer(&rt)) -// // we need to determine whether ifaceIndir, and then whether to just pass 0 as the ptr -// uv := unsafeReflectValue{ut.word, &zeroRTv, flag(rt.Kind())} -// return *(*reflect.Value)(unsafe.Pointer(&uv}) -// } +// regular calls to map via reflection: MapKeys, MapIndex, MapRange/MapIter etc +// will always allocate for each map key or value. +// +// It is more performant to provide a value that the map entry is set into, +// and that elides the allocation. -// func rv2i(rv reflect.Value) interface{} { -// urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) -// // true references (map, func, chan, ptr - NOT slice) may be double-referenced as flagIndir -// var ptr unsafe.Pointer -// // kk := reflect.Kind(urv.flag & (1<<5 - 1)) -// // if (kk == reflect.Map || kk == reflect.Ptr || kk == reflect.Chan || kk == reflect.Func) && urv.flag&unsafeFlagIndir != 0 { -// if refBitset.isset(byte(urv.flag&(1<<5-1))) && urv.flag&unsafeFlagIndir != 0 { -// ptr = *(*unsafe.Pointer)(urv.ptr) -// } else { -// ptr = urv.ptr -// } -// return *(*interface{})(unsafe.Pointer(&unsafeIntf{typ: urv.typ, word: ptr})) -// // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ})) -// // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ})) -// } +// unsafeMapHashIter +// +// go 1.4+ has runtime/hashmap.go or runtime/map.go which has a +// hIter struct with the first 2 values being key and value +// of the current iteration. +// +// This *hIter is passed to mapiterinit, mapiternext, mapiterkey, mapiterelem. +// We bypass the reflect wrapper functions and just use the *hIter directly. +// +// Though *hIter has many fields, we only care about the first 2. +type unsafeMapHashIter struct { + key, value unsafe.Pointer + // other fields are ignored +} -// func definitelyNil(v interface{}) bool { -// var ui *unsafeIntf = (*unsafeIntf)(unsafe.Pointer(&v)) -// if ui.word == nil { -// return true -// } -// var tk = reflect.TypeOf(v).Kind() -// return (tk == reflect.Interface || tk == reflect.Slice) && *(*unsafe.Pointer)(ui.word) == nil -// fmt.Printf(">>>> definitely nil: isnil: %v, TYPE: \t%T, word: %v, *word: %v, type: %v, nil: %v\n", -// v == nil, v, word, *((*unsafe.Pointer)(word)), ui.typ, nil) -// } +type mapIter struct { + unsafeMapIter +} -// func keepAlive4BytesView(v string) { -// runtime.KeepAlive(v) -// } +type unsafeMapIter struct { + it *unsafeMapHashIter + // k, v reflect.Value + mtyp, ktyp, vtyp unsafe.Pointer + mptr, kptr, vptr unsafe.Pointer + kisref, visref bool + mapvalues bool + done bool + started bool + // _ [2]uint64 // padding (cache-aligned) +} -// func keepAlive4StringView(v []byte) { -// runtime.KeepAlive(v) -// } +func (t *unsafeMapIter) ValidKV() (r bool) { + return false +} -// func rt2id(rt reflect.Type) uintptr { -// return uintptr(((*unsafeIntf)(unsafe.Pointer(&rt))).word) -// // var i interface{} = rt -// // // ui := (*unsafeIntf)(unsafe.Pointer(&i)) -// // return ((*unsafeIntf)(unsafe.Pointer(&i))).word -// } +func (t *unsafeMapIter) Next() (r bool) { + if t == nil || t.done { + return + } + if t.started { + mapiternext((unsafe.Pointer)(t.it)) + } else { + t.started = true + } -// func rv2i(rv reflect.Value) interface{} { -// urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) -// // non-reference type: already indir -// // reference type: depend on flagIndir property ('cos maybe was double-referenced) -// // const (unsafeRvFlagKindMask = 1<<5 - 1 , unsafeRvFlagIndir = 1 << 7 ) -// // rvk := reflect.Kind(urv.flag & (1<<5 - 1)) -// // if (rvk == reflect.Chan || -// // rvk == reflect.Func || -// // rvk == reflect.Interface || -// // rvk == reflect.Map || -// // rvk == reflect.Ptr || -// // rvk == reflect.UnsafePointer) && urv.flag&(1<<8) != 0 { -// // fmt.Printf(">>>>> ---- double indirect reference: %v, %v\n", rvk, rv.Type()) -// // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ})) -// // } -// if urv.flag&(1<<5-1) == uintptr(reflect.Map) && urv.flag&(1<<7) != 0 { -// // fmt.Printf(">>>>> ---- double indirect reference: %v, %v\n", rvk, rv.Type()) -// return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ})) -// } -// // fmt.Printf(">>>>> ++++ direct reference: %v, %v\n", rvk, rv.Type()) -// return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ})) -// } + t.done = t.it.key == nil + if t.done { + return + } + unsafeMapSet(t.kptr, t.ktyp, t.it.key, t.kisref) + if t.mapvalues { + unsafeMapSet(t.vptr, t.vtyp, t.it.value, t.visref) + } + return true +} -// const ( -// unsafeRvFlagKindMask = 1<<5 - 1 -// unsafeRvKindDirectIface = 1 << 5 -// unsafeRvFlagIndir = 1 << 7 -// unsafeRvFlagAddr = 1 << 8 -// unsafeRvFlagMethod = 1 << 9 - -// _USE_RV_INTERFACE bool = false -// _UNSAFE_RV_DEBUG = true -// ) - -// type unsafeRtype struct { -// _ [2]uintptr -// _ uint32 -// _ uint8 -// _ uint8 -// _ uint8 -// kind uint8 -// _ [2]uintptr -// _ int32 -// } +func (t *unsafeMapIter) Key() (r reflect.Value) { + return +} -// func _rv2i(rv reflect.Value) interface{} { -// // Note: From use, -// // - it's never an interface -// // - the only calls here are for ifaceIndir types. -// // (though that conditional is wrong) -// // To know for sure, we need the value of t.kind (which is not exposed). -// // -// // Need to validate the path: type is indirect ==> only value is indirect ==> default (value is direct) -// // - Type indirect, Value indirect: ==> numbers, boolean, slice, struct, array, string -// // - Type Direct, Value indirect: ==> map??? -// // - Type Direct, Value direct: ==> pointers, unsafe.Pointer, func, chan, map -// // -// // TRANSLATES TO: -// // if typeIndirect { } else if valueIndirect { } else { } -// // -// // Since we don't deal with funcs, then "flagNethod" is unset, and can be ignored. - -// if _USE_RV_INTERFACE { -// return rv.Interface() -// } -// urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - -// // if urv.flag&unsafeRvFlagMethod != 0 || urv.flag&unsafeRvFlagKindMask == uintptr(reflect.Interface) { -// // println("***** IS flag method or interface: delegating to rv.Interface()") -// // return rv.Interface() -// // } - -// // if urv.flag&unsafeRvFlagKindMask == uintptr(reflect.Interface) { -// // println("***** IS Interface: delegate to rv.Interface") -// // return rv.Interface() -// // } -// // if urv.flag&unsafeRvFlagKindMask&unsafeRvKindDirectIface == 0 { -// // if urv.flag&unsafeRvFlagAddr == 0 { -// // println("***** IS ifaceIndir typ") -// // // ui := unsafeIntf{word: urv.ptr, typ: urv.typ} -// // // return *(*interface{})(unsafe.Pointer(&ui)) -// // // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ})) -// // } -// // } else if urv.flag&unsafeRvFlagIndir != 0 { -// // println("***** IS flagindir") -// // // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ})) -// // } else { -// // println("***** NOT flagindir") -// // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ})) -// // } -// // println("***** default: delegate to rv.Interface") - -// urt := (*unsafeRtype)(unsafe.Pointer(urv.typ)) -// if _UNSAFE_RV_DEBUG { -// fmt.Printf(">>>> start: %v: ", rv.Type()) -// fmt.Printf("%v - %v\n", *urv, *urt) -// } -// if urt.kind&unsafeRvKindDirectIface == 0 { -// if _UNSAFE_RV_DEBUG { -// fmt.Printf("**** +ifaceIndir type: %v\n", rv.Type()) -// } -// // println("***** IS ifaceIndir typ") -// // if true || urv.flag&unsafeRvFlagAddr == 0 { -// // // println(" ***** IS NOT addr") -// return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ})) -// // } -// } else if urv.flag&unsafeRvFlagIndir != 0 { -// if _UNSAFE_RV_DEBUG { -// fmt.Printf("**** +flagIndir type: %v\n", rv.Type()) -// } -// // println("***** IS flagindir") -// return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ})) -// } else { -// if _UNSAFE_RV_DEBUG { -// fmt.Printf("**** -flagIndir type: %v\n", rv.Type()) -// } -// // println("***** NOT flagindir") -// return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ})) -// } -// // println("***** default: delegating to rv.Interface()") -// // return rv.Interface() -// } +func (t *unsafeMapIter) Value() (r reflect.Value) { + return +} -// var staticM0 = make(map[string]uint64) -// var staticI0 = (int32)(-5) - -// func staticRv2iTest() { -// i0 := (int32)(-5) -// m0 := make(map[string]uint16) -// m0["1"] = 1 -// for _, i := range []interface{}{ -// (int)(7), -// (uint)(8), -// (int16)(-9), -// (uint16)(19), -// (uintptr)(77), -// (bool)(true), -// float32(-32.7), -// float64(64.9), -// complex(float32(19), 5), -// complex(float64(-32), 7), -// [4]uint64{1, 2, 3, 4}, -// (chan<- int)(nil), // chan, -// rv2i, // func -// io.Writer(ioutil.Discard), -// make(map[string]uint), -// (map[string]uint)(nil), -// staticM0, -// m0, -// &m0, -// i0, -// &i0, -// &staticI0, -// &staticM0, -// []uint32{6, 7, 8}, -// "abc", -// Raw{}, -// RawExt{}, -// &Raw{}, -// &RawExt{}, -// unsafe.Pointer(&i0), -// } { -// i2 := rv2i(reflect.ValueOf(i)) -// eq := reflect.DeepEqual(i, i2) -// fmt.Printf(">>>> %v == %v? %v\n", i, i2, eq) -// } -// // os.Exit(0) -// } +func (t *unsafeMapIter) Done() { +} + +func unsafeMapSet(p, ptyp, p2 unsafe.Pointer, isref bool) { + if isref { + *(*unsafe.Pointer)(p) = *(*unsafe.Pointer)(p2) // p2 + } else { + typedmemmove(ptyp, p, p2) // *(*unsafe.Pointer)(p2)) // p2) + } +} + +func unsafeMapKVPtr(urv *unsafeReflectValue) unsafe.Pointer { + if urv.flag&unsafeFlagIndir == 0 { + return unsafe.Pointer(&urv.ptr) + } + return urv.ptr +} -// func init() { -// staticRv2iTest() +func mapRange(t *mapIter, m, k, v reflect.Value, mapvalues bool) { + if rvIsNil(m) { + t.done = true + return + } + t.done = false + t.started = false + t.mapvalues = mapvalues + + var urv *unsafeReflectValue + + urv = (*unsafeReflectValue)(unsafe.Pointer(&m)) + t.mtyp = urv.typ + t.mptr = rv2ptr(urv) + + t.it = (*unsafeMapHashIter)(mapiterinit(t.mtyp, t.mptr)) + + urv = (*unsafeReflectValue)(unsafe.Pointer(&k)) + t.ktyp = urv.typ + t.kptr = urv.ptr + t.kisref = refBitset.isset(byte(k.Kind())) + + if mapvalues { + urv = (*unsafeReflectValue)(unsafe.Pointer(&v)) + t.vtyp = urv.typ + t.vptr = urv.ptr + t.visref = refBitset.isset(byte(v.Kind())) + } else { + t.vtyp = nil + t.vptr = nil + } +} + +func mapGet(m, k, v reflect.Value) (vv reflect.Value) { + var urv = (*unsafeReflectValue)(unsafe.Pointer(&k)) + var kptr = unsafeMapKVPtr(urv) + + urv = (*unsafeReflectValue)(unsafe.Pointer(&m)) + + vvptr := mapaccess(urv.typ, rv2ptr(urv), kptr) + if vvptr == nil { + return + } + // vvptr = *(*unsafe.Pointer)(vvptr) + + urv = (*unsafeReflectValue)(unsafe.Pointer(&v)) + + unsafeMapSet(urv.ptr, urv.typ, vvptr, refBitset.isset(byte(v.Kind()))) + return v +} + +func mapSet(m, k, v reflect.Value) { + var urv = (*unsafeReflectValue)(unsafe.Pointer(&k)) + var kptr = unsafeMapKVPtr(urv) + urv = (*unsafeReflectValue)(unsafe.Pointer(&v)) + var vptr = unsafeMapKVPtr(urv) + urv = (*unsafeReflectValue)(unsafe.Pointer(&m)) + mapassign(urv.typ, rv2ptr(urv), kptr, vptr) +} + +// func mapDelete(m, k reflect.Value) { +// var urv = (*unsafeReflectValue)(unsafe.Pointer(&k)) +// var kptr = unsafeMapKVPtr(urv) +// urv = (*unsafeReflectValue)(unsafe.Pointer(&m)) +// mapdelete(urv.typ, rv2ptr(urv), kptr) // } -// func rv2i(rv reflect.Value) interface{} { -// if _USE_RV_INTERFACE || rv.Kind() == reflect.Interface || rv.CanAddr() { -// return rv.Interface() -// } -// // var i interface{} -// // ui := (*unsafeIntf)(unsafe.Pointer(&i)) -// var ui unsafeIntf -// urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) -// // fmt.Printf("urv: flag: %b, typ: %b, ptr: %b\n", urv.flag, uintptr(urv.typ), uintptr(urv.ptr)) -// if (urv.flag&unsafeRvFlagKindMask)&unsafeRvKindDirectIface == 0 { -// if urv.flag&unsafeRvFlagAddr != 0 { -// println("***** indirect and addressable! Needs typed move - delegate to rv.Interface()") -// return rv.Interface() -// } -// println("****** indirect type/kind") -// ui.word = urv.ptr -// } else if urv.flag&unsafeRvFlagIndir != 0 { -// println("****** unsafe rv flag indir") -// ui.word = *(*unsafe.Pointer)(urv.ptr) -// } else { -// println("****** default: assign prt to word directly") -// ui.word = urv.ptr -// } -// // ui.word = urv.ptr -// ui.typ = urv.typ -// // fmt.Printf("(pointers) ui.typ: %p, word: %p\n", ui.typ, ui.word) -// // fmt.Printf("(binary) ui.typ: %b, word: %b\n", uintptr(ui.typ), uintptr(ui.word)) -// return *(*interface{})(unsafe.Pointer(&ui)) -// // return i +// return an addressable reflect value that can be used in mapRange and mapGet operations. +// +// all calls to mapGet or mapRange will call here to get an addressable reflect.Value. +func mapAddressableRV(t reflect.Type, k reflect.Kind) (r reflect.Value) { + // return reflect.New(t).Elem() + return rvZeroAddrK(t, k) +} + +//go:linkname mapiterinit reflect.mapiterinit +//go:noescape +func mapiterinit(typ unsafe.Pointer, it unsafe.Pointer) (key unsafe.Pointer) + +//go:linkname mapiternext reflect.mapiternext +//go:noescape +func mapiternext(it unsafe.Pointer) (key unsafe.Pointer) + +//go:linkname mapaccess reflect.mapaccess +//go:noescape +func mapaccess(typ unsafe.Pointer, m unsafe.Pointer, key unsafe.Pointer) (val unsafe.Pointer) + +//go:linkname mapassign reflect.mapassign +//go:noescape +func mapassign(typ unsafe.Pointer, m unsafe.Pointer, key, val unsafe.Pointer) + +//go:linkname mapdelete reflect.mapdelete +//go:noescape +func mapdelete(typ unsafe.Pointer, m unsafe.Pointer, key unsafe.Pointer) + +//go:linkname typedmemmove reflect.typedmemmove +//go:noescape +func typedmemmove(typ unsafe.Pointer, dst, src unsafe.Pointer) + +//go:linkname unsafe_New reflect.unsafe_New +//go:noescape +func unsafe_New(typ unsafe.Pointer) unsafe.Pointer + +//go:linkname typedslicecopy reflect.typedslicecopy +//go:noescape +func typedslicecopy(elemType unsafe.Pointer, dst, src unsafeSlice) int + +// ---------- ENCODER optimized --------------- + +func (e *Encoder) jsondriver() *jsonEncDriver { + return (*jsonEncDriver)((*unsafeIntf)(unsafe.Pointer(&e.e)).word) +} + +// ---------- DECODER optimized --------------- + +func (d *Decoder) checkBreak() bool { + // jsonDecDriver.CheckBreak() CANNOT be inlined. + // Consequently, there's no benefit in incurring the cost of this + // wrapping function checkBreak. + // + // It is faster to just call the interface method directly. + + // if d.js { + // return d.jsondriver().CheckBreak() + // } + // if d.cbor { + // return d.cbordriver().CheckBreak() + // } + return d.d.CheckBreak() +} + +func (d *Decoder) jsondriver() *jsonDecDriver { + return (*jsonDecDriver)((*unsafeIntf)(unsafe.Pointer(&d.d)).word) +} + +// func (d *Decoder) cbordriver() *cborDecDriver { +// return (*cborDecDriver)((*unsafeIntf)(unsafe.Pointer(&d.d)).word) // } diff --git a/vendor/github.com/ugorji/go/codec/json.go b/vendor/github.com/ugorji/go/codec/json.go index 619bc5b5..7b64e02e 100644 --- a/vendor/github.com/ugorji/go/codec/json.go +++ b/vendor/github.com/ugorji/go/codec/json.go @@ -18,14 +18,10 @@ package codec // - we cannot use strconv.Quote and strconv.Unquote because json quotes/unquotes differently. // We implement it here. -// Top-level methods of json(End|Dec)Driver (which are implementations of (en|de)cDriver -// MUST not call one-another. - import ( "bytes" "encoding/base64" "math" - "reflect" "strconv" "time" "unicode" @@ -46,11 +42,20 @@ const ( jsonLitTrue = 1 jsonLitFalseQ = 6 jsonLitFalse = 7 - // jsonLitNullQ = 13 - jsonLitNull = 14 + jsonLitNullQ = 13 + jsonLitNull = 14 ) var ( + // jsonLiteralTrueQ = jsonLiterals[jsonLitTrueQ : jsonLitTrueQ+6] + // jsonLiteralFalseQ = jsonLiterals[jsonLitFalseQ : jsonLitFalseQ+7] + // jsonLiteralNullQ = jsonLiterals[jsonLitNullQ : jsonLitNullQ+6] + + jsonLiteralTrue = jsonLiterals[jsonLitTrue : jsonLitTrue+4] + jsonLiteralFalse = jsonLiterals[jsonLitFalse : jsonLitFalse+5] + jsonLiteralNull = jsonLiterals[jsonLitNull : jsonLitNull+4] + + // these are used, after consuming the first char jsonLiteral4True = jsonLiterals[jsonLitTrue+1 : jsonLitTrue+4] jsonLiteral4False = jsonLiterals[jsonLitFalse+1 : jsonLitFalse+5] jsonLiteral4Null = jsonLiterals[jsonLitNull+1 : jsonLitNull+4] @@ -61,7 +66,7 @@ const ( jsonU4Chk1 = 'a' - 10 jsonU4Chk0 = 'A' - 10 - jsonScratchArrayLen = 64 + // jsonScratchArrayLen = cacheLineSize + 32 // 96 ) const ( @@ -120,429 +125,280 @@ func init() { // ---------------- -type jsonEncDriverTypical struct { - w *encWriterSwitch - b *[jsonScratchArrayLen]byte - tw bool // term white space - c containerState -} - -func (e *jsonEncDriverTypical) typical() {} - -func (e *jsonEncDriverTypical) reset(ee *jsonEncDriver) { - e.w = ee.ew - e.b = &ee.b - e.tw = ee.h.TermWhitespace - e.c = 0 -} +type jsonEncDriver struct { + noBuiltInTypes + h *JsonHandle -func (e *jsonEncDriverTypical) WriteArrayStart(length int) { - e.w.writen1('[') - e.c = containerArrayStart -} + se interfaceExtWrapper -func (e *jsonEncDriverTypical) WriteArrayElem() { - if e.c != containerArrayStart { - e.w.writen1(',') - } - e.c = containerArrayElem -} + // ---- cpu cache line boundary? + di int8 // indent per: if negative, use tabs + d bool // indenting? + dl uint16 // indent level + ks bool // map key as string + is byte // integer as string -func (e *jsonEncDriverTypical) WriteArrayEnd() { - e.w.writen1(']') - e.c = containerArrayEnd -} + typical bool -func (e *jsonEncDriverTypical) WriteMapStart(length int) { - e.w.writen1('{') - e.c = containerMapStart -} + s *bitset256 // safe set for characters (taking h.HTMLAsIs into consideration) + // scratch: encode time, numbers, etc. Note: leave 1 byte for containerState + b [cacheLineSize + 24]byte // buffer for encoding numbers and time -func (e *jsonEncDriverTypical) WriteMapElemKey() { - if e.c != containerMapStart { - e.w.writen1(',') - } - e.c = containerMapKey + e Encoder } -func (e *jsonEncDriverTypical) WriteMapElemValue() { - e.w.writen1(':') - e.c = containerMapValue -} +// Keep writeIndent, WriteArrayElem, WriteMapElemKey, WriteMapElemValue +// in jsonEncDriver, so that *Encoder can directly call them -func (e *jsonEncDriverTypical) WriteMapEnd() { - e.w.writen1('}') - e.c = containerMapEnd -} +func (e *jsonEncDriver) encoder() *Encoder { return &e.e } -func (e *jsonEncDriverTypical) EncodeBool(b bool) { - if b { - e.w.writeb(jsonLiterals[jsonLitTrue : jsonLitTrue+4]) +func (e *jsonEncDriver) writeIndent() { + e.e.encWr.writen1('\n') + x := int(e.di) * int(e.dl) + if e.di < 0 { + x = -x + for x > jsonSpacesOrTabsLen { + e.e.encWr.writeb(jsonTabs[:]) + x -= jsonSpacesOrTabsLen + } + e.e.encWr.writeb(jsonTabs[:x]) } else { - e.w.writeb(jsonLiterals[jsonLitFalse : jsonLitFalse+5]) - } -} - -func (e *jsonEncDriverTypical) EncodeFloat64(f float64) { - fmt, prec := jsonFloatStrconvFmtPrec(f) - e.w.writeb(strconv.AppendFloat(e.b[:0], f, fmt, prec, 64)) -} - -func (e *jsonEncDriverTypical) EncodeInt(v int64) { - e.w.writeb(strconv.AppendInt(e.b[:0], v, 10)) -} - -func (e *jsonEncDriverTypical) EncodeUint(v uint64) { - e.w.writeb(strconv.AppendUint(e.b[:0], v, 10)) -} - -func (e *jsonEncDriverTypical) EncodeFloat32(f float32) { - e.EncodeFloat64(float64(f)) -} - -func (e *jsonEncDriverTypical) atEndOfEncode() { - if e.tw { - e.w.writen1(' ') + for x > jsonSpacesOrTabsLen { + e.e.encWr.writeb(jsonSpaces[:]) + x -= jsonSpacesOrTabsLen + } + e.e.encWr.writeb(jsonSpaces[:x]) } } -// ---------------- - -type jsonEncDriverGeneric struct { - w *encWriterSwitch - b *[jsonScratchArrayLen]byte - c containerState - // ds string // indent string - di int8 // indent per - d bool // indenting? - dt bool // indent using tabs - dl uint16 // indent level - ks bool // map key as string - is byte // integer as string - tw bool // term white space - _ [7]byte // padding -} - -// indent is done as below: -// - newline and indent are added before each mapKey or arrayElem -// - newline and indent are added before each ending, -// except there was no entry (so we can have {} or []) - -func (e *jsonEncDriverGeneric) reset(ee *jsonEncDriver) { - e.w = ee.ew - e.b = &ee.b - e.tw = ee.h.TermWhitespace - e.c = 0 - e.d, e.dt, e.dl, e.di = false, false, 0, 0 - h := ee.h - if h.Indent > 0 { - e.d = true - e.di = int8(h.Indent) - } else if h.Indent < 0 { - e.d = true - e.dt = true - e.di = int8(-h.Indent) +func (e *jsonEncDriver) WriteArrayElem() { + if e.e.c != containerArrayStart { + e.e.encWr.writen1(',') } - e.ks = h.MapKeyAsString - e.is = h.IntegerAsString -} - -func (e *jsonEncDriverGeneric) WriteArrayStart(length int) { if e.d { - e.dl++ + e.writeIndent() } - e.w.writen1('[') - e.c = containerArrayStart } -func (e *jsonEncDriverGeneric) WriteArrayElem() { - if e.c != containerArrayStart { - e.w.writen1(',') +func (e *jsonEncDriver) WriteMapElemKey() { + if e.e.c != containerMapStart { + e.e.encWr.writen1(',') } if e.d { e.writeIndent() } - e.c = containerArrayElem } -func (e *jsonEncDriverGeneric) WriteArrayEnd() { +func (e *jsonEncDriver) WriteMapElemValue() { if e.d { - e.dl-- - if e.c != containerArrayStart { - e.writeIndent() - } + e.e.encWr.writen2(':', ' ') + } else { + e.e.encWr.writen1(':') } - e.w.writen1(']') - e.c = containerArrayEnd } -func (e *jsonEncDriverGeneric) WriteMapStart(length int) { - if e.d { - e.dl++ - } - e.w.writen1('{') - e.c = containerMapStart -} +func (e *jsonEncDriver) EncodeNil() { + // We always encode nil as just null (never in quotes) + // This allows us to easily decode if a nil in the json stream + // ie if initial token is n. -func (e *jsonEncDriverGeneric) WriteMapElemKey() { - if e.c != containerMapStart { - e.w.writen1(',') - } - if e.d { - e.writeIndent() - } - e.c = containerMapKey + // e.e.encWr.writeb(jsonLiteralNull) + e.e.encWr.writen([rwNLen]byte{'n', 'u', 'l', 'l'}, 4) } -func (e *jsonEncDriverGeneric) WriteMapElemValue() { - if e.d { - e.w.writen2(':', ' ') +func (e *jsonEncDriver) EncodeTime(t time.Time) { + // Do NOT use MarshalJSON, as it allocates internally. + // instead, we call AppendFormat directly, using our scratch buffer (e.b) + + if t.IsZero() { + e.EncodeNil() } else { - e.w.writen1(':') + e.b[0] = '"' + b := fmtTime(t, e.b[1:1]) + e.b[len(b)+1] = '"' + e.e.encWr.writeb(e.b[:len(b)+2]) } - e.c = containerMapValue } -func (e *jsonEncDriverGeneric) WriteMapEnd() { - if e.d { - e.dl-- - if e.c != containerMapStart { - e.writeIndent() - } +func (e *jsonEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext) { + if ext == SelfExt { + rv2 := baseRV(rv) + e.e.encodeValue(rv2, e.h.fnNoExt(rv2.Type())) + } else if v := ext.ConvertExt(rv); v == nil { + e.EncodeNil() + } else { + e.e.encode(v) } - e.w.writen1('}') - e.c = containerMapEnd } -func (e *jsonEncDriverGeneric) writeIndent() { - e.w.writen1('\n') - x := int(e.di) * int(e.dl) - if e.dt { - for x > jsonSpacesOrTabsLen { - e.w.writeb(jsonTabs[:]) - x -= jsonSpacesOrTabsLen - } - e.w.writeb(jsonTabs[:x]) +func (e *jsonEncDriver) EncodeRawExt(re *RawExt) { + // only encodes re.Value (never re.Data) + if re.Value == nil { + e.EncodeNil() } else { - for x > jsonSpacesOrTabsLen { - e.w.writeb(jsonSpaces[:]) - x -= jsonSpacesOrTabsLen - } - e.w.writeb(jsonSpaces[:x]) + e.e.encode(re.Value) } } -func (e *jsonEncDriverGeneric) EncodeBool(b bool) { - if e.ks && e.c == containerMapKey { +func (e *jsonEncDriver) EncodeBool(b bool) { + // Use writen with an array instead of writeb with a slice + // i.e. in place of e.e.encWr.writeb(jsonLiteralTrueQ) + // OR jsonLiteralTrue, jsonLiteralFalse, jsonLiteralFalseQ, etc + + if e.ks && e.e.c == containerMapKey { if b { - e.w.writeb(jsonLiterals[jsonLitTrueQ : jsonLitTrueQ+6]) + e.e.encWr.writen([rwNLen]byte{'"', 't', 'r', 'u', 'e', '"'}, 6) } else { - e.w.writeb(jsonLiterals[jsonLitFalseQ : jsonLitFalseQ+7]) + e.e.encWr.writen([rwNLen]byte{'"', 'f', 'a', 'l', 's', 'e', '"'}, 7) } } else { if b { - e.w.writeb(jsonLiterals[jsonLitTrue : jsonLitTrue+4]) + e.e.encWr.writen([rwNLen]byte{'t', 'r', 'u', 'e'}, 4) } else { - e.w.writeb(jsonLiterals[jsonLitFalse : jsonLitFalse+5]) + e.e.encWr.writen([rwNLen]byte{'f', 'a', 'l', 's', 'e'}, 5) } } } -func (e *jsonEncDriverGeneric) EncodeFloat64(f float64) { - // instead of using 'g', specify whether to use 'e' or 'f' - fmt, prec := jsonFloatStrconvFmtPrec(f) - - var blen int - if e.ks && e.c == containerMapKey { - blen = 2 + len(strconv.AppendFloat(e.b[1:1], f, fmt, prec, 64)) +func (e *jsonEncDriver) encodeFloat(f float64, bitsize, fmt byte, prec int8) { + var blen uint + if e.ks && e.e.c == containerMapKey { + blen = 2 + uint(len(strconv.AppendFloat(e.b[1:1], f, fmt, int(prec), int(bitsize)))) + // _ = e.b[:blen] e.b[0] = '"' e.b[blen-1] = '"' + e.e.encWr.writeb(e.b[:blen]) } else { - blen = len(strconv.AppendFloat(e.b[:0], f, fmt, prec, 64)) + e.e.encWr.writeb(strconv.AppendFloat(e.b[:0], f, fmt, int(prec), int(bitsize))) } - e.w.writeb(e.b[:blen]) } -func (e *jsonEncDriverGeneric) EncodeInt(v int64) { - x := e.is - if x == 'A' || x == 'L' && (v > 1<<53 || v < -(1<<53)) || (e.ks && e.c == containerMapKey) { +func (e *jsonEncDriver) EncodeFloat64(f float64) { + fmt, prec := jsonFloatStrconvFmtPrec64(f) + e.encodeFloat(f, 64, fmt, prec) +} + +func (e *jsonEncDriver) EncodeFloat32(f float32) { + fmt, prec := jsonFloatStrconvFmtPrec32(f) + e.encodeFloat(float64(f), 32, fmt, prec) +} + +func (e *jsonEncDriver) EncodeInt(v int64) { + if e.is == 'A' || e.is == 'L' && (v > 1<<53 || v < -(1<<53)) || + (e.ks && e.e.c == containerMapKey) { blen := 2 + len(strconv.AppendInt(e.b[1:1], v, 10)) e.b[0] = '"' e.b[blen-1] = '"' - e.w.writeb(e.b[:blen]) + e.e.encWr.writeb(e.b[:blen]) return } - e.w.writeb(strconv.AppendInt(e.b[:0], v, 10)) + e.e.encWr.writeb(strconv.AppendInt(e.b[:0], v, 10)) } -func (e *jsonEncDriverGeneric) EncodeUint(v uint64) { - x := e.is - if x == 'A' || x == 'L' && v > 1<<53 || (e.ks && e.c == containerMapKey) { +func (e *jsonEncDriver) EncodeUint(v uint64) { + if e.is == 'A' || e.is == 'L' && v > 1<<53 || (e.ks && e.e.c == containerMapKey) { blen := 2 + len(strconv.AppendUint(e.b[1:1], v, 10)) e.b[0] = '"' e.b[blen-1] = '"' - e.w.writeb(e.b[:blen]) + e.e.encWr.writeb(e.b[:blen]) return } - e.w.writeb(strconv.AppendUint(e.b[:0], v, 10)) -} - -func (e *jsonEncDriverGeneric) EncodeFloat32(f float32) { - // e.encodeFloat(float64(f), 32) - // always encode all floats as IEEE 64-bit floating point. - // It also ensures that we can decode in full precision even if into a float32, - // as what is written is always to float64 precision. - e.EncodeFloat64(float64(f)) -} - -func (e *jsonEncDriverGeneric) atEndOfEncode() { - if e.tw { - if e.d { - e.w.writen1('\n') - } else { - e.w.writen1(' ') - } - } -} - -// -------------------- - -type jsonEncDriver struct { - noBuiltInTypes - e *Encoder - h *JsonHandle - ew *encWriterSwitch - se extWrapper - // ---- cpu cache line boundary? - bs []byte // scratch - // ---- cpu cache line boundary? - b [jsonScratchArrayLen]byte // scratch (encode time, - _ [2]uint64 // padding -} - -func (e *jsonEncDriver) EncodeNil() { - // We always encode nil as just null (never in quotes) - // This allows us to easily decode if a nil in the json stream - // ie if initial token is n. - e.ew.writeb(jsonLiterals[jsonLitNull : jsonLitNull+4]) - - // if e.h.MapKeyAsString && e.c == containerMapKey { - // e.ew.writeb(jsonLiterals[jsonLitNullQ : jsonLitNullQ+6]) - // } else { - // e.ew.writeb(jsonLiterals[jsonLitNull : jsonLitNull+4]) - // } + e.e.encWr.writeb(strconv.AppendUint(e.b[:0], v, 10)) } -func (e *jsonEncDriver) EncodeTime(t time.Time) { - // Do NOT use MarshalJSON, as it allocates internally. - // instead, we call AppendFormat directly, using our scratch buffer (e.b) - if t.IsZero() { - e.EncodeNil() - } else { - e.b[0] = '"' - b := t.AppendFormat(e.b[1:1], time.RFC3339Nano) - e.b[len(b)+1] = '"' - e.ew.writeb(e.b[:len(b)+2]) - } - // v, err := t.MarshalJSON(); if err != nil { e.e.error(err) } e.ew.writeb(v) -} - -func (e *jsonEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) { - if v := ext.ConvertExt(rv); v == nil { - e.EncodeNil() - } else { - en.encode(v) - } -} - -func (e *jsonEncDriver) EncodeRawExt(re *RawExt, en *Encoder) { - // only encodes re.Value (never re.Data) - if re.Value == nil { - e.EncodeNil() - } else { - en.encode(re.Value) +func (e *jsonEncDriver) EncodeString(v string) { + if e.h.StringToRaw { + e.EncodeStringBytesRaw(bytesView(v)) + return } -} - -func (e *jsonEncDriver) EncodeString(c charEncoding, v string) { e.quoteStr(v) } -func (e *jsonEncDriver) EncodeStringEnc(c charEncoding, v string) { - e.quoteStr(v) -} - -func (e *jsonEncDriver) EncodeStringBytes(c charEncoding, v []byte) { +func (e *jsonEncDriver) EncodeStringBytesRaw(v []byte) { // if encoding raw bytes and RawBytesExt is configured, use it to encode if v == nil { e.EncodeNil() return } - if c == cRAW { - if e.se.InterfaceExt != nil { - e.EncodeExt(v, 0, &e.se, e.e) - return - } + if e.se.InterfaceExt != nil { + e.EncodeExt(v, 0, &e.se) + return + } - slen := base64.StdEncoding.EncodedLen(len(v)) + 2 - if cap(e.bs) >= slen { - e.bs = e.bs[:slen] - } else { - e.bs = make([]byte, slen) - } - e.bs[0] = '"' - base64.StdEncoding.Encode(e.bs[1:], v) - e.bs[slen-1] = '"' - e.ew.writeb(e.bs) + slen := base64.StdEncoding.EncodedLen(len(v)) + 2 + var bs []byte + if len(e.b) < slen { + bs = e.e.blist.get(slen) } else { - e.quoteStr(stringView(v)) + bs = e.b[:slen] + } + bs[0] = '"' + base64.StdEncoding.Encode(bs[1:], v) + bs[len(bs)-1] = '"' + e.e.encWr.writeb(bs) + if len(e.b) < slen { + e.e.blist.put(bs) } } -func (e *jsonEncDriver) EncodeStringBytesRaw(v []byte) { - // if encoding raw bytes and RawBytesExt is configured, use it to encode - if v == nil { - e.EncodeNil() - return +// indent is done as below: +// - newline and indent are added before each mapKey or arrayElem +// - newline and indent are added before each ending, +// except there was no entry (so we can have {} or []) + +func (e *jsonEncDriver) WriteArrayStart(length int) { + if e.d { + e.dl++ } - if e.se.InterfaceExt != nil { - e.EncodeExt(v, 0, &e.se, e.e) - return + e.e.encWr.writen1('[') +} + +func (e *jsonEncDriver) WriteArrayEnd() { + if e.d { + e.dl-- + e.writeIndent() } + e.e.encWr.writen1(']') +} - slen := base64.StdEncoding.EncodedLen(len(v)) + 2 - if cap(e.bs) >= slen { - e.bs = e.bs[:slen] - } else { - e.bs = make([]byte, slen) +func (e *jsonEncDriver) WriteMapStart(length int) { + if e.d { + e.dl++ } - e.bs[0] = '"' - base64.StdEncoding.Encode(e.bs[1:], v) - e.bs[slen-1] = '"' - e.ew.writeb(e.bs) + e.e.encWr.writen1('{') } -func (e *jsonEncDriver) EncodeAsis(v []byte) { - e.ew.writeb(v) +func (e *jsonEncDriver) WriteMapEnd() { + if e.d { + e.dl-- + if e.e.c != containerMapStart { + e.writeIndent() + } + } + e.e.encWr.writen1('}') } func (e *jsonEncDriver) quoteStr(s string) { // adapted from std pkg encoding/json const hex = "0123456789abcdef" - w := e.ew - htmlasis := e.h.HTMLCharsAsIs + w := e.e.w() w.writen1('"') - var start int - for i, slen := 0, len(s); i < slen; { + var i, start uint + for i < uint(len(s)) { // encode all bytes < 0x20 (except \r, \n). // also encode < > & to prevent security holes when served to some browsers. - if b := s[i]; b < utf8.RuneSelf { - // if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' { - // if (htmlasis && jsonCharSafeSet.isset(b)) || jsonCharHtmlSafeSet.isset(b) { - if jsonCharHtmlSafeSet.isset(b) || (htmlasis && jsonCharSafeSet.isset(b)) { - i++ - continue - } + + // We optimize for ascii, by assumining that most characters are in the BMP + // and natively consumed by json without much computation. + + // if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' { + // if (htmlasis && jsonCharSafeSet.isset(b)) || jsonCharHtmlSafeSet.isset(b) { + b := s[i] + if e.s.isset(b) { + i++ + continue + } + if b < utf8.RuneSelf { if start < i { w.writestr(s[start:i]) } @@ -568,13 +424,15 @@ func (e *jsonEncDriver) quoteStr(s string) { continue } c, size := utf8.DecodeRuneInString(s[i:]) - if c == utf8.RuneError && size == 1 { - if start < i { - w.writestr(s[start:i]) + if c == utf8.RuneError { + if size == 1 { + if start < i { + w.writestr(s[start:i]) + } + w.writestr(`\ufffd`) + i++ + start = i } - w.writestr(`\ufffd`) - i += size - start = i continue } // U+2028 is LINE SEPARATOR. U+2029 is PARAGRAPH SEPARATOR. @@ -585,39 +443,47 @@ func (e *jsonEncDriver) quoteStr(s string) { } w.writestr(`\u202`) w.writen1(hex[c&0xF]) - i += size + i += uint(size) start = i continue } - i += size + i += uint(size) } - if start < len(s) { + if start < uint(len(s)) { w.writestr(s[start:]) } w.writen1('"') } +func (e *jsonEncDriver) atEndOfEncode() { + if e.h.TermWhitespace { + if e.e.c == 0 { // scalar written, output space + e.e.encWr.writen1(' ') + } else { // container written, output new-line + e.e.encWr.writen1('\n') + } + } +} + +// ---------- + type jsonDecDriver struct { noBuiltInTypes - d *Decoder - h *JsonHandle - r *decReaderSwitch - se extWrapper - - // ---- writable fields during execution --- *try* to keep in sep cache line - - c containerState - // tok is used to store the token read right after skipWhiteSpace. - tok uint8 - fnull bool // found null from appendStringAsBytes - bs []byte // scratch. Initialized from b. Used for parsing strings or numbers. - bstr [8]byte // scratch used for string \UXXX parsing + h *JsonHandle + + tok uint8 // used to store the token read right after skipWhiteSpace + fnil bool // found null + _ [2]byte // padding + bstr [4]byte // scratch used for string \UXXX parsing + + buf []byte + se interfaceExtWrapper + + _ uint64 // padding + // ---- cpu cache line boundary? - b [jsonScratchArrayLen]byte // scratch 1, used for parsing strings or numbers or time.Time - b2 [jsonScratchArrayLen]byte // scratch 2, used only for readUntil, decNumBytes - // _ [3]uint64 // padding - // n jsonNum + d Decoder } // func jsonIsWS(b byte) bool { @@ -625,158 +491,144 @@ type jsonDecDriver struct { // return jsonCharWhitespaceSet.isset(b) // } +func (d *jsonDecDriver) decoder() *Decoder { + return &d.d +} + func (d *jsonDecDriver) uncacheRead() { if d.tok != 0 { - d.r.unreadn1() + d.d.decRd.unreadn1() d.tok = 0 } } func (d *jsonDecDriver) ReadMapStart() int { - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) + d.advance() + if d.tok == 'n' { + d.readLit4Null() + return decContainerLenNil } - const xc uint8 = '{' - if d.tok != xc { - d.d.errorf("read map - expect char '%c' but got char '%c'", xc, d.tok) + if d.tok != '{' { + d.d.errorf("read map - expect char '%c' but got char '%c'", '{', d.tok) } d.tok = 0 - d.c = containerMapStart - return -1 + return decContainerLenUnknown } func (d *jsonDecDriver) ReadArrayStart() int { - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) + d.advance() + if d.tok == 'n' { + d.readLit4Null() + return decContainerLenNil } - const xc uint8 = '[' - if d.tok != xc { - d.d.errorf("read array - expect char '%c' but got char '%c'", xc, d.tok) + if d.tok != '[' { + d.d.errorf("read array - expect char '%c' but got char '%c'", '[', d.tok) } d.tok = 0 - d.c = containerArrayStart - return -1 + return decContainerLenUnknown } func (d *jsonDecDriver) CheckBreak() bool { - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } + d.advance() return d.tok == '}' || d.tok == ']' } -// For the ReadXXX methods below, we could just delegate to helper functions -// readContainerState(c containerState, xc uint8, check bool) -// - ReadArrayElem would become: -// readContainerState(containerArrayElem, ',', d.c != containerArrayStart) -// -// However, until mid-stack inlining comes in go1.11 which supports inlining of -// one-liners, we explicitly write them all 5 out to elide the extra func call. -// -// TODO: For Go 1.11, if inlined, consider consolidating these. - func (d *jsonDecDriver) ReadArrayElem() { const xc uint8 = ',' - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } - if d.c != containerArrayStart { + if d.d.c != containerArrayStart { + d.advance() if d.tok != xc { - d.d.errorf("read array element - expect char '%c' but got char '%c'", xc, d.tok) + d.readDelimError(xc) } d.tok = 0 } - d.c = containerArrayElem } func (d *jsonDecDriver) ReadArrayEnd() { const xc uint8 = ']' - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } + d.advance() if d.tok != xc { - d.d.errorf("read array end - expect char '%c' but got char '%c'", xc, d.tok) + d.readDelimError(xc) } d.tok = 0 - d.c = containerArrayEnd } func (d *jsonDecDriver) ReadMapElemKey() { const xc uint8 = ',' - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } - if d.c != containerMapStart { + if d.d.c != containerMapStart { + d.advance() if d.tok != xc { - d.d.errorf("read map key - expect char '%c' but got char '%c'", xc, d.tok) + d.readDelimError(xc) } d.tok = 0 } - d.c = containerMapKey } func (d *jsonDecDriver) ReadMapElemValue() { const xc uint8 = ':' - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } + d.advance() if d.tok != xc { - d.d.errorf("read map value - expect char '%c' but got char '%c'", xc, d.tok) + d.readDelimError(xc) } d.tok = 0 - d.c = containerMapValue } func (d *jsonDecDriver) ReadMapEnd() { const xc uint8 = '}' - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } + d.advance() if d.tok != xc { - d.d.errorf("read map end - expect char '%c' but got char '%c'", xc, d.tok) + d.readDelimError(xc) } d.tok = 0 - d.c = containerMapEnd } -// func (d *jsonDecDriver) readLit(length, fromIdx uint8) { -// // length here is always less than 8 (literals are: null, true, false) -// bs := d.r.readx(int(length)) -// d.tok = 0 -// if jsonValidateSymbols && !bytes.Equal(bs, jsonLiterals[fromIdx:fromIdx+length]) { -// d.d.errorf("expecting %s: got %s", jsonLiterals[fromIdx:fromIdx+length], bs) +// func (d *jsonDecDriver) readDelim(xc uint8) { +// d.advance() +// if d.tok != xc { +// d.readDelimError(xc) // } +// d.tok = 0 // } +func (d *jsonDecDriver) readDelimError(xc uint8) { + d.d.errorf("read json delimiter - expect char '%c' but got char '%c'", xc, d.tok) +} + func (d *jsonDecDriver) readLit4True() { - bs := d.r.readx(3) + bs := d.d.decRd.readn(3) d.tok = 0 - if jsonValidateSymbols && !bytes.Equal(bs, jsonLiteral4True) { + if jsonValidateSymbols && bs != [rwNLen]byte{'r', 'u', 'e'} { // !Equal jsonLiteral4True d.d.errorf("expecting %s: got %s", jsonLiteral4True, bs) } } func (d *jsonDecDriver) readLit4False() { - bs := d.r.readx(4) + bs := d.d.decRd.readn(4) d.tok = 0 - if jsonValidateSymbols && !bytes.Equal(bs, jsonLiteral4False) { + if jsonValidateSymbols && bs != [rwNLen]byte{'a', 'l', 's', 'e'} { // !Equal jsonLiteral4False d.d.errorf("expecting %s: got %s", jsonLiteral4False, bs) } } func (d *jsonDecDriver) readLit4Null() { - bs := d.r.readx(3) + bs := d.d.decRd.readn(3) // readx(3) d.tok = 0 - if jsonValidateSymbols && !bytes.Equal(bs, jsonLiteral4Null) { + if jsonValidateSymbols && bs != [rwNLen]byte{'u', 'l', 'l'} { // !Equal jsonLiteral4Null d.d.errorf("expecting %s: got %s", jsonLiteral4Null, bs) } + d.fnil = true } -func (d *jsonDecDriver) TryDecodeAsNil() bool { +func (d *jsonDecDriver) advance() { if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) + d.fnil = false + d.tok = d.d.decRd.skip(&jsonCharWhitespaceSet) } - // we shouldn't try to see if "null" was here, right? +} + +func (d *jsonDecDriver) TryNil() bool { + d.advance() + // we shouldn't try to see if quoted "null" was here, right? // only the plain string: `null` denotes a nil (ie not quotes) if d.tok == 'n' { d.readLit4Null() @@ -785,13 +637,19 @@ func (d *jsonDecDriver) TryDecodeAsNil() bool { return false } +func (d *jsonDecDriver) Nil() bool { + return d.fnil +} + func (d *jsonDecDriver) DecodeBool() (v bool) { - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) + d.advance() + if d.tok == 'n' { + d.readLit4Null() + return } - fquot := d.c == containerMapKey && d.tok == '"' + fquot := d.d.c == containerMapKey && d.tok == '"' if fquot { - d.tok = d.r.readn1() + d.tok = d.d.decRd.readn1() } switch d.tok { case 'f': @@ -805,18 +663,20 @@ func (d *jsonDecDriver) DecodeBool() (v bool) { // v = false // "unreachable" } if fquot { - d.r.readn1() + d.d.decRd.readn1() } return } func (d *jsonDecDriver) DecodeTime() (t time.Time) { // read string, and pass the string into json.unmarshal - d.appendStringAsBytes() - if d.fnull { + d.advance() + if d.tok == 'n' { + d.readLit4Null() return } - t, err := time.Parse(time.RFC3339, stringView(d.bs)) + bs := d.readString() + t, err := time.Parse(time.RFC3339, stringView(bs)) if err != nil { d.d.errorv(err) } @@ -825,41 +685,38 @@ func (d *jsonDecDriver) DecodeTime() (t time.Time) { func (d *jsonDecDriver) ContainerType() (vt valueType) { // check container type by checking the first char - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } + d.advance() // optimize this, so we don't do 4 checks but do one computation. // return jsonContainerSet[d.tok] // ContainerType is mostly called for Map and Array, // so this conditional is good enough (max 2 checks typically) - if b := d.tok; b == '{' { + if d.tok == '{' { return valueTypeMap - } else if b == '[' { + } else if d.tok == '[' { return valueTypeArray - } else if b == 'n' { + } else if d.tok == 'n' { + d.readLit4Null() return valueTypeNil - } else if b == '"' { + } else if d.tok == '"' { return valueTypeString } return valueTypeUnset } func (d *jsonDecDriver) decNumBytes() (bs []byte) { - // stores num bytes in d.bs - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } + d.advance() if d.tok == '"' { - bs = d.r.readUntil(d.b2[:0], '"') - bs = bs[:len(bs)-1] + bs = d.d.decRd.readUntil('"', false) + } else if d.tok == 'n' { + d.readLit4Null() } else { - d.r.unreadn1() - bs = d.r.readTo(d.bs[:0], &jsonNumSet) + d.d.decRd.unreadn1() + bs = d.d.decRd.readTo(&jsonNumSet) } d.tok = 0 - return bs + return } func (d *jsonDecDriver) DecodeUint64() (u uint64) { @@ -874,7 +731,7 @@ func (d *jsonDecDriver) DecodeUint64() (u uint64) { d.d.errorf("minus found parsing unsigned integer: %s", bs) } else if badsyntax { // fallback: try to decode as float, and cast - n = d.decUint64ViaFloat(stringView(bs)) + n = d.decUint64ViaFloat(bs) } return n } @@ -892,9 +749,9 @@ func (d *jsonDecDriver) DecodeInt64() (i int64) { // d.d.errorf("invalid syntax for integer: %s", bs) // fallback: try to decode as float, and cast if neg { - n = d.decUint64ViaFloat(stringView(bs[1:])) + n = d.decUint64ViaFloat(bs[1:]) } else { - n = d.decUint64ViaFloat(stringView(bs)) + n = d.decUint64ViaFloat(bs) } } if neg { @@ -911,14 +768,13 @@ func (d *jsonDecDriver) DecodeInt64() (i int64) { return } -func (d *jsonDecDriver) decUint64ViaFloat(s string) (u uint64) { +func (d *jsonDecDriver) decUint64ViaFloat(s []byte) (u uint64) { if len(s) == 0 { return } - f, err := strconv.ParseFloat(s, 64) + f, err := parseFloat64(s) if err != nil { d.d.errorf("invalid syntax for integer: %s", s) - // d.d.errorv(err) } fi, ff := math.Modf(f) if ff > 0 { @@ -930,28 +786,62 @@ func (d *jsonDecDriver) decUint64ViaFloat(s string) (u uint64) { } func (d *jsonDecDriver) DecodeFloat64() (f float64) { - bs := d.decNumBytes() - if len(bs) == 0 { - return + var err error + if bs := d.decNumBytes(); len(bs) > 0 { + if f, err = parseFloat64(bs); err != nil { + d.d.errorv(err) + } } - f, err := strconv.ParseFloat(stringView(bs), 64) - if err != nil { - d.d.errorv(err) + return +} + +func (d *jsonDecDriver) DecodeFloat32() (f float32) { + var err error + if bs := d.decNumBytes(); len(bs) > 0 { + if f, err = parseFloat32(bs); err != nil { + d.d.errorv(err) + } } return } -func (d *jsonDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { +func (d *jsonDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) { + d.advance() + if d.tok == 'n' { + d.readLit4Null() + return + } if ext == nil { re := rv.(*RawExt) re.Tag = xtag d.d.decode(&re.Value) + } else if ext == SelfExt { + rv2 := baseRV(rv) + d.d.decodeValue(rv2, d.h.fnNoExt(rv2.Type())) } else { - var v interface{} - d.d.decode(&v) - ext.UpdateExt(rv, v) + d.d.interfaceExtConvertAndDecode(rv, ext) } - return +} + +func (d *jsonDecDriver) decBytesFromArray(bs []byte) []byte { + if bs == nil { + bs = []byte{} + } else { + bs = bs[:0] + } + d.tok = 0 + bs = append(bs, uint8(d.DecodeUint64())) + d.tok = d.d.decRd.skip(&jsonCharWhitespaceSet) + for d.tok != ']' { + if d.tok != ',' { + d.d.errorf("read array element - expect char '%c' but got char '%c'", ',', d.tok) + } + d.tok = 0 + bs = append(bs, uint8(chkOvf.UintV(d.DecodeUint64(), 8))) + d.tok = d.d.decRd.skip(&jsonCharWhitespaceSet) + } + d.tok = 0 + return bs } func (d *jsonDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { @@ -961,37 +851,41 @@ func (d *jsonDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { d.DecodeExt(&bsOut, 0, &d.se) return } - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } + d.advance() // check if an "array" of uint8's (see ContainerType for how to infer if an array) if d.tok == '[' { - bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) - return + // bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) + if zerocopy && len(bs) == 0 { + bs = d.d.b[:] + } + return d.decBytesFromArray(bs) } - d.appendStringAsBytes() + // base64 encodes []byte{} as "", and we encode nil []byte as null. // Consequently, base64 should decode null as a nil []byte, and "" as an empty []byte{}. - // appendStringAsBytes returns a zero-len slice for both, so as not to reset d.bs. - // However, it sets a fnull field to true, so we can check if a null was found. - if len(d.bs) == 0 { - if d.fnull { - return nil - } - return []byte{} + // appendStringAsBytes returns a zero-len slice for both, so as not to reset d.buf. + // However, it sets a fnil field to true, so we can check if a null was found. + + if d.tok == 'n' { + d.readLit4Null() + return nil } - bs0 := d.bs - slen := base64.StdEncoding.DecodedLen(len(bs0)) - if slen <= cap(bs) { + + bs1 := d.readString() + slen := base64.StdEncoding.DecodedLen(len(bs1)) + if slen == 0 { + bsOut = []byte{} + } else if slen <= cap(bs) { bsOut = bs[:slen] - } else if zerocopy && slen <= cap(d.b2) { - bsOut = d.b2[:slen] + } else if zerocopy { + d.buf = d.d.blist.check(d.buf, slen) + bsOut = d.buf } else { bsOut = make([]byte, slen) } - slen2, err := base64.StdEncoding.Decode(bsOut, bs0) + slen2, err := base64.StdEncoding.Decode(bsOut, bs1) if err != nil { - d.d.errorf("error decoding base64 binary '%s': %v", bs0, err) + d.d.errorf("error decoding base64 binary '%s': %v", bs1, err) return nil } if slen != slen2 { @@ -1000,157 +894,179 @@ func (d *jsonDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { return } -func (d *jsonDecDriver) DecodeString() (s string) { - d.appendStringAsBytes() - return d.bsToString() -} - func (d *jsonDecDriver) DecodeStringAsBytes() (s []byte) { - d.appendStringAsBytes() - return d.bs -} - -func (d *jsonDecDriver) appendStringAsBytes() { - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } - - d.fnull = false + d.advance() if d.tok != '"' { // d.d.errorf("expect char '%c' but got char '%c'", '"', d.tok) // handle non-string scalar: null, true, false or a number switch d.tok { case 'n': d.readLit4Null() - d.bs = d.bs[:0] - d.fnull = true + return []byte{} case 'f': d.readLit4False() - d.bs = d.bs[:5] - copy(d.bs, "false") + return jsonLiteralFalse case 't': d.readLit4True() - d.bs = d.bs[:4] - copy(d.bs, "true") - default: - // try to parse a valid number - bs := d.decNumBytes() - if len(bs) <= cap(d.bs) { - d.bs = d.bs[:len(bs)] - } else { - d.bs = make([]byte, len(bs)) - } - copy(d.bs, bs) + return jsonLiteralTrue } + // try to parse a valid number + return d.decNumBytes() + } + s = d.appendStringAsBytes() + if d.fnil { + return nil + } + return +} + +func (d *jsonDecDriver) readString() (bs []byte) { + if d.tok != '"' { + d.d.errorf("expecting string starting with '\"'; got '%c'", d.tok) return } + bs = d.d.decRd.readUntil('"', false) d.tok = 0 - r := d.r - var cs = r.readUntil(d.b2[:0], '"') - var cslen = uint(len(cs)) - var c uint8 - v := d.bs[:0] + return +} + +func (d *jsonDecDriver) appendStringAsBytes() (bs []byte) { + if d.buf != nil { + d.buf = d.buf[:0] + } + d.tok = 0 + // append on each byte seen can be expensive, so we just // keep track of where we last read a contiguous set of // non-special bytes (using cursor variable), // and when we see a special byte // e.g. end-of-slice, " or \, // we will append the full range into the v slice before proceeding + + var cs = d.d.decRd.readUntil('"', true) + var c uint8 var i, cursor uint for { - if i == cslen { - v = append(v, cs[cursor:]...) - cs = r.readUntil(d.b2[:0], '"') - cslen = uint(len(cs)) + if i >= uint(len(cs)) { + d.buf = append(d.buf, cs[cursor:]...) + cs = d.d.decRd.readUntil('"', true) i, cursor = 0, 0 + continue // this continue helps elide the cs[i] below } c = cs[i] if c == '"' { - v = append(v, cs[cursor:i]...) break } if c != '\\' { i++ continue } - v = append(v, cs[cursor:i]...) + + d.buf = append(d.buf, cs[cursor:i]...) i++ + if i >= uint(len(cs)) { + d.d.errorf("need at least 1 more bytes for \\ escape sequence") + return // bounds-check elimination + } c = cs[i] switch c { case '"', '\\', '/', '\'': - v = append(v, c) + d.buf = append(d.buf, c) case 'b': - v = append(v, '\b') + d.buf = append(d.buf, '\b') case 'f': - v = append(v, '\f') + d.buf = append(d.buf, '\f') case 'n': - v = append(v, '\n') + d.buf = append(d.buf, '\n') case 'r': - v = append(v, '\r') + d.buf = append(d.buf, '\r') case 't': - v = append(v, '\t') + d.buf = append(d.buf, '\t') case 'u': - var r rune - var rr uint32 - if cslen < i+4 { - d.d.errorf("need at least 4 more bytes for unicode sequence") - } - var j uint - for _, c = range cs[i+1 : i+5] { // bounds-check-elimination - // best to use explicit if-else - // - not a table, etc which involve memory loads, array lookup with bounds checks, etc - if c >= '0' && c <= '9' { - rr = rr*16 + uint32(c-jsonU4Chk2) - } else if c >= 'a' && c <= 'f' { - rr = rr*16 + uint32(c-jsonU4Chk1) - } else if c >= 'A' && c <= 'F' { - rr = rr*16 + uint32(c-jsonU4Chk0) - } else { - r = unicode.ReplacementChar - i += 4 - goto encode_rune - } + i = d.appendStringAsBytesSlashU(cs, i) + default: + d.d.errorf("unsupported escaped value: %c", c) + } + i++ + cursor = i + } + if len(cs) > 0 { + if len(d.buf) > 0 && cursor < uint(len(cs)) { + d.buf = append(d.buf, cs[cursor:i]...) + } else { + // if bytes, just return the cs got from readUntil. + // do not do it for io, especially bufio, as the buffer is needed for other things + cs = cs[:i] + if d.d.bytes { + return cs } - r = rune(rr) + d.buf = d.d.blist.check(d.buf, len(cs)) + copy(d.buf, cs) + } + } + return d.buf +} + +func (d *jsonDecDriver) appendStringAsBytesSlashU(cs []byte, i uint) uint { + var r rune + var rr uint32 + var j uint + var c byte + if uint(len(cs)) < i+4 { + d.d.errorf("need at least 4 more bytes for unicode sequence") + return 0 // bounds-check elimination + } + for _, c = range cs[i+1 : i+5] { // bounds-check-elimination + // best to use explicit if-else + // - not a table, etc which involve memory loads, array lookup with bounds checks, etc + if c >= '0' && c <= '9' { + rr = rr*16 + uint32(c-jsonU4Chk2) + } else if c >= 'a' && c <= 'f' { + rr = rr*16 + uint32(c-jsonU4Chk1) + } else if c >= 'A' && c <= 'F' { + rr = rr*16 + uint32(c-jsonU4Chk0) + } else { + r = unicode.ReplacementChar i += 4 - if utf16.IsSurrogate(r) { - if len(cs) >= int(i+6) { - var cx = cs[i+1:][:6:6] // [:6] affords bounds-check-elimination - if cx[0] == '\\' && cx[1] == 'u' { - i += 2 - var rr1 uint32 - for j = 2; j < 6; j++ { - c = cx[j] - if c >= '0' && c <= '9' { - rr = rr*16 + uint32(c-jsonU4Chk2) - } else if c >= 'a' && c <= 'f' { - rr = rr*16 + uint32(c-jsonU4Chk1) - } else if c >= 'A' && c <= 'F' { - rr = rr*16 + uint32(c-jsonU4Chk0) - } else { - r = unicode.ReplacementChar - i += 4 - goto encode_rune - } - } - r = utf16.DecodeRune(r, rune(rr1)) + goto encode_rune + } + } + r = rune(rr) + i += 4 + if utf16.IsSurrogate(r) { + if len(cs) >= int(i+6) { + var cx = cs[i+1:][:6:6] // [:6] affords bounds-check-elimination + //var cx [6]byte + //copy(cx[:], cs[i+1:]) + if cx[0] == '\\' && cx[1] == 'u' { + i += 2 + var rr1 uint32 + for j = 2; j < 6; j++ { + c = cx[j] + if c >= '0' && c <= '9' { + rr = rr*16 + uint32(c-jsonU4Chk2) + } else if c >= 'a' && c <= 'f' { + rr = rr*16 + uint32(c-jsonU4Chk1) + } else if c >= 'A' && c <= 'F' { + rr = rr*16 + uint32(c-jsonU4Chk0) + } else { + r = unicode.ReplacementChar i += 4 goto encode_rune } } - r = unicode.ReplacementChar + r = utf16.DecodeRune(r, rune(rr1)) + i += 4 + goto encode_rune } - encode_rune: - w2 := utf8.EncodeRune(d.bstr[:], r) - v = append(v, d.bstr[:w2]...) - default: - d.d.errorf("unsupported escaped value: %c", c) } - i++ - cursor = i + r = unicode.ReplacementChar } - d.bs = v +encode_rune: + w2 := utf8.EncodeRune(d.bstr[:], r) + d.buf = append(d.buf, d.bstr[:w2]...) + return i } func (d *jsonDecDriver) nakedNum(z *decNaked, bs []byte) (err error) { @@ -1198,25 +1114,22 @@ func (d *jsonDecDriver) nakedNum(z *decNaked, bs []byte) (err error) { return F: z.v = valueTypeFloat - z.f, err = strconv.ParseFloat(stringView(bs), 64) + z.f, err = parseFloat64(bs) return } -func (d *jsonDecDriver) bsToString() string { - // if x := d.s.sc; x != nil && x.so && x.st == '}' { // map key - if jsonAlwaysReturnInternString || d.c == containerMapKey { - return d.d.string(d.bs) +func (d *jsonDecDriver) sliceToString(bs []byte) string { + if d.d.is != nil && (jsonAlwaysReturnInternString || d.d.c == containerMapKey) { + return d.d.string(bs) } - return string(d.bs) + return string(bs) } func (d *jsonDecDriver) DecodeNaked() { z := d.d.naked() - // var decodeFurther bool - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } + d.advance() + var bs []byte switch d.tok { case 'n': d.readLit4Null() @@ -1235,30 +1148,29 @@ func (d *jsonDecDriver) DecodeNaked() { z.v = valueTypeArray // don't consume. kInterfaceNaked will call ReadArrayStart case '"': // if a string, and MapKeyAsString, then try to decode it as a nil, bool or number first - d.appendStringAsBytes() - if len(d.bs) > 0 && d.c == containerMapKey && d.h.MapKeyAsString { - switch stringView(d.bs) { - case "null": + bs = d.appendStringAsBytes() + if len(bs) > 0 && d.d.c == containerMapKey && d.h.MapKeyAsString { + if bytes.Equal(bs, jsonLiteralNull) { z.v = valueTypeNil - case "true": + } else if bytes.Equal(bs, jsonLiteralTrue) { z.v = valueTypeBool z.b = true - case "false": + } else if bytes.Equal(bs, jsonLiteralFalse) { z.v = valueTypeBool z.b = false - default: + } else { // check if a number: float, int or uint - if err := d.nakedNum(z, d.bs); err != nil { + if err := d.nakedNum(z, bs); err != nil { z.v = valueTypeString - z.s = d.bsToString() + z.s = d.sliceToString(bs) } } } else { z.v = valueTypeString - z.s = d.bsToString() + z.s = d.sliceToString(bs) } default: // number - bs := d.decNumBytes() + bs = d.decNumBytes() if len(bs) == 0 { d.d.errorf("decode number from empty string") return @@ -1268,9 +1180,6 @@ func (d *jsonDecDriver) DecodeNaked() { return } } - // if decodeFurther { - // d.s.sc.retryRead() - // } } //---------------------- @@ -1342,121 +1251,117 @@ type JsonHandle struct { // The only caveat is that nil value is ALWAYS written as null (never as "null") MapKeyAsString bool - // _ [2]byte // padding + // _ uint64 // padding (cache line) - // Note: below, we store hardly-used items e.g. RawBytesExt is cached in the (en|de)cDriver. + // Note: below, we store hardly-used items + // e.g. RawBytesExt (which is already cached in the (en|de)cDriver). // RawBytesExt, if configured, is used to encode and decode raw bytes in a custom way. // If not configured, raw bytes are encoded to/from base64 text. RawBytesExt InterfaceExt - _ [2]uint64 // padding + _ [5]uint64 // padding (cache line) } // Name returns the name of the handle: json -func (h *JsonHandle) Name() string { return "json" } -func (h *JsonHandle) hasElemSeparators() bool { return true } +func (h *JsonHandle) Name() string { return "json" } + +// func (h *JsonHandle) hasElemSeparators() bool { return true } func (h *JsonHandle) typical() bool { return h.Indent == 0 && !h.MapKeyAsString && h.IntegerAsString != 'A' && h.IntegerAsString != 'L' } -type jsonTypical interface { - typical() -} - -func (h *JsonHandle) recreateEncDriver(ed encDriver) (v bool) { - _, v = ed.(jsonTypical) - return v != h.typical() -} - -// SetInterfaceExt sets an extension -func (h *JsonHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { - return h.SetExt(rt, tag, &extWrapper{bytesExtFailer{}, ext}) +func (h *JsonHandle) newEncDriver() encDriver { + var e = &jsonEncDriver{h: h} + e.e.e = e + e.e.js = true + e.e.init(h) + e.reset() + return e } -type jsonEncDriverTypicalImpl struct { - jsonEncDriver - jsonEncDriverTypical - _ [1]uint64 // padding +func (h *JsonHandle) newDecDriver() decDriver { + var d = &jsonDecDriver{h: h} + d.d.d = d + d.d.js = true + d.d.jsms = h.MapKeyAsString + d.d.init(h) + d.reset() + return d } -func (x *jsonEncDriverTypicalImpl) reset() { - x.jsonEncDriver.reset() - x.jsonEncDriverTypical.reset(&x.jsonEncDriver) -} - -type jsonEncDriverGenericImpl struct { - jsonEncDriver - jsonEncDriverGeneric - // _ [2]uint64 // padding -} - -func (x *jsonEncDriverGenericImpl) reset() { - x.jsonEncDriver.reset() - x.jsonEncDriverGeneric.reset(&x.jsonEncDriver) -} - -func (h *JsonHandle) newEncDriver(e *Encoder) (ee encDriver) { - var hd *jsonEncDriver - if h.typical() { - var v jsonEncDriverTypicalImpl - ee = &v - hd = &v.jsonEncDriver +func (e *jsonEncDriver) reset() { + // (htmlasis && jsonCharSafeSet.isset(b)) || jsonCharHtmlSafeSet.isset(b) + e.typical = e.h.typical() + if e.h.HTMLCharsAsIs { + e.s = &jsonCharSafeSet } else { - var v jsonEncDriverGenericImpl - ee = &v - hd = &v.jsonEncDriver + e.s = &jsonCharHtmlSafeSet } - hd.e, hd.h, hd.bs = e, h, hd.b[:0] - hd.se.BytesExt = bytesExtFailer{} - ee.reset() - return -} - -func (h *JsonHandle) newDecDriver(d *Decoder) decDriver { - // d := jsonDecDriver{r: r.(*bytesDecReader), h: h} - hd := jsonDecDriver{d: d, h: h} - hd.se.BytesExt = bytesExtFailer{} - hd.bs = hd.b[:0] - hd.reset() - return &hd -} - -func (e *jsonEncDriver) reset() { - e.ew = e.e.w e.se.InterfaceExt = e.h.RawBytesExt - if e.bs != nil { - e.bs = e.bs[:0] + e.d, e.dl, e.di = false, 0, 0 + if e.h.Indent != 0 { + e.d = true + e.di = int8(e.h.Indent) } + e.ks = e.h.MapKeyAsString + e.is = e.h.IntegerAsString } func (d *jsonDecDriver) reset() { - d.r = d.d.r d.se.InterfaceExt = d.h.RawBytesExt - if d.bs != nil { - d.bs = d.bs[:0] - } - d.c, d.tok = 0, 0 - // d.n.reset() + d.buf = d.d.blist.check(d.buf, 256)[:0] + d.tok = 0 + d.fnil = false } -func jsonFloatStrconvFmtPrec(f float64) (fmt byte, prec int) { +func (d *jsonDecDriver) atEndOfDecode() {} + +// jsonFloatStrconvFmtPrec ... +// +// ensure that every float has an 'e' or '.' in it,/ for easy differentiation from integers. +// this is better/faster than checking if encoded value has [e.] and appending if needed. + +// func jsonFloatStrconvFmtPrec(f float64, bits32 bool) (fmt byte, prec int) { +// fmt = 'f' +// prec = -1 +// var abs = math.Abs(f) +// if abs == 0 || abs == 1 { +// prec = 1 +// } else if !bits32 && (abs < 1e-6 || abs >= 1e21) || +// bits32 && (float32(abs) < 1e-6 || float32(abs) >= 1e21) { +// fmt = 'e' +// } else if _, frac := math.Modf(abs); frac == 0 { +// // ensure that floats have a .0 at the end, for easy identification as floats +// prec = 1 +// } +// return +// } + +func jsonFloatStrconvFmtPrec64(f float64) (fmt byte, prec int8) { + fmt = 'f' prec = -1 var abs = math.Abs(f) - if abs != 0 && (abs < 1e-6 || abs >= 1e21) { + if abs == 0 || abs == 1 { + prec = 1 + } else if abs < 1e-6 || abs >= 1e21 { fmt = 'e' - } else { - fmt = 'f' - // set prec to 1 iff mod is 0. - // better than using jsonIsFloatBytesB2 to check if a . or E in the float bytes. - // this ensures that every float has an e or .0 in it. - if abs <= 1 { - if abs == 0 || abs == 1 { - prec = 1 - } - } else if _, mod := math.Modf(abs); mod == 0 { - prec = 1 - } + } else if noFrac64(abs) { // _, frac := math.Modf(abs); frac == 0 { + prec = 1 + } + return +} + +func jsonFloatStrconvFmtPrec32(f float32) (fmt byte, prec int8) { + fmt = 'f' + prec = -1 + var abs = abs32(f) + if abs == 0 || abs == 1 { + prec = 1 + } else if abs < 1e-6 || abs >= 1e21 { + fmt = 'e' + } else if noFrac32(abs) { // _, frac := math.Modf(abs); frac == 0 { + prec = 1 } return } @@ -1502,7 +1407,87 @@ func jsonParseInteger(s []byte) (n uint64, neg, badSyntax, overflow bool) { return } +var _ decDriverContainerTracker = (*jsonDecDriver)(nil) +var _ encDriverContainerTracker = (*jsonEncDriver)(nil) var _ decDriver = (*jsonDecDriver)(nil) -var _ encDriver = (*jsonEncDriverGenericImpl)(nil) -var _ encDriver = (*jsonEncDriverTypicalImpl)(nil) -var _ jsonTypical = (*jsonEncDriverTypical)(nil) + +var _ encDriver = (*jsonEncDriver)(nil) + +// ---------------- + +/* +type jsonEncDriverTypical jsonEncDriver + +func (e *jsonEncDriverTypical) WriteArrayStart(length int) { + e.e.encWr.writen1('[') +} + +func (e *jsonEncDriverTypical) WriteArrayElem() { + if e.e.c != containerArrayStart { + e.e.encWr.writen1(',') + } +} + +func (e *jsonEncDriverTypical) WriteArrayEnd() { + e.e.encWr.writen1(']') +} + +func (e *jsonEncDriverTypical) WriteMapStart(length int) { + e.e.encWr.writen1('{') +} + +func (e *jsonEncDriverTypical) WriteMapElemKey() { + if e.e.c != containerMapStart { + e.e.encWr.writen1(',') + } +} + +func (e *jsonEncDriverTypical) WriteMapElemValue() { + e.e.encWr.writen1(':') +} + +func (e *jsonEncDriverTypical) WriteMapEnd() { + e.e.encWr.writen1('}') +} + +func (e *jsonEncDriverTypical) EncodeBool(b bool) { + if b { + // e.e.encWr.writeb(jsonLiteralTrue) + e.e.encWr.writen([rwNLen]byte{'t', 'r', 'u', 'e'}, 4) + } else { + // e.e.encWr.writeb(jsonLiteralFalse) + e.e.encWr.writen([rwNLen]byte{'f', 'a', 'l', 's', 'e'}, 5) + } +} + +func (e *jsonEncDriverTypical) EncodeInt(v int64) { + e.e.encWr.writeb(strconv.AppendInt(e.b[:0], v, 10)) +} + +func (e *jsonEncDriverTypical) EncodeUint(v uint64) { + e.e.encWr.writeb(strconv.AppendUint(e.b[:0], v, 10)) +} + +func (e *jsonEncDriverTypical) EncodeFloat64(f float64) { + fmt, prec := jsonFloatStrconvFmtPrec64(f) + e.e.encWr.writeb(strconv.AppendFloat(e.b[:0], f, fmt, int(prec), 64)) + // e.e.encWr.writeb(strconv.AppendFloat(e.b[:0], f, jsonFloatStrconvFmtPrec64(f), 64)) +} + +func (e *jsonEncDriverTypical) EncodeFloat32(f float32) { + fmt, prec := jsonFloatStrconvFmtPrec32(f) + e.e.encWr.writeb(strconv.AppendFloat(e.b[:0], float64(f), fmt, int(prec), 32)) +} + +// func (e *jsonEncDriverTypical) encodeFloat(f float64, bitsize uint8) { +// fmt, prec := jsonFloatStrconvFmtPrec(f, bitsize == 32) +// e.e.encWr.writeb(strconv.AppendFloat(e.b[:0], f, fmt, prec, int(bitsize))) +// } + +// func (e *jsonEncDriverTypical) atEndOfEncode() { +// if e.tw { +// e.e.encWr.writen1(' ') +// } +// } + +*/ diff --git a/vendor/github.com/ugorji/go/codec/mammoth-test.go.tmpl b/vendor/github.com/ugorji/go/codec/mammoth-test.go.tmpl new file mode 100644 index 00000000..ba55b396 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/mammoth-test.go.tmpl @@ -0,0 +1,162 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// Code generated from mammoth-test.go.tmpl - DO NOT EDIT. + +package codec + +import "testing" +import "fmt" + +// TestMammoth has all the different paths optimized in fast-path +// It has all the primitives, slices and maps. +// +// For each of those types, it has a pointer and a non-pointer field. + +func init() { _ = fmt.Printf } // so we can include fmt as needed + +type TestMammoth struct { + +{{range .Values }}{{if .Primitive -}} +{{ .MethodNamePfx "F" true }} {{ .Primitive }} +{{ .MethodNamePfx "Fptr" true }} *{{ .Primitive }} +{{end}}{{end}} + +{{range .Values }}{{if not .Primitive }}{{if not .MapKey -}} +{{ .MethodNamePfx "F" false }} []{{ .Elem }} +{{ .MethodNamePfx "Fptr" false }} *[]{{ .Elem }} +{{end}}{{end}}{{end}} + +{{range .Values }}{{if not .Primitive }}{{if .MapKey -}} +{{ .MethodNamePfx "F" false }} map[{{ .MapKey }}]{{ .Elem }} +{{ .MethodNamePfx "Fptr" false }} *map[{{ .MapKey }}]{{ .Elem }} +{{end}}{{end}}{{end}} + +} + +{{range .Values }}{{if not .Primitive }}{{if not .MapKey -}} +type {{ .MethodNamePfx "typMbs" false }} []{{ .Elem }} +func (_ {{ .MethodNamePfx "typMbs" false }}) MapBySlice() { } +{{end}}{{end}}{{end}} + +{{range .Values }}{{if not .Primitive }}{{if .MapKey -}} +type {{ .MethodNamePfx "typMap" false }} map[{{ .MapKey }}]{{ .Elem }} +{{end}}{{end}}{{end}} + +func doTestMammothSlices(t *testing.T, h Handle) { +{{range $i, $e := .Values }}{{if not .Primitive }}{{if not .MapKey -}} + var v{{$i}}va [8]{{ .Elem }} + for _, v := range [][]{{ .Elem }}{ nil, {}, { {{ nonzerocmd .Elem }}, {{ zerocmd .Elem }}, {{ zerocmd .Elem }}, {{ nonzerocmd .Elem }} } } { + {{/* + // fmt.Printf(">>>> running mammoth slice v{{$i}}: %v\n", v) + // - encode value to some []byte + // - decode into a length-wise-equal []byte + // - check if equal to initial slice + // - encode ptr to the value + // - check if encode bytes are same + // - decode into ptrs to: nil, then 1-elem slice, equal-length, then large len slice + // - decode into non-addressable slice of equal length, then larger len + // - for each decode, compare elem-by-elem to the original slice + // - + // - rinse and repeat for a MapBySlice version + // - + */ -}} + var v{{$i}}v1, v{{$i}}v2 []{{ .Elem }} + var bs{{$i}} []byte + v{{$i}}v1 = v + bs{{$i}} = testMarshalErr(v{{$i}}v1, h, t, "enc-slice-v{{$i}}") + if v != nil { + if v == nil { v{{$i}}v2 = nil } else { v{{$i}}v2 = make([]{{ .Elem }}, len(v)) } + testUnmarshalErr(v{{$i}}v2, bs{{$i}}, h, t, "dec-slice-v{{$i}}") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-slice-v{{$i}}") + if v == nil { v{{$i}}v2 = nil } else { v{{$i}}v2 = make([]{{ .Elem }}, len(v)) } + testUnmarshalErr(rv4i(v{{$i}}v2), bs{{$i}}, h, t, "dec-slice-v{{$i}}-noaddr") // non-addressable value + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-slice-v{{$i}}-noaddr") + } + // ... + bs{{$i}} = testMarshalErr(&v{{$i}}v1, h, t, "enc-slice-v{{$i}}-p") + v{{$i}}v2 = nil + testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-slice-v{{$i}}-p") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-slice-v{{$i}}-p") + v{{$i}}va = [8]{{ .Elem }}{} // clear the array + v{{$i}}v2 = v{{$i}}va[:1:1] + testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-slice-v{{$i}}-p-1") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-slice-v{{$i}}-p-1") + v{{$i}}va = [8]{{ .Elem }}{} // clear the array + v{{$i}}v2 = v{{$i}}va[:len(v{{$i}}v1):len(v{{$i}}v1)] + testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-slice-v{{$i}}-p-len") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-slice-v{{$i}}-p-len") + v{{$i}}va = [8]{{ .Elem }}{} // clear the array + v{{$i}}v2 = v{{$i}}va[:] + testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-slice-v{{$i}}-p-cap") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-slice-v{{$i}}-p-cap") + if len(v{{$i}}v1) > 1 { + v{{$i}}va = [8]{{ .Elem }}{} // clear the array + testUnmarshalErr((&v{{$i}}va)[:len(v{{$i}}v1)], bs{{$i}}, h, t, "dec-slice-v{{$i}}-p-len-noaddr") + testDeepEqualErr(v{{$i}}v1, v{{$i}}va[:len(v{{$i}}v1)], t, "equal-slice-v{{$i}}-p-len-noaddr") + v{{$i}}va = [8]{{ .Elem }}{} // clear the array + testUnmarshalErr((&v{{$i}}va)[:], bs{{$i}}, h, t, "dec-slice-v{{$i}}-p-cap-noaddr") + testDeepEqualErr(v{{$i}}v1, v{{$i}}va[:len(v{{$i}}v1)], t, "equal-slice-v{{$i}}-p-cap-noaddr") + } + // ... + var v{{$i}}v3, v{{$i}}v4 {{ .MethodNamePfx "typMbs" false }} + v{{$i}}v2 = nil + if v != nil { v{{$i}}v2 = make([]{{ .Elem }}, len(v)) } + v{{$i}}v3 = {{ .MethodNamePfx "typMbs" false }}(v{{$i}}v1) + v{{$i}}v4 = {{ .MethodNamePfx "typMbs" false }}(v{{$i}}v2) + if v != nil { + bs{{$i}} = testMarshalErr(v{{$i}}v3, h, t, "enc-slice-v{{$i}}-custom") + testUnmarshalErr(v{{$i}}v4, bs{{$i}}, h, t, "dec-slice-v{{$i}}-custom") + testDeepEqualErr(v{{$i}}v3, v{{$i}}v4, t, "equal-slice-v{{$i}}-custom") + } + bs{{$i}} = testMarshalErr(&v{{$i}}v3, h, t, "enc-slice-v{{$i}}-custom-p") + v{{$i}}v2 = nil + v{{$i}}v4 = {{ .MethodNamePfx "typMbs" false }}(v{{$i}}v2) + testUnmarshalErr(&v{{$i}}v4, bs{{$i}}, h, t, "dec-slice-v{{$i}}-custom-p") + testDeepEqualErr(v{{$i}}v3, v{{$i}}v4, t, "equal-slice-v{{$i}}-custom-p") + } +{{end}}{{end}}{{end}} +} + +func doTestMammothMaps(t *testing.T, h Handle) { +{{range $i, $e := .Values }}{{if not .Primitive }}{{if .MapKey -}} + for _, v := range []map[{{ .MapKey }}]{{ .Elem }}{ nil, {}, { {{ nonzerocmd .MapKey }}:{{ zerocmd .Elem }} {{if ne "bool" .MapKey}}, {{ nonzerocmd .MapKey }}:{{ nonzerocmd .Elem }} {{end}} } } { + // fmt.Printf(">>>> running mammoth map v{{$i}}: %v\n", v) + var v{{$i}}v1, v{{$i}}v2 map[{{ .MapKey }}]{{ .Elem }} + var bs{{$i}} []byte + v{{$i}}v1 = v + bs{{$i}} = testMarshalErr(v{{$i}}v1, h, t, "enc-map-v{{$i}}") + if v != nil { + if v == nil { v{{$i}}v2 = nil } else { v{{$i}}v2 = make(map[{{ .MapKey }}]{{ .Elem }}, len(v)) } // reset map + testUnmarshalErr(v{{$i}}v2, bs{{$i}}, h, t, "dec-map-v{{$i}}") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-map-v{{$i}}") + if v == nil { v{{$i}}v2 = nil } else { v{{$i}}v2 = make(map[{{ .MapKey }}]{{ .Elem }}, len(v)) } // reset map + testUnmarshalErr(rv4i(v{{$i}}v2), bs{{$i}}, h, t, "dec-map-v{{$i}}-noaddr") // decode into non-addressable map value + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-map-v{{$i}}-noaddr") + } + if v == nil { v{{$i}}v2 = nil } else { v{{$i}}v2 = make(map[{{ .MapKey }}]{{ .Elem }}, len(v)) } // reset map + testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-map-v{{$i}}-p-len") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-map-v{{$i}}-p-len") + bs{{$i}} = testMarshalErr(&v{{$i}}v1, h, t, "enc-map-v{{$i}}-p") + v{{$i}}v2 = nil + testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-map-v{{$i}}-p-nil") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-map-v{{$i}}-p-nil") + // ... + if v == nil { v{{$i}}v2 = nil } else { v{{$i}}v2 = make(map[{{ .MapKey }}]{{ .Elem }}, len(v)) } // reset map + var v{{$i}}v3, v{{$i}}v4 {{ .MethodNamePfx "typMap" false }} + v{{$i}}v3 = {{ .MethodNamePfx "typMap" false }}(v{{$i}}v1) + v{{$i}}v4 = {{ .MethodNamePfx "typMap" false }}(v{{$i}}v2) + if v != nil { + bs{{$i}} = testMarshalErr(v{{$i}}v3, h, t, "enc-map-v{{$i}}-custom") + testUnmarshalErr(v{{$i}}v4, bs{{$i}}, h, t, "dec-map-v{{$i}}-p-len") + testDeepEqualErr(v{{$i}}v3, v{{$i}}v4, t, "equal-map-v{{$i}}-p-len") + } + } +{{end}}{{end}}{{end}} + +} + +func doTestMammothMapsAndSlices(t *testing.T, h Handle) { + doTestMammothSlices(t, h) + doTestMammothMaps(t, h) +} diff --git a/vendor/github.com/ugorji/go/codec/mammoth2-test.go.tmpl b/vendor/github.com/ugorji/go/codec/mammoth2-test.go.tmpl new file mode 100644 index 00000000..71eaf618 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/mammoth2-test.go.tmpl @@ -0,0 +1,94 @@ +// +build !notfastpath + +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// Code generated from mammoth2-test.go.tmpl - DO NOT EDIT. + +package codec + +// Increase codecoverage by covering all the codecgen paths, in fast-path and gen-helper.go.... +// +// Add: +// - test file for creating a mammoth generated file as _mammoth_generated.go +// - generate a second mammoth files in a different file: mammoth2_generated_test.go +// - mammoth-test.go.tmpl will do this +// - run codecgen on it, into mammoth2_codecgen_generated_test.go (no build tags) +// - as part of TestMammoth, run it also +// - this will cover all the codecgen, gen-helper, etc in one full run +// - check in mammoth* files into github also +// - then +// +// Now, add some types: +// - some that implement BinaryMarshal, TextMarshal, JSONMarshal, and one that implements none of it +// - create a wrapper type that includes TestMammoth2, with it in slices, and maps, and the custom types +// - this wrapper object is what we work encode/decode (so that the codecgen methods are called) + + +// import "encoding/binary" +import "fmt" + +type TestMammoth2 struct { + +{{range .Values }}{{if .Primitive }}{{/* +*/}}{{ .MethodNamePfx "F" true }} {{ .Primitive }} +{{ .MethodNamePfx "Fptr" true }} *{{ .Primitive }} +{{end}}{{end}} + +{{range .Values }}{{if not .Primitive }}{{if not .MapKey }}{{/* +*/}}{{ .MethodNamePfx "F" false }} []{{ .Elem }} +{{ .MethodNamePfx "Fptr" false }} *[]{{ .Elem }} +{{end}}{{end}}{{end}} + +{{range .Values }}{{if not .Primitive }}{{if .MapKey }}{{/* +*/}}{{ .MethodNamePfx "F" false }} map[{{ .MapKey }}]{{ .Elem }} +{{ .MethodNamePfx "Fptr" false }} *map[{{ .MapKey }}]{{ .Elem }} +{{end}}{{end}}{{end}} + +} + +// ----------- + +type testMammoth2Binary uint64 +func (x testMammoth2Binary) MarshalBinary() (data []byte, err error) { +data = make([]byte, 8) +bigen.PutUint64(data, uint64(x)) +return +} +func (x *testMammoth2Binary) UnmarshalBinary(data []byte) (err error) { +*x = testMammoth2Binary(bigen.Uint64(data)) +return +} + +type testMammoth2Text uint64 +func (x testMammoth2Text) MarshalText() (data []byte, err error) { +data = []byte(fmt.Sprintf("%b", uint64(x))) +return +} +func (x *testMammoth2Text) UnmarshalText(data []byte) (err error) { +_, err = fmt.Sscanf(string(data), "%b", (*uint64)(x)) +return +} + +type testMammoth2Json uint64 +func (x testMammoth2Json) MarshalJSON() (data []byte, err error) { +data = []byte(fmt.Sprintf("%v", uint64(x))) +return +} +func (x *testMammoth2Json) UnmarshalJSON(data []byte) (err error) { +_, err = fmt.Sscanf(string(data), "%v", (*uint64)(x)) +return +} + +type testMammoth2Basic [4]uint64 + +type TestMammoth2Wrapper struct { + V TestMammoth2 + T testMammoth2Text + B testMammoth2Binary + J testMammoth2Json + C testMammoth2Basic + M map[testMammoth2Basic]TestMammoth2 + L []TestMammoth2 + A [4]int64 +} diff --git a/vendor/github.com/ugorji/go/codec/msgpack.go b/vendor/github.com/ugorji/go/codec/msgpack.go index 85c71f22..4543337d 100644 --- a/vendor/github.com/ugorji/go/codec/msgpack.go +++ b/vendor/github.com/ugorji/go/codec/msgpack.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a MIT license found in the LICENSE file. /* -MSGPACK - Msgpack-c implementation powers the c, c++, python, ruby, etc libraries. We need to maintain compatibility with it and how it encodes integer values without caring about the type. @@ -24,7 +22,6 @@ import ( "io" "math" "net/rpc" - "reflect" "time" ) @@ -200,16 +197,18 @@ var ( type msgpackEncDriver struct { noBuiltInTypes encDriverNoopContainerWriter - // encNoSeparator - e *Encoder - w *encWriterSwitch h *MsgpackHandle x [8]byte - // _ [3]uint64 // padding + _ [6]uint64 // padding + e Encoder +} + +func (e *msgpackEncDriver) encoder() *Encoder { + return &e.e } func (e *msgpackEncDriver) EncodeNil() { - e.w.writen1(mpNil) + e.e.encWr.writen1(mpNil) } func (e *msgpackEncDriver) EncodeInt(i int64) { @@ -217,72 +216,72 @@ func (e *msgpackEncDriver) EncodeInt(i int64) { e.EncodeUint(uint64(i)) } else if i > math.MaxInt8 { if i <= math.MaxInt16 { - e.w.writen1(mpInt16) - bigenHelper{e.x[:2], e.w}.writeUint16(uint16(i)) + e.e.encWr.writen1(mpInt16) + bigenHelper{e.x[:2], e.e.w()}.writeUint16(uint16(i)) } else if i <= math.MaxInt32 { - e.w.writen1(mpInt32) - bigenHelper{e.x[:4], e.w}.writeUint32(uint32(i)) + e.e.encWr.writen1(mpInt32) + bigenHelper{e.x[:4], e.e.w()}.writeUint32(uint32(i)) } else { - e.w.writen1(mpInt64) - bigenHelper{e.x[:8], e.w}.writeUint64(uint64(i)) + e.e.encWr.writen1(mpInt64) + bigenHelper{e.x[:8], e.e.w()}.writeUint64(uint64(i)) } } else if i >= -32 { if e.h.NoFixedNum { - e.w.writen2(mpInt8, byte(i)) + e.e.encWr.writen2(mpInt8, byte(i)) } else { - e.w.writen1(byte(i)) + e.e.encWr.writen1(byte(i)) } } else if i >= math.MinInt8 { - e.w.writen2(mpInt8, byte(i)) + e.e.encWr.writen2(mpInt8, byte(i)) } else if i >= math.MinInt16 { - e.w.writen1(mpInt16) - bigenHelper{e.x[:2], e.w}.writeUint16(uint16(i)) + e.e.encWr.writen1(mpInt16) + bigenHelper{e.x[:2], e.e.w()}.writeUint16(uint16(i)) } else if i >= math.MinInt32 { - e.w.writen1(mpInt32) - bigenHelper{e.x[:4], e.w}.writeUint32(uint32(i)) + e.e.encWr.writen1(mpInt32) + bigenHelper{e.x[:4], e.e.w()}.writeUint32(uint32(i)) } else { - e.w.writen1(mpInt64) - bigenHelper{e.x[:8], e.w}.writeUint64(uint64(i)) + e.e.encWr.writen1(mpInt64) + bigenHelper{e.x[:8], e.e.w()}.writeUint64(uint64(i)) } } func (e *msgpackEncDriver) EncodeUint(i uint64) { if i <= math.MaxInt8 { if e.h.NoFixedNum { - e.w.writen2(mpUint8, byte(i)) + e.e.encWr.writen2(mpUint8, byte(i)) } else { - e.w.writen1(byte(i)) + e.e.encWr.writen1(byte(i)) } } else if i <= math.MaxUint8 { - e.w.writen2(mpUint8, byte(i)) + e.e.encWr.writen2(mpUint8, byte(i)) } else if i <= math.MaxUint16 { - e.w.writen1(mpUint16) - bigenHelper{e.x[:2], e.w}.writeUint16(uint16(i)) + e.e.encWr.writen1(mpUint16) + bigenHelper{e.x[:2], e.e.w()}.writeUint16(uint16(i)) } else if i <= math.MaxUint32 { - e.w.writen1(mpUint32) - bigenHelper{e.x[:4], e.w}.writeUint32(uint32(i)) + e.e.encWr.writen1(mpUint32) + bigenHelper{e.x[:4], e.e.w()}.writeUint32(uint32(i)) } else { - e.w.writen1(mpUint64) - bigenHelper{e.x[:8], e.w}.writeUint64(uint64(i)) + e.e.encWr.writen1(mpUint64) + bigenHelper{e.x[:8], e.e.w()}.writeUint64(uint64(i)) } } func (e *msgpackEncDriver) EncodeBool(b bool) { if b { - e.w.writen1(mpTrue) + e.e.encWr.writen1(mpTrue) } else { - e.w.writen1(mpFalse) + e.e.encWr.writen1(mpFalse) } } func (e *msgpackEncDriver) EncodeFloat32(f float32) { - e.w.writen1(mpFloat) - bigenHelper{e.x[:4], e.w}.writeUint32(math.Float32bits(f)) + e.e.encWr.writen1(mpFloat) + bigenHelper{e.x[:4], e.e.w()}.writeUint32(math.Float32bits(f)) } func (e *msgpackEncDriver) EncodeFloat64(f float64) { - e.w.writen1(mpDouble) - bigenHelper{e.x[:8], e.w}.writeUint64(math.Float64bits(f)) + e.e.encWr.writen1(mpDouble) + bigenHelper{e.x[:8], e.e.w()}.writeUint64(math.Float64bits(f)) } func (e *msgpackEncDriver) EncodeTime(t time.Time) { @@ -309,56 +308,65 @@ func (e *msgpackEncDriver) EncodeTime(t time.Time) { } switch l { case 4: - bigenHelper{e.x[:4], e.w}.writeUint32(uint32(data64)) + bigenHelper{e.x[:4], e.e.w()}.writeUint32(uint32(data64)) case 8: - bigenHelper{e.x[:8], e.w}.writeUint64(data64) + bigenHelper{e.x[:8], e.e.w()}.writeUint64(data64) case 12: - bigenHelper{e.x[:4], e.w}.writeUint32(uint32(nsec)) - bigenHelper{e.x[:8], e.w}.writeUint64(uint64(sec)) + bigenHelper{e.x[:4], e.e.w()}.writeUint32(uint32(nsec)) + bigenHelper{e.x[:8], e.e.w()}.writeUint64(uint64(sec)) } } -func (e *msgpackEncDriver) EncodeExt(v interface{}, xtag uint64, ext Ext, _ *Encoder) { - bs := ext.WriteExt(v) +func (e *msgpackEncDriver) EncodeExt(v interface{}, xtag uint64, ext Ext) { + var bs []byte + if ext == SelfExt { + bs = e.e.blist.get(1024)[:0] + e.e.sideEncode(v, &bs) + } else { + bs = ext.WriteExt(v) + } if bs == nil { e.EncodeNil() return } if e.h.WriteExt { e.encodeExtPreamble(uint8(xtag), len(bs)) - e.w.writeb(bs) + e.e.encWr.writeb(bs) } else { e.EncodeStringBytesRaw(bs) } + if ext == SelfExt { + e.e.blist.put(bs) + } } -func (e *msgpackEncDriver) EncodeRawExt(re *RawExt, _ *Encoder) { +func (e *msgpackEncDriver) EncodeRawExt(re *RawExt) { e.encodeExtPreamble(uint8(re.Tag), len(re.Data)) - e.w.writeb(re.Data) + e.e.encWr.writeb(re.Data) } func (e *msgpackEncDriver) encodeExtPreamble(xtag byte, l int) { if l == 1 { - e.w.writen2(mpFixExt1, xtag) + e.e.encWr.writen2(mpFixExt1, xtag) } else if l == 2 { - e.w.writen2(mpFixExt2, xtag) + e.e.encWr.writen2(mpFixExt2, xtag) } else if l == 4 { - e.w.writen2(mpFixExt4, xtag) + e.e.encWr.writen2(mpFixExt4, xtag) } else if l == 8 { - e.w.writen2(mpFixExt8, xtag) + e.e.encWr.writen2(mpFixExt8, xtag) } else if l == 16 { - e.w.writen2(mpFixExt16, xtag) + e.e.encWr.writen2(mpFixExt16, xtag) } else if l < 256 { - e.w.writen2(mpExt8, byte(l)) - e.w.writen1(xtag) + e.e.encWr.writen2(mpExt8, byte(l)) + e.e.encWr.writen1(xtag) } else if l < 65536 { - e.w.writen1(mpExt16) - bigenHelper{e.x[:2], e.w}.writeUint16(uint16(l)) - e.w.writen1(xtag) + e.e.encWr.writen1(mpExt16) + bigenHelper{e.x[:2], e.e.w()}.writeUint16(uint16(l)) + e.e.encWr.writen1(xtag) } else { - e.w.writen1(mpExt32) - bigenHelper{e.x[:4], e.w}.writeUint32(uint32(l)) - e.w.writen1(xtag) + e.e.encWr.writen1(mpExt32) + bigenHelper{e.x[:4], e.e.w()}.writeUint32(uint32(l)) + e.e.encWr.writen1(xtag) } } @@ -370,39 +378,20 @@ func (e *msgpackEncDriver) WriteMapStart(length int) { e.writeContainerLen(msgpackContainerMap, length) } -func (e *msgpackEncDriver) EncodeString(c charEncoding, s string) { - slen := len(s) - if c == cRAW && e.h.WriteExt { - e.writeContainerLen(msgpackContainerBin, slen) - } else { - e.writeContainerLen(msgpackContainerRawLegacy, slen) - } - if slen > 0 { - e.w.writestr(s) - } -} - -func (e *msgpackEncDriver) EncodeStringEnc(c charEncoding, s string) { - slen := len(s) - e.writeContainerLen(msgpackContainerStr, slen) - if slen > 0 { - e.w.writestr(s) - } -} - -func (e *msgpackEncDriver) EncodeStringBytes(c charEncoding, bs []byte) { - if bs == nil { - e.EncodeNil() - return - } - slen := len(bs) - if c == cRAW && e.h.WriteExt { - e.writeContainerLen(msgpackContainerBin, slen) +func (e *msgpackEncDriver) EncodeString(s string) { + var ct msgpackContainerType + if e.h.WriteExt { + if e.h.StringToRaw { + ct = msgpackContainerBin + } else { + ct = msgpackContainerStr + } } else { - e.writeContainerLen(msgpackContainerRawLegacy, slen) + ct = msgpackContainerRawLegacy } - if slen > 0 { - e.w.writeb(bs) + e.writeContainerLen(ct, len(s)) + if len(s) > 0 { + e.e.encWr.writestr(s) } } @@ -411,46 +400,46 @@ func (e *msgpackEncDriver) EncodeStringBytesRaw(bs []byte) { e.EncodeNil() return } - slen := len(bs) if e.h.WriteExt { - e.writeContainerLen(msgpackContainerBin, slen) + e.writeContainerLen(msgpackContainerBin, len(bs)) } else { - e.writeContainerLen(msgpackContainerRawLegacy, slen) + e.writeContainerLen(msgpackContainerRawLegacy, len(bs)) } - if slen > 0 { - e.w.writeb(bs) + if len(bs) > 0 { + e.e.encWr.writeb(bs) } } func (e *msgpackEncDriver) writeContainerLen(ct msgpackContainerType, l int) { if ct.fixCutoff > 0 && l < int(ct.fixCutoff) { - e.w.writen1(ct.bFixMin | byte(l)) + e.e.encWr.writen1(ct.bFixMin | byte(l)) } else if ct.b8 > 0 && l < 256 { - e.w.writen2(ct.b8, uint8(l)) + e.e.encWr.writen2(ct.b8, uint8(l)) } else if l < 65536 { - e.w.writen1(ct.b16) - bigenHelper{e.x[:2], e.w}.writeUint16(uint16(l)) + e.e.encWr.writen1(ct.b16) + bigenHelper{e.x[:2], e.e.w()}.writeUint16(uint16(l)) } else { - e.w.writen1(ct.b32) - bigenHelper{e.x[:4], e.w}.writeUint32(uint32(l)) + e.e.encWr.writen1(ct.b32) + bigenHelper{e.x[:4], e.e.w()}.writeUint32(uint32(l)) } } //--------------------------------------------- type msgpackDecDriver struct { - d *Decoder - r *decReaderSwitch + decDriverNoopContainerReader h *MsgpackHandle // b [scratchByteArrayLen]byte bd byte bdRead bool - br bool // bytes reader + fnil bool noBuiltInTypes - // noStreamingCodec - // decNoSeparator - decDriverNoopContainerReader - // _ [3]uint64 // padding + _ [6]uint64 // padding + d Decoder +} + +func (d *msgpackDecDriver) decoder() *Decoder { + return &d.d } // Note: This returns either a primitive (int, bool, etc) for non-containers, @@ -462,6 +451,7 @@ func (d *msgpackDecDriver) DecodeNaked() { if !d.bdRead { d.readNextBd() } + d.fnil = false bd := d.bd n := d.d.naked() var decodeFurther bool @@ -470,6 +460,7 @@ func (d *msgpackDecDriver) DecodeNaked() { case mpNil: n.v = valueTypeNil d.bdRead = false + d.fnil = true case mpFalse: n.v = valueTypeBool n.b = false @@ -479,36 +470,36 @@ func (d *msgpackDecDriver) DecodeNaked() { case mpFloat: n.v = valueTypeFloat - n.f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + n.f = float64(math.Float32frombits(bigen.Uint32(d.d.decRd.readx(4)))) case mpDouble: n.v = valueTypeFloat - n.f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + n.f = math.Float64frombits(bigen.Uint64(d.d.decRd.readx(8))) case mpUint8: n.v = valueTypeUint - n.u = uint64(d.r.readn1()) + n.u = uint64(d.d.decRd.readn1()) case mpUint16: n.v = valueTypeUint - n.u = uint64(bigen.Uint16(d.r.readx(2))) + n.u = uint64(bigen.Uint16(d.d.decRd.readx(2))) case mpUint32: n.v = valueTypeUint - n.u = uint64(bigen.Uint32(d.r.readx(4))) + n.u = uint64(bigen.Uint32(d.d.decRd.readx(4))) case mpUint64: n.v = valueTypeUint - n.u = uint64(bigen.Uint64(d.r.readx(8))) + n.u = uint64(bigen.Uint64(d.d.decRd.readx(8))) case mpInt8: n.v = valueTypeInt - n.i = int64(int8(d.r.readn1())) + n.i = int64(int8(d.d.decRd.readn1())) case mpInt16: n.v = valueTypeInt - n.i = int64(int16(bigen.Uint16(d.r.readx(2)))) + n.i = int64(int16(bigen.Uint16(d.d.decRd.readx(2)))) case mpInt32: n.v = valueTypeInt - n.i = int64(int32(bigen.Uint32(d.r.readx(4)))) + n.i = int64(int32(bigen.Uint32(d.d.decRd.readx(4)))) case mpInt64: n.v = valueTypeInt - n.i = int64(int64(bigen.Uint64(d.r.readx(8)))) + n.i = int64(int64(bigen.Uint64(d.d.decRd.readx(8)))) default: switch { @@ -521,15 +512,15 @@ func (d *msgpackDecDriver) DecodeNaked() { n.v = valueTypeInt n.i = int64(int8(bd)) case bd == mpStr8, bd == mpStr16, bd == mpStr32, bd >= mpFixStrMin && bd <= mpFixStrMax: - if d.h.WriteExt { + if d.h.WriteExt || d.h.RawToString { n.v = valueTypeString - n.s = d.DecodeString() + n.s = string(d.DecodeStringAsBytes()) } else { n.v = valueTypeBytes n.l = d.DecodeBytes(nil, false) } case bd == mpBin8, bd == mpBin16, bd == mpBin32: - decNakedReadRawBytes(d, d.d, n, d.h.RawToString) + decNakedReadRawBytes(d, &d.d, n, d.h.RawToString) case bd == mpArray16, bd == mpArray32, bd >= mpFixArrayMin && bd <= mpFixArrayMax: n.v = valueTypeArray decodeFurther = true @@ -539,14 +530,14 @@ func (d *msgpackDecDriver) DecodeNaked() { case bd >= mpFixExt1 && bd <= mpFixExt16, bd >= mpExt8 && bd <= mpExt32: n.v = valueTypeExt clen := d.readExtLen() - n.u = uint64(d.r.readn1()) + n.u = uint64(d.d.decRd.readn1()) if n.u == uint64(mpTimeExtTagU) { n.v = valueTypeTime n.t = d.decodeTime(clen) - } else if d.br { - n.l = d.r.readx(uint(clen)) + } else if d.d.bytes { + n.l = d.d.decRd.readx(uint(clen)) } else { - n.l = decByteSlice(d.r, clen, d.d.h.MaxInitLen, d.d.b[:]) + n.l = decByteSlice(d.d.r(), clen, d.d.h.MaxInitLen, d.d.b[:]) } default: d.d.errorf("cannot infer value: %s: Ox%x/%d/%s", msgBadDesc, bd, bd, mpdesc(bd)) @@ -563,26 +554,26 @@ func (d *msgpackDecDriver) DecodeNaked() { // int can be decoded from msgpack type: intXXX or uintXXX func (d *msgpackDecDriver) DecodeInt64() (i int64) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return } switch d.bd { case mpUint8: - i = int64(uint64(d.r.readn1())) + i = int64(uint64(d.d.decRd.readn1())) case mpUint16: - i = int64(uint64(bigen.Uint16(d.r.readx(2)))) + i = int64(uint64(bigen.Uint16(d.d.decRd.readx(2)))) case mpUint32: - i = int64(uint64(bigen.Uint32(d.r.readx(4)))) + i = int64(uint64(bigen.Uint32(d.d.decRd.readx(4)))) case mpUint64: - i = int64(bigen.Uint64(d.r.readx(8))) + i = int64(bigen.Uint64(d.d.decRd.readx(8))) case mpInt8: - i = int64(int8(d.r.readn1())) + i = int64(int8(d.d.decRd.readn1())) case mpInt16: - i = int64(int16(bigen.Uint16(d.r.readx(2)))) + i = int64(int16(bigen.Uint16(d.d.decRd.readx(2)))) case mpInt32: - i = int64(int32(bigen.Uint32(d.r.readx(4)))) + i = int64(int32(bigen.Uint32(d.d.decRd.readx(4)))) case mpInt64: - i = int64(bigen.Uint64(d.r.readx(8))) + i = int64(bigen.Uint64(d.d.decRd.readx(8))) default: switch { case d.bd >= mpPosFixNumMin && d.bd <= mpPosFixNumMax: @@ -600,41 +591,41 @@ func (d *msgpackDecDriver) DecodeInt64() (i int64) { // uint can be decoded from msgpack type: intXXX or uintXXX func (d *msgpackDecDriver) DecodeUint64() (ui uint64) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return } switch d.bd { case mpUint8: - ui = uint64(d.r.readn1()) + ui = uint64(d.d.decRd.readn1()) case mpUint16: - ui = uint64(bigen.Uint16(d.r.readx(2))) + ui = uint64(bigen.Uint16(d.d.decRd.readx(2))) case mpUint32: - ui = uint64(bigen.Uint32(d.r.readx(4))) + ui = uint64(bigen.Uint32(d.d.decRd.readx(4))) case mpUint64: - ui = bigen.Uint64(d.r.readx(8)) + ui = bigen.Uint64(d.d.decRd.readx(8)) case mpInt8: - if i := int64(int8(d.r.readn1())); i >= 0 { + if i := int64(int8(d.d.decRd.readn1())); i >= 0 { ui = uint64(i) } else { d.d.errorf("assigning negative signed value: %v, to unsigned type", i) return } case mpInt16: - if i := int64(int16(bigen.Uint16(d.r.readx(2)))); i >= 0 { + if i := int64(int16(bigen.Uint16(d.d.decRd.readx(2)))); i >= 0 { ui = uint64(i) } else { d.d.errorf("assigning negative signed value: %v, to unsigned type", i) return } case mpInt32: - if i := int64(int32(bigen.Uint32(d.r.readx(4)))); i >= 0 { + if i := int64(int32(bigen.Uint32(d.d.decRd.readx(4)))); i >= 0 { ui = uint64(i) } else { d.d.errorf("assigning negative signed value: %v, to unsigned type", i) return } case mpInt64: - if i := int64(bigen.Uint64(d.r.readx(8))); i >= 0 { + if i := int64(bigen.Uint64(d.d.decRd.readx(8))); i >= 0 { ui = uint64(i) } else { d.d.errorf("assigning negative signed value: %v, to unsigned type", i) @@ -658,13 +649,13 @@ func (d *msgpackDecDriver) DecodeUint64() (ui uint64) { // float can either be decoded from msgpack type: float, double or intX func (d *msgpackDecDriver) DecodeFloat64() (f float64) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return } if d.bd == mpFloat { - f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + f = float64(math.Float32frombits(bigen.Uint32(d.d.decRd.readx(4)))) } else if d.bd == mpDouble { - f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + f = math.Float64frombits(bigen.Uint64(d.d.decRd.readx(8))) } else { f = float64(d.DecodeInt64()) } @@ -674,8 +665,8 @@ func (d *msgpackDecDriver) DecodeFloat64() (f float64) { // bool can be decoded from bool, fixnum 0 or 1. func (d *msgpackDecDriver) DecodeBool() (b bool) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return } if d.bd == mpFalse || d.bd == 0 { // b = false @@ -690,26 +681,30 @@ func (d *msgpackDecDriver) DecodeBool() (b bool) { } func (d *msgpackDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return } bd := d.bd var clen int - if bd == mpNil { - d.bdRead = false - return - } else if bd == mpBin8 || bd == mpBin16 || bd == mpBin32 { + if bd == mpBin8 || bd == mpBin16 || bd == mpBin32 { clen = d.readContainerLen(msgpackContainerBin) // binary - } else if bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax) { + } else if bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || + (bd >= mpFixStrMin && bd <= mpFixStrMax) { clen = d.readContainerLen(msgpackContainerStr) // string/raw - } else if bd == mpArray16 || bd == mpArray32 || (bd >= mpFixArrayMin && bd <= mpFixArrayMax) { + } else if bd == mpArray16 || bd == mpArray32 || + (bd >= mpFixArrayMin && bd <= mpFixArrayMax) { // check if an "array" of uint8's if zerocopy && len(bs) == 0 { bs = d.d.b[:] } - bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) - return + // bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) + slen := d.ReadArrayStart() + bs = usableByteSlice(bs, slen) + for i := 0; i < len(bs); i++ { + bs[i] = uint8(chkOvf.UintV(d.DecodeUint64(), 8)) + } + return bs } else { d.d.errorf("invalid byte descriptor for decoding bytes, got: 0x%x", d.bd) return @@ -717,17 +712,13 @@ func (d *msgpackDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) d.bdRead = false if zerocopy { - if d.br { - return d.r.readx(uint(clen)) + if d.d.bytes { + return d.d.decRd.readx(uint(clen)) } else if len(bs) == 0 { bs = d.d.b[:] } } - return decByteSlice(d.r, clen, d.h.MaxInitLen, bs) -} - -func (d *msgpackDecDriver) DecodeString() (s string) { - return string(d.DecodeBytes(d.d.b[:], true)) + return decByteSlice(d.d.r(), clen, d.h.MaxInitLen, bs) } func (d *msgpackDecDriver) DecodeStringAsBytes() (s []byte) { @@ -735,15 +726,32 @@ func (d *msgpackDecDriver) DecodeStringAsBytes() (s []byte) { } func (d *msgpackDecDriver) readNextBd() { - d.bd = d.r.readn1() + d.bd = d.d.decRd.readn1() d.bdRead = true } func (d *msgpackDecDriver) uncacheRead() { if d.bdRead { - d.r.unreadn1() + d.d.decRd.unreadn1() + d.bdRead = false + } +} + +func (d *msgpackDecDriver) advanceNil() (null bool) { + d.fnil = false + if !d.bdRead { + d.readNextBd() + } + if d.bd == mpNil { d.bdRead = false + d.fnil = true + null = true } + return +} + +func (d *msgpackDecDriver) Nil() bool { + return d.fnil } func (d *msgpackDecDriver) ContainerType() (vt valueType) { @@ -751,23 +759,16 @@ func (d *msgpackDecDriver) ContainerType() (vt valueType) { d.readNextBd() } bd := d.bd - // if bd == mpNil { - // // nil - // } else if bd == mpBin8 || bd == mpBin16 || bd == mpBin32 { - // // binary - // } else if bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax) { - // // string/raw - // } else if bd == mpArray16 || bd == mpArray32 || (bd >= mpFixArrayMin && bd <= mpFixArrayMax) { - // // array - // } else if bd == mpMap16 || bd == mpMap32 || (bd >= mpFixMapMin && bd <= mpFixMapMax) { - // // map - // } + d.fnil = false if bd == mpNil { + d.bdRead = false + d.fnil = true return valueTypeNil } else if bd == mpBin8 || bd == mpBin16 || bd == mpBin32 { return valueTypeBytes - } else if bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax) { - if d.h.WriteExt { // UTF-8 string (new spec) + } else if bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || + (bd >= mpFixStrMin && bd <= mpFixStrMax) { + if d.h.WriteExt || d.h.RawToString { // UTF-8 string (new spec) return valueTypeString } return valueTypeBytes // raw (old spec) @@ -776,33 +777,21 @@ func (d *msgpackDecDriver) ContainerType() (vt valueType) { } else if bd == mpMap16 || bd == mpMap32 || (bd >= mpFixMapMin && bd <= mpFixMapMax) { return valueTypeMap } - // else { - // d.d.errorf("isContainerType: unsupported parameter: %v", vt) - // } return valueTypeUnset } -func (d *msgpackDecDriver) TryDecodeAsNil() (v bool) { - if !d.bdRead { - d.readNextBd() - } - if d.bd == mpNil { - d.bdRead = false - return true - } - return +func (d *msgpackDecDriver) TryNil() (v bool) { + return d.advanceNil() } func (d *msgpackDecDriver) readContainerLen(ct msgpackContainerType) (clen int) { bd := d.bd - if bd == mpNil { - clen = -1 // to represent nil - } else if bd == ct.b8 { - clen = int(d.r.readn1()) + if bd == ct.b8 { + clen = int(d.d.decRd.readn1()) } else if bd == ct.b16 { - clen = int(bigen.Uint16(d.r.readx(2))) + clen = int(bigen.Uint16(d.d.decRd.readx(2))) } else if bd == ct.b32 { - clen = int(bigen.Uint32(d.r.readx(4))) + clen = int(bigen.Uint32(d.d.decRd.readx(4))) } else if (ct.bFixMin & bd) == ct.bFixMin { clen = int(ct.bFixMin ^ bd) } else { @@ -814,23 +803,21 @@ func (d *msgpackDecDriver) readContainerLen(ct msgpackContainerType) (clen int) } func (d *msgpackDecDriver) ReadMapStart() int { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return decContainerLenNil } return d.readContainerLen(msgpackContainerMap) } func (d *msgpackDecDriver) ReadArrayStart() int { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return decContainerLenNil } return d.readContainerLen(msgpackContainerList) } func (d *msgpackDecDriver) readExtLen() (clen int) { switch d.bd { - case mpNil: - clen = -1 // to represent nil case mpFixExt1: clen = 1 case mpFixExt2: @@ -842,11 +829,11 @@ func (d *msgpackDecDriver) readExtLen() (clen int) { case mpFixExt16: clen = 16 case mpExt8: - clen = int(d.r.readn1()) + clen = int(d.d.decRd.readn1()) case mpExt16: - clen = int(bigen.Uint16(d.r.readx(2))) + clen = int(bigen.Uint16(d.d.decRd.readx(2))) case mpExt32: - clen = int(bigen.Uint32(d.r.readx(4))) + clen = int(bigen.Uint32(d.d.decRd.readx(4))) default: d.d.errorf("decoding ext bytes: found unexpected byte: %x", d.bd) return @@ -856,27 +843,25 @@ func (d *msgpackDecDriver) readExtLen() (clen int) { func (d *msgpackDecDriver) DecodeTime() (t time.Time) { // decode time from string bytes or ext - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return } bd := d.bd var clen int - if bd == mpNil { - d.bdRead = false - return - } else if bd == mpBin8 || bd == mpBin16 || bd == mpBin32 { + if bd == mpBin8 || bd == mpBin16 || bd == mpBin32 { clen = d.readContainerLen(msgpackContainerBin) // binary - } else if bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax) { + } else if bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || + (bd >= mpFixStrMin && bd <= mpFixStrMax) { clen = d.readContainerLen(msgpackContainerStr) // string/raw } else { // expect to see mpFixExt4,-1 OR mpFixExt8,-1 OR mpExt8,12,-1 d.bdRead = false - b2 := d.r.readn1() + b2 := d.d.decRd.readn1() if d.bd == mpFixExt4 && b2 == mpTimeExtTagU { clen = 4 } else if d.bd == mpFixExt8 && b2 == mpTimeExtTagU { clen = 8 - } else if d.bd == mpExt8 && b2 == 12 && d.r.readn1() == mpTimeExtTagU { + } else if d.bd == mpExt8 && b2 == 12 && d.d.decRd.readn1() == mpTimeExtTagU { clen = 12 } else { d.d.errorf("invalid stream for decoding time as extension: got 0x%x, 0x%x", d.bd, b2) @@ -887,17 +872,17 @@ func (d *msgpackDecDriver) DecodeTime() (t time.Time) { } func (d *msgpackDecDriver) decodeTime(clen int) (t time.Time) { - // bs = d.r.readx(clen) + // bs = d.d.decRd.readx(clen) d.bdRead = false switch clen { case 4: - t = time.Unix(int64(bigen.Uint32(d.r.readx(4))), 0).UTC() + t = time.Unix(int64(bigen.Uint32(d.d.decRd.readx(4))), 0).UTC() case 8: - tv := bigen.Uint64(d.r.readx(8)) + tv := bigen.Uint64(d.d.decRd.readx(8)) t = time.Unix(int64(tv&0x00000003ffffffff), int64(tv>>34)).UTC() case 12: - nsec := bigen.Uint32(d.r.readx(4)) - sec := bigen.Uint64(d.r.readx(8)) + nsec := bigen.Uint32(d.d.decRd.readx(4)) + sec := bigen.Uint64(d.d.decRd.readx(8)) t = time.Unix(int64(sec), int64(nsec)).UTC() default: d.d.errorf("invalid length of bytes for decoding time - expecting 4 or 8 or 12, got %d", clen) @@ -906,27 +891,28 @@ func (d *msgpackDecDriver) decodeTime(clen int) (t time.Time) { return } -func (d *msgpackDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { +func (d *msgpackDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) { if xtag > 0xff { d.d.errorf("ext: tag must be <= 0xff; got: %v", xtag) return } + if d.advanceNil() { + return + } realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag)) - realxtag = uint64(realxtag1) + realxtag := uint64(realxtag1) if ext == nil { re := rv.(*RawExt) re.Tag = realxtag - re.Data = detachZeroCopyBytes(d.br, re.Data, xbs) + re.Data = detachZeroCopyBytes(d.d.bytes, re.Data, xbs) + } else if ext == SelfExt { + d.d.sideDecode(rv, xbs) } else { ext.ReadExt(rv, xbs) } - return } func (d *msgpackDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) { - if !d.bdRead { - d.readNextBd() - } xbd := d.bd if xbd == mpBin8 || xbd == mpBin16 || xbd == mpBin32 { xbs = d.DecodeBytes(nil, true) @@ -935,15 +921,15 @@ func (d *msgpackDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs xbs = d.DecodeStringAsBytes() } else { clen := d.readExtLen() - xtag = d.r.readn1() + xtag = d.d.decRd.readn1() if verifyTag && xtag != tag { d.d.errorf("wrong extension tag - got %b, expecting %v", xtag, tag) return } - if d.br { - xbs = d.r.readx(uint(clen)) + if d.d.bytes { + xbs = d.d.decRd.readx(uint(clen)) } else { - xbs = decByteSlice(d.r, clen, d.d.h.MaxInitLen, d.d.b[:]) + xbs = decByteSlice(d.d.r(), clen, d.d.h.MaxInitLen, d.d.b[:]) } } d.bdRead = false @@ -954,6 +940,7 @@ func (d *msgpackDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs //MsgpackHandle is a Handle for the Msgpack Schema-Free Encoding Format. type MsgpackHandle struct { + binaryEncodingType BasicHandle // NoFixedNum says to output all signed integers as 2-bytes, never as 1-byte fixednum. @@ -976,35 +963,34 @@ type MsgpackHandle struct { // PositiveIntUnsigned says to encode positive integers as unsigned. PositiveIntUnsigned bool - binaryEncodingType - noElemSeparators - - // _ [1]uint64 // padding + _ [7]uint64 // padding (cache-aligned) } // Name returns the name of the handle: msgpack func (h *MsgpackHandle) Name() string { return "msgpack" } -// SetBytesExt sets an extension -func (h *MsgpackHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { - return h.SetExt(rt, tag, &extWrapper{ext, interfaceExtFailer{}}) +func (h *MsgpackHandle) newEncDriver() encDriver { + var e = &msgpackEncDriver{h: h} + e.e.e = e + e.e.init(h) + e.reset() + return e } -func (h *MsgpackHandle) newEncDriver(e *Encoder) encDriver { - return &msgpackEncDriver{e: e, w: e.w, h: h} -} - -func (h *MsgpackHandle) newDecDriver(d *Decoder) decDriver { - return &msgpackDecDriver{d: d, h: h, r: d.r, br: d.bytes} +func (h *MsgpackHandle) newDecDriver() decDriver { + d := &msgpackDecDriver{h: h} + d.d.d = d + d.d.init(h) + d.reset() + return d } func (e *msgpackEncDriver) reset() { - e.w = e.e.w } func (d *msgpackDecDriver) reset() { - d.r, d.br = d.d.r, d.d.bytes d.bd, d.bdRead = 0, false + d.fnil = false } //-------------------------------------------------- @@ -1065,11 +1051,7 @@ func (c *msgpackSpecRpcCodec) parseCustomHeader(expectTypeByte byte, msgid *uint // so that the body can be decoded on its own from the stream at a later time. const fia byte = 0x94 //four item array descriptor value - // Not sure why the panic of EOF is swallowed above. - // if bs1 := c.dec.r.readn1(); bs1 != fia { - // err = fmt.Errorf("Unexpected value for array descriptor: Expecting %v. Received %v", fia, bs1) - // return - // } + var ba [1]byte var n int for { diff --git a/vendor/github.com/ugorji/go/codec/prebuild.go b/vendor/github.com/ugorji/go/codec/prebuild.go new file mode 100644 index 00000000..7771057e --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/prebuild.go @@ -0,0 +1,136 @@ +// +build prebuild + +package main + +// prebuild.go generates sort implementations for +// various slice types and combination slice+reflect.Value types. +// +// The combination slice+reflect.Value types are used +// during canonical encode, and the others are used during fast-path +// encoding of map keys. + +import ( + "bytes" + "go/format" + "io/ioutil" + "os" + "strings" + "text/template" +) + +// genInternalSortableTypes returns the types +// that are used for fast-path canonical's encoding of maps. +// +// For now, we only support the highest sizes for +// int64, uint64, float64, bool, string, bytes. +func genInternalSortableTypes() []string { + return []string{ + "string", + // "float32", + "float64", + // "uint", + // "uint8", + // "uint16", + // "uint32", + "uint64", + "uintptr", + // "int", + // "int8", + // "int16", + // "int32", + "int64", + "bool", + "time", + "bytes", + } +} + +// genInternalSortablePlusTypes returns the types +// that are used for reflection-based canonical's encoding of maps. +// +// For now, we only support the highest sizes for +// int64, uint64, float64, bool, string, bytes. +func genInternalSortablePlusTypes() []string { + return []string{ + "string", + "float64", + "uint64", + "uintptr", + "int64", + "bool", + "time", + "bytes", + } +} + +func genTypeForShortName(s string) string { + switch s { + case "time": + return "time.Time" + case "bytes": + return "[]byte" + } + return s +} + +func genArgs(args ...interface{}) map[string]interface{} { + m := make(map[string]interface{}, len(args)/2) + for i := 0; i < len(args); { + m[args[i].(string)] = args[i+1] + i += 2 + } + return m +} + +func genEndsWith(s0 string, sn ...string) bool { + for _, s := range sn { + if strings.HasSuffix(s0, s) { + return true + } + } + return false +} + +func chkerr(err error) { + if err != nil { + panic(err) + } +} + +func run(fnameIn, fnameOut string) { + var err error + + funcs := make(template.FuncMap) + funcs["sortables"] = genInternalSortableTypes + funcs["sortablesplus"] = genInternalSortablePlusTypes + funcs["tshort"] = genTypeForShortName + funcs["endswith"] = genEndsWith + funcs["args"] = genArgs + + t := template.New("").Funcs(funcs) + fin, err := os.Open(fnameIn) + chkerr(err) + defer fin.Close() + fout, err := os.Create(fnameOut) + chkerr(err) + defer fout.Close() + tmplstr, err := ioutil.ReadAll(fin) + chkerr(err) + t, err = t.Parse(string(tmplstr)) + chkerr(err) + var out bytes.Buffer + err = t.Execute(&out, 0) + chkerr(err) + bout, err := format.Source(out.Bytes()) + if err != nil { + fout.Write(out.Bytes()) // write out if error, so we can still see. + } + chkerr(err) + // write out if error, as much as possible, so we can still see. + _, err = fout.Write(bout) + chkerr(err) +} + +func main() { + run("sort-slice.go.tmpl", "sort-slice.generated.go") +} diff --git a/vendor/github.com/ugorji/go/codec/reader.go b/vendor/github.com/ugorji/go/codec/reader.go new file mode 100644 index 00000000..1c3fe88e --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/reader.go @@ -0,0 +1,1017 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import "io" + +// decReader abstracts the reading source, allowing implementations that can +// read from an io.Reader or directly off a byte slice with zero-copying. +type decReader interface { + unreadn1() + // readx will use the implementation scratch buffer if possible i.e. n < len(scratchbuf), OR + // just return a view of the []byte being decoded from. + // Ensure you call detachZeroCopyBytes later if this needs to be sent outside codec control. + readx(n uint) []byte + readb([]byte) + readn1() uint8 + // read up to 7 bytes at a time + readn(num uint8) (v [rwNLen]byte) + numread() uint // number of bytes read + track() + stopTrack() []byte + + // skip will skip any byte that matches, and return the first non-matching byte + skip(accept *bitset256) (token byte) + // readTo will read any byte that matches, stopping once no-longer matching. + readTo(accept *bitset256) (out []byte) + // readUntil will read, only stopping once it matches the 'stop' byte. + readUntil(stop byte, includeLast bool) (out []byte) +} + +// ------------------------------------------------ + +type unreadByteStatus uint8 + +// unreadByteStatus goes from +// undefined (when initialized) -- (read) --> canUnread -- (unread) --> canRead ... +const ( + unreadByteUndefined unreadByteStatus = iota + unreadByteCanRead + unreadByteCanUnread +) + +// -------------------- + +type ioDecReaderCommon struct { + r io.Reader // the reader passed in + + n uint // num read + + l byte // last byte + ls unreadByteStatus // last byte status + trb bool // tracking bytes turned on + _ bool + b [4]byte // tiny buffer for reading single bytes + + blist *bytesFreelist + + tr []byte // buffer for tracking bytes + bufr []byte // buffer for readTo/readUntil +} + +func (z *ioDecReaderCommon) last() byte { + return z.l +} + +func (z *ioDecReaderCommon) reset(r io.Reader, blist *bytesFreelist) { + z.blist = blist + z.r = r + z.ls = unreadByteUndefined + z.l, z.n = 0, 0 + z.trb = false +} + +func (z *ioDecReaderCommon) numread() uint { + return z.n +} + +func (z *ioDecReaderCommon) track() { + z.tr = z.blist.check(z.tr, 256)[:0] + z.trb = true +} + +func (z *ioDecReaderCommon) stopTrack() (bs []byte) { + z.trb = false + return z.tr +} + +// ------------------------------------------ + +// ioDecReader is a decReader that reads off an io.Reader. +// +// It also has a fallback implementation of ByteScanner if needed. +type ioDecReader struct { + ioDecReaderCommon + + // rr io.Reader + br io.ByteScanner + + x [64 + 16]byte // for: get struct field name, swallow valueTypeBytes, etc + // _ [1]uint64 // padding +} + +func (z *ioDecReader) reset(r io.Reader, blist *bytesFreelist) { + z.ioDecReaderCommon.reset(r, blist) + + z.br, _ = r.(io.ByteScanner) +} + +func (z *ioDecReader) Read(p []byte) (n int, err error) { + if len(p) == 0 { + return + } + var firstByte bool + if z.ls == unreadByteCanRead { + z.ls = unreadByteCanUnread + p[0] = z.l + if len(p) == 1 { + n = 1 + return + } + firstByte = true + p = p[1:] + } + n, err = z.r.Read(p) + if n > 0 { + if err == io.EOF && n == len(p) { + err = nil // read was successful, so postpone EOF (till next time) + } + z.l = p[n-1] + z.ls = unreadByteCanUnread + } + if firstByte { + n++ + } + return +} + +func (z *ioDecReader) ReadByte() (c byte, err error) { + if z.br != nil { + c, err = z.br.ReadByte() + if err == nil { + z.l = c + z.ls = unreadByteCanUnread + } + return + } + + n, err := z.Read(z.b[:1]) + if n == 1 { + c = z.b[0] + if err == io.EOF { + err = nil // read was successful, so postpone EOF (till next time) + } + } + return +} + +func (z *ioDecReader) UnreadByte() (err error) { + if z.br != nil { + err = z.br.UnreadByte() + if err == nil { + z.ls = unreadByteCanRead + } + return + } + + switch z.ls { + case unreadByteCanUnread: + z.ls = unreadByteCanRead + case unreadByteCanRead: + err = errDecUnreadByteLastByteNotRead + case unreadByteUndefined: + err = errDecUnreadByteNothingToRead + default: + err = errDecUnreadByteUnknown + } + return +} + +func (z *ioDecReader) readn(num uint8) (bs [rwNLen]byte) { + z.readb(bs[:num]) + // copy(bs[:], z.readx(uint(num))) + return +} + +func (z *ioDecReader) readx(n uint) (bs []byte) { + if n == 0 { + return + } + if n < uint(len(z.x)) { + bs = z.x[:n] + } else { + bs = make([]byte, n) + } + if _, err := decReadFull(z.r, bs); err != nil { + panic(err) + } + z.n += uint(len(bs)) + if z.trb { + z.tr = append(z.tr, bs...) + } + return +} + +func (z *ioDecReader) readb(bs []byte) { + if len(bs) == 0 { + return + } + if _, err := decReadFull(z.r, bs); err != nil { + panic(err) + } + z.n += uint(len(bs)) + if z.trb { + z.tr = append(z.tr, bs...) + } +} + +func (z *ioDecReader) readn1eof() (b uint8, eof bool) { + b, err := z.ReadByte() + if err == nil { + z.n++ + if z.trb { + z.tr = append(z.tr, b) + } + } else if err == io.EOF { + eof = true + } else { + panic(err) + } + return +} + +func (z *ioDecReader) readn1() (b uint8) { + b, err := z.ReadByte() + if err == nil { + z.n++ + if z.trb { + z.tr = append(z.tr, b) + } + return + } + panic(err) +} + +func (z *ioDecReader) skip(accept *bitset256) (token byte) { + var eof bool +LOOP: + token, eof = z.readn1eof() + if eof { + return + } + if accept.isset(token) { + goto LOOP + } + return +} + +func (z *ioDecReader) readTo(accept *bitset256) []byte { + z.bufr = z.blist.check(z.bufr, 256)[:0] +LOOP: + token, eof := z.readn1eof() + if eof { + return z.bufr + } + if accept.isset(token) { + z.bufr = append(z.bufr, token) + goto LOOP + } + z.unreadn1() + return z.bufr +} + +func (z *ioDecReader) readUntil(stop byte, includeLast bool) []byte { + z.bufr = z.blist.check(z.bufr, 256)[:0] +LOOP: + token, eof := z.readn1eof() + if eof { + panic(io.EOF) + } + z.bufr = append(z.bufr, token) + if token == stop { + if includeLast { + return z.bufr + } + return z.bufr[:len(z.bufr)-1] + } + goto LOOP +} + +//go:noinline +func (z *ioDecReader) unreadn1() { + err := z.UnreadByte() + if err != nil { + panic(err) + } + z.n-- + if z.trb { + if l := len(z.tr) - 1; l >= 0 { + z.tr = z.tr[:l] + } + } +} + +// ------------------------------------ + +type bufioDecReader struct { + ioDecReaderCommon + + c uint // cursor + buf []byte +} + +func (z *bufioDecReader) reset(r io.Reader, bufsize int, blist *bytesFreelist) { + z.ioDecReaderCommon.reset(r, blist) + z.c = 0 + if cap(z.buf) < bufsize { + z.buf = blist.get(bufsize) + } + z.buf = z.buf[:0] +} + +func (z *bufioDecReader) readb(p []byte) { + var n = uint(copy(p, z.buf[z.c:])) + z.n += n + z.c += n + if len(p) == int(n) { + if z.trb { + z.tr = append(z.tr, p...) + } + } else { + z.readbFill(p, n) + } +} + +func (z *bufioDecReader) readbFill(p0 []byte, n uint) { + // at this point, there's nothing in z.buf to read (z.buf is fully consumed) + p := p0[n:] + var n2 uint + var err error + if len(p) > cap(z.buf) { + n2, err = decReadFull(z.r, p) + if err != nil { + panic(err) + } + n += n2 + z.n += n2 + // always keep last byte in z.buf + z.buf = z.buf[:1] + z.buf[0] = p[len(p)-1] + z.c = 1 + if z.trb { + z.tr = append(z.tr, p0[:n]...) + } + return + } + // z.c is now 0, and len(p) <= cap(z.buf) +LOOP: + // for len(p) > 0 && z.err == nil { + if len(p) > 0 { + z.buf = z.buf[0:cap(z.buf)] + var n1 int + n1, err = z.r.Read(z.buf) + n2 = uint(n1) + if n2 == 0 && err != nil { + panic(err) + } + z.buf = z.buf[:n2] + n2 = uint(copy(p, z.buf)) + z.c = n2 + n += n2 + z.n += n2 + p = p[n2:] + goto LOOP + } + if z.c == 0 { + z.buf = z.buf[:1] + z.buf[0] = p[len(p)-1] + z.c = 1 + } + if z.trb { + z.tr = append(z.tr, p0[:n]...) + } +} + +func (z *bufioDecReader) last() byte { + return z.buf[z.c-1] +} + +func (z *bufioDecReader) readn1() (b byte) { + // fast-path, so we elide calling into Read() most of the time + if z.c < uint(len(z.buf)) { + b = z.buf[z.c] + z.c++ + z.n++ + if z.trb { + z.tr = append(z.tr, b) + } + } else { // meaning z.c == len(z.buf) or greater ... so need to fill + z.readbFill(z.b[:1], 0) + b = z.b[0] + } + return +} + +func (z *bufioDecReader) unreadn1() { + if z.c == 0 { + panic(errDecUnreadByteNothingToRead) + } + z.c-- + z.n-- + if z.trb { + z.tr = z.tr[:len(z.tr)-1] + } +} + +func (z *bufioDecReader) readn(num uint8) (bs [rwNLen]byte) { + z.readb(bs[:num]) + // copy(bs[:], z.readx(uint(num))) + return +} + +func (z *bufioDecReader) readx(n uint) (bs []byte) { + if n == 0 { + // return + } else if z.c+n <= uint(len(z.buf)) { + bs = z.buf[z.c : z.c+n] + z.n += n + z.c += n + if z.trb { + z.tr = append(z.tr, bs...) + } + } else { + bs = make([]byte, n) + // n no longer used - can reuse + n = uint(copy(bs, z.buf[z.c:])) + z.n += n + z.c += n + z.readbFill(bs, n) + } + return +} + +func (z *bufioDecReader) skip(accept *bitset256) (token byte) { + i := z.c +LOOP: + if i < uint(len(z.buf)) { + // inline z.skipLoopFn(i) and refactor, so cost is within inline budget + token = z.buf[i] + i++ + if accept.isset(token) { + goto LOOP + } + z.n += i - 2 - z.c + if z.trb { + z.tr = append(z.tr, z.buf[z.c:i]...) // z.doTrack(i) + } + z.c = i + return + } + return z.skipFill(accept) +} + +func (z *bufioDecReader) skipFill(accept *bitset256) (token byte) { + z.n += uint(len(z.buf)) - z.c + if z.trb { + z.tr = append(z.tr, z.buf[z.c:]...) + } + var i, n2 int + var err error + for { + z.c = 0 + z.buf = z.buf[0:cap(z.buf)] + n2, err = z.r.Read(z.buf) + if n2 == 0 && err != nil { + panic(err) + } + z.buf = z.buf[:n2] + for i, token = range z.buf { + // if !accept.isset(token) { + if accept.check(token) == 0 { + z.n += (uint(i) - z.c) - 1 + z.loopFn(uint(i + 1)) + return + } + } + z.n += uint(n2) + if z.trb { + z.tr = append(z.tr, z.buf...) + } + } +} + +func (z *bufioDecReader) loopFn(i uint) { + if z.trb { + z.tr = append(z.tr, z.buf[z.c:i]...) // z.doTrack(i) + } + z.c = i +} + +func (z *bufioDecReader) readTo(accept *bitset256) (out []byte) { + i := z.c +LOOP: + if i < uint(len(z.buf)) { + // if !accept.isset(z.buf[i]) { + if accept.check(z.buf[i]) == 0 { + // inline readToLoopFn here (for performance) + z.n += (i - z.c) - 1 + out = z.buf[z.c:i] + if z.trb { + z.tr = append(z.tr, z.buf[z.c:i]...) // z.doTrack(i) + } + z.c = i + return + } + i++ + goto LOOP + } + return z.readToFill(accept) +} + +func (z *bufioDecReader) readToFill(accept *bitset256) []byte { + z.bufr = z.blist.check(z.bufr, 256)[:0] + z.n += uint(len(z.buf)) - z.c + z.bufr = append(z.bufr, z.buf[z.c:]...) + if z.trb { + z.tr = append(z.tr, z.buf[z.c:]...) + } + var n2 int + var err error + for { + z.c = 0 + z.buf = z.buf[:cap(z.buf)] + n2, err = z.r.Read(z.buf) + if n2 == 0 && err != nil { + if err == io.EOF { + return z.bufr // readTo should read until it matches or end is reached + } + panic(err) + } + z.buf = z.buf[:n2] + for i, token := range z.buf { + // if !accept.isset(token) { + if accept.check(token) == 0 { + z.n += (uint(i) - z.c) - 1 + z.bufr = append(z.bufr, z.buf[z.c:i]...) + z.loopFn(uint(i)) + return z.bufr + } + } + z.bufr = append(z.bufr, z.buf...) + z.n += uint(n2) + if z.trb { + z.tr = append(z.tr, z.buf...) + } + } +} + +func (z *bufioDecReader) readUntil(stop byte, includeLast bool) (out []byte) { + i := z.c +LOOP: + if i < uint(len(z.buf)) { + if z.buf[i] == stop { + z.n += (i - z.c) - 1 + i++ + out = z.buf[z.c:i] + if z.trb { + z.tr = append(z.tr, z.buf[z.c:i]...) // z.doTrack(i) + } + z.c = i + goto FINISH + } + i++ + goto LOOP + } + out = z.readUntilFill(stop) +FINISH: + if includeLast { + return + } + return out[:len(out)-1] +} + +func (z *bufioDecReader) readUntilFill(stop byte) []byte { + z.bufr = z.blist.check(z.bufr, 256)[:0] + z.n += uint(len(z.buf)) - z.c + z.bufr = append(z.bufr, z.buf[z.c:]...) + if z.trb { + z.tr = append(z.tr, z.buf[z.c:]...) + } + for { + z.c = 0 + z.buf = z.buf[0:cap(z.buf)] + n1, err := z.r.Read(z.buf) + if n1 == 0 && err != nil { + panic(err) + } + n2 := uint(n1) + z.buf = z.buf[:n2] + for i, token := range z.buf { + if token == stop { + z.n += (uint(i) - z.c) - 1 + z.bufr = append(z.bufr, z.buf[z.c:i+1]...) + z.loopFn(uint(i + 1)) + return z.bufr + } + } + z.bufr = append(z.bufr, z.buf...) + z.n += n2 + if z.trb { + z.tr = append(z.tr, z.buf...) + } + } +} + +// ------------------------------------ + +// bytesDecReader is a decReader that reads off a byte slice with zero copying +type bytesDecReader struct { + b []byte // data + c uint // cursor + t uint // track start + // a int // available +} + +func (z *bytesDecReader) reset(in []byte) { + z.b = in + z.c = 0 + z.t = 0 +} + +func (z *bytesDecReader) numread() uint { + return z.c +} + +func (z *bytesDecReader) last() byte { + return z.b[z.c-1] +} + +func (z *bytesDecReader) unreadn1() { + if z.c == 0 || len(z.b) == 0 { + panic(errBytesDecReaderCannotUnread) + } + z.c-- +} + +func (z *bytesDecReader) readx(n uint) (bs []byte) { + // slicing from a non-constant start position is more expensive, + // as more computation is required to decipher the pointer start position. + // However, we do it only once, and it's better than reslicing both z.b and return value. + + z.c += n + return z.b[z.c-n : z.c] +} + +func (z *bytesDecReader) readb(bs []byte) { + copy(bs, z.readx(uint(len(bs)))) +} + +func (z *bytesDecReader) readn1() (v uint8) { + v = z.b[z.c] + z.c++ + return +} + +func (z *bytesDecReader) readn(num uint8) (bs [rwNLen]byte) { + // if z.c >= uint(len(z.b)) || z.c+uint(num) >= uint(len(z.b)) { + // panic(io.EOF) + // } + + // for bounds-check elimination, reslice z.b and ensure bs is within len + // bb := z.b[z.c:][:num] + bb := z.b[z.c : z.c+uint(num)] + _ = bs[len(bb)-1] + var i int +LOOP: + if i < len(bb) { + bs[i] = bb[i] + i++ + goto LOOP + } + + z.c += uint(num) + return +} + +func (z *bytesDecReader) skip(accept *bitset256) (token byte) { + i := z.c +LOOP: + // if i < uint(len(z.b)) { + token = z.b[i] + i++ + if accept.isset(token) { + goto LOOP + } + z.c = i + return +} + +func (z *bytesDecReader) readTo(accept *bitset256) (out []byte) { + i := z.c +LOOP: + if i < uint(len(z.b)) { + if accept.isset(z.b[i]) { + i++ + goto LOOP + } + } + + out = z.b[z.c:i] + z.c = i + return // z.b[c:i] +} + +func (z *bytesDecReader) readUntil(stop byte, includeLast bool) (out []byte) { + i := z.c +LOOP: + // if i < uint(len(z.b)) { + if z.b[i] == stop { + i++ + if includeLast { + out = z.b[z.c:i] + } else { + out = z.b[z.c : i-1] + } + // z.a -= (i - z.c) + z.c = i + return + } + i++ + goto LOOP + // } + // panic(io.EOF) +} + +func (z *bytesDecReader) track() { + z.t = z.c +} + +func (z *bytesDecReader) stopTrack() (bs []byte) { + return z.b[z.t:z.c] +} + +// -------------- + +type decRd struct { + mtr bool // is maptype a known type? + str bool // is slicetype a known type? + + be bool // is binary encoding + js bool // is json handle + jsms bool // is json handle, and MapKeyAsString + cbor bool // is cbor handle + + bytes bool // is bytes reader + bufio bool // is this a bufioDecReader? + + rb bytesDecReader + ri *ioDecReader + bi *bufioDecReader +} + +// numread, track and stopTrack are always inlined, as they just check int fields, etc. + +// the if/else-if/else block is expensive to inline. +// Each node of this construct costs a lot and dominates the budget. +// Best to only do an if fast-path else block (so fast-path is inlined). +// This is irrespective of inlineExtraCallCost set in $GOROOT/src/cmd/compile/internal/gc/inl.go +// +// In decRd methods below, we delegate all IO functions into their own methods. +// This allows for the inlining of the common path when z.bytes=true. +// Go 1.12+ supports inlining methods with up to 1 inlined function (or 2 if no other constructs). +// +// However, up through Go 1.13, decRd's readXXX, skip and unreadXXX methods are not inlined. +// Consequently, there is no benefit to do the xxxIO methods for decRd at this time. +// Instead, we have a if/else-if/else block so that IO calls do not have to jump through +// a second unnecessary function call. +// +// If golang inlining gets better and bytesDecReader methods can be inlined, +// then we can revert to using these 2 functions so the bytesDecReader +// methods are inlined and the IO paths call out to a function. + +func (z *decRd) numread() uint { + if z.bytes { + return z.rb.numread() + } else if z.bufio { + return z.bi.numread() + } else { + return z.ri.numread() + } +} +func (z *decRd) stopTrack() []byte { + if z.bytes { + return z.rb.stopTrack() + } else if z.bufio { + return z.bi.stopTrack() + } else { + return z.ri.stopTrack() + } +} + +func (z *decRd) track() { + if z.bytes { + z.rb.track() + } else if z.bufio { + z.bi.track() + } else { + z.ri.track() + } +} + +func (z *decRd) unreadn1() { + if z.bytes { + z.rb.unreadn1() + } else if z.bufio { + z.bi.unreadn1() + } else { + z.ri.unreadn1() // not inlined + } +} + +func (z *decRd) readn(num uint8) [rwNLen]byte { + if z.bytes { + return z.rb.readn(num) + } else if z.bufio { + return z.bi.readn(num) + } else { + return z.ri.readn(num) + } +} + +func (z *decRd) readx(n uint) []byte { + if z.bytes { + return z.rb.readx(n) + } else if z.bufio { + return z.bi.readx(n) + } else { + return z.ri.readx(n) + } +} + +func (z *decRd) readb(s []byte) { + if z.bytes { + z.rb.readb(s) + } else if z.bufio { + z.bi.readb(s) + } else { + z.ri.readb(s) + } +} + +func (z *decRd) readn1() uint8 { + if z.bytes { + return z.rb.readn1() + } else if z.bufio { + return z.bi.readn1() + } else { + return z.ri.readn1() + } +} + +func (z *decRd) skip(accept *bitset256) (token byte) { + if z.bytes { + return z.rb.skip(accept) + } else if z.bufio { + return z.bi.skip(accept) + } else { + return z.ri.skip(accept) + } +} + +func (z *decRd) readTo(accept *bitset256) (out []byte) { + if z.bytes { + return z.rb.readTo(accept) + } else if z.bufio { + return z.bi.readTo(accept) + } else { + return z.ri.readTo(accept) + } +} + +func (z *decRd) readUntil(stop byte, includeLast bool) (out []byte) { + if z.bytes { + return z.rb.readUntil(stop, includeLast) + } else if z.bufio { + return z.bi.readUntil(stop, includeLast) + } else { + return z.ri.readUntil(stop, includeLast) + } +} + +/* +func (z *decRd) track() { + if z.bytes { + z.rb.track() + } else { + z.trackIO() + } +} +func (z *decRd) trackIO() { + if z.bufio { + z.bi.track() + } else { + z.ri.track() + } +} + +func (z *decRd) unreadn1() { + if z.bytes { + z.rb.unreadn1() + } else { + z.unreadn1IO() + } +} +func (z *decRd) unreadn1IO() { + if z.bufio { + z.bi.unreadn1() + } else { + z.ri.unreadn1() + } +} + +func (z *decRd) readn(num uint8) [rwNLen]byte { + if z.bytes { + return z.rb.readn(num) + } + return z.readnIO(num) +} +func (z *decRd) readnIO(num uint8) [rwNLen]byte { + if z.bufio { + return z.bi.readn(num) + } + return z.ri.readn(num) +} + +func (z *decRd) readx(n uint) []byte { + if z.bytes { + return z.rb.readx(n) + } + return z.readxIO(n) +} +func (z *decRd) readxIO(n uint) []byte { + if z.bufio { + return z.bi.readx(n) + } + return z.ri.readx(n) +} + +func (z *decRd) readb(s []byte) { + if z.bytes { + z.rb.readb(s) + } else { + z.readbIO(s) + } +} +func (z *decRd) readbIO(s []byte) { + if z.bufio { + z.bi.readb(s) + } else { + z.ri.readb(s) + } +} + +func (z *decRd) readn1() uint8 { + if z.bytes { + return z.rb.readn1() + } + return z.readn1IO() +} +func (z *decRd) readn1IO() uint8 { + if z.bufio { + return z.bi.readn1() + } + return z.ri.readn1() +} + +func (z *decRd) skip(accept *bitset256) (token byte) { + if z.bytes { + return z.rb.skip(accept) + } + return z.skipIO(accept) +} +func (z *decRd) skipIO(accept *bitset256) (token byte) { + if z.bufio { + return z.bi.skip(accept) + } + return z.ri.skip(accept) +} + +func (z *decRd) readTo(accept *bitset256) (out []byte) { + if z.bytes { + return z.rb.readTo(accept) + } + return z.readToIO(accept) +} +func (z *decRd) readToIO(accept *bitset256) (out []byte) { + if z.bufio { + return z.bi.readTo(accept) + } + return z.ri.readTo(accept) +} + +func (z *decRd) readUntil(stop byte, includeLast bool) (out []byte) { + if z.bytes { + return z.rb.readUntil(stop, includeLast) + } + return z.readUntilIO(stop, includeLast) +} +func (z *decRd) readUntilIO(stop byte, includeLast bool) (out []byte) { + if z.bufio { + return z.bi.readUntil(stop, includeLast) + } + return z.ri.readUntil(stop, includeLast) +} +*/ + +var _ decReader = (*decRd)(nil) diff --git a/vendor/github.com/ugorji/go/codec/register_ext.go b/vendor/github.com/ugorji/go/codec/register_ext.go new file mode 100644 index 00000000..68b002cc --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/register_ext.go @@ -0,0 +1,38 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import "reflect" + +// This file exists, so that the files for specific formats do not all import reflect. +// This just helps us ensure that reflect package is isolated to a few files. + +// SetInterfaceExt sets an extension +func (h *JsonHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { + return h.SetExt(rt, tag, makeExt(ext)) +} + +// SetInterfaceExt sets an extension +func (h *CborHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { + return h.SetExt(rt, tag, makeExt(ext)) +} + +// SetBytesExt sets an extension +func (h *MsgpackHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { + return h.SetExt(rt, tag, makeExt(ext)) +} + +// SetBytesExt sets an extension +func (h *SimpleHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { + return h.SetExt(rt, tag, makeExt(ext)) +} + +// SetBytesExt sets an extension +func (h *BincHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { + return h.SetExt(rt, tag, makeExt(ext)) +} + +// func (h *XMLHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { +// return h.SetExt(rt, tag, &interfaceExtWrapper{InterfaceExt: ext}) +// } diff --git a/vendor/github.com/ugorji/go/codec/rpc.go b/vendor/github.com/ugorji/go/codec/rpc.go index 39250881..8ee23587 100644 --- a/vendor/github.com/ugorji/go/codec/rpc.go +++ b/vendor/github.com/ugorji/go/codec/rpc.go @@ -97,9 +97,6 @@ func (c *rpcCodec) write(obj1, obj2 interface{}, writeObj2 bool) (err error) { if writeObj2 { err = c.enc.Encode(obj2) } - // if err == nil && c.f != nil { - // err = c.f.Flush() - // } } if c.f != nil { if err == nil { diff --git a/vendor/github.com/ugorji/go/codec/simple.go b/vendor/github.com/ugorji/go/codec/simple.go index a3257c1a..42bfd042 100644 --- a/vendor/github.com/ugorji/go/codec/simple.go +++ b/vendor/github.com/ugorji/go/codec/simple.go @@ -5,7 +5,6 @@ package codec import ( "math" - "reflect" "time" ) @@ -33,49 +32,49 @@ const ( type simpleEncDriver struct { noBuiltInTypes - // encNoSeparator - e *Encoder + encDriverNoopContainerWriter h *SimpleHandle - w *encWriterSwitch b [8]byte - // c containerState - encDriverTrackContainerWriter - // encDriverNoopContainerWriter - _ [3]uint64 // padding + _ [6]uint64 // padding (cache-aligned) + e Encoder +} + +func (e *simpleEncDriver) encoder() *Encoder { + return &e.e } func (e *simpleEncDriver) EncodeNil() { - e.w.writen1(simpleVdNil) + e.e.encWr.writen1(simpleVdNil) } func (e *simpleEncDriver) EncodeBool(b bool) { - if e.h.EncZeroValuesAsNil && e.c != containerMapKey && !b { + if e.h.EncZeroValuesAsNil && e.e.c != containerMapKey && !b { e.EncodeNil() return } if b { - e.w.writen1(simpleVdTrue) + e.e.encWr.writen1(simpleVdTrue) } else { - e.w.writen1(simpleVdFalse) + e.e.encWr.writen1(simpleVdFalse) } } func (e *simpleEncDriver) EncodeFloat32(f float32) { - if e.h.EncZeroValuesAsNil && e.c != containerMapKey && f == 0.0 { + if e.h.EncZeroValuesAsNil && e.e.c != containerMapKey && f == 0.0 { e.EncodeNil() return } - e.w.writen1(simpleVdFloat32) - bigenHelper{e.b[:4], e.w}.writeUint32(math.Float32bits(f)) + e.e.encWr.writen1(simpleVdFloat32) + bigenHelper{e.b[:4], e.e.w()}.writeUint32(math.Float32bits(f)) } func (e *simpleEncDriver) EncodeFloat64(f float64) { - if e.h.EncZeroValuesAsNil && e.c != containerMapKey && f == 0.0 { + if e.h.EncZeroValuesAsNil && e.e.c != containerMapKey && f == 0.0 { e.EncodeNil() return } - e.w.writen1(simpleVdFloat64) - bigenHelper{e.b[:8], e.w}.writeUint64(math.Float64bits(f)) + e.e.encWr.writen1(simpleVdFloat64) + bigenHelper{e.b[:8], e.e.w()}.writeUint64(math.Float64bits(f)) } func (e *simpleEncDriver) EncodeInt(v int64) { @@ -91,91 +90,90 @@ func (e *simpleEncDriver) EncodeUint(v uint64) { } func (e *simpleEncDriver) encUint(v uint64, bd uint8) { - if e.h.EncZeroValuesAsNil && e.c != containerMapKey && v == 0 { + if e.h.EncZeroValuesAsNil && e.e.c != containerMapKey && v == 0 { e.EncodeNil() return } if v <= math.MaxUint8 { - e.w.writen2(bd, uint8(v)) + e.e.encWr.writen2(bd, uint8(v)) } else if v <= math.MaxUint16 { - e.w.writen1(bd + 1) - bigenHelper{e.b[:2], e.w}.writeUint16(uint16(v)) + e.e.encWr.writen1(bd + 1) + bigenHelper{e.b[:2], e.e.w()}.writeUint16(uint16(v)) } else if v <= math.MaxUint32 { - e.w.writen1(bd + 2) - bigenHelper{e.b[:4], e.w}.writeUint32(uint32(v)) + e.e.encWr.writen1(bd + 2) + bigenHelper{e.b[:4], e.e.w()}.writeUint32(uint32(v)) } else { // if v <= math.MaxUint64 { - e.w.writen1(bd + 3) - bigenHelper{e.b[:8], e.w}.writeUint64(v) + e.e.encWr.writen1(bd + 3) + bigenHelper{e.b[:8], e.e.w()}.writeUint64(v) } } func (e *simpleEncDriver) encLen(bd byte, length int) { if length == 0 { - e.w.writen1(bd) + e.e.encWr.writen1(bd) } else if length <= math.MaxUint8 { - e.w.writen1(bd + 1) - e.w.writen1(uint8(length)) + e.e.encWr.writen1(bd + 1) + e.e.encWr.writen1(uint8(length)) } else if length <= math.MaxUint16 { - e.w.writen1(bd + 2) - bigenHelper{e.b[:2], e.w}.writeUint16(uint16(length)) + e.e.encWr.writen1(bd + 2) + bigenHelper{e.b[:2], e.e.w()}.writeUint16(uint16(length)) } else if int64(length) <= math.MaxUint32 { - e.w.writen1(bd + 3) - bigenHelper{e.b[:4], e.w}.writeUint32(uint32(length)) + e.e.encWr.writen1(bd + 3) + bigenHelper{e.b[:4], e.e.w()}.writeUint32(uint32(length)) } else { - e.w.writen1(bd + 4) - bigenHelper{e.b[:8], e.w}.writeUint64(uint64(length)) + e.e.encWr.writen1(bd + 4) + bigenHelper{e.b[:8], e.e.w()}.writeUint64(uint64(length)) } } -func (e *simpleEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, _ *Encoder) { - bs := ext.WriteExt(rv) +func (e *simpleEncDriver) EncodeExt(v interface{}, xtag uint64, ext Ext) { + var bs []byte + if ext == SelfExt { + bs = e.e.blist.get(1024)[:0] + e.e.sideEncode(v, &bs) + } else { + bs = ext.WriteExt(v) + } if bs == nil { e.EncodeNil() return } e.encodeExtPreamble(uint8(xtag), len(bs)) - e.w.writeb(bs) + e.e.encWr.writeb(bs) + if ext == SelfExt { + e.e.blist.put(bs) + } } -func (e *simpleEncDriver) EncodeRawExt(re *RawExt, _ *Encoder) { +func (e *simpleEncDriver) EncodeRawExt(re *RawExt) { e.encodeExtPreamble(uint8(re.Tag), len(re.Data)) - e.w.writeb(re.Data) + e.e.encWr.writeb(re.Data) } func (e *simpleEncDriver) encodeExtPreamble(xtag byte, length int) { e.encLen(simpleVdExt, length) - e.w.writen1(xtag) + e.e.encWr.writen1(xtag) } func (e *simpleEncDriver) WriteArrayStart(length int) { - e.c = containerArrayStart e.encLen(simpleVdArray, length) } func (e *simpleEncDriver) WriteMapStart(length int) { - e.c = containerMapStart e.encLen(simpleVdMap, length) } -// func (e *simpleEncDriver) EncodeSymbol(v string) { -// e.EncodeStringEnc(cUTF8, v) -// } - -func (e *simpleEncDriver) EncodeStringEnc(c charEncoding, v string) { - if false && e.h.EncZeroValuesAsNil && e.c != containerMapKey && v == "" { +func (e *simpleEncDriver) EncodeString(v string) { + if e.h.EncZeroValuesAsNil && e.e.c != containerMapKey && v == "" { e.EncodeNil() return } - e.encLen(simpleVdString, len(v)) - e.w.writestr(v) -} - -func (e *simpleEncDriver) EncodeString(c charEncoding, v string) { - e.EncodeStringEnc(c, v) -} - -func (e *simpleEncDriver) EncodeStringBytes(c charEncoding, v []byte) { - e.EncodeStringBytesRaw(v) + if e.h.StringToRaw { + e.encLen(simpleVdByteArray, len(v)) + } else { + e.encLen(simpleVdString, len(v)) + } + e.e.encWr.writestr(v) } func (e *simpleEncDriver) EncodeStringBytesRaw(v []byte) { @@ -185,7 +183,7 @@ func (e *simpleEncDriver) EncodeStringBytesRaw(v []byte) { return } e.encLen(simpleVdByteArray, len(v)) - e.w.writeb(v) + e.e.encWr.writeb(v) } func (e *simpleEncDriver) EncodeTime(t time.Time) { @@ -200,45 +198,65 @@ func (e *simpleEncDriver) EncodeTime(t time.Time) { return } // time.Time marshalbinary takes about 14 bytes. - e.w.writen2(simpleVdTime, uint8(len(v))) - e.w.writeb(v) + e.e.encWr.writen2(simpleVdTime, uint8(len(v))) + e.e.encWr.writeb(v) } //------------------------------------ type simpleDecDriver struct { - d *Decoder h *SimpleHandle - r *decReaderSwitch bdRead bool bd byte - br bool // a bytes reader? - c containerState - // b [scratchByteArrayLen]byte + fnil bool noBuiltInTypes - // noStreamingCodec decDriverNoopContainerReader - // _ [3]uint64 // padding + _ [6]uint64 // padding + d Decoder +} + +func (d *simpleDecDriver) decoder() *Decoder { + return &d.d } func (d *simpleDecDriver) readNextBd() { - d.bd = d.r.readn1() + d.bd = d.d.decRd.readn1() d.bdRead = true } func (d *simpleDecDriver) uncacheRead() { if d.bdRead { - d.r.unreadn1() + d.d.decRd.unreadn1() d.bdRead = false } } +func (d *simpleDecDriver) advanceNil() (null bool) { + d.fnil = false + if !d.bdRead { + d.readNextBd() + } + if d.bd == simpleVdNil { + d.bdRead = false + d.fnil = true + null = true + } + return +} + +func (d *simpleDecDriver) Nil() bool { + return d.fnil +} + func (d *simpleDecDriver) ContainerType() (vt valueType) { if !d.bdRead { d.readNextBd() } + d.fnil = false switch d.bd { case simpleVdNil: + d.bdRead = false + d.fnil = true return valueTypeNil case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: @@ -252,56 +270,42 @@ func (d *simpleDecDriver) ContainerType() (vt valueType) { case simpleVdMap, simpleVdMap + 1, simpleVdMap + 2, simpleVdMap + 3, simpleVdMap + 4: return valueTypeMap - // case simpleVdTime: - // return valueTypeTime } - // else { - // d.d.errorf("isContainerType: unsupported parameter: %v", vt) - // } return valueTypeUnset } -func (d *simpleDecDriver) TryDecodeAsNil() bool { - if !d.bdRead { - d.readNextBd() - } - if d.bd == simpleVdNil { - d.bdRead = false - return true - } - return false +func (d *simpleDecDriver) TryNil() bool { + return d.advanceNil() } func (d *simpleDecDriver) decCheckInteger() (ui uint64, neg bool) { - if !d.bdRead { - d.readNextBd() - } switch d.bd { case simpleVdPosInt: - ui = uint64(d.r.readn1()) + ui = uint64(d.d.decRd.readn1()) case simpleVdPosInt + 1: - ui = uint64(bigen.Uint16(d.r.readx(2))) + ui = uint64(bigen.Uint16(d.d.decRd.readx(2))) case simpleVdPosInt + 2: - ui = uint64(bigen.Uint32(d.r.readx(4))) + ui = uint64(bigen.Uint32(d.d.decRd.readx(4))) case simpleVdPosInt + 3: - ui = uint64(bigen.Uint64(d.r.readx(8))) + ui = uint64(bigen.Uint64(d.d.decRd.readx(8))) case simpleVdNegInt: - ui = uint64(d.r.readn1()) + ui = uint64(d.d.decRd.readn1()) neg = true case simpleVdNegInt + 1: - ui = uint64(bigen.Uint16(d.r.readx(2))) + ui = uint64(bigen.Uint16(d.d.decRd.readx(2))) neg = true case simpleVdNegInt + 2: - ui = uint64(bigen.Uint32(d.r.readx(4))) + ui = uint64(bigen.Uint32(d.d.decRd.readx(4))) neg = true case simpleVdNegInt + 3: - ui = uint64(bigen.Uint64(d.r.readx(8))) + ui = uint64(bigen.Uint64(d.d.decRd.readx(8))) neg = true default: d.d.errorf("integer only valid from pos/neg integer1..8. Invalid descriptor: %v", d.bd) return } - // don't do this check, because callers may only want the unsigned value. + // DO NOT do this check below, because callers may only want the unsigned value: + // // if ui > math.MaxInt64 { // d.d.errorf("decIntAny: Integer out of range for signed int64: %v", ui) // return @@ -310,6 +314,9 @@ func (d *simpleDecDriver) decCheckInteger() (ui uint64, neg bool) { } func (d *simpleDecDriver) DecodeInt64() (i int64) { + if d.advanceNil() { + return + } ui, neg := d.decCheckInteger() i = chkOvf.SignedIntV(ui) if neg { @@ -320,6 +327,9 @@ func (d *simpleDecDriver) DecodeInt64() (i int64) { } func (d *simpleDecDriver) DecodeUint64() (ui uint64) { + if d.advanceNil() { + return + } ui, neg := d.decCheckInteger() if neg { d.d.errorf("assigning negative signed value to unsigned type") @@ -330,13 +340,13 @@ func (d *simpleDecDriver) DecodeUint64() (ui uint64) { } func (d *simpleDecDriver) DecodeFloat64() (f float64) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return } if d.bd == simpleVdFloat32 { - f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + f = float64(math.Float32frombits(bigen.Uint32(d.d.decRd.readx(4)))) } else if d.bd == simpleVdFloat64 { - f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + f = math.Float64frombits(bigen.Uint64(d.d.decRd.readx(8))) } else { if d.bd >= simpleVdPosInt && d.bd <= simpleVdNegInt+3 { f = float64(d.DecodeInt64()) @@ -351,12 +361,12 @@ func (d *simpleDecDriver) DecodeFloat64() (f float64) { // bool can be decoded from bool only (single byte). func (d *simpleDecDriver) DecodeBool() (b bool) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return } - if d.bd == simpleVdTrue { + if d.bd == simpleVdFalse { + } else if d.bd == simpleVdTrue { b = true - } else if d.bd == simpleVdFalse { } else { d.d.errorf("cannot decode bool - %s: %x", msgBadDesc, d.bd) return @@ -366,60 +376,38 @@ func (d *simpleDecDriver) DecodeBool() (b bool) { } func (d *simpleDecDriver) ReadMapStart() (length int) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return decContainerLenNil } d.bdRead = false - d.c = containerMapStart return d.decLen() } func (d *simpleDecDriver) ReadArrayStart() (length int) { - if !d.bdRead { - d.readNextBd() + if d.advanceNil() { + return decContainerLenNil } d.bdRead = false - d.c = containerArrayStart return d.decLen() } -func (d *simpleDecDriver) ReadArrayElem() { - d.c = containerArrayElem -} - -func (d *simpleDecDriver) ReadArrayEnd() { - d.c = containerArrayEnd -} - -func (d *simpleDecDriver) ReadMapElemKey() { - d.c = containerMapKey -} - -func (d *simpleDecDriver) ReadMapElemValue() { - d.c = containerMapValue -} - -func (d *simpleDecDriver) ReadMapEnd() { - d.c = containerMapEnd -} - func (d *simpleDecDriver) decLen() int { switch d.bd % 8 { case 0: return 0 case 1: - return int(d.r.readn1()) + return int(d.d.decRd.readn1()) case 2: - return int(bigen.Uint16(d.r.readx(2))) + return int(bigen.Uint16(d.d.decRd.readx(2))) case 3: - ui := uint64(bigen.Uint32(d.r.readx(4))) + ui := uint64(bigen.Uint32(d.d.decRd.readx(4))) if chkOvf.Uint(ui, intBitsize) { d.d.errorf("overflow integer: %v", ui) return 0 } return int(ui) case 4: - ui := bigen.Uint64(d.r.readx(8)) + ui := bigen.Uint64(d.d.decRd.readx(8)) if chkOvf.Uint(ui, intBitsize) { d.d.errorf("overflow integer: %v", ui) return 0 @@ -430,20 +418,12 @@ func (d *simpleDecDriver) decLen() int { return -1 } -func (d *simpleDecDriver) DecodeString() (s string) { - return string(d.DecodeBytes(d.d.b[:], true)) -} - func (d *simpleDecDriver) DecodeStringAsBytes() (s []byte) { return d.DecodeBytes(d.d.b[:], true) } func (d *simpleDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { - if !d.bdRead { - d.readNextBd() - } - if d.bd == simpleVdNil { - d.bdRead = false + if d.advanceNil() { return } // check if an "array" of uint8's (see ContainerType for how to infer if an array) @@ -451,28 +431,29 @@ func (d *simpleDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { if len(bs) == 0 && zerocopy { bs = d.d.b[:] } - bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) - return + // bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) + slen := d.ReadArrayStart() + bs = usableByteSlice(bs, slen) + for i := 0; i < len(bs); i++ { + bs[i] = uint8(chkOvf.UintV(d.DecodeUint64(), 8)) + } + return bs } clen := d.decLen() d.bdRead = false if zerocopy { - if d.br { - return d.r.readx(uint(clen)) + if d.d.bytes { + return d.d.decRd.readx(uint(clen)) } else if len(bs) == 0 { bs = d.d.b[:] } } - return decByteSlice(d.r, clen, d.d.h.MaxInitLen, bs) + return decByteSlice(d.d.r(), clen, d.d.h.MaxInitLen, bs) } func (d *simpleDecDriver) DecodeTime() (t time.Time) { - if !d.bdRead { - d.readNextBd() - } - if d.bd == simpleVdNil { - d.bdRead = false + if d.advanceNil() { return } if d.bd != simpleVdTime { @@ -480,47 +461,48 @@ func (d *simpleDecDriver) DecodeTime() (t time.Time) { return } d.bdRead = false - clen := int(d.r.readn1()) - b := d.r.readx(uint(clen)) + clen := int(d.d.decRd.readn1()) + b := d.d.decRd.readx(uint(clen)) if err := (&t).UnmarshalBinary(b); err != nil { d.d.errorv(err) } return } -func (d *simpleDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { +func (d *simpleDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) { if xtag > 0xff { d.d.errorf("ext: tag must be <= 0xff; got: %v", xtag) return } + if d.advanceNil() { + return + } realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag)) - realxtag = uint64(realxtag1) + realxtag := uint64(realxtag1) if ext == nil { re := rv.(*RawExt) re.Tag = realxtag - re.Data = detachZeroCopyBytes(d.br, re.Data, xbs) + re.Data = detachZeroCopyBytes(d.d.bytes, re.Data, xbs) + } else if ext == SelfExt { + d.d.sideDecode(rv, xbs) } else { ext.ReadExt(rv, xbs) } - return } func (d *simpleDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) { - if !d.bdRead { - d.readNextBd() - } switch d.bd { case simpleVdExt, simpleVdExt + 1, simpleVdExt + 2, simpleVdExt + 3, simpleVdExt + 4: l := d.decLen() - xtag = d.r.readn1() + xtag = d.d.decRd.readn1() if verifyTag && xtag != tag { d.d.errorf("wrong extension tag. Got %b. Expecting: %v", xtag, tag) return } - if d.br { - xbs = d.r.readx(uint(l)) + if d.d.bytes { + xbs = d.d.decRd.readx(uint(l)) } else { - xbs = decByteSlice(d.r, l, d.d.h.MaxInitLen, d.d.b[:]) + xbs = decByteSlice(d.d.r(), l, d.d.h.MaxInitLen, d.d.b[:]) } case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: @@ -538,12 +520,14 @@ func (d *simpleDecDriver) DecodeNaked() { d.readNextBd() } + d.fnil = false n := d.d.naked() var decodeFurther bool switch d.bd { case simpleVdNil: n.v = valueTypeNil + d.fnil = true case simpleVdFalse: n.v = valueTypeBool n.b = false @@ -573,18 +557,18 @@ func (d *simpleDecDriver) DecodeNaked() { case simpleVdString, simpleVdString + 1, simpleVdString + 2, simpleVdString + 3, simpleVdString + 4: n.v = valueTypeString - n.s = d.DecodeString() + n.s = string(d.DecodeStringAsBytes()) case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: - decNakedReadRawBytes(d, d.d, n, d.h.RawToString) + decNakedReadRawBytes(d, &d.d, n, d.h.RawToString) case simpleVdExt, simpleVdExt + 1, simpleVdExt + 2, simpleVdExt + 3, simpleVdExt + 4: n.v = valueTypeExt l := d.decLen() - n.u = uint64(d.r.readn1()) - if d.br { - n.l = d.r.readx(uint(l)) + n.u = uint64(d.d.decRd.readn1()) + if d.d.bytes { + n.l = d.d.decRd.readx(uint(l)) } else { - n.l = decByteSlice(d.r, l, d.d.h.MaxInitLen, d.d.b[:]) + n.l = decByteSlice(d.d.r(), l, d.d.h.MaxInitLen, d.d.b[:]) } case simpleVdArray, simpleVdArray + 1, simpleVdArray + 2, simpleVdArray + 3, simpleVdArray + 4: @@ -624,42 +608,39 @@ func (d *simpleDecDriver) DecodeNaked() { // // The full spec will be published soon. type SimpleHandle struct { - BasicHandle binaryEncodingType - noElemSeparators + BasicHandle // EncZeroValuesAsNil says to encode zero values for numbers, bool, string, etc as nil EncZeroValuesAsNil bool - // _ [1]uint64 // padding + _ [7]uint64 // padding (cache-aligned) } // Name returns the name of the handle: simple func (h *SimpleHandle) Name() string { return "simple" } -// SetBytesExt sets an extension -func (h *SimpleHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { - return h.SetExt(rt, tag, &extWrapper{ext, interfaceExtFailer{}}) -} - -func (h *SimpleHandle) hasElemSeparators() bool { return true } // as it implements Write(Map|Array)XXX - -func (h *SimpleHandle) newEncDriver(e *Encoder) encDriver { - return &simpleEncDriver{e: e, w: e.w, h: h} +func (h *SimpleHandle) newEncDriver() encDriver { + var e = &simpleEncDriver{h: h} + e.e.e = e + e.e.init(h) + e.reset() + return e } -func (h *SimpleHandle) newDecDriver(d *Decoder) decDriver { - return &simpleDecDriver{d: d, h: h, r: d.r, br: d.bytes} +func (h *SimpleHandle) newDecDriver() decDriver { + d := &simpleDecDriver{h: h} + d.d.d = d + d.d.init(h) + d.reset() + return d } func (e *simpleEncDriver) reset() { - e.c = 0 - e.w = e.e.w } func (d *simpleDecDriver) reset() { - d.c = 0 - d.r, d.br = d.d.r, d.d.bytes d.bd, d.bdRead = 0, false + d.fnil = false } var _ decDriver = (*simpleDecDriver)(nil) diff --git a/vendor/github.com/ugorji/go/codec/sort-slice.generated.go b/vendor/github.com/ugorji/go/codec/sort-slice.generated.go new file mode 100644 index 00000000..352ddfbd --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/sort-slice.generated.go @@ -0,0 +1,266 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// Code generated from sort-slice.go.tmpl - DO NOT EDIT. + +package codec + +import "time" +import "reflect" +import "bytes" + +type stringSlice []string + +func (p stringSlice) Len() int { return len(p) } +func (p stringSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p stringSlice) Less(i, j int) bool { + return p[uint(i)] < p[uint(j)] +} + +type float64Slice []float64 + +func (p float64Slice) Len() int { return len(p) } +func (p float64Slice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p float64Slice) Less(i, j int) bool { + return p[uint(i)] < p[uint(j)] || isNaN64(p[uint(i)]) && !isNaN64(p[uint(j)]) +} + +type uint64Slice []uint64 + +func (p uint64Slice) Len() int { return len(p) } +func (p uint64Slice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p uint64Slice) Less(i, j int) bool { + return p[uint(i)] < p[uint(j)] +} + +type uintptrSlice []uintptr + +func (p uintptrSlice) Len() int { return len(p) } +func (p uintptrSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p uintptrSlice) Less(i, j int) bool { + return p[uint(i)] < p[uint(j)] +} + +type int64Slice []int64 + +func (p int64Slice) Len() int { return len(p) } +func (p int64Slice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p int64Slice) Less(i, j int) bool { + return p[uint(i)] < p[uint(j)] +} + +type boolSlice []bool + +func (p boolSlice) Len() int { return len(p) } +func (p boolSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p boolSlice) Less(i, j int) bool { + return !p[uint(i)] && p[uint(j)] +} + +type timeSlice []time.Time + +func (p timeSlice) Len() int { return len(p) } +func (p timeSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p timeSlice) Less(i, j int) bool { + return p[uint(i)].Before(p[uint(j)]) +} + +type bytesSlice [][]byte + +func (p bytesSlice) Len() int { return len(p) } +func (p bytesSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p bytesSlice) Less(i, j int) bool { + return bytes.Compare(p[uint(i)], p[uint(j)]) == -1 +} + +type stringRv struct { + v string + r reflect.Value +} +type stringRvSlice []stringRv + +func (p stringRvSlice) Len() int { return len(p) } +func (p stringRvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p stringRvSlice) Less(i, j int) bool { + return p[uint(i)].v < p[uint(j)].v +} + +type stringIntf struct { + v string + i interface{} +} +type stringIntfSlice []stringIntf + +func (p stringIntfSlice) Len() int { return len(p) } +func (p stringIntfSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p stringIntfSlice) Less(i, j int) bool { + return p[uint(i)].v < p[uint(j)].v +} + +type float64Rv struct { + v float64 + r reflect.Value +} +type float64RvSlice []float64Rv + +func (p float64RvSlice) Len() int { return len(p) } +func (p float64RvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p float64RvSlice) Less(i, j int) bool { + return p[uint(i)].v < p[uint(j)].v || isNaN64(p[uint(i)].v) && !isNaN64(p[uint(j)].v) +} + +type float64Intf struct { + v float64 + i interface{} +} +type float64IntfSlice []float64Intf + +func (p float64IntfSlice) Len() int { return len(p) } +func (p float64IntfSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p float64IntfSlice) Less(i, j int) bool { + return p[uint(i)].v < p[uint(j)].v || isNaN64(p[uint(i)].v) && !isNaN64(p[uint(j)].v) +} + +type uint64Rv struct { + v uint64 + r reflect.Value +} +type uint64RvSlice []uint64Rv + +func (p uint64RvSlice) Len() int { return len(p) } +func (p uint64RvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p uint64RvSlice) Less(i, j int) bool { + return p[uint(i)].v < p[uint(j)].v +} + +type uint64Intf struct { + v uint64 + i interface{} +} +type uint64IntfSlice []uint64Intf + +func (p uint64IntfSlice) Len() int { return len(p) } +func (p uint64IntfSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p uint64IntfSlice) Less(i, j int) bool { + return p[uint(i)].v < p[uint(j)].v +} + +type uintptrRv struct { + v uintptr + r reflect.Value +} +type uintptrRvSlice []uintptrRv + +func (p uintptrRvSlice) Len() int { return len(p) } +func (p uintptrRvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p uintptrRvSlice) Less(i, j int) bool { + return p[uint(i)].v < p[uint(j)].v +} + +type uintptrIntf struct { + v uintptr + i interface{} +} +type uintptrIntfSlice []uintptrIntf + +func (p uintptrIntfSlice) Len() int { return len(p) } +func (p uintptrIntfSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p uintptrIntfSlice) Less(i, j int) bool { + return p[uint(i)].v < p[uint(j)].v +} + +type int64Rv struct { + v int64 + r reflect.Value +} +type int64RvSlice []int64Rv + +func (p int64RvSlice) Len() int { return len(p) } +func (p int64RvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p int64RvSlice) Less(i, j int) bool { + return p[uint(i)].v < p[uint(j)].v +} + +type int64Intf struct { + v int64 + i interface{} +} +type int64IntfSlice []int64Intf + +func (p int64IntfSlice) Len() int { return len(p) } +func (p int64IntfSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p int64IntfSlice) Less(i, j int) bool { + return p[uint(i)].v < p[uint(j)].v +} + +type boolRv struct { + v bool + r reflect.Value +} +type boolRvSlice []boolRv + +func (p boolRvSlice) Len() int { return len(p) } +func (p boolRvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p boolRvSlice) Less(i, j int) bool { + return !p[uint(i)].v && p[uint(j)].v +} + +type boolIntf struct { + v bool + i interface{} +} +type boolIntfSlice []boolIntf + +func (p boolIntfSlice) Len() int { return len(p) } +func (p boolIntfSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p boolIntfSlice) Less(i, j int) bool { + return !p[uint(i)].v && p[uint(j)].v +} + +type timeRv struct { + v time.Time + r reflect.Value +} +type timeRvSlice []timeRv + +func (p timeRvSlice) Len() int { return len(p) } +func (p timeRvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p timeRvSlice) Less(i, j int) bool { + return p[uint(i)].v.Before(p[uint(j)].v) +} + +type timeIntf struct { + v time.Time + i interface{} +} +type timeIntfSlice []timeIntf + +func (p timeIntfSlice) Len() int { return len(p) } +func (p timeIntfSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p timeIntfSlice) Less(i, j int) bool { + return p[uint(i)].v.Before(p[uint(j)].v) +} + +type bytesRv struct { + v []byte + r reflect.Value +} +type bytesRvSlice []bytesRv + +func (p bytesRvSlice) Len() int { return len(p) } +func (p bytesRvSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p bytesRvSlice) Less(i, j int) bool { + return bytes.Compare(p[uint(i)].v, p[uint(j)].v) == -1 +} + +type bytesIntf struct { + v []byte + i interface{} +} +type bytesIntfSlice []bytesIntf + +func (p bytesIntfSlice) Len() int { return len(p) } +func (p bytesIntfSlice) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p bytesIntfSlice) Less(i, j int) bool { + return bytes.Compare(p[uint(i)].v, p[uint(j)].v) == -1 +} diff --git a/vendor/github.com/ugorji/go/codec/sort-slice.go.tmpl b/vendor/github.com/ugorji/go/codec/sort-slice.go.tmpl new file mode 100644 index 00000000..95d348c9 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/sort-slice.go.tmpl @@ -0,0 +1,64 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// Code generated from sort-slice.go.tmpl - DO NOT EDIT. + +{{/* +xxxSlice +xxxIntf +xxxIntfSlice +xxxRv +xxxRvSlice + +I'm now going to create them for +- sortables +- sortablesplus + +With the parameters passed in sortables or sortablesplus, +'time, 'bytes' are special, and correspond to time.Time and []byte respectively. +*/}} + +package codec + +import "time" +import "reflect" +import "bytes" + +{{/* func init() { _ = time.Unix } */}} + +{{define "T"}} +func (p {{ .Type }}) Len() int { return len(p) } +func (p {{ .Type }}) Swap(i, j int) { p[uint(i)], p[uint(j)] = p[uint(j)], p[uint(i)] } +func (p {{ .Type }}) Less(i, j int) bool { + {{ if eq .Kind "bool" }} return !p[uint(i)]{{.V}} && p[uint(j)]{{.V}} + {{ else if eq .Kind "float32" }} return p[uint(i)]{{.V}} < p[uint(j)]{{.V}} || isNaN32(p[uint(i)]{{.V}}) && !isNaN32(p[uint(j)]{{.V}}) + {{ else if eq .Kind "float64" }} return p[uint(i)]{{.V}} < p[uint(j)]{{.V}} || isNaN64(p[uint(i)]{{.V}}) && !isNaN64(p[uint(j)]{{.V}}) + {{ else if eq .Kind "time" }} return p[uint(i)]{{.V}}.Before(p[uint(j)]{{.V}}) + {{ else if eq .Kind "bytes" }} return bytes.Compare(p[uint(i)]{{.V}}, p[uint(j)]{{.V}}) == -1 + {{ else }} return p[uint(i)]{{.V}} < p[uint(j)]{{.V}} + {{ end -}} +} +{{end}} + +{{range $i, $v := sortables }}{{ $t := tshort $v }} +type {{ $v }}Slice []{{ $t }} +{{template "T" args "Kind" $v "Type" (print $v "Slice") "V" ""}} +{{end}} + +{{range $i, $v := sortablesplus }}{{ $t := tshort $v }} + +type {{ $v }}Rv struct { + v {{ $t }} + r reflect.Value +} +type {{ $v }}RvSlice []{{ $v }}Rv +{{template "T" args "Kind" $v "Type" (print $v "RvSlice") "V" ".v"}} + +type {{ $v }}Intf struct { + v {{ $t }} + i interface{} +} +type {{ $v }}IntfSlice []{{ $v }}Intf +{{template "T" args "Kind" $v "Type" (print $v "IntfSlice") "V" ".v"}} + +{{end}} diff --git a/vendor/github.com/ugorji/go/codec/test-cbor-goldens.json b/vendor/github.com/ugorji/go/codec/test-cbor-goldens.json new file mode 100644 index 00000000..90285867 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/test-cbor-goldens.json @@ -0,0 +1,639 @@ +[ + { + "cbor": "AA==", + "hex": "00", + "roundtrip": true, + "decoded": 0 + }, + { + "cbor": "AQ==", + "hex": "01", + "roundtrip": true, + "decoded": 1 + }, + { + "cbor": "Cg==", + "hex": "0a", + "roundtrip": true, + "decoded": 10 + }, + { + "cbor": "Fw==", + "hex": "17", + "roundtrip": true, + "decoded": 23 + }, + { + "cbor": "GBg=", + "hex": "1818", + "roundtrip": true, + "decoded": 24 + }, + { + "cbor": "GBk=", + "hex": "1819", + "roundtrip": true, + "decoded": 25 + }, + { + "cbor": "GGQ=", + "hex": "1864", + "roundtrip": true, + "decoded": 100 + }, + { + "cbor": "GQPo", + "hex": "1903e8", + "roundtrip": true, + "decoded": 1000 + }, + { + "cbor": "GgAPQkA=", + "hex": "1a000f4240", + "roundtrip": true, + "decoded": 1000000 + }, + { + "cbor": "GwAAAOjUpRAA", + "hex": "1b000000e8d4a51000", + "roundtrip": true, + "decoded": 1000000000000 + }, + { + "cbor": "G///////////", + "hex": "1bffffffffffffffff", + "roundtrip": true, + "decoded": 18446744073709551615 + }, + { + "cbor": "wkkBAAAAAAAAAAA=", + "hex": "c249010000000000000000", + "roundtrip": true, + "decoded": 18446744073709551616 + }, + { + "cbor": "O///////////", + "hex": "3bffffffffffffffff", + "roundtrip": true, + "decoded": -18446744073709551616, + "skip": true + }, + { + "cbor": "w0kBAAAAAAAAAAA=", + "hex": "c349010000000000000000", + "roundtrip": true, + "decoded": -18446744073709551617 + }, + { + "cbor": "IA==", + "hex": "20", + "roundtrip": true, + "decoded": -1 + }, + { + "cbor": "KQ==", + "hex": "29", + "roundtrip": true, + "decoded": -10 + }, + { + "cbor": "OGM=", + "hex": "3863", + "roundtrip": true, + "decoded": -100 + }, + { + "cbor": "OQPn", + "hex": "3903e7", + "roundtrip": true, + "decoded": -1000 + }, + { + "cbor": "+QAA", + "hex": "f90000", + "roundtrip": true, + "decoded": 0.0 + }, + { + "cbor": "+YAA", + "hex": "f98000", + "roundtrip": true, + "decoded": -0.0 + }, + { + "cbor": "+TwA", + "hex": "f93c00", + "roundtrip": true, + "decoded": 1.0 + }, + { + "cbor": "+z/xmZmZmZma", + "hex": "fb3ff199999999999a", + "roundtrip": true, + "decoded": 1.1 + }, + { + "cbor": "+T4A", + "hex": "f93e00", + "roundtrip": true, + "decoded": 1.5 + }, + { + "cbor": "+Xv/", + "hex": "f97bff", + "roundtrip": true, + "decoded": 65504.0 + }, + { + "cbor": "+kfDUAA=", + "hex": "fa47c35000", + "roundtrip": true, + "decoded": 100000.0 + }, + { + "cbor": "+n9///8=", + "hex": "fa7f7fffff", + "roundtrip": true, + "decoded": 3.4028234663852886e+38 + }, + { + "cbor": "+3435DyIAHWc", + "hex": "fb7e37e43c8800759c", + "roundtrip": true, + "decoded": 1.0e+300 + }, + { + "cbor": "+QAB", + "hex": "f90001", + "roundtrip": true, + "decoded": 5.960464477539063e-08 + }, + { + "cbor": "+QQA", + "hex": "f90400", + "roundtrip": true, + "decoded": 6.103515625e-05 + }, + { + "cbor": "+cQA", + "hex": "f9c400", + "roundtrip": true, + "decoded": -4.0 + }, + { + "cbor": "+8AQZmZmZmZm", + "hex": "fbc010666666666666", + "roundtrip": true, + "decoded": -4.1 + }, + { + "cbor": "+XwA", + "hex": "f97c00", + "roundtrip": true, + "diagnostic": "Infinity" + }, + { + "cbor": "+X4A", + "hex": "f97e00", + "roundtrip": true, + "diagnostic": "NaN" + }, + { + "cbor": "+fwA", + "hex": "f9fc00", + "roundtrip": true, + "diagnostic": "-Infinity" + }, + { + "cbor": "+n+AAAA=", + "hex": "fa7f800000", + "roundtrip": false, + "diagnostic": "Infinity" + }, + { + "cbor": "+n/AAAA=", + "hex": "fa7fc00000", + "roundtrip": false, + "diagnostic": "NaN" + }, + { + "cbor": "+v+AAAA=", + "hex": "faff800000", + "roundtrip": false, + "diagnostic": "-Infinity" + }, + { + "cbor": "+3/wAAAAAAAA", + "hex": "fb7ff0000000000000", + "roundtrip": false, + "diagnostic": "Infinity" + }, + { + "cbor": "+3/4AAAAAAAA", + "hex": "fb7ff8000000000000", + "roundtrip": false, + "diagnostic": "NaN" + }, + { + "cbor": "+//wAAAAAAAA", + "hex": "fbfff0000000000000", + "roundtrip": false, + "diagnostic": "-Infinity" + }, + { + "cbor": "9A==", + "hex": "f4", + "roundtrip": true, + "decoded": false + }, + { + "cbor": "9Q==", + "hex": "f5", + "roundtrip": true, + "decoded": true + }, + { + "cbor": "9g==", + "hex": "f6", + "roundtrip": true, + "decoded": null + }, + { + "cbor": "9w==", + "hex": "f7", + "roundtrip": true, + "diagnostic": "undefined" + }, + { + "cbor": "8A==", + "hex": "f0", + "roundtrip": true, + "diagnostic": "simple(16)" + }, + { + "cbor": "+Bg=", + "hex": "f818", + "roundtrip": true, + "diagnostic": "simple(24)" + }, + { + "cbor": "+P8=", + "hex": "f8ff", + "roundtrip": true, + "diagnostic": "simple(255)" + }, + { + "cbor": "wHQyMDEzLTAzLTIxVDIwOjA0OjAwWg==", + "hex": "c074323031332d30332d32315432303a30343a30305a", + "roundtrip": true, + "diagnostic": "0(\"2013-03-21T20:04:00Z\")" + }, + { + "cbor": "wRpRS2ew", + "hex": "c11a514b67b0", + "roundtrip": true, + "diagnostic": "1(1363896240)" + }, + { + "cbor": "wftB1FLZ7CAAAA==", + "hex": "c1fb41d452d9ec200000", + "roundtrip": true, + "diagnostic": "1(1363896240.5)" + }, + { + "cbor": "10QBAgME", + "hex": "d74401020304", + "roundtrip": true, + "diagnostic": "23(h'01020304')" + }, + { + "cbor": "2BhFZElFVEY=", + "hex": "d818456449455446", + "roundtrip": true, + "diagnostic": "24(h'6449455446')" + }, + { + "cbor": "2CB2aHR0cDovL3d3dy5leGFtcGxlLmNvbQ==", + "hex": "d82076687474703a2f2f7777772e6578616d706c652e636f6d", + "roundtrip": true, + "diagnostic": "32(\"http://www.example.com\")" + }, + { + "cbor": "QA==", + "hex": "40", + "roundtrip": true, + "diagnostic": "h''" + }, + { + "cbor": "RAECAwQ=", + "hex": "4401020304", + "roundtrip": true, + "diagnostic": "h'01020304'" + }, + { + "cbor": "YA==", + "hex": "60", + "roundtrip": true, + "decoded": "" + }, + { + "cbor": "YWE=", + "hex": "6161", + "roundtrip": true, + "decoded": "a" + }, + { + "cbor": "ZElFVEY=", + "hex": "6449455446", + "roundtrip": true, + "decoded": "IETF" + }, + { + "cbor": "YiJc", + "hex": "62225c", + "roundtrip": true, + "decoded": "\"\\" + }, + { + "cbor": "YsO8", + "hex": "62c3bc", + "roundtrip": true, + "decoded": "ü" + }, + { + "cbor": "Y+awtA==", + "hex": "63e6b0b4", + "roundtrip": true, + "decoded": "水" + }, + { + "cbor": "ZPCQhZE=", + "hex": "64f0908591", + "roundtrip": true, + "decoded": "𐅑" + }, + { + "cbor": "gA==", + "hex": "80", + "roundtrip": true, + "decoded": [ + + ] + }, + { + "cbor": "gwECAw==", + "hex": "83010203", + "roundtrip": true, + "decoded": [ + 1, + 2, + 3 + ] + }, + { + "cbor": "gwGCAgOCBAU=", + "hex": "8301820203820405", + "roundtrip": true, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "mBkBAgMEBQYHCAkKCwwNDg8QERITFBUWFxgYGBk=", + "hex": "98190102030405060708090a0b0c0d0e0f101112131415161718181819", + "roundtrip": true, + "decoded": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25 + ] + }, + { + "cbor": "oA==", + "hex": "a0", + "roundtrip": true, + "decoded": { + } + }, + { + "cbor": "ogECAwQ=", + "hex": "a201020304", + "roundtrip": true, + "skip": true, + "diagnostic": "{1: 2, 3: 4}" + }, + { + "cbor": "omFhAWFiggID", + "hex": "a26161016162820203", + "roundtrip": true, + "decoded": { + "a": 1, + "b": [ + 2, + 3 + ] + } + }, + { + "cbor": "gmFhoWFiYWM=", + "hex": "826161a161626163", + "roundtrip": true, + "decoded": [ + "a", + { + "b": "c" + } + ] + }, + { + "cbor": "pWFhYUFhYmFCYWNhQ2FkYURhZWFF", + "hex": "a56161614161626142616361436164614461656145", + "roundtrip": true, + "decoded": { + "a": "A", + "b": "B", + "c": "C", + "d": "D", + "e": "E" + } + }, + { + "cbor": "X0IBAkMDBAX/", + "hex": "5f42010243030405ff", + "roundtrip": false, + "skip": true, + "diagnostic": "(_ h'0102', h'030405')" + }, + { + "cbor": "f2VzdHJlYWRtaW5n/w==", + "hex": "7f657374726561646d696e67ff", + "roundtrip": false, + "decoded": "streaming" + }, + { + "cbor": "n/8=", + "hex": "9fff", + "roundtrip": false, + "decoded": [ + + ] + }, + { + "cbor": "nwGCAgOfBAX//w==", + "hex": "9f018202039f0405ffff", + "roundtrip": false, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "nwGCAgOCBAX/", + "hex": "9f01820203820405ff", + "roundtrip": false, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "gwGCAgOfBAX/", + "hex": "83018202039f0405ff", + "roundtrip": false, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "gwGfAgP/ggQF", + "hex": "83019f0203ff820405", + "roundtrip": false, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "nwECAwQFBgcICQoLDA0ODxAREhMUFRYXGBgYGf8=", + "hex": "9f0102030405060708090a0b0c0d0e0f101112131415161718181819ff", + "roundtrip": false, + "decoded": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25 + ] + }, + { + "cbor": "v2FhAWFinwID//8=", + "hex": "bf61610161629f0203ffff", + "roundtrip": false, + "decoded": { + "a": 1, + "b": [ + 2, + 3 + ] + } + }, + { + "cbor": "gmFhv2FiYWP/", + "hex": "826161bf61626163ff", + "roundtrip": false, + "decoded": [ + "a", + { + "b": "c" + } + ] + }, + { + "cbor": "v2NGdW71Y0FtdCH/", + "hex": "bf6346756ef563416d7421ff", + "roundtrip": false, + "decoded": { + "Fun": true, + "Amt": -2 + } + } +] diff --git a/vendor/github.com/ugorji/go/codec/test.py b/vendor/github.com/ugorji/go/codec/test.py new file mode 100644 index 00000000..800376f6 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/test.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python + +# This will create golden files in a directory passed to it. +# A Test calls this internally to create the golden files +# So it can process them (so we don't have to checkin the files). + +# Ensure msgpack-python and cbor are installed first, using: +# sudo apt-get install python-dev +# sudo apt-get install python-pip +# pip install --user msgpack-python msgpack-rpc-python cbor + +# Ensure all "string" keys are utf strings (else encoded as bytes) + +import cbor, msgpack, msgpackrpc, sys, os, threading + +def get_test_data_list(): + # get list with all primitive types, and a combo type + l0 = [ + -8, + -1616, + -32323232, + -6464646464646464, + 192, + 1616, + 32323232, + 6464646464646464, + 192, + -3232.0, + -6464646464.0, + 3232.0, + 6464.0, + 6464646464.0, + False, + True, + u"null", + None, + u"some&day>some 0 + if stopTimeSec > 0: + def myStopRpcServer(): + server.stop() + t = threading.Timer(stopTimeSec, myStopRpcServer) + t.start() + server.start() + +def doRpcClientToPythonSvc(port): + address = msgpackrpc.Address('127.0.0.1', port) + client = msgpackrpc.Client(address, unpack_encoding='utf-8') + print client.call("Echo123", "A1", "B2", "C3") + print client.call("EchoStruct", {"A" :"Aa", "B":"Bb", "C":"Cc"}) + +def doRpcClientToGoSvc(port): + # print ">>>> port: ", port, " <<<<<" + address = msgpackrpc.Address('127.0.0.1', port) + client = msgpackrpc.Client(address, unpack_encoding='utf-8') + print client.call("TestRpcInt.Echo123", ["A1", "B2", "C3"]) + print client.call("TestRpcInt.EchoStruct", {"A" :"Aa", "B":"Bb", "C":"Cc"}) + +def doMain(args): + if len(args) == 2 and args[0] == "testdata": + build_test_data(args[1]) + elif len(args) == 3 and args[0] == "rpc-server": + doRpcServer(int(args[1]), int(args[2])) + elif len(args) == 2 and args[0] == "rpc-client-python-service": + doRpcClientToPythonSvc(int(args[1])) + elif len(args) == 2 and args[0] == "rpc-client-go-service": + doRpcClientToGoSvc(int(args[1])) + else: + print("Usage: test.py " + + "[testdata|rpc-server|rpc-client-python-service|rpc-client-go-service] ...") + +if __name__ == "__main__": + doMain(sys.argv[1:]) + diff --git a/vendor/github.com/ugorji/go/codec/writer.go b/vendor/github.com/ugorji/go/codec/writer.go new file mode 100644 index 00000000..764790bf --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/writer.go @@ -0,0 +1,267 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import "io" + +// encWriter abstracts writing to a byte array or to an io.Writer. +type encWriter interface { + writeb([]byte) + writestr(string) + writeqstr(string) // write string wrapped in quotes ie "..." + writen1(byte) + writen2(byte, byte) + // writen will write up to 7 bytes at a time. + writen(b [rwNLen]byte, num uint8) + end() +} + +// --------------------------------------------- + +// bufioEncWriter +type bufioEncWriter struct { + w io.Writer + + buf []byte + + n int + + b [16]byte // scratch buffer and padding (cache-aligned) +} + +func (z *bufioEncWriter) reset(w io.Writer, bufsize int, blist *bytesFreelist) { + z.w = w + z.n = 0 + if bufsize <= 0 { + bufsize = defEncByteBufSize + } + // bufsize must be >= 8, to accomodate writen methods (where n <= 8) + if bufsize <= 8 { + bufsize = 8 + } + if cap(z.buf) < bufsize { + if len(z.buf) > 0 && &z.buf[0] != &z.b[0] { + blist.put(z.buf) + } + if len(z.b) > bufsize { + z.buf = z.b[:] + } else { + z.buf = blist.get(bufsize) + } + } + z.buf = z.buf[:cap(z.buf)] +} + +//go:noinline - flush only called intermittently +func (z *bufioEncWriter) flushErr() (err error) { + n, err := z.w.Write(z.buf[:z.n]) + z.n -= n + if z.n > 0 && err == nil { + err = io.ErrShortWrite + } + if n > 0 && z.n > 0 { + copy(z.buf, z.buf[n:z.n+n]) + } + return err +} + +func (z *bufioEncWriter) flush() { + if err := z.flushErr(); err != nil { + panic(err) + } +} + +func (z *bufioEncWriter) writeb(s []byte) { +LOOP: + a := len(z.buf) - z.n + if len(s) > a { + z.n += copy(z.buf[z.n:], s[:a]) + s = s[a:] + z.flush() + goto LOOP + } + z.n += copy(z.buf[z.n:], s) +} + +func (z *bufioEncWriter) writestr(s string) { + // z.writeb(bytesView(s)) // inlined below +LOOP: + a := len(z.buf) - z.n + if len(s) > a { + z.n += copy(z.buf[z.n:], s[:a]) + s = s[a:] + z.flush() + goto LOOP + } + z.n += copy(z.buf[z.n:], s) +} + +func (z *bufioEncWriter) writeqstr(s string) { + // z.writen1('"') + // z.writestr(s) + // z.writen1('"') + + if z.n+len(s)+2 > len(z.buf) { + z.flush() + } + z.buf[z.n] = '"' + z.n++ +LOOP: + a := len(z.buf) - z.n + if len(s)+1 > a { + z.n += copy(z.buf[z.n:], s[:a]) + s = s[a:] + z.flush() + goto LOOP + } + z.n += copy(z.buf[z.n:], s) + z.buf[z.n] = '"' + z.n++ +} + +func (z *bufioEncWriter) writen1(b1 byte) { + if 1 > len(z.buf)-z.n { + z.flush() + } + z.buf[z.n] = b1 + z.n++ +} + +func (z *bufioEncWriter) writen2(b1, b2 byte) { + if 2 > len(z.buf)-z.n { + z.flush() + } + z.buf[z.n+1] = b2 + z.buf[z.n] = b1 + z.n += 2 +} + +func (z *bufioEncWriter) writen(b [rwNLen]byte, num uint8) { + if int(num) > len(z.buf)-z.n { + z.flush() + } + copy(z.buf[z.n:], b[:num]) + z.n += int(num) +} + +func (z *bufioEncWriter) endErr() (err error) { + if z.n > 0 { + err = z.flushErr() + } + return +} + +// --------------------------------------------- + +// bytesEncAppender implements encWriter and can write to an byte slice. +type bytesEncAppender struct { + b []byte + out *[]byte +} + +func (z *bytesEncAppender) writeb(s []byte) { + z.b = append(z.b, s...) +} +func (z *bytesEncAppender) writestr(s string) { + z.b = append(z.b, s...) +} +func (z *bytesEncAppender) writeqstr(s string) { + z.b = append(append(append(z.b, '"'), s...), '"') + + // z.b = append(z.b, '"') + // z.b = append(z.b, s...) + // z.b = append(z.b, '"') +} +func (z *bytesEncAppender) writen1(b1 byte) { + z.b = append(z.b, b1) +} +func (z *bytesEncAppender) writen2(b1, b2 byte) { + z.b = append(z.b, b1, b2) // cost: 81 +} +func (z *bytesEncAppender) writen(s [rwNLen]byte, num uint8) { + // if num <= rwNLen { + if int(num) <= len(s) { + z.b = append(z.b, s[:num]...) + } +} +func (z *bytesEncAppender) endErr() error { + *(z.out) = z.b + return nil +} +func (z *bytesEncAppender) reset(in []byte, out *[]byte) { + z.b = in[:0] + z.out = out +} + +// -------------------------------------------------- + +type encWr struct { + bytes bool // encoding to []byte + js bool // is json encoder? + be bool // is binary encoder? + + c containerState + + calls uint16 + + wb bytesEncAppender + wf *bufioEncWriter +} + +func (z *encWr) writeb(s []byte) { + if z.bytes { + z.wb.writeb(s) + } else { + z.wf.writeb(s) + } +} +func (z *encWr) writeqstr(s string) { + if z.bytes { + z.wb.writeqstr(s) + } else { + z.wf.writeqstr(s) + } +} +func (z *encWr) writestr(s string) { + if z.bytes { + z.wb.writestr(s) + } else { + z.wf.writestr(s) + } +} +func (z *encWr) writen1(b1 byte) { + if z.bytes { + z.wb.writen1(b1) + } else { + z.wf.writen1(b1) + } +} +func (z *encWr) writen2(b1, b2 byte) { + if z.bytes { + z.wb.writen2(b1, b2) + } else { + z.wf.writen2(b1, b2) + } +} +func (z *encWr) writen(b [rwNLen]byte, num uint8) { + if z.bytes { + z.wb.writen(b, num) + } else { + z.wf.writen(b, num) + } +} +func (z *encWr) endErr() error { + if z.bytes { + return z.wb.endErr() + } + return z.wf.endErr() +} + +func (z *encWr) end() { + if err := z.endErr(); err != nil { + panic(err) + } +} + +var _ encWriter = (*encWr)(nil) diff --git a/vendor/github.com/ugorji/go/codec/xml.go b/vendor/github.com/ugorji/go/codec/xml.go deleted file mode 100644 index 19fc36ca..00000000 --- a/vendor/github.com/ugorji/go/codec/xml.go +++ /dev/null @@ -1,508 +0,0 @@ -// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. -// Use of this source code is governed by a MIT license found in the LICENSE file. - -// +build ignore - -package codec - -import "reflect" - -/* - -A strict Non-validating namespace-aware XML 1.0 parser and (en|de)coder. - -We are attempting this due to perceived issues with encoding/xml: - - Complicated. It tried to do too much, and is not as simple to use as json. - - Due to over-engineering, reflection is over-used AND performance suffers: - java is 6X faster:http://fabsk.eu/blog/category/informatique/dev/golang/ - even PYTHON performs better: http://outgoing.typepad.com/outgoing/2014/07/exploring-golang.html - -codec framework will offer the following benefits - - VASTLY improved performance (when using reflection-mode or codecgen) - - simplicity and consistency: with the rest of the supported formats - - all other benefits of codec framework (streaming, codegeneration, etc) - -codec is not a drop-in replacement for encoding/xml. -It is a replacement, based on the simplicity and performance of codec. -Look at it like JAXB for Go. - -Challenges: - - Need to output XML preamble, with all namespaces at the right location in the output. - - Each "end" block is dynamic, so we need to maintain a context-aware stack - - How to decide when to use an attribute VS an element - - How to handle chardata, attr, comment EXPLICITLY. - - Should it output fragments? - e.g. encoding a bool should just output true OR false, which is not well-formed XML. - -Extend the struct tag. See representative example: - type X struct { - ID uint8 `codec:"http://ugorji.net/x-namespace xid id,omitempty,toarray,attr,cdata"` - // format: [namespace-uri ][namespace-prefix ]local-name, ... - } - -Based on this, we encode - - fields as elements, BUT - encode as attributes if struct tag contains ",attr" and is a scalar (bool, number or string) - - text as entity-escaped text, BUT encode as CDATA if struct tag contains ",cdata". - -To handle namespaces: - - XMLHandle is denoted as being namespace-aware. - Consequently, we WILL use the ns:name pair to encode and decode if defined, else use the plain name. - - *Encoder and *Decoder know whether the Handle "prefers" namespaces. - - add *Encoder.getEncName(*structFieldInfo). - No one calls *structFieldInfo.indexForEncName directly anymore - - OR better yet: indexForEncName is namespace-aware, and helper.go is all namespace-aware - indexForEncName takes a parameter of the form namespace:local-name OR local-name - - add *Decoder.getStructFieldInfo(encName string) // encName here is either like abc, or h1:nsabc - by being a method on *Decoder, or maybe a method on the Handle itself. - No one accesses .encName anymore - - let encode.go and decode.go use these (for consistency) - - only problem exists for gen.go, where we create a big switch on encName. - Now, we also have to add a switch on strings.endsWith(kName, encNsName) - - gen.go will need to have many more methods, and then double-on the 2 switch loops like: - switch k { - case "abc" : x.abc() - case "def" : x.def() - default { - switch { - case !nsAware: panic(...) - case strings.endsWith(":abc"): x.abc() - case strings.endsWith(":def"): x.def() - default: panic(...) - } - } - } - -The structure below accommodates this: - - type typeInfo struct { - sfi []*structFieldInfo // sorted by encName - sfins // sorted by namespace - sfia // sorted, to have those with attributes at the top. Needed to write XML appropriately. - sfip // unsorted - } - type structFieldInfo struct { - encName - nsEncName - ns string - attr bool - cdata bool - } - -indexForEncName is now an internal helper function that takes a sorted array -(one of ti.sfins or ti.sfi). It is only used by *Encoder.getStructFieldInfo(...) - -There will be a separate parser from the builder. -The parser will have a method: next() xmlToken method. It has lookahead support, -so you can pop multiple tokens, make a determination, and push them back in the order popped. -This will be needed to determine whether we are "nakedly" decoding a container or not. -The stack will be implemented using a slice and push/pop happens at the [0] element. - -xmlToken has fields: - - type uint8: 0 | ElementStart | ElementEnd | AttrKey | AttrVal | Text - - value string - - ns string - -SEE: http://www.xml.com/pub/a/98/10/guide0.html?page=3#ENTDECL - -The following are skipped when parsing: - - External Entities (from external file) - - Notation Declaration e.g. - - Entity Declarations & References - - XML Declaration (assume UTF-8) - - XML Directive i.e. - - Other Declarations: Notation, etc. - - Comment - - Processing Instruction - - schema / DTD for validation: - We are not a VALIDATING parser. Validation is done elsewhere. - However, some parts of the DTD internal subset are used (SEE BELOW). - For Attribute List Declarations e.g. - - We considered using the ATTLIST to get "default" value, but not to validate the contents. (VETOED) - -The following XML features are supported - - Namespace - - Element - - Attribute - - cdata - - Unicode escape - -The following DTD (when as an internal sub-set) features are supported: - - Internal Entities e.g. - AND entities for the set: [<>&"'] - - Parameter entities e.g. - - -At decode time, a structure containing the following is kept - - namespace mapping - - default attribute values - - all internal entities (<>&"' and others written in the document) - -When decode starts, it parses XML namespace declarations and creates a map in the -xmlDecDriver. While parsing, that map continuously gets updated. -The only problem happens when a namespace declaration happens on the node that it defines. -e.g. -To handle this, each Element must be fully parsed at a time, -even if it amounts to multiple tokens which are returned one at a time on request. - -xmlns is a special attribute name. - - It is used to define namespaces, including the default - - It is never returned as an AttrKey or AttrVal. - *We may decide later to allow user to use it e.g. you want to parse the xmlns mappings into a field.* - -Number, bool, null, mapKey, etc can all be decoded from any xmlToken. -This accommodates map[int]string for example. - -It should be possible to create a schema from the types, -or vice versa (generate types from schema with appropriate tags). -This is however out-of-scope from this parsing project. - -We should write all namespace information at the first point that it is referenced in the tree, -and use the mapping for all child nodes and attributes. This means that state is maintained -at a point in the tree. This also means that calls to Decode or MustDecode will reset some state. - -When decoding, it is important to keep track of entity references and default attribute values. -It seems these can only be stored in the DTD components. We should honor them when decoding. - -Configuration for XMLHandle will look like this: - - XMLHandle - DefaultNS string - // Encoding: - NS map[string]string // ns URI to key, used for encoding - // Decoding: in case ENTITY declared in external schema or dtd, store info needed here - Entities map[string]string // map of entity rep to character - - -During encode, if a namespace mapping is not defined for a namespace found on a struct, -then we create a mapping for it using nsN (where N is 1..1000000, and doesn't conflict -with any other namespace mapping). - -Note that different fields in a struct can have different namespaces. -However, all fields will default to the namespace on the _struct field (if defined). - -An XML document is a name, a map of attributes and a list of children. -Consequently, we cannot "DecodeNaked" into a map[string]interface{} (for example). -We have to "DecodeNaked" into something that resembles XML data. - -To support DecodeNaked (decode into nil interface{}), we have to define some "supporting" types: - type Name struct { // Preferred. Less allocations due to conversions. - Local string - Space string - } - type Element struct { - Name Name - Attrs map[Name]string - Children []interface{} // each child is either *Element or string - } -Only two "supporting" types are exposed for XML: Name and Element. - -// ------------------ - -We considered 'type Name string' where Name is like "Space Local" (space-separated). -We decided against it, because each creation of a name would lead to -double allocation (first convert []byte to string, then concatenate them into a string). -The benefit is that it is faster to read Attrs from a map. But given that Element is a value -object, we want to eschew methods and have public exposed variables. - -We also considered the following, where xml types were not value objects, and we used -intelligent accessor methods to extract information and for performance. -*** WE DECIDED AGAINST THIS. *** - type Attr struct { - Name Name - Value string - } - // Element is a ValueObject: There are no accessor methods. - // Make element self-contained. - type Element struct { - Name Name - attrsMap map[string]string // where key is "Space Local" - attrs []Attr - childrenT []string - childrenE []Element - childrenI []int // each child is a index into T or E. - } - func (x *Element) child(i) interface{} // returns string or *Element - -// ------------------ - -Per XML spec and our default handling, white space is always treated as -insignificant between elements, except in a text node. The xml:space='preserve' -attribute is ignored. - -**Note: there is no xml: namespace. The xml: attributes were defined before namespaces.** -**So treat them as just "directives" that should be interpreted to mean something**. - -On encoding, we support indenting aka prettifying markup in the same way we support it for json. - -A document or element can only be encoded/decoded from/to a struct. In this mode: - - struct name maps to element name (or tag-info from _struct field) - - fields are mapped to child elements or attributes - -A map is either encoded as attributes on current element, or as a set of child elements. -Maps are encoded as attributes iff their keys and values are primitives (number, bool, string). - -A list is encoded as a set of child elements. - -Primitives (number, bool, string) are encoded as an element, attribute or text -depending on the context. - -Extensions must encode themselves as a text string. - -Encoding is tough, specifically when encoding mappings, because we need to encode -as either attribute or element. To do this, we need to default to encoding as attributes, -and then let Encoder inform the Handle when to start encoding as nodes. -i.e. Encoder does something like: - - h.EncodeMapStart() - h.Encode(), h.Encode(), ... - h.EncodeMapNotAttrSignal() // this is not a bool, because it's a signal - h.Encode(), h.Encode(), ... - h.EncodeEnd() - -Only XMLHandle understands this, and will set itself to start encoding as elements. - -This support extends to maps. For example, if a struct field is a map, and it has -the struct tag signifying it should be attr, then all its fields are encoded as attributes. -e.g. - - type X struct { - M map[string]int `codec:"m,attr"` // encode keys as attributes named - } - -Question: - - if encoding a map, what if map keys have spaces in them??? - Then they cannot be attributes or child elements. Error. - -Options to consider adding later: - - For attribute values, normalize by trimming beginning and ending white space, - and converting every white space sequence to a single space. - - ATTLIST restrictions are enforced. - e.g. default value of xml:space, skipping xml:XYZ style attributes, etc. - - Consider supporting NON-STRICT mode (e.g. to handle HTML parsing). - Some elements e.g. br, hr, etc need not close and should be auto-closed - ... (see http://www.w3.org/TR/html4/loose.dtd) - An expansive set of entities are pre-defined. - - Have easy way to create a HTML parser: - add a HTML() method to XMLHandle, that will set Strict=false, specify AutoClose, - and add HTML Entities to the list. - - Support validating element/attribute XMLName before writing it. - Keep this behind a flag, which is set to false by default (for performance). - type XMLHandle struct { - CheckName bool - } - -Misc: - -ROADMAP (1 weeks): - - build encoder (1 day) - - build decoder (based off xmlParser) (1 day) - - implement xmlParser (2 days). - Look at encoding/xml for inspiration. - - integrate and TEST (1 days) - - write article and post it (1 day) - -// ---------- MORE NOTES FROM 2017-11-30 ------------ - -when parsing -- parse the attributes first -- then parse the nodes - -basically: -- if encoding a field: we use the field name for the wrapper -- if encoding a non-field, then just use the element type name - - map[string]string ==> abcval... or - val... OR - val1val2... <- PREFERED - []string ==> v1v2... - string v1 ==> v1 - bool true ==> true - float 1.0 ==> 1.0 - ... - - F1 map[string]string ==> abcval... OR - val... OR - val... <- PREFERED - F2 []string ==> v1v2... - F3 bool ==> true - ... - -- a scalar is encoded as: - (value) of type T ==> - (value) of field F ==> -- A kv-pair is encoded as: - (key,value) ==> OR - (key,value) of field F ==> OR -- A map or struct is just a list of kv-pairs -- A list is encoded as sequences of same node e.g. - - - value21 - value22 -- we may have to singularize the field name, when entering into xml, - and pluralize them when encoding. -- bi-directional encode->decode->encode is not a MUST. - even encoding/xml cannot decode correctly what was encoded: - - see https://play.golang.org/p/224V_nyhMS - func main() { - fmt.Println("Hello, playground") - v := []interface{}{"hello", 1, true, nil, time.Now()} - s, err := xml.Marshal(v) - fmt.Printf("err: %v, \ns: %s\n", err, s) - var v2 []interface{} - err = xml.Unmarshal(s, &v2) - fmt.Printf("err: %v, \nv2: %v\n", err, v2) - type T struct { - V []interface{} - } - v3 := T{V: v} - s, err = xml.Marshal(v3) - fmt.Printf("err: %v, \ns: %s\n", err, s) - var v4 T - err = xml.Unmarshal(s, &v4) - fmt.Printf("err: %v, \nv4: %v\n", err, v4) - } - Output: - err: , - s: hello1true - err: , - v2: [] - err: , - s: hello1true2009-11-10T23:00:00Z - err: , - v4: {[ ]} -- -*/ - -// ----------- PARSER ------------------- - -type xmlTokenType uint8 - -const ( - _ xmlTokenType = iota << 1 - xmlTokenElemStart - xmlTokenElemEnd - xmlTokenAttrKey - xmlTokenAttrVal - xmlTokenText -) - -type xmlToken struct { - Type xmlTokenType - Value string - Namespace string // blank for AttrVal and Text -} - -type xmlParser struct { - r decReader - toks []xmlToken // list of tokens. - ptr int // ptr into the toks slice - done bool // nothing else to parse. r now returns EOF. -} - -func (x *xmlParser) next() (t *xmlToken) { - // once x.done, or x.ptr == len(x.toks) == 0, then return nil (to signify finish) - if !x.done && len(x.toks) == 0 { - x.nextTag() - } - // parses one element at a time (into possible many tokens) - if x.ptr < len(x.toks) { - t = &(x.toks[x.ptr]) - x.ptr++ - if x.ptr == len(x.toks) { - x.ptr = 0 - x.toks = x.toks[:0] - } - } - return -} - -// nextTag will parses the next element and fill up toks. -// It set done flag if/once EOF is reached. -func (x *xmlParser) nextTag() { - // TODO: implement. -} - -// ----------- ENCODER ------------------- - -type xmlEncDriver struct { - e *Encoder - w encWriter - h *XMLHandle - b [64]byte // scratch - bs []byte // scratch - // s jsonStack - noBuiltInTypes -} - -// ----------- DECODER ------------------- - -type xmlDecDriver struct { - d *Decoder - h *XMLHandle - r decReader // *bytesDecReader decReader - ct valueType // container type. one of unset, array or map. - bstr [8]byte // scratch used for string \UXXX parsing - b [64]byte // scratch - - // wsSkipped bool // whitespace skipped - - // s jsonStack - - noBuiltInTypes -} - -// DecodeNaked will decode into an XMLNode - -// XMLName is a value object representing a namespace-aware NAME -type XMLName struct { - Local string - Space string -} - -// XMLNode represents a "union" of the different types of XML Nodes. -// Only one of fields (Text or *Element) is set. -type XMLNode struct { - Element *Element - Text string -} - -// XMLElement is a value object representing an fully-parsed XML element. -type XMLElement struct { - Name Name - Attrs map[XMLName]string - // Children is a list of child nodes, each being a *XMLElement or string - Children []XMLNode -} - -// ----------- HANDLE ------------------- - -type XMLHandle struct { - BasicHandle - textEncodingType - - DefaultNS string - NS map[string]string // ns URI to key, for encoding - Entities map[string]string // entity representation to string, for encoding. -} - -func (h *XMLHandle) newEncDriver(e *Encoder) encDriver { - return &xmlEncDriver{e: e, w: e.w, h: h} -} - -func (h *XMLHandle) newDecDriver(d *Decoder) decDriver { - // d := xmlDecDriver{r: r.(*bytesDecReader), h: h} - hd := xmlDecDriver{d: d, r: d.r, h: h} - hd.n.bytes = d.b[:] - return &hd -} - -func (h *XMLHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { - return h.SetExt(rt, tag, &extWrapper{bytesExtFailer{}, ext}) -} - -var _ decDriver = (*xmlDecDriver)(nil) -var _ encDriver = (*xmlEncDriver)(nil) diff --git a/vendor/github.com/zealic/xignore/.travis.yml b/vendor/github.com/zealic/xignore/.travis.yml new file mode 100644 index 00000000..7b98c207 --- /dev/null +++ b/vendor/github.com/zealic/xignore/.travis.yml @@ -0,0 +1,9 @@ +sudo: false +language: go +go: + - 1.11 +env: + - GO111MODULE=on + +script: + - make test diff --git a/vendor/github.com/zealic/xignore/Makefile b/vendor/github.com/zealic/xignore/Makefile new file mode 100644 index 00000000..bf180959 --- /dev/null +++ b/vendor/github.com/zealic/xignore/Makefile @@ -0,0 +1,5 @@ +test: ensure + @go test ./... + +ensure: + @go mod download diff --git a/vendor/github.com/zealic/xignore/README.md b/vendor/github.com/zealic/xignore/README.md new file mode 100644 index 00000000..ee43e7cb --- /dev/null +++ b/vendor/github.com/zealic/xignore/README.md @@ -0,0 +1,48 @@ +[![Build Status][travis-image]][travis-url] +[![GoDoc][godoc-image]][godoc-url] +[![GitHub release][release-image]][release-url] + +# xignore + +A golang package for pattern matching of file paths. Like gitignore, dockerignore chefignore. + + +## Requirements + +* Golang ≥ 1.11 + + +## Use + +```golang +result := xignore.DirMatches("/workspace/my_project", &MatchesOptions{ + Ignorefile: ".gitignore", + Nested: true, // Handle nested ignorefile +}) + +// ignorefile rules matched files +fmt.Printf("%#v\n", result.MatchedFiles) +// ignorefile rules unmatched files +fmt.Printf("%#v\n", result.UnmatchedFiles) +// ignorefile rules matched dirs +fmt.Printf("%#v\n", result.MatchedDirs) +// ignorefile rules unmatched dirs +fmt.Printf("%#v\n", result.UnmatchedDirs) +``` + + +## LICENSE +[MIT](https://github.com/zealic/xignore/blob/master/LICENSE.txt) + + +## Reference + +* https://git-scm.com/docs/gitignore +* https://github.com/moby/moby/blob/master/pkg/fileutils/fileutils.go + +[travis-image]: https://travis-ci.org/zealic/xignore.svg +[travis-url]: https://travis-ci.org/zealic/xignore +[godoc-image]: https://godoc.org/github.com/zealic/xignore?status.svg +[godoc-url]: https://godoc.org/github.com/zealic/xignore +[release-image]: https://img.shields.io/github/release/zealic/xignore.svg +[release-url]: https://github.com/zealic/go2node/releases/xignore diff --git a/vendor/github.com/zealic/xignore/go.mod b/vendor/github.com/zealic/xignore/go.mod new file mode 100644 index 00000000..8c81c6d4 --- /dev/null +++ b/vendor/github.com/zealic/xignore/go.mod @@ -0,0 +1,6 @@ +module github.com/zealic/xignore + +require ( + github.com/spf13/afero v1.2.0 + github.com/stretchr/testify v1.3.0 +) diff --git a/vendor/github.com/zealic/xignore/go.sum b/vendor/github.com/zealic/xignore/go.sum new file mode 100644 index 00000000..c56c1ff6 --- /dev/null +++ b/vendor/github.com/zealic/xignore/go.sum @@ -0,0 +1,11 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/spf13/afero v1.2.0 h1:O9FblXGxoTc51M+cqr74Bm2Tmt4PvkA5iu/j8HrkNuY= +github.com/spf13/afero v1.2.0/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -- cgit v1.2.3